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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d7c4f6566ad04e2d10d0cfcc3e107302afb367d
4
- data.tar.gz: 1fc331ef010a59d7723ca3faa206dd72b4322b17
3
+ metadata.gz: efcb015c47c36ad6a97afb3d09c8a24f92e2d78b
4
+ data.tar.gz: 7563322db21411006066a429815da428275e15bc
5
5
  SHA512:
6
- metadata.gz: 2ae15f473e25cdf638d5aaa51daf9239f61d4ee157544ce55d5184019405795584a8538eb693d0377730117dca662de16fcfdd96e3cbb96e3b3ebcc7c434f83b
7
- data.tar.gz: 16c0a85b1a3798f913171cecc68830cb5f046d6689a33ddeb316458b85d9168ea019d174fcc2049c6a6358ff3684b722f2c398824d6b4391d59cd9014e6af00b
6
+ metadata.gz: f47f51e9bf362cea79e40eb5b06dec063b9c250fc82cb06b11d89141d921e35d0ad8ab3556331749b78a8dc9aa5e4f46c37afaf99c7518c0d6cf9aa3f1da71d0
7
+ data.tar.gz: 911bc61ae935e384088ad33b8f47e6fac421e634f8e8b5ff68b7562ac964318701f17e4ab4e866bfb0dad5b229fc37e120458b139940fa814ccf3a6ea2898c53
data/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  script: bundle exec rake
2
2
  rvm:
3
3
  - 2.0.0
4
+ gemfile:
5
+ - gemfiles/4.0.x.gemfile
4
6
  branches:
5
7
  only:
6
8
  - master
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in class-action.gemspec
4
- gemspec
4
+ gemspec
data/Gemfile.lock CHANGED
@@ -1,62 +1,60 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- class-action (1.1.0)
5
- activesupport (~> 3.2)
4
+ class-action (1.2.0)
5
+ activesupport
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionpack (3.2.14)
11
- activemodel (= 3.2.14)
12
- activesupport (= 3.2.14)
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
- journey (~> 1.0.4)
16
- rack (~> 1.4.5)
17
- rack-cache (~> 1.2)
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
- multi_json (~> 1.0)
26
- builder (3.0.4)
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
- journey (1.0.4)
32
- multi_json (1.8.2)
33
- rack (1.4.5)
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.0)
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.7)
44
- rspec-expectations (2.14.4)
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.4)
47
- sprockets (2.2.2)
48
- hike (~> 1.2)
49
- multi_json (~> 1.0)
50
- rack (~> 1.0)
51
- tilt (~> 1.1, != 1.3.0)
52
- tilt (1.4.1)
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 (~> 3.2)
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
@@ -1 +1,7 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require 'rspec/core/rake_task'
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ task :default => :spec
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 'activesupport', '~> 3.2'
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", "~> 2.14"
27
- spec.add_development_dependency "actionpack", "~> 3.2"
26
+ spec.add_development_dependency "simplecov"
27
+ spec.add_development_dependency "actionpack"
28
28
  end
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem "rails", "~> 4.0"
4
+
5
+ # Specify your gem's dependencies in class-action.gemspec
6
+ gemspec path: '../'
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 << '@_class_action'
105
+ AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES << :@_class_action
106
106
  end
107
107
 
108
108
  require 'class_action/version'
@@ -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.reverse_merge! superclass._responses if superclass.respond_to?(:_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.reverse_merge! superclass._responders if superclass.respond_to?(:_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*.
@@ -1,3 +1,3 @@
1
1
  module ClassAction
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
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.1.0
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: 2013-12-16 00:00:00.000000000 Z
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: '3.2'
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: '3.2'
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: '2.14'
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: '2.14'
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: '3.2'
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: '3.2'
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: