cached_resource 5.0.0 → 5.0.1

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: 2afcc694c9c8dbe55afacbf55e921b1c4ec51355
4
- data.tar.gz: dd4ede0e4ed5106e4cf63478b32704f4353b660b
3
+ metadata.gz: c76de5ea977a9387d2c796a1935aa80aa33cc559
4
+ data.tar.gz: 747fb41b327ea8117ff01cce745f9ee0b0d4e468
5
5
  SHA512:
6
- metadata.gz: 31c69e1b927ade3909af93adb83aa4afa5c0a1aafeead453da29b19a08131a78cbb1bc447bf3dcac256413f22ee20b8c2e23ee59e08f866a4998fb92b67b89c9
7
- data.tar.gz: 22e9439b077f55f8b24517b1a1b094be8673eb3a88e89cfb4cee81e32e14a64d65b9e255471bbc25b5d08356457a6befff6a7cb935921b8a240f043fe18ae6f4
6
+ metadata.gz: 8068e71dc7aefadec576363763c94499d7fe88d7fd75f37480db7453ca72fae889716ae897e86905040a25c26b4a206e89e0d2948dbf4618a4f367cdb45f51a4
7
+ data.tar.gz: 37efb08196caa091b6d8cb1f56e0134f6d5c4b5662135d1fce5c000a1d61c85fbb234fb8793050c7e8ddbd794cdee34bb2b415007ac50cbf2d9165f8c5003b3c
@@ -1,11 +1,10 @@
1
1
  PATH
2
- remote: ..
2
+ remote: ../
3
3
  specs:
4
- cached_resource (4.2.0)
5
- activeresource (>= 3.2)
6
- activesupport (>= 3.2)
4
+ cached_resource (5.0.0)
5
+ activeresource (>= 4.0)
6
+ activesupport (>= 4.0)
7
7
  nilio (>= 1.0)
8
- rake
9
8
 
10
9
  GEM
11
10
  remote: http://rubygems.org/
@@ -134,6 +133,7 @@ DEPENDENCIES
134
133
  appraisal
135
134
  cached_resource!
136
135
  rails (~> 4.2.0)
136
+ rake
137
137
  rspec
138
138
 
139
139
  BUNDLED WITH
@@ -1,11 +1,10 @@
1
1
  PATH
2
- remote: ..
2
+ remote: ../
3
3
  specs:
4
- cached_resource (4.2.0)
5
- activeresource (>= 3.2)
6
- activesupport (>= 3.2)
4
+ cached_resource (5.0.0)
5
+ activeresource (>= 4.0)
6
+ activesupport (>= 4.0)
7
7
  nilio (>= 1.0)
8
- rake
9
8
 
10
9
  GEM
11
10
  remote: http://rubygems.org/
@@ -144,6 +143,7 @@ DEPENDENCIES
144
143
  appraisal
145
144
  cached_resource!
146
145
  rails (~> 5.0.0)
146
+ rake
147
147
  rspec
148
148
 
149
149
  BUNDLED WITH
@@ -1,11 +1,10 @@
1
1
  PATH
2
- remote: ..
2
+ remote: ../
3
3
  specs:
4
- cached_resource (4.2.0)
5
- activeresource (>= 3.2)
6
- activesupport (>= 3.2)
4
+ cached_resource (5.0.0)
5
+ activeresource (>= 4.0)
6
+ activesupport (>= 4.0)
7
7
  nilio (>= 1.0)
8
- rake
9
8
 
10
9
  GEM
11
10
  remote: http://rubygems.org/
@@ -144,6 +143,7 @@ DEPENDENCIES
144
143
  appraisal
145
144
  cached_resource!
146
145
  rails (~> 5.1.0)
146
+ rake
147
147
  rspec
148
148
 
149
149
  BUNDLED WITH
@@ -31,8 +31,8 @@ module CachedResource
31
31
  # self.cached_resource = CachedResource::Configuration.new(options={})
32
32
  def inherited(child)
33
33
  child.cached_resource = self.cached_resource if defined?(@cached_resource)
34
+ super
34
35
  end
35
36
  end
36
-
37
37
  end
38
- end
38
+ end
@@ -1,3 +1,3 @@
1
1
  module CachedResource
2
- VERSION = "5.0.0"
2
+ VERSION = "5.0.1"
3
3
  end
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe CachedResource do
4
+ before do
5
+ class BaseThing < ActiveResource::Base
6
+ end
7
+
8
+ class FirstChildThing < BaseThing
9
+ self.site = 'http://api.first-child-thing.com'
10
+ cached_resource
11
+ end
12
+
13
+ class SecondChildThing < BaseThing
14
+ self.site = 'http://api.second-child-thing.com'
15
+ end
16
+ end
17
+
18
+ after do
19
+ [:BaseThing, :FirstChildThing, :SecondChildThing].each do |klass|
20
+ Object.send(:remove_const, klass)
21
+ end
22
+ end
23
+
24
+ describe '.inherited' do
25
+ it 'should include descendants when calling .descendants' do
26
+ BaseThing.descendants.sort_by { |klass| klass.name }.should == [FirstChildThing, SecondChildThing]
27
+ end
28
+ end
29
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cached_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morgan Brown
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-01 00:00:00.000000000 Z
11
+ date: 2017-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -120,6 +120,7 @@ files:
120
120
  - lib/cached_resource/caching.rb
121
121
  - lib/cached_resource/configuration.rb
122
122
  - lib/cached_resource/version.rb
123
+ - spec/cached_resource/cached_resource_spec.rb
123
124
  - spec/cached_resource/caching_spec.rb
124
125
  - spec/cached_resource/configuration_spec.rb
125
126
  - spec/spec_helper.rb
@@ -148,6 +149,7 @@ signing_key:
148
149
  specification_version: 4
149
150
  summary: Caching for ActiveResource
150
151
  test_files:
152
+ - spec/cached_resource/cached_resource_spec.rb
151
153
  - spec/cached_resource/caching_spec.rb
152
154
  - spec/cached_resource/configuration_spec.rb
153
155
  - spec/spec_helper.rb