merb_param_protection 0.9.7 → 0.9.8
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/Rakefile +24 -33
- data/lib/merb_param_protection.rb +3 -0
- metadata +3 -3
data/Rakefile
CHANGED
@@ -18,7 +18,7 @@ GEM_EMAIL = "lancecarlson@gmail.com"
|
|
18
18
|
|
19
19
|
GEM_NAME = "merb_param_protection"
|
20
20
|
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
21
|
-
GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.
|
21
|
+
GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.8") + PKG_BUILD
|
22
22
|
|
23
23
|
RELEASE_NAME = "REL #{GEM_VERSION}"
|
24
24
|
|
@@ -36,7 +36,7 @@ spec = Gem::Specification.new do |s|
|
|
36
36
|
s.author = GEM_AUTHOR
|
37
37
|
s.email = GEM_EMAIL
|
38
38
|
s.homepage = PROJECT_URL
|
39
|
-
s.add_dependency('merb-core', '>= 0.9.
|
39
|
+
s.add_dependency('merb-core', '>= 0.9.8')
|
40
40
|
s.require_path = 'lib'
|
41
41
|
s.files = %w(LICENSE README Rakefile) + Dir.glob("{lib,specs}/**/*")
|
42
42
|
end
|
@@ -45,43 +45,34 @@ Rake::GemPackageTask.new(spec) do |pkg|
|
|
45
45
|
pkg.gem_spec = spec
|
46
46
|
end
|
47
47
|
|
48
|
-
desc "
|
49
|
-
task :
|
50
|
-
|
51
|
-
file.puts spec.to_ruby
|
52
|
-
end
|
48
|
+
desc "Install the gem"
|
49
|
+
task :install do
|
50
|
+
Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
|
53
51
|
end
|
54
52
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
desc "Install the gem"
|
60
|
-
task :install => [:package] do
|
61
|
-
sh install_command(GEM_NAME, GEM_VERSION)
|
53
|
+
desc "Uninstall the gem"
|
54
|
+
task :uninstall do
|
55
|
+
Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
|
62
56
|
end
|
63
57
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
58
|
+
desc "Create a gemspec file"
|
59
|
+
task :gemspec do
|
60
|
+
File.open("#{GEM_NAME}.gemspec", "w") do |file|
|
61
|
+
file.puts spec.to_ruby
|
68
62
|
end
|
69
63
|
end
|
70
64
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
65
|
+
desc "Run all examples (or a specific spec with TASK=xxxx)"
|
66
|
+
Spec::Rake::SpecTask.new('spec') do |t|
|
67
|
+
t.spec_opts = ["-cfs"]
|
68
|
+
t.spec_files = begin
|
69
|
+
if ENV["TASK"]
|
70
|
+
ENV["TASK"].split(',').map { |task| "spec/**/#{task}_spec.rb" }
|
71
|
+
else
|
72
|
+
FileList['spec/**/*_spec.rb']
|
73
|
+
end
|
74
|
+
end
|
78
75
|
end
|
79
76
|
|
80
|
-
desc
|
81
|
-
|
82
|
-
t.spec_files = FileList['spec/**/*_spec.rb']
|
83
|
-
t.spec_opts = ["--format", "specdoc", "--colour"]
|
84
|
-
t.rcov = true
|
85
|
-
t.rcov_dir = 'coverage'
|
86
|
-
t.rcov_opts = ['--exclude', 'gems', '--exclude', 'spec']
|
87
|
-
end
|
77
|
+
desc 'Default: run spec examples'
|
78
|
+
task :default => 'spec'
|
@@ -40,6 +40,9 @@ if defined?(Merb::Plugins)
|
|
40
40
|
base.send(:class_inheritable_accessor, :accessible_params_args)
|
41
41
|
base.send(:class_inheritable_accessor, :protected_params_args)
|
42
42
|
base.send(:class_inheritable_accessor, :log_params_args)
|
43
|
+
# Don't expose these as public methods - otherwise they'll become controller actions
|
44
|
+
base.send(:protected, :accessible_params_args, :protected_params_args, :log_params_args)
|
45
|
+
base.send(:protected, :accessible_params_args=, :protected_params_args=, :log_params_args=)
|
43
46
|
|
44
47
|
base.send(:before, :initialize_params_filter)
|
45
48
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb_param_protection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lance Carlson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-10-07 00:00:00 +03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.9.
|
23
|
+
version: 0.9.8
|
24
24
|
version:
|
25
25
|
description: Merb plugin that provides params_accessible and params_protected class methods
|
26
26
|
email: lancecarlson@gmail.com
|