prismic.io 1.0.7 → 1.0.8

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
2
  SHA1:
3
- metadata.gz: 18f657d9d256a5349ddc73a96de913a1a6bed915
4
- data.tar.gz: fd4d4892962175df4e46be5f8aadd3c2a122c95d
3
+ metadata.gz: c7f2d0b0ba3d6766562edf42e7538f6ea33511a4
4
+ data.tar.gz: a372c1dcdcfd3e4c45309335b6ead48a1e40b390
5
5
  SHA512:
6
- metadata.gz: 1b7c685ea3ca894b8c1b5edf7ae6f42d05db80b0c1ac8981b456acecfb0bb00ac67a19bcf24fd20d4a8685862d60fb3be3376f68ed64d1fca38c5b21263e3a4c
7
- data.tar.gz: 42150c5f18955907c3093266b646291fd991bed395d97bebc5da7951a9576f0cafcc1638da74d99ed948e685ba4c41c31574e30423c41f5dc2c21ce75b44ee12
6
+ metadata.gz: a4405dddff6efff77e345c58fbe95f3487d6ff5654526a2e2c855e89f8198f38792b11f07e2a881404b196b22027177f062377774de7322508323f2a6ff71fa9
7
+ data.tar.gz: e72e6fbd322acfb9d635b1339b24dc265769bb3cafe7d4774359722cbf668612c8a5b5e91688c1958c47fd6593f5a12ef0e97e50b4c517aad3723dd6b300dbd7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prismic.io (1.0.7)
4
+ prismic.io (1.0.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/prismic/api.rb CHANGED
@@ -105,9 +105,10 @@ module Prismic
105
105
  def preview_session(token, link_resolver, default_url)
106
106
  response = self.http_client.get(token, {}, 'Accept' => 'application/json')
107
107
  if response.code.to_s == '200'
108
- documents = self.form('everything').query(Prismic::Predicates.at('document.id', response['mainDocument'])).submit(token)
109
- if documents.results > 0
110
- link_resolver.link_to(response.results[0])
108
+ json = JSON.load(response.body)
109
+ documents = self.form('everything').query(Prismic::Predicates.at('document.id', json['mainDocument'])).submit(token)
110
+ if documents.results.size > 0
111
+ link_resolver.link_to(documents.results[0])
111
112
  else
112
113
  default_url
113
114
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Prismic
3
3
 
4
- VERSION = '1.0.7'
4
+ VERSION = '1.0.8'
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.0.7
4
+ version: 1.0.8
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: 2014-11-13 00:00:00.000000000 Z
14
+ date: 2014-11-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler