prismic.io 1.6.1 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +8 -8
- data/Gemfile.lock +5 -2
- data/lib/prismic/fragments.rb +1 -0
- data/lib/prismic/fragments/integration_field.rb +19 -0
- data/lib/prismic/json_parsers.rb +9 -4
- data/lib/prismic/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e41dc7a4fb85a94a4ac56034a5565b068af27b5a8ac4e15fc4b77f7ca52b025e
|
4
|
+
data.tar.gz: ee57f1d28b9050b0adb564de62b81149f6178cd38dca1e0bc4d07864b8765604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27ed02ec87bd731bec6a2df07eaf010013a23c3b971743dab0fc395113c23bfde6fca4858899e1c1027ceeec01938aa1a87dc6ae0de1b4a1d76e7c3c221af132
|
7
|
+
data.tar.gz: 33e9de0fc144c00fd0851dbe8780fcc1487106480cab49458848eba6e5218026b0eec882995f68150a1600d83d30940927a76e79900387253eaf9d6f3df8ba20
|
data/.travis.yml
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
-
|
4
|
-
- 2.3
|
5
|
-
- 2.
|
6
|
-
- 2.
|
7
|
-
-
|
8
|
-
-
|
9
|
-
- 1.
|
10
|
-
- jruby-19mode
|
3
|
+
- ruby-head
|
4
|
+
- 2.6.3
|
5
|
+
- 2.5.5
|
6
|
+
- 2.4.6
|
7
|
+
- jruby-head
|
8
|
+
- jruby-9.1.9.0
|
9
|
+
- jruby-1.7.26
|
11
10
|
|
12
11
|
sudo: false
|
13
12
|
cache: bundler
|
14
13
|
|
14
|
+
before_install: gem install bundler:1.16.0
|
15
15
|
script: bundle exec rspec spec
|
16
16
|
|
17
17
|
notifications:
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
prismic.io (1.6.
|
4
|
+
prismic.io (1.6.2)
|
5
5
|
hashery (~> 2.1.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -29,7 +29,7 @@ GEM
|
|
29
29
|
multi_json (~> 1.0)
|
30
30
|
simplecov-html (~> 0.7.1)
|
31
31
|
simplecov-html (0.7.1)
|
32
|
-
yajl-ruby (1.1
|
32
|
+
yajl-ruby (1.3.1)
|
33
33
|
|
34
34
|
PLATFORMS
|
35
35
|
java
|
@@ -44,3 +44,6 @@ DEPENDENCIES
|
|
44
44
|
rspec (~> 2.14)
|
45
45
|
simplecov (~> 0.7)
|
46
46
|
yajl-ruby
|
47
|
+
|
48
|
+
BUNDLED WITH
|
49
|
+
1.16.0
|
data/lib/prismic/fragments.rb
CHANGED
data/lib/prismic/json_parsers.rb
CHANGED
@@ -25,10 +25,15 @@ module Prismic
|
|
25
25
|
'Multiple' => method(:multiple_parser),
|
26
26
|
'Group' => method(:group_parser),
|
27
27
|
'SliceZone' => method(:slices_parser),
|
28
|
-
'Separator' => method(:separator_parser)
|
28
|
+
'Separator' => method(:separator_parser),
|
29
|
+
'IntegrationFields' => method(:integration_fields_parser)
|
29
30
|
}
|
30
31
|
end
|
31
32
|
|
33
|
+
def integration_fields_parser(json)
|
34
|
+
Prismic::Fragments::IntegrationField.new(json['value'])
|
35
|
+
end
|
36
|
+
|
32
37
|
def document_link_parser(json)
|
33
38
|
doc = json['value']['document']
|
34
39
|
type = doc['type']
|
@@ -220,7 +225,7 @@ module Prismic
|
|
220
225
|
|
221
226
|
repeat = group_parser({ 'type' => 'Group', 'value' => data['repeat']})
|
222
227
|
|
223
|
-
slices << Prismic::Fragments::CompositeSlice.new(slice_type, slice_label, non_repeat, repeat)
|
228
|
+
slices << Prismic::Fragments::CompositeSlice.new(slice_type, slice_label, non_repeat, repeat)
|
224
229
|
end
|
225
230
|
end
|
226
231
|
Prismic::Fragments::SliceZone.new(slices)
|
@@ -235,7 +240,7 @@ module Prismic
|
|
235
240
|
end
|
236
241
|
|
237
242
|
def alternate_language_parser(alternate_language)
|
238
|
-
Prismic::AlternateLanguage.new(alternate_language)
|
243
|
+
Prismic::AlternateLanguage.new(alternate_language)
|
239
244
|
end
|
240
245
|
|
241
246
|
def document_parser(json)
|
@@ -253,7 +258,7 @@ module Prismic
|
|
253
258
|
|
254
259
|
alternate_languages = nil
|
255
260
|
if json.key?('alternate_languages')
|
256
|
-
alternate_languages = Hash[json['alternate_languages'].map { |doc|
|
261
|
+
alternate_languages = Hash[json['alternate_languages'].map { |doc|
|
257
262
|
[doc['lang'], alternate_language_parser(doc)]
|
258
263
|
}]
|
259
264
|
end
|
data/lib/prismic/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prismic.io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Étienne Vallette d'Osia
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2019-05-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -194,6 +194,7 @@ files:
|
|
194
194
|
- lib/prismic/fragments/geopoint.rb
|
195
195
|
- lib/prismic/fragments/group.rb
|
196
196
|
- lib/prismic/fragments/image.rb
|
197
|
+
- lib/prismic/fragments/integration_field.rb
|
197
198
|
- lib/prismic/fragments/link.rb
|
198
199
|
- lib/prismic/fragments/multiple.rb
|
199
200
|
- lib/prismic/fragments/number.rb
|
@@ -252,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
253
|
version: '0'
|
253
254
|
requirements: []
|
254
255
|
rubyforge_project:
|
255
|
-
rubygems_version: 2.
|
256
|
+
rubygems_version: 2.7.7
|
256
257
|
signing_key:
|
257
258
|
specification_version: 4
|
258
259
|
summary: Prismic.io development kit
|