buttercms-ruby 1.5 → 1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/buttercms/butter_collection.rb +2 -1
- data/lib/buttercms/version.rb +2 -2
- data/spec/lib/buttercms/butter_collection_spec.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33b36093743686ac542292da5bbf4c0c1c7ade36e9d09c57d72161f8094a722b
|
4
|
+
data.tar.gz: d75f6c5f94c7882c8aa105f10d267e78a31f98e660bdc6900827536da4891ce4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da1631dd94328b6c62786002de75bb33de70d4e584bb2f1bd0fb5481847a587a4113cc85d3d19fd69e8ef8a00be25b016c205e4a656c822ffca12140ede8ac34
|
7
|
+
data.tar.gz: 8c900e9cc1cfef9eb187e2e5b6b0d1cee3e2dada2ef6c3ba3eff52fb429e07d77660cc29d2ea8a70fdecccc902abcf150b4177c1abf4dfe096a04c52f38840f0
|
data/README.md
CHANGED
@@ -34,7 +34,7 @@ https://buttercms.com/docs/api/?ruby#pages
|
|
34
34
|
|
35
35
|
|
36
36
|
```ruby
|
37
|
-
params = {page: 1, page_size: 10, locale: 'en', preview: 1, fields.headline: 'foo bar', levels: 2} # optional
|
37
|
+
params = {page: 1, page_size: 10, locale: 'en', preview: 1, 'fields.headline': 'foo bar', levels: 2} # optional
|
38
38
|
pages = ButterCMS::Page.list('news', params)
|
39
39
|
page = ButterCMS::Page.get('news', 'hello-world', params)
|
40
40
|
```
|
@@ -45,7 +45,7 @@ https://buttercms.com/docs/api/?ruby#retrieve-a-collection
|
|
45
45
|
|
46
46
|
```ruby
|
47
47
|
# list each instance of a given collection with meta data for fetching the next page.
|
48
|
-
params = { page: 1, page_size: 10, locale: 'en', preview: 1, fields.headline: 'foo bar', levels: 2 } # optional
|
48
|
+
params = { page: 1, page_size: 10, locale: 'en', preview: 1, 'fields.headline': 'foo bar', levels: 2 } # optional
|
49
49
|
ButterCMS::Content.list('collection1', params)
|
50
50
|
|
51
51
|
# list instances for multiple collections, this will not return meta data for pagination control.
|
data/lib/buttercms/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module ButterCMS
|
2
|
-
VERSION = '1.
|
3
|
-
end
|
2
|
+
VERSION = '1.6'
|
3
|
+
end
|
@@ -4,6 +4,12 @@ describe ButterCMS::ButterCollection do
|
|
4
4
|
let(:json) { {"data" => ["foo"], "meta" => {}} }
|
5
5
|
let(:klass) { double('klass', :new => 'bar') }
|
6
6
|
|
7
|
+
it 'implements #items' do
|
8
|
+
collection = ButterCMS::ButterCollection.new(klass, json)
|
9
|
+
|
10
|
+
expect(collection.items).to match_array(["bar"])
|
11
|
+
end
|
12
|
+
|
7
13
|
it 'implements #meta' do
|
8
14
|
collection = ButterCMS::ButterCollection.new(klass, json)
|
9
15
|
|
@@ -15,4 +21,4 @@ describe ButterCMS::ButterCollection do
|
|
15
21
|
|
16
22
|
expect(collection.count).to eq 1
|
17
23
|
end
|
18
|
-
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buttercms-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ButterCMS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|