bundler 0.4.0 → 0.4.1

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.

data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'spec/rake/spectask'
6
6
 
7
7
  spec = Gem::Specification.new do |s|
8
8
  s.name = "bundler"
9
- s.version = "0.4.0"
9
+ s.version = "0.4.1"
10
10
  s.author = "Yehuda Katz"
11
11
  s.email = "wycats@gmail.com"
12
12
  s.homepage = "http://github.com/wycats/bundler"
@@ -13,10 +13,10 @@ require "bundler/gem_ext"
13
13
  require "bundler/resolver"
14
14
  require "bundler/manifest_file"
15
15
  require "bundler/manifest"
16
- require "bundler/dependency"
17
16
  require "bundler/dsl"
18
17
  require "bundler/cli"
19
18
  require "bundler/repository"
19
+ require "bundler/runtime/dependency"
20
20
 
21
21
  module Bundler
22
22
  VERSION = "0.5.0"
@@ -22,6 +22,7 @@ module Bundler
22
22
  # Cleanup incase fetch was a no-op
23
23
  repository.cleanup(gems)
24
24
  create_environment_file(repository.path)
25
+ create_bundler_runtime
25
26
  Bundler.logger.info "Done."
26
27
  end
27
28
 
@@ -119,5 +120,17 @@ module Bundler
119
120
  end
120
121
  files
121
122
  end
123
+
124
+ def create_bundler_runtime
125
+ here = Pathname.new(__FILE__).dirname
126
+ there = path.join("bundler")
127
+
128
+ Bundler.logger.info "Creating the bundler runtime"
129
+
130
+ FileUtils.rm_rf(there)
131
+ there.mkdir
132
+ FileUtils.cp(here.join("runtime.rb"), there)
133
+ FileUtils.cp_r(here.join("runtime"), there)
134
+ end
122
135
  end
123
136
  end
@@ -50,7 +50,7 @@ module Bundler
50
50
  ENV["GEM_PATH"] = @gem_path
51
51
  end
52
52
  ENV["PATH"] = "#{@bindir}:#{ENV["PATH"]}"
53
- ENV["RUBYOPT"] = "-r#{@gem_path}/environments/default #{ENV["RUBYOPT"]}"
53
+ ENV["RUBYOPT"] = "-r#{@gem_path}/environment #{ENV["RUBYOPT"]}"
54
54
  end
55
55
 
56
56
  def load_manifest
@@ -20,7 +20,7 @@ module Bundler
20
20
  end
21
21
 
22
22
  def valid?
23
- (Dir[@path.join("*")] - Dir[@path.join("{cache,doc,gems,environment.rb,specifications}")]).empty?
23
+ (Dir[@path.join("*")] - Dir[@path.join("{cache,doc,gems,bundler,environment.rb,specifications}")]).empty?
24
24
  end
25
25
 
26
26
  def download(spec)
@@ -1,46 +1,2 @@
1
- require "bundler/dependency"
2
-
3
- module Bundler
4
- class ManifestFileNotFound < StandardError; end
5
-
6
- def self.require(environment = nil)
7
- ManifestBuilder.run(@gemfile, environment || :default)
8
- end
9
-
10
- class ManifestBuilder
11
- def self.run(gemfile, environment)
12
- unless File.exist?(gemfile)
13
- raise ManifestFileNotFound, "#{gemfile.inspect} does not exist"
14
- end
15
-
16
- builder = new(environment)
17
- builder.instance_eval(File.read(gemfile))
18
- builder
19
- end
20
-
21
- def initialize(environment)
22
- @environment = environment
23
- end
24
-
25
- def bundle_path(*) ; end
26
-
27
- def bin_path(*) ; end
28
-
29
- def disable_rubygems(*) ; end
30
-
31
- def disable_system_gems(*) ; end
32
-
33
- def source(*) ; end
34
-
35
- def clear_sources(*) ; end
36
-
37
- def gem(name, *args, &blk)
38
- options = args.last.is_a?(Hash) ? args.pop : {}
39
- version = args.last
40
-
41
- dep = Dependency.new(name, options.merge(:version => version), &blk)
42
- dep.require(@environment)
43
- dep
44
- end
45
- end
46
- end
1
+ require File.join(File.dirname(__FILE__), "runtime", "dsl")
2
+ require File.join(File.dirname(__FILE__), "runtime", "dependency")
@@ -0,0 +1,44 @@
1
+ module Bundler
2
+ class ManifestFileNotFound < StandardError; end
3
+
4
+ def self.require(environment = nil)
5
+ ManifestBuilder.run(@gemfile, environment || :default)
6
+ end
7
+
8
+ class ManifestBuilder
9
+ def self.run(gemfile, environment)
10
+ unless File.exist?(gemfile)
11
+ raise ManifestFileNotFound, "#{gemfile.inspect} does not exist"
12
+ end
13
+
14
+ builder = new(environment)
15
+ builder.instance_eval(File.read(gemfile))
16
+ builder
17
+ end
18
+
19
+ def initialize(environment)
20
+ @environment = environment
21
+ end
22
+
23
+ def bundle_path(*) ; end
24
+
25
+ def bin_path(*) ; end
26
+
27
+ def disable_rubygems(*) ; end
28
+
29
+ def disable_system_gems(*) ; end
30
+
31
+ def source(*) ; end
32
+
33
+ def clear_sources(*) ; end
34
+
35
+ def gem(name, *args, &blk)
36
+ options = args.last.is_a?(Hash) ? args.pop : {}
37
+ version = args.last
38
+
39
+ dep = Dependency.new(name, options.merge(:version => version), &blk)
40
+ dep.require(@environment)
41
+ dep
42
+ end
43
+ end
44
+ end
@@ -36,6 +36,8 @@ module Bundler
36
36
  add_specs_to_loaded_specs
37
37
  add_specs_to_index
38
38
  <% end -%>
39
+
40
+ require File.join(dir, "bundler", "runtime")
39
41
  end
40
42
 
41
43
  <% if @rubygems -%>
@@ -79,6 +81,4 @@ module Gem
79
81
  class VerificationError < Exception; end
80
82
  class SystemExitException < SystemExit; end
81
83
  end
82
- <% end -%>
83
-
84
- require "bundler/runtime"
84
+ <% end -%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehuda Katz
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-18 00:00:00 -07:00
12
+ date: 2009-08-19 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -29,7 +29,6 @@ files:
29
29
  - lib/bundler/cli.rb
30
30
  - lib/bundler/commands/bundle_command.rb
31
31
  - lib/bundler/commands/exec_command.rb
32
- - lib/bundler/dependency.rb
33
32
  - lib/bundler/dsl.rb
34
33
  - lib/bundler/finder.rb
35
34
  - lib/bundler/gem_bundle.rb
@@ -38,6 +37,8 @@ files:
38
37
  - lib/bundler/manifest_file.rb
39
38
  - lib/bundler/repository.rb
40
39
  - lib/bundler/resolver.rb
40
+ - lib/bundler/runtime/dependency.rb
41
+ - lib/bundler/runtime/dsl.rb
41
42
  - lib/bundler/runtime.rb
42
43
  - lib/bundler/source.rb
43
44
  - lib/bundler/templates/app_script.erb