class-action 1.1.0 → 1.2.0
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 +4 -4
- data/.travis.yml +2 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +32 -34
- data/README.md +2 -0
- data/Rakefile +7 -1
- data/class-action.gemspec +3 -3
- data/gemfiles/4.0.x.gemfile +6 -0
- data/lib/class_action.rb +1 -1
- data/lib/class_action/action.rb +3 -2
- data/lib/class_action/version.rb +1 -1
- metadata +15 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: efcb015c47c36ad6a97afb3d09c8a24f92e2d78b
|
|
4
|
+
data.tar.gz: 7563322db21411006066a429815da428275e15bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f47f51e9bf362cea79e40eb5b06dec063b9c250fc82cb06b11d89141d921e35d0ad8ab3556331749b78a8dc9aa5e4f46c37afaf99c7518c0d6cf9aa3f1da71d0
|
|
7
|
+
data.tar.gz: 911bc61ae935e384088ad33b8f47e6fac421e634f8e8b5ff68b7562ac964318701f17e4ab4e866bfb0dad5b229fc37e120458b139940fa814ccf3a6ea2898c53
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,62 +1,60 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
class-action (1.
|
|
5
|
-
activesupport
|
|
4
|
+
class-action (1.2.0)
|
|
5
|
+
activesupport
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
actionpack (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
builder (~> 3.0.0)
|
|
10
|
+
actionpack (4.0.3)
|
|
11
|
+
activesupport (= 4.0.3)
|
|
12
|
+
builder (~> 3.1.0)
|
|
14
13
|
erubis (~> 2.7.0)
|
|
15
|
-
|
|
16
|
-
rack (~>
|
|
17
|
-
|
|
18
|
-
rack-test (~> 0.6.1)
|
|
19
|
-
sprockets (~> 2.2.1)
|
|
20
|
-
activemodel (3.2.14)
|
|
21
|
-
activesupport (= 3.2.14)
|
|
22
|
-
builder (~> 3.0.0)
|
|
23
|
-
activesupport (3.2.14)
|
|
14
|
+
rack (~> 1.5.2)
|
|
15
|
+
rack-test (~> 0.6.2)
|
|
16
|
+
activesupport (4.0.3)
|
|
24
17
|
i18n (~> 0.6, >= 0.6.4)
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
minitest (~> 4.2)
|
|
19
|
+
multi_json (~> 1.3)
|
|
20
|
+
thread_safe (~> 0.1)
|
|
21
|
+
tzinfo (~> 0.3.37)
|
|
22
|
+
atomic (1.1.15)
|
|
23
|
+
builder (3.1.4)
|
|
27
24
|
diff-lcs (1.2.5)
|
|
25
|
+
docile (1.1.3)
|
|
28
26
|
erubis (2.7.0)
|
|
29
|
-
hike (1.2.3)
|
|
30
27
|
i18n (0.6.9)
|
|
31
|
-
|
|
32
|
-
multi_json (1.
|
|
33
|
-
rack (1.
|
|
34
|
-
rack-cache (1.2)
|
|
35
|
-
rack (>= 0.4)
|
|
28
|
+
minitest (4.7.5)
|
|
29
|
+
multi_json (1.9.0)
|
|
30
|
+
rack (1.5.2)
|
|
36
31
|
rack-test (0.6.2)
|
|
37
32
|
rack (>= 1.0)
|
|
38
|
-
rake (10.1.
|
|
33
|
+
rake (10.1.1)
|
|
39
34
|
rspec (2.14.1)
|
|
40
35
|
rspec-core (~> 2.14.0)
|
|
41
36
|
rspec-expectations (~> 2.14.0)
|
|
42
37
|
rspec-mocks (~> 2.14.0)
|
|
43
|
-
rspec-core (2.14.
|
|
44
|
-
rspec-expectations (2.14.
|
|
38
|
+
rspec-core (2.14.8)
|
|
39
|
+
rspec-expectations (2.14.5)
|
|
45
40
|
diff-lcs (>= 1.1.3, < 2.0)
|
|
46
|
-
rspec-mocks (2.14.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
multi_json
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
rspec-mocks (2.14.6)
|
|
42
|
+
simplecov (0.8.2)
|
|
43
|
+
docile (~> 1.1.0)
|
|
44
|
+
multi_json
|
|
45
|
+
simplecov-html (~> 0.8.0)
|
|
46
|
+
simplecov-html (0.8.0)
|
|
47
|
+
thread_safe (0.2.0)
|
|
48
|
+
atomic (>= 1.1.7, < 2)
|
|
49
|
+
tzinfo (0.3.39)
|
|
53
50
|
|
|
54
51
|
PLATFORMS
|
|
55
52
|
ruby
|
|
56
53
|
|
|
57
54
|
DEPENDENCIES
|
|
58
|
-
actionpack
|
|
55
|
+
actionpack
|
|
59
56
|
bundler (~> 1.3)
|
|
60
57
|
class-action!
|
|
61
58
|
rake
|
|
62
59
|
rspec (~> 2.14)
|
|
60
|
+
simplecov
|
data/README.md
CHANGED
|
@@ -9,6 +9,8 @@ Additional benefits include:
|
|
|
9
9
|
* Action-specific helper methods
|
|
10
10
|
* Support for responders (future support)
|
|
11
11
|
|
|
12
|
+
[<img src="https://secure.travis-ci.org/yoazt/class-action.png?branch=master" alt="Build Status" />](http://travis-ci.org/yoazt/class-action)
|
|
13
|
+
|
|
12
14
|
## Installation
|
|
13
15
|
|
|
14
16
|
Add this line to your application's Gemfile:
|
data/Rakefile
CHANGED
data/class-action.gemspec
CHANGED
|
@@ -18,11 +18,11 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
19
|
spec.require_paths = ["lib"]
|
|
20
20
|
|
|
21
|
-
spec.add_dependency
|
|
21
|
+
spec.add_dependency "activesupport"
|
|
22
22
|
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
|
24
24
|
spec.add_development_dependency "rake"
|
|
25
25
|
spec.add_development_dependency "rspec", "~> 2.14"
|
|
26
|
-
spec.add_development_dependency "simplecov"
|
|
27
|
-
spec.add_development_dependency "actionpack"
|
|
26
|
+
spec.add_development_dependency "simplecov"
|
|
27
|
+
spec.add_development_dependency "actionpack"
|
|
28
28
|
end
|
data/lib/class_action.rb
CHANGED
|
@@ -102,7 +102,7 @@ module ClassAction
|
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
if defined?(AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES)
|
|
105
|
-
AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES <<
|
|
105
|
+
AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES << :@_class_action
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
require 'class_action/version'
|
data/lib/class_action/action.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require 'active_support/core_ext/object/try'
|
|
2
|
+
require 'active_support/core_ext/hash/reverse_merge'
|
|
2
3
|
|
|
3
4
|
module ClassAction
|
|
4
5
|
|
|
@@ -167,7 +168,7 @@ module ClassAction
|
|
|
167
168
|
|
|
168
169
|
def _responses
|
|
169
170
|
@_responses ||= {}.tap do |responses|
|
|
170
|
-
responses.
|
|
171
|
+
responses.reverse_update superclass._responses if superclass.respond_to?(:_responses)
|
|
171
172
|
end
|
|
172
173
|
|
|
173
174
|
# Keep the hash in such an order that the 'nil' condition is always *last*.
|
|
@@ -177,7 +178,7 @@ module ClassAction
|
|
|
177
178
|
|
|
178
179
|
def _responders
|
|
179
180
|
@_responders ||= {}.tap do |responders|
|
|
180
|
-
responders.
|
|
181
|
+
responders.reverse_update superclass._responders if superclass.respond_to?(:_responders)
|
|
181
182
|
end
|
|
182
183
|
|
|
183
184
|
# Keep the hash in such an order that the 'nil' conditions are always *last*.
|
data/lib/class_action/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: class-action
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joost Lubach
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2014-03-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - '>='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '0'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - '>='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: bundler
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -70,30 +70,30 @@ dependencies:
|
|
|
70
70
|
name: simplecov
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- -
|
|
73
|
+
- - '>='
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '
|
|
75
|
+
version: '0'
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- -
|
|
80
|
+
- - '>='
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '
|
|
82
|
+
version: '0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: actionpack
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
|
-
- -
|
|
87
|
+
- - '>='
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '
|
|
89
|
+
version: '0'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
|
-
- -
|
|
94
|
+
- - '>='
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
96
|
+
version: '0'
|
|
97
97
|
description: Allows you to write controller actions as classes, rather than methods.
|
|
98
98
|
email:
|
|
99
99
|
- joost@yoazt.com
|
|
@@ -110,6 +110,7 @@ files:
|
|
|
110
110
|
- README.md
|
|
111
111
|
- Rakefile
|
|
112
112
|
- class-action.gemspec
|
|
113
|
+
- gemfiles/4.0.x.gemfile
|
|
113
114
|
- lib/class-action.rb
|
|
114
115
|
- lib/class-action/rspec.rb
|
|
115
116
|
- lib/class_action.rb
|
|
@@ -157,4 +158,3 @@ test_files:
|
|
|
157
158
|
- spec/class_action/rspec/respond_with_matcher_spec.rb
|
|
158
159
|
- spec/class_action_spec.rb
|
|
159
160
|
- spec/spec_helper.rb
|
|
160
|
-
has_rdoc:
|