ruby_cop 1.0.4 → 1.0.5
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/lib/ruby_cop/policy.rb +2 -0
- data/lib/ruby_cop/version.rb +1 -1
- data/ruby_cop.gemspec +1 -0
- data/spec/policy_spec.rb +2 -0
- metadata +19 -4
data/lib/ruby_cop/policy.rb
CHANGED
data/lib/ruby_cop/version.rb
CHANGED
data/ruby_cop.gemspec
CHANGED
data/spec/policy_spec.rb
CHANGED
@@ -85,6 +85,7 @@ describe RubyCop::Policy do
|
|
85
85
|
it { should allow('"abc".intern') }
|
86
86
|
it { should allow('"abc".to_sym') }
|
87
87
|
|
88
|
+
it { should_not allow('__send__(:eval, "`ls`")') }
|
88
89
|
it { should_not allow('abort("fail")') }
|
89
90
|
it { should_not allow('alias :foo :bar') }
|
90
91
|
it { should_not allow('alias foo bar') }
|
@@ -119,6 +120,7 @@ describe RubyCop::Policy do
|
|
119
120
|
it { should_not allow('method(:eval)') }
|
120
121
|
it { should_not allow('module_eval("`ls`")') }
|
121
122
|
it { should_not allow('open("/etc/passwd")') }
|
123
|
+
it { should_not allow('public_send(:eval, "`ls`")') }
|
122
124
|
it { should_not allow('readline') }
|
123
125
|
it { should_not allow('readline()') }
|
124
126
|
it { should_not allow('readlines') }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_cop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-06-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: geminabox
|
@@ -28,6 +28,22 @@ dependencies:
|
|
28
28
|
- - ! '>='
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '0'
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: rake
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
type: :development
|
40
|
+
prerelease: false
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
31
47
|
- !ruby/object:Gem::Dependency
|
32
48
|
name: rspec
|
33
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
146
|
version: '0'
|
131
147
|
requirements: []
|
132
148
|
rubyforge_project: ruby_cop
|
133
|
-
rubygems_version: 1.8.
|
149
|
+
rubygems_version: 1.8.21
|
134
150
|
signing_key:
|
135
151
|
specification_version: 3
|
136
152
|
summary: Statically analyze Ruby and neutralize nefarious code
|
@@ -139,4 +155,3 @@ test_files:
|
|
139
155
|
- spec/analyzer/policy_spec.rb
|
140
156
|
- spec/policy_spec.rb
|
141
157
|
- spec/spec_helper.rb
|
142
|
-
has_rdoc:
|