Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
samberrry committed Apr 3, 2022
2 parents 41c2b77 + 1a8fdae commit 4842bb2
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 172 deletions.
12 changes: 0 additions & 12 deletions src/Config/binshopsblog.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,6 @@
'basic_answers' => "black,dark", // comma separated list of possible answers. Don't worry about case.
],

////////// RSS FEED

'rssfeed' => [

'should_shorten_text' => true, // boolean. Default: true. Should we shorten the text in rss feed?
'text_limit' => 100, // max length of description text in the rss feed
'posts_to_show_in_rss_feed' => 10, // how many posts should we show in the rss feed
'cache_in_minutes' => 60, // how long (in minutes) to cache the RSS blog feed for.
'description' => "Our blog post RSS feed", //description for the RSS feed
'language' => "en", // see https://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
],

////////// comments:

'comments' => [
Expand Down
94 changes: 0 additions & 94 deletions src/Controllers/BinshopsRssFeedController.php

This file was deleted.

16 changes: 0 additions & 16 deletions src/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,6 @@ public static function pull_flashed_message()
return Session::pull(self::FLASH_MESSAGE_SESSION_KEY);
}

/**
* Use this (Helpers::rss_html_tag()) in your blade/template files, within <head>
* to auto insert the links to rss feed
* @return string
*/
public static function rss_html_tag()
{


return '<link rel="alternate" type="application/atom+xml" title="Atom RSS Feed" href="' . e(route("binshopsblog.feed")) . '?type=atom" />
<link rel="alternate" type="application/rss+xml" title="XML RSS Feed" href="' . e(route("binshopsblog.feed")) . '?type=rss" />
';


}

/**
* This method is depreciated. Just use the config() directly.
* @return array
Expand Down
41 changes: 0 additions & 41 deletions src/Requests/FeedRequest.php

This file was deleted.

5 changes: 1 addition & 4 deletions src/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Route::group(['middleware' => ['web'], 'namespace' => '\BinshopsBlog\Controllers'], function () {

/** The main public facing blog routes - show all posts, view a category, rss feed, view a single post, also the add comment route */
/** The main public facing blog routes - show all posts, view a category, view a single post, also the add comment route */
Route::group(['prefix' => "/{locale}/".config('binshopsblog.blog_prefix', 'blog')], function () {

Route::get('/', 'BinshopsReaderController@index')
Expand All @@ -11,9 +11,6 @@
Route::get('/search', 'BinshopsReaderController@search')
->name('binshopsblog.search');

Route::get('/feed', 'BinshopsRssFeedController@feed')
->name('binshopsblog.feed'); //RSS feed

Route::get('/category{subcategories}', 'BinshopsReaderController@view_category')->where('subcategories', '^[a-zA-Z0-9-_\/]+$')->name('binshopsblog.view_category');

// Route::get('/category/{categorySlug}',
Expand Down
7 changes: 2 additions & 5 deletions tests/MainTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class MainTest extends \Tests\TestCase
/blog/...
binshopsblog.index YES
binshopsblog.feed YES
binshopsblog.view_category no - but this is basically binshopsblog.index
binshopsblog.single YES
binshopsblog.comments.add_new_comment YES - tested multiple times with/without basic captcha on/off/correct/incorrect.
Expand Down Expand Up @@ -270,10 +269,9 @@ public function testCreatePostThenCheckIsViewableToPublic()
$response = $this->get(config("binshopsblog.blog_prefix", "blog"));
$response->assertDontSee($new_object_vals['slug']);

// must clear the cache, as the /feed is cached
// must clear the cache
\Artisan::call('cache:clear');

$response = $this->get(config("binshopsblog.blog_prefix", "blog") . "/feed");
$response->assertDontSee($new_object_vals['slug']);

$response = $this->post($admin_panel_url . "/add_post", $new_object_vals);
Expand All @@ -290,10 +288,9 @@ public function testCreatePostThenCheckIsViewableToPublic()
$response->assertSee($new_object_vals['slug']);


// must clear the cache, as the /feed is cached
// must clear the cache
\Artisan::call('cache:clear');

$response = $this->get(config("binshopsblog.blog_prefix", "blog") . "/feed");
$response->assertSee($new_object_vals['slug']);
$response->assertSee($new_object_vals['title']);

Expand Down

0 comments on commit 4842bb2

Please sign in to comment.