gems-status 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/gems-status +1 -1
- data/lib/{gems_status.rb → gems-status.rb} +5 -5
- data/lib/{exists_in_upstream.rb → gems-status/exists_in_upstream.rb} +2 -2
- data/lib/{gem_checker.rb → gems-status/gem_checker.rb} +0 -0
- data/lib/{gem_simple.rb → gems-status/gem_simple.rb} +0 -0
- data/lib/{gems_command.rb → gems-status/gems_command.rb} +1 -1
- data/lib/{gems_composite_command.rb → gems-status/gems_composite_command.rb} +6 -6
- data/lib/{gems_status_metadata.rb → gems-status/gems_status_metadata.rb} +1 -1
- data/lib/{lockfile_gems.rb → gems-status/lockfile_gems.rb} +25 -23
- data/lib/{not_native_gem_checker.rb → gems-status/not_native_gem_checker.rb} +1 -1
- data/lib/{not_rails_checker.rb → gems-status/not_rails_checker.rb} +1 -1
- data/lib/{obs_gems.rb → gems-status/obs_gems.rb} +3 -3
- data/lib/{ruby_gems_gems.rb → gems-status/ruby_gems_gems.rb} +3 -3
- data/lib/{ruby_gems_gems_gem_simple.rb → gems-status/ruby_gems_gems_gem_simple.rb} +1 -1
- data/lib/{utils.rb → gems-status/utils.rb} +0 -0
- data/lib/{view_results.rb → gems-status/view_results.rb} +2 -2
- metadata +20 -20
data/bin/gems-status
CHANGED
@@ -7,11 +7,11 @@ require "xmlsimple"
|
|
7
7
|
require "open-uri"
|
8
8
|
require "yaml"
|
9
9
|
|
10
|
-
require "gem_simple"
|
11
|
-
require "obs_gems"
|
12
|
-
require "lockfile_gems"
|
13
|
-
require "ruby_gems_gems"
|
14
|
-
require "gems_composite_command"
|
10
|
+
require "gems-status/gem_simple"
|
11
|
+
require "gems-status/obs_gems"
|
12
|
+
require "gems-status/lockfile_gems"
|
13
|
+
require "gems-status/ruby_gems_gems"
|
14
|
+
require "gems-status/gems_composite_command"
|
15
15
|
|
16
16
|
class GemStatus
|
17
17
|
def initialize(conf_file)
|
File without changes
|
File without changes
|
@@ -1,9 +1,9 @@
|
|
1
|
-
require "gem_simple"
|
2
|
-
require "gems_command"
|
3
|
-
require "not_native_gem_checker"
|
4
|
-
require "not_rails_checker"
|
5
|
-
require "exists_in_upstream"
|
6
|
-
require "view_results"
|
1
|
+
require "gems-status/gem_simple"
|
2
|
+
require "gems-status/gems_command"
|
3
|
+
require "gems-status/not_native_gem_checker"
|
4
|
+
require "gems-status/not_rails_checker"
|
5
|
+
require "gems-status/exists_in_upstream"
|
6
|
+
require "gems-status/view_results"
|
7
7
|
|
8
8
|
class GemsCompositeCommand < GemsCommand
|
9
9
|
def initialize(target)
|
@@ -4,9 +4,9 @@ require "open-uri"
|
|
4
4
|
require "zlib"
|
5
5
|
|
6
6
|
require "bundler"
|
7
|
-
require "ruby_gems_gems_gem_simple"
|
8
|
-
require "gems_command"
|
9
|
-
require "utils"
|
7
|
+
require "gems-status/ruby_gems_gems_gem_simple"
|
8
|
+
require "gems-status/gems_command"
|
9
|
+
require "gems-status/utils"
|
10
10
|
|
11
11
|
class LockfileGems < GemsCommand
|
12
12
|
def initialize(conf)
|
@@ -56,28 +56,30 @@ class LockfileGems < GemsCommand
|
|
56
56
|
def execute
|
57
57
|
@filenames.each do |filename|
|
58
58
|
Utils::log_debug "reading #{filename}"
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
lockfile = Bundler::LockfileParser.new(file_data)
|
65
|
-
lockfile.specs.each do |spec|
|
66
|
-
name = spec.name
|
67
|
-
version = Gem::Version.create(spec.version)
|
68
|
-
dependencies = spec.dependencies
|
69
|
-
Utils::log_debug "dependencies for #{name} #{dependencies}"
|
70
|
-
if spec.source.class.name == "Bundler::Source::Git"
|
71
|
-
Utils::log_debug "this comes from git #{name} #{version}"
|
72
|
-
gems_url = spec.source.uri
|
73
|
-
else
|
74
|
-
gems_url = @gems_url
|
59
|
+
Dir.chdir(File.dirname(filename)) do
|
60
|
+
file_data = get_data(File::dirname(filename), File::basename(filename))
|
61
|
+
if file_data.empty?
|
62
|
+
Utils::log_error("?", "file empty #{filename}")
|
63
|
+
next
|
75
64
|
end
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
65
|
+
lockfile = Bundler::LockfileParser.new(file_data)
|
66
|
+
lockfile.specs.each do |spec|
|
67
|
+
name = spec.name
|
68
|
+
version = Gem::Version.create(spec.version)
|
69
|
+
dependencies = spec.dependencies
|
70
|
+
Utils::log_debug "dependencies for #{name} #{dependencies}"
|
71
|
+
if spec.source.class.name == "Bundler::Source::Git"
|
72
|
+
Utils::log_debug "this comes from git #{name} #{version}"
|
73
|
+
gems_url = spec.source.uri
|
74
|
+
else
|
75
|
+
gems_url = @gems_url
|
76
|
+
end
|
77
|
+
@result[name] = [] if !@result[name]
|
78
|
+
@result[name] << RubyGemsGems_GemSimple.new(name, version , '', filename,
|
79
|
+
gems_url, dependencies)
|
80
|
+
@result[name] << RubyGemsGems_GemSimple.new(name, version , '', @upstream_url,
|
80
81
|
@upstream_url, dependencies)
|
82
|
+
end
|
81
83
|
end
|
82
84
|
update_dependencies
|
83
85
|
end
|
@@ -2,9 +2,9 @@ require "rubygems"
|
|
2
2
|
require "xmlsimple"
|
3
3
|
require "open-uri"
|
4
4
|
|
5
|
-
require "gem_simple"
|
6
|
-
require "gems_command"
|
7
|
-
require "utils"
|
5
|
+
require "gems-status/gem_simple"
|
6
|
+
require "gems-status/gems_command"
|
7
|
+
require "gems-status/utils"
|
8
8
|
|
9
9
|
class OBSGems < GemsCommand
|
10
10
|
FILES_TO_IGNORE = /(\w(\.gem|\.spec|\.changes|\.rpmlintrc|-rpm-lintrc|-rpmlintrc))|README.SuSE/
|
@@ -3,9 +3,9 @@ require "xmlsimple"
|
|
3
3
|
require "open-uri"
|
4
4
|
require "zlib"
|
5
5
|
|
6
|
-
require "ruby_gems_gems_gem_simple"
|
7
|
-
require "gems_command"
|
8
|
-
require "utils"
|
6
|
+
require "gems-status/ruby_gems_gems_gem_simple"
|
7
|
+
require "gems-status/gems_command"
|
8
|
+
require "gems-status/utils"
|
9
9
|
|
10
10
|
|
11
11
|
class RubyGemsGems < GemsCommand
|
File without changes
|
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: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 6
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.6.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-04-
|
18
|
+
date: 2012-04-25 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: xml-simple
|
@@ -55,21 +55,21 @@ extra_rdoc_files: []
|
|
55
55
|
|
56
56
|
files:
|
57
57
|
- LICENSE
|
58
|
-
- lib/
|
59
|
-
- lib/
|
60
|
-
- lib/
|
61
|
-
- lib/
|
62
|
-
- lib/
|
63
|
-
- lib/
|
64
|
-
- lib/
|
65
|
-
- lib/
|
66
|
-
- lib/
|
67
|
-
- lib/
|
68
|
-
- lib/
|
69
|
-
- lib/
|
70
|
-
- lib/
|
71
|
-
- lib/
|
72
|
-
- lib/utils.rb
|
58
|
+
- lib/gems-status.rb
|
59
|
+
- lib/gems-status/ruby_gems_gems.rb
|
60
|
+
- lib/gems-status/gem_simple.rb
|
61
|
+
- lib/gems-status/lockfile_gems.rb
|
62
|
+
- lib/gems-status/ruby_gems_gems_gem_simple.rb
|
63
|
+
- lib/gems-status/not_native_gem_checker.rb
|
64
|
+
- lib/gems-status/gems_composite_command.rb
|
65
|
+
- lib/gems-status/gems_status_metadata.rb
|
66
|
+
- lib/gems-status/gem_checker.rb
|
67
|
+
- lib/gems-status/exists_in_upstream.rb
|
68
|
+
- lib/gems-status/not_rails_checker.rb
|
69
|
+
- lib/gems-status/view_results.rb
|
70
|
+
- lib/gems-status/obs_gems.rb
|
71
|
+
- lib/gems-status/gems_command.rb
|
72
|
+
- lib/gems-status/utils.rb
|
73
73
|
- bin/gems-status
|
74
74
|
- test/Gemfile.lock.test
|
75
75
|
- test/test-gems_composite_command.rb
|
@@ -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
|