rubygems_check_replacement_vulnerability 0.1.1 → 0.1.2.beta1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5099b5abe7f96a93908dfce6e089added27d00f6
4
- data.tar.gz: 1794ab8750bc311f3f3062491e079668a6e17f34
3
+ metadata.gz: 9e69fc9a91d8c22e12e8d3ae19fa92f1d9a3100f
4
+ data.tar.gz: 9c62504caad58a82581e05b399efdf47aca8e533
5
5
  SHA512:
6
- metadata.gz: 394271b37cfc43cdbbc5aba26c31c94492eff2582c0ab651949af490998b91a444e67f56918222eba963f9e37f0e1d99f5efdbdac16ece29d14c4013ff9092e8
7
- data.tar.gz: 21d807b91671c8858b439ee96cbf8b85e087f10f579287b3b8f65a3049c7df649cb4301c84cf6fc13e5fff4c44b0b4fbb737b5eed3db558bc66f3faa6a5291b0
6
+ metadata.gz: e92f9d774d3cff533950ad5275277b0d37a2ef24bbd45f6759a32618441d09b0d389422e544796c68d721668194f64541f764a641d1aab5c58f192f1f1933968
7
+ data.tar.gz: c611725a5a87bf3d35c75ea7972a6c89d6910f1bf461b0a0709ffc1a8589fbdc691a5fda0047c576a51bc5ffeed70ae3c17717d998d6410d4c10a7b9ca0f28a5
@@ -64,6 +64,7 @@ module RubygemsCheckReplacementVulnerability
64
64
  rubygems.vulnerable_versions
65
65
  end
66
66
 
67
+ unsafe_count = 0
67
68
  Dir.mktmpdir("repo-") do |work_dir|
68
69
  repository = Repository.new(options[:repo_url], work_dir)
69
70
  repository.git_clone
@@ -83,10 +84,13 @@ module RubygemsCheckReplacementVulnerability
83
84
  if safe
84
85
  puts "[Info] #{rubygems.gem_name} #{version} is safe!"
85
86
  else
86
- puts "[Warn] #{rubygems.gem_name} #{version} is contaminated!"
87
+ puts "[Warn] #{rubygems.gem_name} #{version} is not safe!"
88
+ unsafe_count += 1
87
89
  end
88
90
  end
89
91
  end
92
+
93
+ failure_exit if unsafe_count > 0
90
94
  end
91
95
 
92
96
  no_commands do
@@ -133,6 +137,10 @@ module RubygemsCheckReplacementVulnerability
133
137
 
134
138
  true
135
139
  end
140
+
141
+ def failure_exit
142
+ exit(1)
143
+ end
136
144
  end
137
145
  end
138
146
  end
@@ -1,3 +1,3 @@
1
1
  module RubygemsCheckReplacementVulnerability
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2.beta1"
3
3
  end
@@ -10,7 +10,10 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["sue445@sue445.net"]
11
11
 
12
12
  spec.summary = %q{Check your gems whether affected by "RubyGems.org gem replacement vulnerability and mitigation"}
13
- spec.description = %q{Check your gems whether affected by "RubyGems.org gem replacement vulnerability and mitigation"}
13
+ spec.description = <<-EOS
14
+ Check your gems whether affected by "RubyGems.org gem replacement vulnerability and mitigation"
15
+ http://blog.rubygems.org/2016/04/06/gem-replacement-vulnerability-and-mitigation.html
16
+ EOS
14
17
  spec.homepage = "https://github.com/sue445/rubygems_check_replacement_vulnerability"
15
18
  spec.license = "MIT"
16
19
 
@@ -23,7 +26,7 @@ Gem::Specification.new do |spec|
23
26
 
24
27
  spec.add_dependency "thor"
25
28
 
26
- spec.add_development_dependency "bundler", "~> 1.11"
29
+ spec.add_development_dependency "bundler"
27
30
  spec.add_development_dependency "coveralls"
28
31
  spec.add_development_dependency "codeclimate-test-reporter"
29
32
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygems_check_replacement_vulnerability
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-14 00:00:00.000000000 Z
11
+ date: 2016-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.11'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.11'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: coveralls
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -136,8 +136,9 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
- description: Check your gems whether affected by "RubyGems.org gem replacement vulnerability
140
- and mitigation"
139
+ description: |
140
+ Check your gems whether affected by "RubyGems.org gem replacement vulnerability and mitigation"
141
+ http://blog.rubygems.org/2016/04/06/gem-replacement-vulnerability-and-mitigation.html
141
142
  email:
142
143
  - sue445@sue445.net
143
144
  executables:
@@ -179,9 +180,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
179
180
  version: 2.1.0
180
181
  required_rubygems_version: !ruby/object:Gem::Requirement
181
182
  requirements:
182
- - - ">="
183
+ - - ">"
183
184
  - !ruby/object:Gem::Version
184
- version: '0'
185
+ version: 1.3.1
185
186
  requirements: []
186
187
  rubyforge_project:
187
188
  rubygems_version: 2.5.1