prismic.io 1.3.1 → 1.3.2

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: d224afd3ee32524169fdee262f95d3f2893749af
4
- data.tar.gz: 2c3d874f6c67bff9022a9cf789d3b832c72cd786
3
+ metadata.gz: 7dd72a8b4157559e09dbf03af67e175b4303ade4
4
+ data.tar.gz: 786099f491183c9e30bbd1e97be367eedfa749f9
5
5
  SHA512:
6
- metadata.gz: cfcd6341947039e5e6999fa8bfcd360d6d57c6384dee9eed32440913a20e29325cb9e988555760310eaaad8021089643db0e064cef543db422ead2d4c1b30c9d
7
- data.tar.gz: 6cde1dedf707faaf56c737e3169f4b420f3698f210585dec7b33a1cb004bf9ce92687f77e9777abe2e1d0af4ba24cdaf6c5a522acf08276d52016d565e2b2071
6
+ metadata.gz: 490bbc66b6bec4ea28fb162d0ece6619f4df5f4d34a3951648a32958fe3454fe9186bc372e5f61a51563e8d31fcfe0d62f11a4ce601578fe9cb702c150fc49dc
7
+ data.tar.gz: 4c40eb9188b71fa644f8774aef858e6494207e6fa97df04d303079ba9f70da4a9dbe66d4df33b58fb7d554519ecf134cd0ff6e2c1a9fd77d71df35c766eddc42
data/.travis.yml CHANGED
@@ -5,13 +5,20 @@ rvm:
5
5
  - 2.0.0
6
6
  - 1.9.3
7
7
  - jruby-19mode
8
+
9
+ sudo: false
10
+ cache: bundler
11
+
8
12
  script: bundle exec rspec spec
13
+
9
14
  notifications:
10
15
  email:
11
16
  - evo@zenexity.com
17
+
12
18
  addons:
13
19
  code_climate:
14
20
  repo_token: f46a7e216896abddbc4877ce065239e8ac9f575af7a120bdaa61a42be70777e9
21
+
15
22
  deploy:
16
23
  provider: rubygems
17
24
  api_key:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prismic.io (1.3.1)
4
+ prismic.io (1.3.2)
5
5
  hashery (~> 2.1.1)
6
6
 
7
7
  GEM
data/lib/prismic/api.rb CHANGED
@@ -139,10 +139,10 @@ module Prismic
139
139
  def self.start(url, opts={})
140
140
  http_client = opts[:http_client] || Prismic::DefaultHTTPClient
141
141
  access_token = opts[:access_token]
142
- cache = opts[:cache]
143
- api_cache = opts[:api_cache]
144
- api_cache = Prismic::DefaultCache unless api_cache
145
- cache ||= Prismic::DefaultCache unless !cache
142
+ # We don't use ||= because we want to keep the DefaultCache if nil was explicitly passed
143
+ api_cache = opts.has_key?(:api_cache) ? opts[:api_cache] : Prismic::DefaultCache
144
+ cache = opts.has_key?(:cache) ? opts[:cache] : Prismic::DefaultCache
145
+
146
146
  resp = get(url, access_token, http_client, api_cache)
147
147
  json = JSON.load(resp.body)
148
148
  parse_api_response(json, access_token, http_client, cache)
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Prismic
3
3
 
4
- VERSION = '1.3.1'
4
+ VERSION = '1.3.2'
5
5
 
6
6
  end
data/spec/cache_spec.rb CHANGED
@@ -16,7 +16,7 @@ describe "Cache's" do
16
16
  end
17
17
 
18
18
  it "is properly off" do
19
- api = Prismic.api("https://lesbonneschoses.prismic.io/api", cache: false)
19
+ api = Prismic.api("https://lesbonneschoses.prismic.io/api", cache: nil)
20
20
  api.has_cache?.should == false
21
21
  end
22
22
 
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.3.1
4
+ version: 1.3.2
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: 2015-07-10 00:00:00.000000000 Z
14
+ date: 2015-07-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler