cortex-client 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cortex/posts.rb +6 -2
- data/lib/cortex/version.rb +1 -1
- data/spec/posts_spec.rb +13 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d4a7029a68781747888bb6898fb8c492ca01689
|
4
|
+
data.tar.gz: ed321e8718b45133e3e2ea0547b630f9f15bad08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f49c24080ffd139603628769558ac0690301017204749441735c99b38c4b757914edd2b8ffa98d85ac6df2925dd65e058e117546fa111b6dd768b74ff7788518
|
7
|
+
data.tar.gz: 9937c642d87e1cd06e3bd98ad1e348abca4a4681d8055969ef4cf1ca959c635b81c255fa6e9aca579c70268e443ad8c416b581a97f298c6134f5f93c38fe690c
|
data/lib/cortex/posts.rb
CHANGED
@@ -4,8 +4,8 @@ module Cortex
|
|
4
4
|
client.get('/posts')
|
5
5
|
end
|
6
6
|
|
7
|
-
def feed
|
8
|
-
client.get('/posts/feed')
|
7
|
+
def feed(params = nil)
|
8
|
+
client.get('/posts/feed', params)
|
9
9
|
end
|
10
10
|
|
11
11
|
def get(id)
|
@@ -19,5 +19,9 @@ module Cortex
|
|
19
19
|
def delete(id)
|
20
20
|
client.delete("/posts/#{id}")
|
21
21
|
end
|
22
|
+
|
23
|
+
def filters
|
24
|
+
client.get('/posts/filters')
|
25
|
+
end
|
22
26
|
end
|
23
27
|
end
|
data/lib/cortex/version.rb
CHANGED
data/spec/posts_spec.rb
CHANGED
@@ -13,9 +13,14 @@ describe Cortex::Posts do
|
|
13
13
|
|
14
14
|
describe :feed do
|
15
15
|
it 'should correctly make the request' do
|
16
|
-
client.should_receive(:get).with('/posts/feed').and_return('response')
|
16
|
+
client.should_receive(:get).with('/posts/feed', nil).and_return('response')
|
17
17
|
client.posts.feed().should == 'response'
|
18
18
|
end
|
19
|
+
|
20
|
+
it 'should accept parameters and send them with the request' do
|
21
|
+
client.should_receive(:get).with('/posts/feed', {q: "Test*"}).and_return('success')
|
22
|
+
client.posts.feed(q: 'Test*').should == 'success'
|
23
|
+
end
|
19
24
|
end
|
20
25
|
|
21
26
|
describe :save do
|
@@ -35,4 +40,11 @@ describe Cortex::Posts do
|
|
35
40
|
end
|
36
41
|
end
|
37
42
|
end
|
43
|
+
|
44
|
+
describe :filters do
|
45
|
+
it 'should correctly make the request' do
|
46
|
+
client.should_receive(:get).with('/posts/filters').and_return('success')
|
47
|
+
client.posts.filters().should == 'success'
|
48
|
+
end
|
49
|
+
end
|
38
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cortex-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bennett Goble
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|