gem-dependent 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -3,4 +3,4 @@ source 'http://rubygems.org'
3
3
  gem 'rake'
4
4
  gem 'rspec', '~>2'
5
5
  gem 'jeweler'
6
- gem 'parallel'
6
+ gem 'parallel', '>= 0.5.1'
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GEM
9
9
  git (>= 1.2.5)
10
10
  rubyforge (>= 2.0.0)
11
11
  json_pure (1.4.6)
12
- parallel (0.5.0)
12
+ parallel (0.5.1)
13
13
  rake (0.8.7)
14
14
  rspec (2.0.1)
15
15
  rspec-core (~> 2.0.1)
@@ -29,6 +29,6 @@ PLATFORMS
29
29
 
30
30
  DEPENDENCIES
31
31
  jeweler
32
- parallel
32
+ parallel (>= 0.5.1)
33
33
  rake
34
34
  rspec (~> 2)
data/Rakefile CHANGED
@@ -12,7 +12,19 @@ begin
12
12
  gem.email = "grosser.michael@gmail.com"
13
13
  gem.homepage = "http://github.com/grosser/#{gem.name}"
14
14
  gem.authors = ["Michael Grosser"]
15
- gem.add_dependency 'parallel', '>= 0.4'
15
+
16
+
17
+ # if parallel was a dependency, every requirement of rubygems would
18
+ # load parallel, which causes overhead and problems
19
+ gem.post_install_message = <<-POST_INSTALL_MESSAGE
20
+ #{'*'*50}
21
+
22
+ Since parallel cannot be a dependency, please install by hand:
23
+
24
+ gem install parallel
25
+
26
+ #{'*'*50}
27
+ POST_INSTALL_MESSAGE
16
28
  end
17
29
 
18
30
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gem-dependent}
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
12
- s.date = %q{2010-11-04}
12
+ s.date = %q{2010-11-05}
13
13
  s.email = %q{grosser.michael@gmail.com}
14
14
  s.files = [
15
15
  "Gemfile",
@@ -25,6 +25,14 @@ Gem::Specification.new do |s|
25
25
  "spec/fixtures/gemcutter_specs.yml"
26
26
  ]
27
27
  s.homepage = %q{http://github.com/grosser/gem-dependent}
28
+ s.post_install_message = %q{**************************************************
29
+
30
+ Since parallel cannot be a dependency, please install by hand:
31
+
32
+ gem install parallel
33
+
34
+ **************************************************
35
+ }
28
36
  s.rdoc_options = ["--charset=UTF-8"]
29
37
  s.require_paths = ["lib"]
30
38
  s.rubygems_version = %q{1.3.7}
@@ -38,12 +46,9 @@ Gem::Specification.new do |s|
38
46
  s.specification_version = 3
39
47
 
40
48
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
41
- s.add_runtime_dependency(%q<parallel>, [">= 0.4"])
42
49
  else
43
- s.add_dependency(%q<parallel>, [">= 0.4"])
44
50
  end
45
51
  else
46
- s.add_dependency(%q<parallel>, [">= 0.4"])
47
52
  end
48
53
  end
49
54
 
@@ -1,5 +1,4 @@
1
1
  require 'rubygems/command'
2
- require 'rubygems/dependent'
3
2
 
4
3
  class Gem::Commands::DependentCommand < Gem::Command
5
4
  def initialize
@@ -27,6 +26,10 @@ class Gem::Commands::DependentCommand < Gem::Command
27
26
  end
28
27
 
29
28
  def execute
29
+ # only require when it is really needed, otherwise
30
+ # it would be required every time someone loads rubygems
31
+ require 'rubygems/dependent'
32
+
30
33
  gem = get_all_gem_names.first
31
34
  gems_and_dependencies = Gem::Dependent.find(gem, options)
32
35
  gems_and_dependencies.each do |gem, dependencies|
@@ -35,6 +38,9 @@ class Gem::Commands::DependentCommand < Gem::Command
35
38
  end.join(', ')
36
39
  puts "#{gem} #{requirements}"
37
40
  end
41
+ rescue Object => e
42
+ $stderr.puts e
43
+ $stderr.puts e.backtrace
38
44
  end
39
45
 
40
46
  private
@@ -1,6 +1,9 @@
1
1
  require 'parallel'
2
2
  require 'rubygems/spec_fetcher'
3
3
 
4
+ # older parallel versions can produce strange bugs
5
+ puts "update parallel gem" if Parallel::VERSION < '0.5.1'
6
+
4
7
  module Gem
5
8
  class Dependent
6
9
  VERSION = File.read( File.join(File.dirname(__FILE__),'..','..','VERSION') ).strip
@@ -30,7 +33,7 @@ module Gem
30
33
  private
31
34
 
32
35
  def self.fetch_all_dependencies(specs_and_sources)
33
- Parallel.map(specs_and_sources, :in_processes => 20) do |spec, source|
36
+ Parallel.map(specs_and_sources, :in_processes => 15) do |spec, source|
34
37
  yield if block_given?
35
38
  name = spec.first
36
39
  dependencies = fetch_dependencies(spec, source)
@@ -42,7 +45,7 @@ module Gem
42
45
  begin
43
46
  fetcher = Gem::SpecFetcher.fetcher
44
47
  fetcher.fetch_spec(spec, URI.parse(source)).dependencies
45
- rescue Gem::RemoteFetcher::FetchError, Zlib::DataError => e
48
+ rescue Object => e
46
49
  $stderr.puts e
47
50
  []
48
51
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-dependent
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
9
+ - 4
10
+ version: 0.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Grosser
@@ -15,24 +15,10 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-04 00:00:00 +01:00
18
+ date: 2010-11-05 00:00:00 +01:00
19
19
  default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- requirement: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- hash: 3
28
- segments:
29
- - 0
30
- - 4
31
- version: "0.4"
32
- name: parallel
33
- prerelease: false
34
- type: :runtime
35
- version_requirements: *id001
20
+ dependencies: []
21
+
36
22
  description:
37
23
  email: grosser.michael@gmail.com
38
24
  executables: []
@@ -57,7 +43,15 @@ has_rdoc: true
57
43
  homepage: http://github.com/grosser/gem-dependent
58
44
  licenses: []
59
45
 
60
- post_install_message:
46
+ post_install_message: |
47
+ **************************************************
48
+
49
+ Since parallel cannot be a dependency, please install by hand:
50
+
51
+ gem install parallel
52
+
53
+ **************************************************
54
+
61
55
  rdoc_options:
62
56
  - --charset=UTF-8
63
57
  require_paths: