flexirest 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04507c65528dc2baef055f9197b1f12edd3492e4
4
- data.tar.gz: f32284067eabbb3b79e4e010351f8787de76dbcf
3
+ metadata.gz: 3c9f803c00338b0144951500a49edc9d442f37b9
4
+ data.tar.gz: cc67b490693f4411158a8128072474cee491da45
5
5
  SHA512:
6
- metadata.gz: 1c1981bf74912034111120ad4054d87d1e18ee0be4725af68ca29e13e03cd80ec88423682ca2ad6d239e2a770ed92fd400a262ae463d0aaf2057211bd6883228
7
- data.tar.gz: 66c1e257611da681ef0d99e8d3c80995591922a3c1aec4b1517144540e3b68d0c8764036aeef80057139a610c87e3612b5739bbfe410b57559402313babe184e
6
+ metadata.gz: 8ead7a0e3d8e497cf13273d1a0a5d04146103b95fec7009c2a08a56ddb2509cb61273efeca08780026b0432fc74f6b30da54673b010e95969269c63ba66570f5
7
+ data.tar.gz: 64976c161dfb5a58ae2d18a5e158b4f3ad945efcdff966a4642c49d69a2478834ccad585e8aa23e2f48a3afb81fd1ff38d09a86b7369dbc61b8b61a0aca204e9
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.5
4
+
5
+ Bugfixes:
6
+
7
+ - Fixes case when "Rails" exists but doesn't declare a ".cache" method
8
+
3
9
  ## 1.2.4 / 1.2.3
4
10
 
5
11
  Bugfixes:
@@ -30,7 +30,7 @@ module Flexirest
30
30
 
31
31
  def cache_store
32
32
  rails_cache_store = if Object.const_defined?(:Rails)
33
- ::Rails.cache
33
+ ::Rails.try(:cache)
34
34
  else
35
35
  nil
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module Flexirest
2
- VERSION = "1.2.4"
2
+ VERSION = "1.2.5"
3
3
  end
@@ -46,7 +46,15 @@ describe Flexirest::Caching do
46
46
  ensure
47
47
  Object.send(:remove_const, :Rails) if defined?(Rails)
48
48
  end
49
+ end
49
50
 
51
+ it "should not error if Rails.cache is not found" do
52
+ begin
53
+ class Rails; end
54
+ expect { ActiveRestClient::Base.cache_store }.not_to raise_error
55
+ ensure
56
+ Object.send(:remove_const, :Rails) if defined?(Rails)
57
+ end
50
58
  end
51
59
 
52
60
  it "should use a custom cache store if a valid one is manually set" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexirest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-25 00:00:00.000000000 Z
11
+ date: 2015-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler