buttercms-ruby 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/VERSION +1 -1
- data/lib/buttercms-ruby.rb +0 -1
- data/lib/buttercms/content.rb +4 -2
- data/lib/buttercms/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd0cec560c6a8cbc301cb66c4c7c7ce08dd7fbc5
|
4
|
+
data.tar.gz: c338d395d4ca2f4e7dfaa0ba2d64f7aab01f2571
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6337314aac5222e1e5c34b1aa4559c53b2bfd63ac59c91e332a39e8d0b7174824a4f790369e1a54a7e198ec373463c177c9028e2f165437c307bf9f606b40eb0
|
7
|
+
data.tar.gz: f697193937a8942f1487e0c374869cf610959521912c62bb492c046c5720212a5cb080fd1fcbb717670d3498499255cdec81dcaf2225b668be8a0840c1d6be75
|
data/README.md
CHANGED
@@ -57,6 +57,14 @@ content = ButterCMS::Content.fetch([
|
|
57
57
|
])
|
58
58
|
```
|
59
59
|
|
60
|
+
## Localization
|
61
|
+
|
62
|
+
Setup locales in the ButterCMS dashboard and fetch localized content using the `locale` option:
|
63
|
+
|
64
|
+
```ruby
|
65
|
+
ButterCMS::Content.fetch(['landing_pages'], locale: :es)
|
66
|
+
```
|
67
|
+
|
60
68
|
## Fallback Data Store
|
61
69
|
|
62
70
|
This client supports automatic fallback to a data store when API requests fail. When a data store is set, on every successful API request the response is written to the data store. When a subsequent API request fails, the client attempts to fallback to the value in the data store. Currently, Redis and YAML Store are supported.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
data/lib/buttercms-ruby.rb
CHANGED
data/lib/buttercms/content.rb
CHANGED
@@ -12,8 +12,10 @@ module ButterCMS
|
|
12
12
|
"#<#{self.class}:0x#{self.object_id.to_s(16)}#{id_string}> JSON: " + JSON.pretty_generate(@json)
|
13
13
|
end
|
14
14
|
|
15
|
-
def self.fetch(keys = [])
|
16
|
-
|
15
|
+
def self.fetch(keys = [], options = {})
|
16
|
+
params = {keys: keys.join(',')}.merge(options)
|
17
|
+
|
18
|
+
response = ButterCMS.request("/content", params)
|
17
19
|
|
18
20
|
self.new(response)
|
19
21
|
end
|
data/lib/buttercms/version.rb
CHANGED
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.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ButterCMS
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
version: '0'
|
135
135
|
requirements: []
|
136
136
|
rubyforge_project:
|
137
|
-
rubygems_version: 2.
|
137
|
+
rubygems_version: 2.4.5.1
|
138
138
|
signing_key:
|
139
139
|
specification_version: 4
|
140
140
|
summary: A simple Ruby client for the buttercms.com REST API
|