bundler 0.9.9 → 0.9.10

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bundler might be problematic. Click here for more details.

@@ -276,7 +276,13 @@ Bundler 0.9 changes the following Bundler 0.8 Gemfile APIs:
276
276
 
277
277
  Explanations of common Bundler use cases can be found in [Using Bundler in Real Life](http://yehudakatz.com/2010/02/09/using-bundler-in-real-life/). The general philosophy behind Bundler 0.9 is explained at some length in [Bundler 0.9: Heading Toward 1.0](http://yehudakatz.com/2010/02/01/bundler-0-9-heading-toward-1-0/).
278
278
 
279
- Any remaining questions may be directed via email to the [Bundler mailing list](http://groups.google.com/group/ruby-bundler) or via IRC to [#carlhuda](irc://irc.freenode.net/carlhuda) on Freenode.
279
+ ### Deploying to memory-constrained servers
280
+
281
+ When deploying to a server that is memory-constrained, like Dreamhost, you should run `bundle package` on your local development machine, and then check in the resulting `Gemfile.lock` file and `vendor/cache` directory. The lockfile and cached gems will mean bundler can just install the gems immediately, without contacting any gem servers or using a lot of memory to resolve the dependency tree. On the server, you only need to run `bundle install` after you update your deployed code.
282
+
283
+ ### Other questions
284
+
285
+ Any remaining questions may be asked via IRC in [#carlhuda](irc://irc.freenode.net/carlhuda) on Freenode, or via email on the [Bundler mailing list](http://groups.google.com/group/ruby-bundler).
280
286
 
281
287
  ## Reporting bugs
282
288
 
@@ -4,7 +4,7 @@ require 'yaml'
4
4
  require 'bundler/rubygems_ext'
5
5
 
6
6
  module Bundler
7
- VERSION = "0.9.9"
7
+ VERSION = "0.9.10"
8
8
 
9
9
  autoload :Definition, 'bundler/definition'
10
10
  autoload :Dependency, 'bundler/dependency'
@@ -22,7 +22,7 @@ module Bundler
22
22
  def group_spec(specs, spec, groups)
23
23
  spec.groups.concat(groups)
24
24
  spec.groups.uniq!
25
- spec.dependencies.select { |d| d.type != :development }.each do |d|
25
+ spec.bundler_dependencies.select { |d| d.type != :development }.each do |d|
26
26
  spec = specs.find { |s| s.name == d.name }
27
27
  group_spec(specs, spec, groups)
28
28
  end
@@ -7,7 +7,7 @@ module Bundler
7
7
  end
8
8
 
9
9
  def run(options)
10
- if dependencies.empty?
10
+ if actual_dependencies.empty?
11
11
  Bundler.ui.warn "The Gemfile specifies no dependencies"
12
12
  return
13
13
  end
@@ -36,6 +36,10 @@ module Bundler
36
36
  end
37
37
 
38
38
  def dependencies
39
+ @definition.dependencies
40
+ end
41
+
42
+ def actual_dependencies
39
43
  @definition.actual_dependencies
40
44
  end
41
45
 
@@ -51,19 +55,19 @@ module Bundler
51
55
 
52
56
  def resolve_locally
53
57
  # Return unless all the dependencies have = version requirements
54
- return if dependencies.any? { |d| ambiguous?(d) }
58
+ return if actual_dependencies.any? { |d| ambiguous?(d) }
55
59
 
56
60
  source_requirements = {}
57
- dependencies.each do |dep|
61
+ actual_dependencies.each do |dep|
58
62
  next unless dep.source && dep.source.respond_to?(:local_specs)
59
63
  source_requirements[dep.name] = dep.source.local_specs
60
64
  end
61
65
 
62
66
  # Run a resolve against the locally available gems
63
- specs = Resolver.resolve(dependencies, local_index, source_requirements)
67
+ specs = Resolver.resolve(actual_dependencies, local_index, source_requirements)
64
68
 
65
69
  # Simple logic for now. Can improve later.
66
- specs.length == dependencies.length && specs
70
+ specs.length == actual_dependencies.length && specs
67
71
  rescue Bundler::GemNotFound
68
72
  nil
69
73
  raise if ENV["OMG"]
@@ -73,12 +77,12 @@ module Bundler
73
77
  index # trigger building the index
74
78
  Bundler.ui.info "Resolving dependencies"
75
79
  source_requirements = {}
76
- dependencies.each do |dep|
80
+ actual_dependencies.each do |dep|
77
81
  next unless dep.source
78
82
  source_requirements[dep.name] = dep.source.specs
79
83
  end
80
84
 
81
- specs = Resolver.resolve(dependencies, index, source_requirements)
85
+ specs = Resolver.resolve(actual_dependencies, index, source_requirements)
82
86
  specs
83
87
  end
84
88
 
@@ -90,10 +94,6 @@ module Bundler
90
94
  @index ||= begin
91
95
  index = Index.new
92
96
 
93
- if File.directory?("#{root}/vendor/cache")
94
- index = cache_source.specs.merge(index).freeze
95
- end
96
-
97
97
  rg_sources = sources.select { |s| s.is_a?(Source::Rubygems) }
98
98
  other_sources = sources.select { |s| !s.is_a?(Source::Rubygems) }
99
99
 
@@ -105,10 +105,14 @@ module Bundler
105
105
 
106
106
  index = Index.from_installed_gems.merge(index)
107
107
 
108
+ if File.directory?("#{root}/vendor/cache")
109
+ index = cache_source.specs.merge(index)
110
+ end
111
+
108
112
  rg_sources.each do |source|
109
113
  i = source.specs
110
114
  Bundler.ui.debug "Source: Processing index"
111
- index = i.merge(index).freeze
115
+ index = i.merge(index)
112
116
  end
113
117
 
114
118
  index
@@ -59,7 +59,7 @@ module Bundler
59
59
  result.values.each do |spec1|
60
60
  index = nil
61
61
  place = ordered.detect do |spec2|
62
- spec1.dependencies.any? { |d| d.name == spec2.name }
62
+ spec1.bundler_dependencies.any? { |d| d.name == spec2.name }
63
63
  end
64
64
  place ?
65
65
  ordered.insert(ordered.index(place), spec1) :
@@ -204,7 +204,7 @@ module Bundler
204
204
  # Now, we have to loop through all child dependencies and add them to our
205
205
  # array of requirements.
206
206
  debug { " Dependencies"}
207
- spec.dependencies.each do |dep|
207
+ spec.bundler_dependencies.each do |dep|
208
208
  next if dep.type == :development
209
209
  debug { " * #{dep.name} (#{dep.requirement})" }
210
210
  dep.required_by.replace(requirement.required_by)
@@ -1,6 +1,6 @@
1
1
  unless defined? Gem
2
- require 'rubygems'
3
- require 'rubygems/specification'
2
+ require 'rubygems'
3
+ require 'rubygems/specification'
4
4
  end
5
5
 
6
6
  module Gem
@@ -17,19 +17,17 @@ module Gem
17
17
  @groups ||= []
18
18
  end
19
19
 
20
- module ImplicitRakeDependency
21
- def dependencies
22
- original = super
23
- original << Dependency.new("rake", ">= 0") if implicit_rake_dependency?
24
- original
25
- end
26
-
27
- private
28
- def implicit_rake_dependency?
29
- extensions.any? { |e| e =~ /rakefile|mkrf_conf/i }
30
- end
20
+ def bundler_dependencies
21
+ original = dependencies
22
+ original << Dependency.new("rake", ">= 0") if implicit_rake_dependency?
23
+ original
24
+ end
25
+
26
+ private
27
+
28
+ def implicit_rake_dependency?
29
+ extensions.any? { |e| e =~ /rakefile|mkrf_conf/i }
31
30
  end
32
- include ImplicitRakeDependency
33
31
  end
34
32
 
35
33
  class Dependency
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 9
9
- version: 0.9.9
8
+ - 10
9
+ version: 0.9.10
10
10
  platform: ruby
11
11
  authors:
12
12
  - Carl Lerche
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-02-25 00:00:00 -08:00
18
+ date: 2010-03-01 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -95,8 +95,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  segments:
96
96
  - 1
97
97
  - 3
98
- - 5
99
- version: 1.3.5
98
+ - 6
99
+ version: 1.3.6
100
100
  requirements: []
101
101
 
102
102
  rubyforge_project: