Skip to content

Commit 92b4bcd

Browse files
authored
Merge pull request #89 from petrokarpiuk/fix-dot-notation
Fix - use dot notation to access config properties
2 parents 0379873 + 4c2799e commit 92b4bcd

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,22 +422,22 @@ For convenience we includes a basic view:
422422
<div class="container">
423423
<div class="container-pins">
424424
@foreach ($activities as $activity)
425-
@include('stream-laravel::render_activity', ['activity' => $activity])
425+
@include('stream-laravel.render_activity', ['activity' => $activity])
426426
@endforeach
427427
</div>
428428
</div>
429429
@stop
430430
```
431431

432-
The ```stream-laravel::render_activity``` view tag will render the view activity.$activity["verb"] view with the activity as context.
432+
The ```stream-laravel.render_activity``` view tag will render the view activity.$activity["verb"] view with the activity as context.
433433

434434
For example activity/tweet.blade.php will be used to render an normal activity with verb tweet and aggregated_activity/like.blade.php for an aggregated activity with verb like
435435

436436
If you need to support different kind of templates for the same activity, you can send a third parameter to change the view selection.
437437

438438
The example below will use the view activity/homepage_like.html
439439
```
440-
@include('stream-laravel::render_activity', ['activity' => $activity, 'prefix' => 'homepage'])
440+
@include('stream-laravel.render_activity', ['activity' => $activity, 'prefix' => 'homepage'])
441441
```
442442

443443

src/GetStream/StreamLaravel/StreamLaravelManager.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ public function __construct($api_key, $api_secret, $config)
3838
$this->client = Client::herokuConnect(getenv('STREAM_URL'));
3939
} else {
4040
$this->client = new Client($api_key, $api_secret);
41-
$location = $this->config->get("stream-laravel::location");
41+
$location = $this->config->get("stream-laravel.location");
4242
$this->client->setLocation($location);
43-
$this->client->timeout = $this->config->get("stream-laravel::timeout", 3);
43+
$this->client->timeout = $this->config->get("stream-laravel.timeout", 3);
4444
}
45-
$this->userFeed = $this->config->get("stream-laravel::user_feed");
45+
$this->userFeed = $this->config->get("stream-laravel.user_feed");
4646
}
4747

4848
/**
@@ -62,7 +62,7 @@ public function getUserFeed($user_id)
6262
*/
6363
public function getNotificationFeed($user_id)
6464
{
65-
$user_feed = $this->config->get("stream-laravel::notification_feed");
65+
$user_feed = $this->config->get("stream-laravel.notification_feed");
6666
return $this->client->feed($user_feed, $user_id);
6767
}
6868

@@ -74,7 +74,7 @@ public function getNotificationFeed($user_id)
7474
public function getNewsFeeds($user_id)
7575
{
7676
$feeds = [];
77-
$news_feeds = $this->config->get("stream-laravel::news_feeds");
77+
$news_feeds = $this->config->get("stream-laravel.news_feeds");
7878
foreach ($news_feeds as $feed) {
7979
$feeds[$feed] = $this->client->feed($feed, $user_id);
8080
}

tests/ManagerTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ public function setUp()
99
{
1010
parent::setUp();
1111
$config = m::mock('ConfigMock');
12-
$config->shouldReceive('get')->once()->with('stream-laravel::user_feed')
12+
$config->shouldReceive('get')->once()->with('stream-laravel.user_feed')
1313
->andReturn('user');
14-
$config->shouldReceive('get')->once()->with('stream-laravel::notification_feed')
14+
$config->shouldReceive('get')->once()->with('stream-laravel.notification_feed')
1515
->andReturn('notification');
16-
$config->shouldReceive('get')->once()->with('stream-laravel::location')
16+
$config->shouldReceive('get')->once()->with('stream-laravel.location')
1717
->andReturn('');
18-
$config->shouldReceive('get')->once()->with('stream-laravel::news_feeds')
18+
$config->shouldReceive('get')->once()->with('stream-laravel.news_feeds')
1919
->andReturn(array('flat'=>'flat', 'aggregated'=>'aggregated'));
20-
$config->shouldReceive('get')->once()->with('stream-laravel::timeout', 3)
20+
$config->shouldReceive('get')->once()->with('stream-laravel.timeout', 3)
2121
->andReturn(3);
2222
$this->manager = new StreamLaravelManager('key', 'secret', $config);
2323
}
@@ -32,15 +32,15 @@ public function testCustomTimeout()
3232
{
3333
parent::setUp();
3434
$config = m::mock('ConfigMock');
35-
$config->shouldReceive('get')->once()->with('stream-laravel::user_feed')
35+
$config->shouldReceive('get')->once()->with('stream-laravel.user_feed')
3636
->andReturn('user');
37-
$config->shouldReceive('get')->once()->with('stream-laravel::notification_feed')
37+
$config->shouldReceive('get')->once()->with('stream-laravel.notification_feed')
3838
->andReturn('notification');
39-
$config->shouldReceive('get')->once()->with('stream-laravel::location')
39+
$config->shouldReceive('get')->once()->with('stream-laravel.location')
4040
->andReturn('');
41-
$config->shouldReceive('get')->once()->with('stream-laravel::news_feeds')
41+
$config->shouldReceive('get')->once()->with('stream-laravel.news_feeds')
4242
->andReturn(array('flat'=>'flat', 'aggregated'=>'aggregated'));
43-
$config->shouldReceive('get')->once()->with('stream-laravel::timeout', 3)
43+
$config->shouldReceive('get')->once()->with('stream-laravel.timeout', 3)
4444
->andReturn(6);
4545
$manager = new StreamLaravelManager('key', 'secret', $config);
4646

0 commit comments

Comments
 (0)