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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a6a021f220785431e8cddf55b8bb38d58ca1edd7
4
- data.tar.gz: 7f490a0edd635e5396ded856e919a29a171b9295
2
+ SHA256:
3
+ metadata.gz: e41dc7a4fb85a94a4ac56034a5565b068af27b5a8ac4e15fc4b77f7ca52b025e
4
+ data.tar.gz: ee57f1d28b9050b0adb564de62b81149f6178cd38dca1e0bc4d07864b8765604
5
5
  SHA512:
6
- metadata.gz: 6bcdfac0f87faebe60aa22cc4e876b9349c3c7932b1528c47f41d09d725abc614614058cf4d1c6782a27b701d52fedd795d9f6a0d4cf5d928948fcf13b632001
7
- data.tar.gz: c8926281e90555d6dff1135f5f7ffa6edcf5b98491c97b4e9f7563d9eabf623d10a0e3341055287d512e1ebda820f309a240b4d16dceade47ca8de738b195a3e
6
+ metadata.gz: 27ed02ec87bd731bec6a2df07eaf010013a23c3b971743dab0fc395113c23bfde6fca4858899e1c1027ceeec01938aa1a87dc6ae0de1b4a1d76e7c3c221af132
7
+ data.tar.gz: 33e9de0fc144c00fd0851dbe8780fcc1487106480cab49458848eba6e5218026b0eec882995f68150a1600d83d30940927a76e79900387253eaf9d6f3df8ba20
@@ -1,17 +1,17 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.4.1
4
- - 2.3.4
5
- - 2.2.7
6
- - 2.1.1
7
- - 2.1.0
8
- - 2.0.0
9
- - 1.9.3
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:
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prismic.io (1.6.0)
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.0)
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
@@ -15,3 +15,4 @@ require 'prismic/fragments/text'
15
15
  require 'prismic/fragments/timestamp'
16
16
  require 'prismic/fragments/slices'
17
17
  require 'prismic/fragments/separator'
18
+ require 'prismic/fragments/integration_field'
@@ -0,0 +1,19 @@
1
+ module Prismic
2
+ module Fragments
3
+ class IntegrationField < Fragment
4
+ attr_accessor :value
5
+
6
+ def initialize(value)
7
+ @value = value
8
+ end
9
+
10
+ def as_json
11
+ value.to_json
12
+ end
13
+
14
+ def as_text
15
+ value.to_s
16
+ end
17
+ end
18
+ end
19
+ end
@@ -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
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Prismic
3
3
 
4
- VERSION = '1.6.1'
4
+ VERSION = '1.7.0'
5
5
 
6
6
  end
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.6.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: 2017-11-28 00:00:00.000000000 Z
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.6.12
256
+ rubygems_version: 2.7.7
256
257
  signing_key:
257
258
  specification_version: 4
258
259
  summary: Prismic.io development kit