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 CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
  $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
3
- require "gems_status"
3
+ require "gems-status"
4
4
 
5
5
  def echo_usage
6
6
  puts "usage: gem-status conf_file"
@@ -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)
@@ -1,7 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'open-uri'
3
- require 'gem_checker'
4
- require 'utils'
3
+ require 'gems-status/gem_checker'
4
+ require 'gems-status/utils'
5
5
 
6
6
  class ExistsInUpstream < GemChecker
7
7
  def ExistsInUpstream.check?(gem)
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
 
2
- require "gem_simple"
2
+ require "gems-status/gem_simple"
3
3
 
4
4
  class GemsCommand
5
5
  attr_reader :result
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module GemsStatusMetadata
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
@@ -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
- file_data = get_data(File::dirname(filename), File::basename(filename))
60
- if file_data.empty?
61
- Utils::log_error("?", "file empty #{filename}")
62
- next
63
- end
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
- @result[name] = [] if !@result[name]
77
- @result[name] << RubyGemsGems_GemSimple.new(name, version , '', filename,
78
- gems_url, dependencies)
79
- @result[name] << RubyGemsGems_GemSimple.new(name, version , '', @upstream_url,
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
@@ -1,7 +1,7 @@
1
1
  require 'rubygems/format'
2
2
  require 'rubygems/old_format'
3
3
  require 'open-uri'
4
- require 'gem_checker'
4
+ require 'gems-status/gem_checker'
5
5
 
6
6
  class NotNativeGemChecker < GemChecker
7
7
  def NotNativeGemChecker.check?(gem)
@@ -1,7 +1,7 @@
1
1
  require 'rubygems/format'
2
2
  require 'rubygems/old_format'
3
3
  require 'open-uri'
4
- require 'gem_checker'
4
+ require 'gems-status/gem_checker'
5
5
 
6
6
  class NotRailsChecker < GemChecker
7
7
  RAILS_GEMS = ["rails", "railties","activesupport"]
@@ -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
@@ -1,4 +1,4 @@
1
- require "gem_simple"
1
+ require "gems-status/gem_simple"
2
2
 
3
3
  class RubyGemsGems_GemSimple < GemSimple
4
4
 
File without changes
@@ -1,6 +1,6 @@
1
1
  require 'rubygems'
2
- require 'gems_status_metadata'
3
- require 'utils'
2
+ require 'gems-status/gems_status_metadata'
3
+ require 'gems-status/utils'
4
4
 
5
5
  class ViewResults
6
6
  @@patched = 0
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: 11
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 5
8
+ - 6
9
9
  - 0
10
- version: 0.5.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-13 00:00:00 Z
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/ruby_gems_gems.rb
59
- - lib/gem_simple.rb
60
- - lib/lockfile_gems.rb
61
- - lib/ruby_gems_gems_gem_simple.rb
62
- - lib/not_native_gem_checker.rb
63
- - lib/gems_composite_command.rb
64
- - lib/gems_status_metadata.rb
65
- - lib/gem_checker.rb
66
- - lib/exists_in_upstream.rb
67
- - lib/not_rails_checker.rb
68
- - lib/view_results.rb
69
- - lib/obs_gems.rb
70
- - lib/gems_command.rb
71
- - lib/gems_status.rb
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.11
113
+ rubygems_version: 1.8.15
114
114
  signing_key:
115
115
  specification_version: 3
116
116
  summary: compares rubygems from different sources