ruby_cop 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -62,6 +62,7 @@ module RubyCop
62
62
  end
63
63
 
64
64
  CALL_BLACKLIST = %w[
65
+ __send__
65
66
  abort
66
67
  alias_method
67
68
  at_exit
@@ -86,6 +87,7 @@ module RubyCop
86
87
  method
87
88
  module_eval
88
89
  open
90
+ public_send
89
91
  readline
90
92
  readlines
91
93
  redo
@@ -1,3 +1,3 @@
1
1
  module RubyCop
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ["lib"]
21
21
 
22
22
  s.add_development_dependency 'geminabox'
23
+ s.add_development_dependency 'rake'
23
24
  s.add_development_dependency 'rspec', '~> 2.0'
24
25
  s.add_development_dependency 'yard'
25
26
  end
@@ -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
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-05-23 00:00:00.000000000 Z
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.24
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: