action_controller-parents 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.travis.yml +11 -2
- data/Appraisals +4 -0
- data/action_controller-parents.gemspec +1 -1
- data/gemfiles/activesupport_3.gemfile.lock +5 -2
- data/gemfiles/activesupport_4.2.gemfile.lock +5 -2
- data/gemfiles/activesupport_4.gemfile.lock +5 -2
- data/gemfiles/activesupport_5.0.gemfile +7 -0
- data/gemfiles/activesupport_5.0.gemfile.lock +54 -0
- data/lib/action_controller/parents.rb +1 -1
- data/lib/action_controller/parents/version.rb +1 -1
- data/spec/unit/action_controller-parents_spec.rb +7 -0
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e24c2dcf5344027d938bb815375714b4457120d
|
4
|
+
data.tar.gz: 1f7a6f126d3fc53ec2d6e7ce76c7db5180a85aa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da301a3f90f3af5e1bf4b10756926b9b5ed3478361efdd69811ead6180b15e6a105a78820207929f95f2cc302556f247b81dc8913c3107ed7552f94c3349636d
|
7
|
+
data.tar.gz: 791c0ca18fec6ccab5595ba819a9a687a2ae9fbf76e51858bc1eaf4e2ea3e9980593311fbd67f572c33a24b289f6a036b86d7b558d7c81b75cabca3d3b545b48
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,12 +1,21 @@
|
|
1
1
|
language: ruby
|
2
|
+
cache: bundler
|
2
3
|
sudo: false
|
3
4
|
rvm:
|
4
5
|
- 1.9.3
|
5
|
-
- 2.0.0
|
6
|
-
- 2.1.0
|
7
6
|
- 2.2.0
|
7
|
+
- 2.3.1
|
8
8
|
gemfile:
|
9
9
|
- gemfiles/activesupport_3.gemfile
|
10
10
|
- gemfiles/activesupport_4.gemfile
|
11
11
|
- gemfiles/activesupport_4.2.gemfile
|
12
|
+
- gemfiles/activesupport_5.0.gemfile
|
13
|
+
before_install:
|
14
|
+
- gem install bundler
|
15
|
+
matrix:
|
16
|
+
exclude:
|
17
|
+
- rvm: 1.9.3
|
18
|
+
gemfile: gemfiles/activesupport_5.0.gemfile
|
19
|
+
- rvm: 2.2.0
|
20
|
+
gemfile: gemfiles/activesupport_5.0.gemfile
|
12
21
|
script: "bundle exec rake spec"
|
data/Appraisals
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.8"
|
22
22
|
spec.add_development_dependency "rake"
|
23
23
|
spec.add_development_dependency "rspec"
|
24
|
-
spec.add_development_dependency "appraisal", "2.
|
24
|
+
spec.add_development_dependency "appraisal", "2.1"
|
25
25
|
|
26
26
|
spec.add_dependency "activesupport", ">= 3.0.0"
|
27
27
|
end
|
@@ -8,7 +8,7 @@ GEM
|
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
activesupport (3.0.0)
|
11
|
-
appraisal (2.0
|
11
|
+
appraisal (2.1.0)
|
12
12
|
bundler
|
13
13
|
rake
|
14
14
|
thor (>= 0.14.0)
|
@@ -35,7 +35,10 @@ PLATFORMS
|
|
35
35
|
DEPENDENCIES
|
36
36
|
action_controller-parents!
|
37
37
|
activesupport (= 3.0.0)
|
38
|
-
appraisal (= 2.
|
38
|
+
appraisal (= 2.1)
|
39
39
|
bundler (~> 1.8)
|
40
40
|
rake
|
41
41
|
rspec
|
42
|
+
|
43
|
+
BUNDLED WITH
|
44
|
+
1.12.5
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
minitest (~> 5.1)
|
14
14
|
thread_safe (~> 0.3, >= 0.3.4)
|
15
15
|
tzinfo (~> 1.1)
|
16
|
-
appraisal (2.0
|
16
|
+
appraisal (2.1.0)
|
17
17
|
bundler
|
18
18
|
rake
|
19
19
|
thor (>= 0.14.0)
|
@@ -46,7 +46,10 @@ PLATFORMS
|
|
46
46
|
DEPENDENCIES
|
47
47
|
action_controller-parents!
|
48
48
|
activesupport (= 4.2.0)
|
49
|
-
appraisal (= 2.
|
49
|
+
appraisal (= 2.1)
|
50
50
|
bundler (~> 1.8)
|
51
51
|
rake
|
52
52
|
rspec
|
53
|
+
|
54
|
+
BUNDLED WITH
|
55
|
+
1.12.5
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
multi_json (~> 1.3)
|
14
14
|
thread_safe (~> 0.1)
|
15
15
|
tzinfo (~> 0.3.37)
|
16
|
-
appraisal (2.0
|
16
|
+
appraisal (2.1.0)
|
17
17
|
bundler
|
18
18
|
rake
|
19
19
|
thor (>= 0.14.0)
|
@@ -45,7 +45,10 @@ PLATFORMS
|
|
45
45
|
DEPENDENCIES
|
46
46
|
action_controller-parents!
|
47
47
|
activesupport (= 4.0.0)
|
48
|
-
appraisal (= 2.
|
48
|
+
appraisal (= 2.1)
|
49
49
|
bundler (~> 1.8)
|
50
50
|
rake
|
51
51
|
rspec
|
52
|
+
|
53
|
+
BUNDLED WITH
|
54
|
+
1.12.5
|
@@ -0,0 +1,54 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../
|
3
|
+
specs:
|
4
|
+
action_controller-parents (0.2.2)
|
5
|
+
activesupport (>= 3.0.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activesupport (5.0.0)
|
11
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
+
i18n (~> 0.7)
|
13
|
+
minitest (~> 5.1)
|
14
|
+
tzinfo (~> 1.1)
|
15
|
+
appraisal (2.1.0)
|
16
|
+
bundler
|
17
|
+
rake
|
18
|
+
thor (>= 0.14.0)
|
19
|
+
concurrent-ruby (1.0.2)
|
20
|
+
diff-lcs (1.2.5)
|
21
|
+
i18n (0.7.0)
|
22
|
+
minitest (5.9.0)
|
23
|
+
rake (11.2.2)
|
24
|
+
rspec (3.5.0)
|
25
|
+
rspec-core (~> 3.5.0)
|
26
|
+
rspec-expectations (~> 3.5.0)
|
27
|
+
rspec-mocks (~> 3.5.0)
|
28
|
+
rspec-core (3.5.1)
|
29
|
+
rspec-support (~> 3.5.0)
|
30
|
+
rspec-expectations (3.5.0)
|
31
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
32
|
+
rspec-support (~> 3.5.0)
|
33
|
+
rspec-mocks (3.5.0)
|
34
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
35
|
+
rspec-support (~> 3.5.0)
|
36
|
+
rspec-support (3.5.0)
|
37
|
+
thor (0.19.1)
|
38
|
+
thread_safe (0.3.5)
|
39
|
+
tzinfo (1.2.2)
|
40
|
+
thread_safe (~> 0.1)
|
41
|
+
|
42
|
+
PLATFORMS
|
43
|
+
ruby
|
44
|
+
|
45
|
+
DEPENDENCIES
|
46
|
+
action_controller-parents!
|
47
|
+
activesupport (= 5.0.0)
|
48
|
+
appraisal (= 2.1)
|
49
|
+
bundler (~> 1.8)
|
50
|
+
rake
|
51
|
+
rspec
|
52
|
+
|
53
|
+
BUNDLED WITH
|
54
|
+
1.12.5
|
@@ -26,6 +26,13 @@ describe ActionController::Parents do
|
|
26
26
|
controller.params = { dummy_model_id: 1 }
|
27
27
|
expect(controller.parent_resource).to be_a(DummyModel)
|
28
28
|
end
|
29
|
+
|
30
|
+
it 'caches the result' do
|
31
|
+
controller.params = { dummy_model_id: 1 }
|
32
|
+
expect_any_instance_of(described_class::Finder).to receive(:parent_resource).once.with(controller.params).and_call_original
|
33
|
+
controller.parent_resource
|
34
|
+
controller.parent_resource
|
35
|
+
end
|
29
36
|
end
|
30
37
|
end
|
31
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_controller-parents
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maarten Claes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
61
|
+
version: '2.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.
|
68
|
+
version: '2.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: activesupport
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -104,6 +104,8 @@ files:
|
|
104
104
|
- gemfiles/activesupport_4.2.gemfile.lock
|
105
105
|
- gemfiles/activesupport_4.gemfile
|
106
106
|
- gemfiles/activesupport_4.gemfile.lock
|
107
|
+
- gemfiles/activesupport_5.0.gemfile
|
108
|
+
- gemfiles/activesupport_5.0.gemfile.lock
|
107
109
|
- lib/action_controller/parents.rb
|
108
110
|
- lib/action_controller/parents/finder.rb
|
109
111
|
- lib/action_controller/parents/methods.rb
|
@@ -134,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
136
|
version: '0'
|
135
137
|
requirements: []
|
136
138
|
rubyforge_project:
|
137
|
-
rubygems_version: 2.
|
139
|
+
rubygems_version: 2.5.1
|
138
140
|
signing_key:
|
139
141
|
specification_version: 4
|
140
142
|
summary: Easily access parent resources
|