gems-status 0.3.0 → 0.4.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/lib/gems_composite_command.rb +9 -2
- data/lib/gems_status.rb +0 -2
- data/lib/gems_status_metadata.rb +1 -1
- data/lib/lockfile_gems.rb +6 -5
- data/lib/not_native_gem_checker.rb +14 -3
- data/lib/view_results.rb +1 -1
- data/test/test-lockfile_gems.rb +3 -2
- metadata +5 -5
@@ -36,8 +36,15 @@ class GemsCompositeCommand < GemsCommand
|
|
36
36
|
@results[command.ident] = command.result
|
37
37
|
end
|
38
38
|
@checkers.each do |check_class|
|
39
|
-
|
40
|
-
|
39
|
+
Utils::log_debug "checking #{check_class::description}"
|
40
|
+
@results[@target].sort.each do |k, gems|
|
41
|
+
@checker_results[k] = ""
|
42
|
+
gems.each do |gem|
|
43
|
+
if !check_class::check?(gem)
|
44
|
+
@checker_results[gem.name] << " #{check_class::description}
|
45
|
+
#{gem.name} #{gem.version} #{gem.origin} "
|
46
|
+
end
|
47
|
+
end
|
41
48
|
end
|
42
49
|
end
|
43
50
|
end
|
data/lib/gems_status.rb
CHANGED
data/lib/gems_status_metadata.rb
CHANGED
data/lib/lockfile_gems.rb
CHANGED
@@ -18,12 +18,13 @@ class LockfileGems < GemsCommand
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def get_data(dirname, filename)
|
21
|
-
Dir.chdir(dirname)
|
22
21
|
data = ""
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
Dir.chdir(dirname) do
|
23
|
+
begin
|
24
|
+
data = File.open(filename).read
|
25
|
+
rescue
|
26
|
+
Utils::log_error("?", "There was a problem opening file #{filename} ")
|
27
|
+
end
|
27
28
|
end
|
28
29
|
return data
|
29
30
|
end
|
@@ -6,10 +6,21 @@ require 'gem_checker'
|
|
6
6
|
class NotNativeGemChecker < GemChecker
|
7
7
|
def NotNativeGemChecker.check?(gem)
|
8
8
|
result = nil
|
9
|
-
gem_uri = "#{gem.gems_url}/#{gem.name}-#{gem.version}.gem"
|
9
|
+
gem_uri = URI.parse("#{gem.gems_url}/#{gem.name}-#{gem.version}.gem" )
|
10
|
+
uri_debug = gem_uri.clone
|
11
|
+
uri_debug.password = "********" if uri_debug.password
|
12
|
+
Utils::log_debug "download #{@name} from #{uri_debug}"
|
10
13
|
begin
|
11
|
-
|
12
|
-
|
14
|
+
if gem_uri.user && gem_uri.password
|
15
|
+
source = open(gem_uri.scheme + "://" + gem_uri.host + "/" + gem_uri.path,
|
16
|
+
Gem.binary_mode,
|
17
|
+
:http_basic_authentication=>[gem_uri.user, gem_uri.password]) do |io|
|
18
|
+
result = Gem::Format.from_io io
|
19
|
+
end
|
20
|
+
else
|
21
|
+
source = open(gem_uri, Gem.binary_mode) do |io|
|
22
|
+
result = Gem::Format.from_io io
|
23
|
+
end
|
13
24
|
end
|
14
25
|
rescue IOError
|
15
26
|
#bug on open-uri:137 on closing strings
|
data/lib/view_results.rb
CHANGED
@@ -199,7 +199,7 @@ class ViewResults
|
|
199
199
|
self.print_hash("checks", checker_results, "check")
|
200
200
|
self.print_hash("comments", comments, "comment")
|
201
201
|
self.print_hash("errors", Utils::errors, "errors")
|
202
|
-
date = Time.now.strftime('%
|
202
|
+
date = Time.now.strftime('%a %b %d %H:%M:%S %Z %Y')
|
203
203
|
puts "<p class='footer'>run by <a href=\"https://github.com/jordimassaguerpla/gems-status\">gems-status</a> - #{date} - version: #{GemsStatusMetadata::VERSION}</p>
|
204
204
|
</body>
|
205
205
|
</html>"
|
data/test/test-lockfile_gems.rb
CHANGED
@@ -6,8 +6,9 @@ require 'rubygems/dependency'
|
|
6
6
|
class LockfileGemsTest < LockfileGems
|
7
7
|
attr_accessor :result
|
8
8
|
def initialize
|
9
|
-
|
10
|
-
|
9
|
+
dir=File.expand_path(File.dirname(__FILE__))
|
10
|
+
puts "DEBUG: dir : #{dir} #{dir.class.name}"
|
11
|
+
@filenames = ["#{dir}/Gemfile.lock.test"]
|
11
12
|
@gems_url = ""
|
12
13
|
@result = {}
|
13
14
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gems-status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 4
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jordi Massaguer Pla
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-04-12 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: xml-simple
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
requirements: []
|
111
111
|
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 1.8.
|
113
|
+
rubygems_version: 1.8.15
|
114
114
|
signing_key:
|
115
115
|
specification_version: 3
|
116
116
|
summary: compares rubygems from different sources
|