verification_ext 1.0.3

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.
@@ -0,0 +1,4 @@
1
+ Gemfile.lock
2
+ pkg/*
3
+ *.gem
4
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 David Heinemeier Hansson
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,36 @@
1
+ {<img src="https://travis-ci.org/sikachu/verification.png" />}[https://travis-ci.org/sikachu/verification]
2
+
3
+ This module provides a class-level method for specifying that certain
4
+ actions are guarded against being called without certain prerequisites
5
+ being met. This is essentially a special kind of before_filter.
6
+
7
+ An action may be guarded against being invoked without certain request
8
+ parameters being set, or without certain session values existing.
9
+
10
+ When a verification is violated, values may be inserted into the flash, and
11
+ a specified redirection is triggered. If no specific action is configured,
12
+ verification failures will by default result in a 400 Bad Request response.
13
+
14
+ Usage:
15
+
16
+ class GlobalController < ActionController::Base
17
+ # Prevent the #update_settings action from being invoked unless
18
+ # the 'admin_privileges' request parameter exists. The
19
+ # settings action will be redirected to in current controller
20
+ # if verification fails.
21
+ verify :params => "admin_privileges", :only => :update_post,
22
+ :redirect_to => { :action => "settings" }
23
+
24
+ # Disallow a post from being updated if there was no information
25
+ # submitted with the post, and if there is no active post in the
26
+ # session, and if there is no "note" key in the flash. The route
27
+ # named category_url will be redirected to if verification fails.
28
+
29
+ verify :params => "post", :session => "post", "flash" => "note",
30
+ :only => :update_post,
31
+ :add_flash => { "alert" => "Failed to create your message" },
32
+ :redirect_to => :category_url
33
+
34
+ Note that these prerequisites are not business rules. They do not examine
35
+ the content of the session or the parameters. That level of validation should
36
+ be encapsulated by your domain model or helper methods in the controller.
@@ -0,0 +1,22 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
3
+ require 'rdoc/task'
4
+
5
+ desc 'Default: run unit tests.'
6
+ task :default => :test
7
+
8
+ desc 'Test the verification plugin.'
9
+ Rake::TestTask.new(:test) do |t|
10
+ t.libs << 'lib'
11
+ t.libs << 'test'
12
+ t.pattern = 'test/**/*_test.rb'
13
+ end
14
+
15
+ desc 'Generate documentation for the verification plugin.'
16
+ Rake::RDocTask.new(:rdoc) do |rdoc|
17
+ rdoc.rdoc_dir = 'rdoc'
18
+ rdoc.title = 'Verification'
19
+ rdoc.options << '--line-numbers' << '--inline-source'
20
+ rdoc.rdoc_files.include('README')
21
+ rdoc.rdoc_files.include('lib/**/*.rb')
22
+ end
data/init.rb ADDED
@@ -0,0 +1,3 @@
1
+ # Include hook code here
2
+
3
+ require 'action_controller/verification'
@@ -0,0 +1,132 @@
1
+ module ActionController #:nodoc:
2
+ module Verification #:nodoc:
3
+ extend ActiveSupport::Concern
4
+
5
+ include AbstractController::Callbacks, Flash, Rendering
6
+
7
+ # This module provides a class-level method for specifying that certain
8
+ # actions are guarded against being called without certain prerequisites
9
+ # being met. This is essentially a special kind of before_filter.
10
+ #
11
+ # An action may be guarded against being invoked without certain request
12
+ # parameters being set, or without certain session values existing.
13
+ #
14
+ # When a verification is violated, values may be inserted into the flash, and
15
+ # a specified redirection is triggered. If no specific action is configured,
16
+ # verification failures will by default result in a 400 Bad Request response.
17
+ #
18
+ # Usage:
19
+ #
20
+ # class GlobalController < ActionController::Base
21
+ # # Prevent the #update_settings action from being invoked unless
22
+ # # the 'admin_privileges' request parameter exists. The
23
+ # # settings action will be redirected to in current controller
24
+ # # if verification fails.
25
+ # verify :params => "admin_privileges", :only => :update_post,
26
+ # :redirect_to => { :action => "settings" }
27
+ #
28
+ # # Disallow a post from being updated if there was no information
29
+ # # submitted with the post, and if there is no active post in the
30
+ # # session, and if there is no "note" key in the flash. The route
31
+ # # named category_url will be redirected to if verification fails.
32
+ #
33
+ # verify :params => "post", :session => "post", "flash" => "note",
34
+ # :only => :update_post,
35
+ # :add_flash => { "alert" => "Failed to create your message" },
36
+ # :redirect_to => :category_url
37
+ #
38
+ # Note that these prerequisites are not business rules. They do not examine
39
+ # the content of the session or the parameters. That level of validation should
40
+ # be encapsulated by your domain model or helper methods in the controller.
41
+ module ClassMethods
42
+ # Verify the given actions so that if certain prerequisites are not met,
43
+ # the user is redirected to a different action. The +options+ parameter
44
+ # is a hash consisting of the following key/value pairs:
45
+ #
46
+ # <tt>:params</tt>::
47
+ # a single key or an array of keys that must be in the <tt>params</tt>
48
+ # hash in order for the action(s) to be safely called.
49
+ # <tt>:session</tt>::
50
+ # a single key or an array of keys that must be in the <tt>session</tt>
51
+ # in order for the action(s) to be safely called.
52
+ # <tt>:flash</tt>::
53
+ # a single key or an array of keys that must be in the flash in order
54
+ # for the action(s) to be safely called.
55
+ # <tt>:method</tt>::
56
+ # a single key or an array of keys--any one of which must match the
57
+ # current request method in order for the action(s) to be safely called.
58
+ # (The key should be a symbol: <tt>:get</tt> or <tt>:post</tt>, for
59
+ # example.)
60
+ # <tt>:xhr</tt>::
61
+ # true/false option to ensure that the request is coming from an Ajax
62
+ # call or not.
63
+ # <tt>:add_flash</tt>::
64
+ # a hash of name/value pairs that should be merged into the session's
65
+ # flash if the prerequisites cannot be satisfied.
66
+ # <tt>:add_headers</tt>::
67
+ # a hash of name/value pairs that should be merged into the response's
68
+ # headers hash if the prerequisites cannot be satisfied.
69
+ # <tt>:redirect_to</tt>::
70
+ # the redirection parameters to be used when redirecting if the
71
+ # prerequisites cannot be satisfied. You can redirect either to named
72
+ # route or to the action in some controller.
73
+ # <tt>:render</tt>::
74
+ # the render parameters to be used when the prerequisites cannot be satisfied.
75
+ # <tt>:only</tt>::
76
+ # only apply this verification to the actions specified in the associated
77
+ # array (may also be a single value).
78
+ # <tt>:except</tt>::
79
+ # do not apply this verification to the actions specified in the associated
80
+ # array (may also be a single value).
81
+ def verify(options={})
82
+ before_filter :only => options[:only], :except => options[:except] do
83
+ verify_action options
84
+ end
85
+ end
86
+ end
87
+
88
+ private
89
+
90
+ def verify_action(options) #:nodoc:
91
+ if prereqs_invalid?(options)
92
+ flash.update(options[:add_flash]) if options[:add_flash]
93
+ response.headers.merge!(options[:add_headers]) if options[:add_headers]
94
+ apply_remaining_actions(options) unless performed?
95
+ end
96
+ end
97
+
98
+ def prereqs_invalid?(options) # :nodoc:
99
+ verify_presence_of_keys_in_hash_flash_or_params(options) ||
100
+ verify_method(options) ||
101
+ verify_request_xhr_status(options)
102
+ end
103
+
104
+ def verify_presence_of_keys_in_hash_flash_or_params(options) # :nodoc:
105
+ [*options[:params] ].find { |v| v && params[v.to_sym].nil? } ||
106
+ [*options[:session]].find { |v| session[v].nil? } ||
107
+ [*options[:flash] ].find { |v| flash[v].nil? }
108
+ end
109
+
110
+ def verify_method(options) # :nodoc:
111
+ [*options[:method]].all? { |v| request.request_method_symbol != v.to_sym } if options[:method]
112
+ end
113
+
114
+ def verify_request_xhr_status(options) # :nodoc:
115
+ !!request.xhr? != options[:xhr] unless options[:xhr].nil?
116
+ end
117
+
118
+ def apply_redirect_to(redirect_to_option) # :nodoc:
119
+ (redirect_to_option.is_a?(Symbol) && redirect_to_option != :back) ? self.__send__(redirect_to_option) : redirect_to_option
120
+ end
121
+
122
+ def apply_remaining_actions(options) # :nodoc:
123
+ case
124
+ when options[:render] ; render(options[:render])
125
+ when options[:redirect_to] ; redirect_to(apply_redirect_to(options[:redirect_to]))
126
+ else head(:bad_request)
127
+ end
128
+ end
129
+ end
130
+ end
131
+
132
+ ActionController::Base.send :include, ActionController::Verification
@@ -0,0 +1 @@
1
+ require 'action_controller/verification'
@@ -0,0 +1,20 @@
1
+ require 'bundler/setup'
2
+ require 'test/unit'
3
+ require 'active_support'
4
+ require 'action_controller'
5
+ require 'mocha'
6
+
7
+ require File.dirname(__FILE__) + '/../lib/action_controller/verification'
8
+
9
+ SharedTestRoutes = ActionDispatch::Routing::RouteSet.new
10
+ SharedTestRoutes.draw do
11
+ match ":controller(/:action(/:id))"
12
+ end
13
+
14
+ ActionController::Base.send :include, SharedTestRoutes.url_helpers
15
+
16
+ module ActionController
17
+ class TestCase
18
+ setup { @routes = SharedTestRoutes }
19
+ end
20
+ end
@@ -0,0 +1,289 @@
1
+ require 'test_helper'
2
+
3
+ class VerificationTestController < ActionController::Base
4
+ verify :only => :guarded_one, :params => "one",
5
+ :add_flash => { :error => 'unguarded' },
6
+ :redirect_to => { :action => "unguarded" }
7
+
8
+ verify :only => :guarded_two, :params => %w( one two ),
9
+ :redirect_to => { :action => "unguarded" }
10
+
11
+ verify :only => :guarded_with_flash, :params => "one",
12
+ :add_flash => { :notice => "prereqs failed" },
13
+ :redirect_to => { :action => "unguarded" }
14
+
15
+ verify :only => :guarded_in_session, :session => "one",
16
+ :redirect_to => { :action => "unguarded" }
17
+
18
+ verify :only => [:multi_one, :multi_two], :session => %w( one two ),
19
+ :redirect_to => { :action => "unguarded" }
20
+
21
+ verify :only => :guarded_by_method, :method => :post,
22
+ :redirect_to => { :action => "unguarded" }
23
+
24
+ verify :only => :guarded_by_xhr, :xhr => true,
25
+ :redirect_to => { :action => "unguarded" }
26
+
27
+ verify :only => :guarded_by_not_xhr, :xhr => false,
28
+ :redirect_to => { :action => "unguarded" }
29
+
30
+ before_filter :unconditional_redirect, :only => :two_redirects
31
+ verify :only => :two_redirects, :method => :post,
32
+ :redirect_to => { :action => "unguarded" }
33
+
34
+ verify :only => :must_be_post, :method => :post, :render => { :status => 405, :text => "Must be post" }, :add_headers => { "Allow" => "POST" }
35
+
36
+ verify :only => :must_be_put, :method => :put, :render => { :status => 405, :text => "Must be put" }, :add_headers => { "Allow" => "PUT" }
37
+
38
+ verify :only => :guarded_one_for_named_route_test, :params => "one",
39
+ :redirect_to => :foo_url
40
+
41
+ verify :only => :no_default_action, :params => "santa"
42
+
43
+ verify :only => :guarded_with_back, :method => :post,
44
+ :redirect_to => :back
45
+
46
+ def guarded_one
47
+ render :text => "#{params[:one]}"
48
+ end
49
+
50
+ def guarded_one_for_named_route_test
51
+ render :text => "#{params[:one]}"
52
+ end
53
+
54
+ def guarded_with_flash
55
+ render :text => "#{params[:one]}"
56
+ end
57
+
58
+ def guarded_two
59
+ render :text => "#{params[:one]}:#{params[:two]}"
60
+ end
61
+
62
+ def guarded_in_session
63
+ render :text => "#{session["one"]}"
64
+ end
65
+
66
+ def multi_one
67
+ render :text => "#{session["one"]}:#{session["two"]}"
68
+ end
69
+
70
+ def multi_two
71
+ render :text => "#{session["two"]}:#{session["one"]}"
72
+ end
73
+
74
+ def guarded_by_method
75
+ render :text => "#{request.method}"
76
+ end
77
+
78
+ def guarded_by_xhr
79
+ render :text => "#{!!request.xhr?}"
80
+ end
81
+
82
+ def guarded_by_not_xhr
83
+ render :text => "#{!!request.xhr?}"
84
+ end
85
+
86
+ def unguarded
87
+ render :text => "#{params[:one]}"
88
+ end
89
+
90
+ def two_redirects
91
+ render :nothing => true
92
+ end
93
+
94
+ def must_be_post
95
+ render :text => "Was a post!"
96
+ end
97
+
98
+ def must_be_put
99
+ render :text => "Was a put!"
100
+ end
101
+
102
+ def guarded_with_back
103
+ render :text => "#{params[:one]}"
104
+ end
105
+
106
+ def no_default_action
107
+ # Will never run
108
+ end
109
+
110
+ protected
111
+
112
+ def unconditional_redirect
113
+ redirect_to :action => "unguarded"
114
+ end
115
+ end
116
+
117
+ class VerificationTest < ActionController::TestCase
118
+ tests ::VerificationTestController
119
+
120
+ def test_using_symbol_back_with_no_referrer
121
+ assert_raise(ActionController::RedirectBackError) { get :guarded_with_back }
122
+ end
123
+
124
+ def test_using_symbol_back_redirects_to_referrer
125
+ @request.env["HTTP_REFERER"] = "/foo"
126
+ get :guarded_with_back
127
+ assert_redirected_to '/foo'
128
+ end
129
+
130
+ def test_no_deprecation_warning_for_named_route
131
+ assert_not_deprecated do
132
+ with_routing do |set|
133
+ set.draw do
134
+ match 'foo', :to => 'test#foo', :as => :foo
135
+ match 'verification_test/:action', :to => ::VerificationTestController
136
+ end
137
+ get :guarded_one_for_named_route_test, :two => "not one"
138
+ assert_redirected_to '/foo'
139
+ end
140
+ end
141
+ end
142
+
143
+ def test_guarded_one_with_prereqs
144
+ get :guarded_one, :one => "here"
145
+ assert_equal "here", @response.body
146
+ end
147
+
148
+ def test_guarded_one_without_prereqs
149
+ get :guarded_one
150
+ assert_redirected_to :action => "unguarded"
151
+ assert_equal 'unguarded', flash[:error]
152
+ end
153
+
154
+ def test_guarded_with_flash_with_prereqs
155
+ get :guarded_with_flash, :one => "here"
156
+ assert_equal "here", @response.body
157
+ assert flash.empty?
158
+ end
159
+
160
+ def test_guarded_with_flash_without_prereqs
161
+ get :guarded_with_flash
162
+ assert_redirected_to :action => "unguarded"
163
+ assert_equal "prereqs failed", flash[:notice]
164
+ end
165
+
166
+ def test_guarded_two_with_prereqs
167
+ get :guarded_two, :one => "here", :two => "there"
168
+ assert_equal "here:there", @response.body
169
+ end
170
+
171
+ def test_guarded_two_without_prereqs_one
172
+ get :guarded_two, :two => "there"
173
+ assert_redirected_to :action => "unguarded"
174
+ end
175
+
176
+ def test_guarded_two_without_prereqs_two
177
+ get :guarded_two, :one => "here"
178
+ assert_redirected_to :action => "unguarded"
179
+ end
180
+
181
+ def test_guarded_two_without_prereqs_both
182
+ get :guarded_two
183
+ assert_redirected_to :action => "unguarded"
184
+ end
185
+
186
+ def test_unguarded_with_params
187
+ get :unguarded, :one => "here"
188
+ assert_equal "here", @response.body
189
+ end
190
+
191
+ def test_unguarded_without_params
192
+ get :unguarded
193
+ assert @response.body.blank?
194
+ end
195
+
196
+ def test_guarded_in_session_with_prereqs
197
+ get :guarded_in_session, {}, "one" => "here"
198
+ assert_equal "here", @response.body
199
+ end
200
+
201
+ def test_guarded_in_session_without_prereqs
202
+ get :guarded_in_session
203
+ assert_redirected_to :action => "unguarded"
204
+ end
205
+
206
+ def test_multi_one_with_prereqs
207
+ get :multi_one, {}, "one" => "here", "two" => "there"
208
+ assert_equal "here:there", @response.body
209
+ end
210
+
211
+ def test_multi_one_without_prereqs
212
+ get :multi_one
213
+ assert_redirected_to :action => "unguarded"
214
+ end
215
+
216
+ def test_multi_two_with_prereqs
217
+ get :multi_two, {}, "one" => "here", "two" => "there"
218
+ assert_equal "there:here", @response.body
219
+ end
220
+
221
+ def test_multi_two_without_prereqs
222
+ get :multi_two
223
+ assert_redirected_to :action => "unguarded"
224
+ end
225
+
226
+ def test_guarded_by_method_with_prereqs
227
+ post :guarded_by_method
228
+ assert_equal "POST", @response.body
229
+ end
230
+
231
+ def test_guarded_by_method_without_prereqs
232
+ get :guarded_by_method
233
+ assert_redirected_to :action => "unguarded"
234
+ end
235
+
236
+ def test_guarded_by_xhr_with_prereqs
237
+ xhr :post, :guarded_by_xhr
238
+ assert_equal "true", @response.body
239
+ end
240
+
241
+ def test_guarded_by_xhr_without_prereqs
242
+ get :guarded_by_xhr
243
+ assert_redirected_to :action => "unguarded"
244
+ end
245
+
246
+ def test_guarded_by_not_xhr_with_prereqs
247
+ get :guarded_by_not_xhr
248
+ assert_equal "false", @response.body
249
+ end
250
+
251
+ def test_guarded_by_not_xhr_without_prereqs
252
+ xhr :post, :guarded_by_not_xhr
253
+ assert_redirected_to :action => "unguarded"
254
+ end
255
+
256
+ def test_guarded_post_and_calls_render_succeeds
257
+ post :must_be_post
258
+ assert_equal "Was a post!", @response.body
259
+ end
260
+
261
+ def test_guarded_put_and_calls_render_succeeds
262
+ put :must_be_put
263
+ assert_equal "Was a put!", @response.body
264
+ end
265
+
266
+ def test_default_failure_should_be_a_bad_request
267
+ post :no_default_action
268
+ assert_response :bad_request
269
+ end
270
+
271
+ def test_guarded_post_and_calls_render_fails_and_sets_allow_header
272
+ get :must_be_post
273
+ assert_response 405
274
+ assert_equal "Must be post", @response.body
275
+ assert_equal "POST", @response.headers["Allow"]
276
+ end
277
+
278
+ def test_second_redirect
279
+ assert_nothing_raised { get :two_redirects }
280
+ end
281
+
282
+ def test_guarded_http_method_respects_overwritten_request_method
283
+ # Overwrite http method on application level like Rails supports via sending a _method parameter
284
+ @request.stubs(:request_method_symbol).returns(:put)
285
+
286
+ post :must_be_put
287
+ assert_equal "Was a put!", @response.body
288
+ end
289
+ end
@@ -0,0 +1,26 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "verification_ext"
5
+ s.version = "1.0.3"
6
+ s.platform = Gem::Platform::RUBY
7
+ s.authors = ["debbbbie"]
8
+ s.email = ["debbbbie@163.com.com"]
9
+ s.homepage = "https://github.com/debbbbie/verification"
10
+ s.summary = %q{Verify preconditions for Rails actions}
11
+ s.description = %q{Verify preconditions for Rails actions}
12
+
13
+ s.files = `git ls-files`.split("\n")
14
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
+ s.require_paths = ["lib"]
17
+
18
+ s.add_dependency('activesupport', '3.2.8')
19
+ s.add_dependency('actionpack', '3.2.8')
20
+
21
+ s.add_development_dependency('rake')
22
+ s.add_development_dependency('test-unit')
23
+ s.add_development_dependency('activesupport')
24
+ s.add_development_dependency('actionpack')
25
+ s.add_development_dependency('mocha', "0.12.9")
26
+ end
metadata ADDED
@@ -0,0 +1,179 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: verification_ext
3
+ version: !ruby/object:Gem::Version
4
+ hash: 17
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 3
10
+ version: 1.0.3
11
+ platform: ruby
12
+ authors:
13
+ - debbbbie
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2013-08-09 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: activesupport
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - "="
27
+ - !ruby/object:Gem::Version
28
+ hash: 31
29
+ segments:
30
+ - 3
31
+ - 2
32
+ - 8
33
+ version: 3.2.8
34
+ type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: actionpack
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - "="
43
+ - !ruby/object:Gem::Version
44
+ hash: 31
45
+ segments:
46
+ - 3
47
+ - 2
48
+ - 8
49
+ version: 3.2.8
50
+ type: :runtime
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: rake
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ hash: 3
61
+ segments:
62
+ - 0
63
+ version: "0"
64
+ type: :development
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ name: test-unit
68
+ prerelease: false
69
+ requirement: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ type: :development
79
+ version_requirements: *id004
80
+ - !ruby/object:Gem::Dependency
81
+ name: activesupport
82
+ prerelease: false
83
+ requirement: &id005 !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ hash: 3
89
+ segments:
90
+ - 0
91
+ version: "0"
92
+ type: :development
93
+ version_requirements: *id005
94
+ - !ruby/object:Gem::Dependency
95
+ name: actionpack
96
+ prerelease: false
97
+ requirement: &id006 !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 0
105
+ version: "0"
106
+ type: :development
107
+ version_requirements: *id006
108
+ - !ruby/object:Gem::Dependency
109
+ name: mocha
110
+ prerelease: false
111
+ requirement: &id007 !ruby/object:Gem::Requirement
112
+ none: false
113
+ requirements:
114
+ - - "="
115
+ - !ruby/object:Gem::Version
116
+ hash: 61
117
+ segments:
118
+ - 0
119
+ - 12
120
+ - 9
121
+ version: 0.12.9
122
+ type: :development
123
+ version_requirements: *id007
124
+ description: Verify preconditions for Rails actions
125
+ email:
126
+ - debbbbie@163.com.com
127
+ executables: []
128
+
129
+ extensions: []
130
+
131
+ extra_rdoc_files: []
132
+
133
+ files:
134
+ - .gitignore
135
+ - Gemfile
136
+ - MIT-LICENSE
137
+ - README.rdoc
138
+ - Rakefile
139
+ - init.rb
140
+ - lib/action_controller/verification.rb
141
+ - lib/verification.rb
142
+ - test/test_helper.rb
143
+ - test/verification_test.rb
144
+ - verification_ext.gemspec
145
+ homepage: https://github.com/debbbbie/verification
146
+ licenses: []
147
+
148
+ post_install_message:
149
+ rdoc_options: []
150
+
151
+ require_paths:
152
+ - lib
153
+ required_ruby_version: !ruby/object:Gem::Requirement
154
+ none: false
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ hash: 3
159
+ segments:
160
+ - 0
161
+ version: "0"
162
+ required_rubygems_version: !ruby/object:Gem::Requirement
163
+ none: false
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ hash: 3
168
+ segments:
169
+ - 0
170
+ version: "0"
171
+ requirements: []
172
+
173
+ rubyforge_project:
174
+ rubygems_version: 1.8.24
175
+ signing_key:
176
+ specification_version: 3
177
+ summary: Verify preconditions for Rails actions
178
+ test_files: []
179
+