param_protected 3.0.0 → 4.0.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.
- data/CHANGELOG +9 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +40 -42
- data/README.rdoc +17 -4
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/param_protected/controller_modifications.rb +6 -8
- metadata +6 -6
data/CHANGELOG
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,35 +1,34 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
actionmailer (3.
|
5
|
-
actionpack (= 3.
|
6
|
-
mail (~> 2.
|
7
|
-
actionpack (3.
|
8
|
-
activemodel (= 3.
|
9
|
-
activesupport (= 3.
|
4
|
+
actionmailer (3.2.1)
|
5
|
+
actionpack (= 3.2.1)
|
6
|
+
mail (~> 2.4.0)
|
7
|
+
actionpack (3.2.1)
|
8
|
+
activemodel (= 3.2.1)
|
9
|
+
activesupport (= 3.2.1)
|
10
10
|
builder (~> 3.0.0)
|
11
11
|
erubis (~> 2.7.0)
|
12
|
-
|
13
|
-
rack (~> 1.
|
12
|
+
journey (~> 1.0.1)
|
13
|
+
rack (~> 1.4.0)
|
14
14
|
rack-cache (~> 1.1)
|
15
|
-
rack-mount (~> 0.8.2)
|
16
15
|
rack-test (~> 0.6.1)
|
17
|
-
sprockets (~> 2.
|
18
|
-
activemodel (3.
|
19
|
-
activesupport (= 3.
|
16
|
+
sprockets (~> 2.1.2)
|
17
|
+
activemodel (3.2.1)
|
18
|
+
activesupport (= 3.2.1)
|
20
19
|
builder (~> 3.0.0)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
arel (~> 2.2.1)
|
20
|
+
activerecord (3.2.1)
|
21
|
+
activemodel (= 3.2.1)
|
22
|
+
activesupport (= 3.2.1)
|
23
|
+
arel (~> 3.0.0)
|
26
24
|
tzinfo (~> 0.3.29)
|
27
|
-
activeresource (3.
|
28
|
-
activemodel (= 3.
|
29
|
-
activesupport (= 3.
|
30
|
-
activesupport (3.
|
25
|
+
activeresource (3.2.1)
|
26
|
+
activemodel (= 3.2.1)
|
27
|
+
activesupport (= 3.2.1)
|
28
|
+
activesupport (3.2.1)
|
29
|
+
i18n (~> 0.6)
|
31
30
|
multi_json (~> 1.0)
|
32
|
-
arel (
|
31
|
+
arel (3.0.0)
|
33
32
|
builder (3.0.0)
|
34
33
|
erubis (2.7.0)
|
35
34
|
git (1.2.5)
|
@@ -39,42 +38,41 @@ GEM
|
|
39
38
|
bundler (~> 1.0)
|
40
39
|
git (>= 1.2.5)
|
41
40
|
rake
|
42
|
-
|
43
|
-
|
41
|
+
journey (1.0.1)
|
42
|
+
json (1.6.5)
|
43
|
+
mail (2.4.1)
|
44
44
|
i18n (>= 0.4.0)
|
45
45
|
mime-types (~> 1.16)
|
46
46
|
treetop (~> 1.4.8)
|
47
47
|
mime-types (1.17.2)
|
48
|
-
multi_json (1.0.
|
48
|
+
multi_json (1.0.4)
|
49
49
|
polyglot (0.3.3)
|
50
|
-
rack (1.
|
50
|
+
rack (1.4.1)
|
51
51
|
rack-cache (1.1)
|
52
52
|
rack (>= 0.4)
|
53
|
-
rack-mount (0.8.3)
|
54
|
-
rack (>= 1.0.0)
|
55
53
|
rack-ssl (1.3.2)
|
56
54
|
rack
|
57
55
|
rack-test (0.6.1)
|
58
56
|
rack (>= 1.0)
|
59
|
-
rails (3.
|
60
|
-
actionmailer (= 3.
|
61
|
-
actionpack (= 3.
|
62
|
-
activerecord (= 3.
|
63
|
-
activeresource (= 3.
|
64
|
-
activesupport (= 3.
|
57
|
+
rails (3.2.1)
|
58
|
+
actionmailer (= 3.2.1)
|
59
|
+
actionpack (= 3.2.1)
|
60
|
+
activerecord (= 3.2.1)
|
61
|
+
activeresource (= 3.2.1)
|
62
|
+
activesupport (= 3.2.1)
|
65
63
|
bundler (~> 1.0)
|
66
|
-
railties (= 3.
|
67
|
-
railties (3.
|
68
|
-
actionpack (= 3.
|
69
|
-
activesupport (= 3.
|
64
|
+
railties (= 3.2.1)
|
65
|
+
railties (3.2.1)
|
66
|
+
actionpack (= 3.2.1)
|
67
|
+
activesupport (= 3.2.1)
|
70
68
|
rack-ssl (~> 1.3.2)
|
71
69
|
rake (>= 0.8.7)
|
72
70
|
rdoc (~> 3.4)
|
73
71
|
thor (~> 0.14.6)
|
74
72
|
rake (0.9.2.2)
|
75
|
-
rdoc (3.
|
73
|
+
rdoc (3.12)
|
76
74
|
json (~> 1.4)
|
77
|
-
sprockets (2.
|
75
|
+
sprockets (2.1.2)
|
78
76
|
hike (~> 1.2)
|
79
77
|
rack (~> 1.0)
|
80
78
|
tilt (~> 1.1, != 1.3.0)
|
@@ -83,11 +81,11 @@ GEM
|
|
83
81
|
treetop (1.4.10)
|
84
82
|
polyglot
|
85
83
|
polyglot (>= 0.3.1)
|
86
|
-
tzinfo (0.3.
|
84
|
+
tzinfo (0.3.31)
|
87
85
|
|
88
86
|
PLATFORMS
|
89
87
|
ruby
|
90
88
|
|
91
89
|
DEPENDENCIES
|
92
90
|
jeweler
|
93
|
-
rails (~> 3.
|
91
|
+
rails (~> 3.2.0)
|
data/README.rdoc
CHANGED
@@ -3,12 +3,22 @@ This plugin provides two class methods on <tt>ActiveController::Base</tt> that f
|
|
3
3
|
|
4
4
|
=== Installation
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
==== Rails 2.3.x
|
7
|
+
|
8
|
+
gem install param_protected -v "~> 1.0.0"
|
9
|
+
|
10
|
+
==== Rails 3.0.x
|
11
|
+
|
12
|
+
gem "param_protected", "~> 2.0.0"
|
9
13
|
|
10
14
|
Thanks to {jonleighton}[http://github.com/jonleighton] for the Rails 3 port.
|
11
15
|
|
16
|
+
==== Rails 3.1.x
|
17
|
+
|
18
|
+
gem "param_protected", "~> 3.0.0"
|
19
|
+
|
20
|
+
Thanks to {gucki}[https://github.com/gucki] for the Rails 3.1 port.
|
21
|
+
|
12
22
|
=== Usage
|
13
23
|
class YourController < ActiveController::Base
|
14
24
|
param_protected <param_name> <options>
|
@@ -76,4 +86,7 @@ Christopher J. Bottaro - {cjbottaro}[http://github.com/cjbottaro]
|
|
76
86
|
|
77
87
|
=== Contributors
|
78
88
|
Moritz Heidkamp - {DerGuteMoritz}[http://github.com/DerGuteMoritz]
|
79
|
-
|
89
|
+
|
90
|
+
Jon Leighton - {jonleighton}[http://github.com/jonleighton]
|
91
|
+
|
92
|
+
Corin Langosch - {gucki}[https://github.com/gucki]
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
4.0.0
|
@@ -29,15 +29,13 @@ module ParamProtected
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
end
|
32
|
+
def _protector
|
33
|
+
self.class._protector
|
34
|
+
end
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
end
|
36
|
+
def params_with_protection
|
37
|
+
return params_without_protection if action_name.blank?
|
38
|
+
@params_with_protection ||= _protector.protect(self, params_without_protection, action_name)
|
41
39
|
end
|
42
40
|
end
|
43
41
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: param_protected
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jeweler
|
16
|
-
requirement: &
|
16
|
+
requirement: &70291141551340 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70291141551340
|
25
25
|
description: Provides two class methods on ActiveController::Base that filter the
|
26
26
|
params hash for that controller's actions. You can think of them as the controller
|
27
27
|
analog of attr_protected and attr_accessible.
|
@@ -85,7 +85,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
85
85
|
version: '0'
|
86
86
|
segments:
|
87
87
|
- 0
|
88
|
-
hash: -
|
88
|
+
hash: -4067681859825759352
|
89
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
90
|
none: false
|
91
91
|
requirements:
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 1.8.
|
97
|
+
rubygems_version: 1.8.11
|
98
98
|
signing_key:
|
99
99
|
specification_version: 3
|
100
100
|
summary: Filter unwanted parameters in your controllers and actions.
|