Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Simple pie upgrade (#17)
Browse files Browse the repository at this point in the history
* Updating the dependencies

* Reconfiguring folders

* Updating service provider

* Misc fixes

* Updating documentation

* Removing the minimum stability

* Updating the PHP dependencies in the travis-ci configuration
  • Loading branch information
awjudd authored Jun 18, 2016
1 parent edb0c61 commit 2f3ac81
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 119 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- 5.4
- 5.5
- 5.6

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A simple RSS feed reader for **Laravel 5**
In the `require` key of `composer.json` file add the following:

```
"awjudd/feed-reader": "1.2.*"
"awjudd/feed-reader": "1.3.*"
```

Run the Composer update command
Expand All @@ -39,7 +39,7 @@ In your `config/app.php` add `'Awjudd\FeedReader\FeedReaderServiceProvider'` to
'App' => 'Illuminate\Support\Facades\App',
'Artisan' => 'Illuminate\Support\Facades\Artisan',
...
'FeedReader' => 'Awjudd\FeedReader\Facades\FeedReader',
'FeedReader' => 'Awjudd\FeedReader\Facades',
),
```

Expand All @@ -50,12 +50,12 @@ In your `config/app.php` add `'Awjudd\FeedReader\FeedReaderServiceProvider'` to
After installing through composer, you should publish the config file. To do this, run the following command:

```
$ php artisan config:publish awjudd/feed-reader
$ php artisan vendor:publish
```

### Configuration Values

Once published, the configuration file contains an array of profiles. These will define how the RSS feed reader will react. By default the "default" profile will used. For more information on: [here]http://simplepie.org/wiki/reference/simplepie/start.
Once published, the configuration file contains an array of profiles. These will define how the RSS feed reader will react. By default the "default" profile will used. For more information on: [here](http://simplepie.org/wiki/reference/simplepie/start).

### How to use

Expand Down
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
}
],
"require": {
"php": ">=5.4.0",
"php": ">=5.5.9",
"illuminate/support": "~5",
"simplepie/simplepie": "dev-master"
"simplepie/simplepie": "~1.4"
},
"autoload": {
"psr-0": {
"Awjudd\\FeedReader": "src/"
"psr-4": {
"Awjudd\\FeedReader\\": "src/"
}
},
"minimum-stability": "dev"
}
}
File renamed without changes.
17 changes: 0 additions & 17 deletions src/Awjudd/FeedReader/Facades/FeedReader.php

This file was deleted.

90 changes: 0 additions & 90 deletions src/Awjudd/FeedReader/FeedReaderServiceProvider.php

This file was deleted.

14 changes: 14 additions & 0 deletions src/Facade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Awjudd\FeedReader;

class Facade extends \Illuminate\Support\Facades\Facade
{
/**
* {@inheritdoc}
*/
protected static function getFacadeAccessor()
{
return 'rss-feed-reader';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ private function setup_cache_directory($configuration)
*/
private function read_config($configuration, $name, $default)
{
return Config::get('feed-reader::config.profiles.' . $configuration . '.' . $name, $default);
return Config::get('rss-feed-reader.profiles.' . $configuration . '.' . $name, $default);
}
}
41 changes: 41 additions & 0 deletions src/FeedReaderServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace Awjudd\FeedReader;

use Illuminate\Support\ServiceProvider;

class FeedReaderServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application events.
*/
public function boot()
{
$this->handleConfigs();
$this->setupProcessor();
}

/**
* Register the service provider.
*/
public function register()
{
$this->app->singleton('rss-feed-reader', FeedReader::class);
}

/**
* Register the configuration.
*/
private function handleConfigs()
{
$configPath = __DIR__.'/../config/rss-feed-reader.php';
$this->publishes([$configPath => config_path('rss-feed-reader.php')]);
$this->mergeConfigFrom($configPath, 'rss-feed-reader');
}

private function setupProcessor()
{
$this->app->singleton(FeedReader::class);
}

}

0 comments on commit 2f3ac81

Please sign in to comment.