bundler 1.0.0 → 1.0.2

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.

Files changed (108) hide show
  1. data/.gitignore +12 -0
  2. data/CHANGELOG.md +28 -6
  3. data/ISSUES.md +1 -1
  4. data/README.md +7 -5
  5. data/Rakefile +173 -0
  6. data/UPGRADING.md +103 -0
  7. data/bundler.gemspec +28 -0
  8. data/lib/bundler.rb +1 -0
  9. data/lib/bundler/capistrano.rb +2 -31
  10. data/lib/bundler/cli.rb +18 -16
  11. data/lib/bundler/deployment.rb +37 -0
  12. data/lib/bundler/dsl.rb +3 -3
  13. data/lib/bundler/gem_helper.rb +4 -7
  14. data/lib/bundler/graph.rb +3 -3
  15. data/lib/bundler/installer.rb +1 -0
  16. data/lib/bundler/lockfile_parser.rb +1 -1
  17. data/lib/bundler/man/bundle +1 -1
  18. data/lib/bundler/man/bundle-config +92 -0
  19. data/lib/bundler/man/bundle-config.txt +72 -30
  20. data/lib/bundler/man/bundle-exec +1 -1
  21. data/lib/bundler/man/bundle-exec.txt +1 -1
  22. data/lib/bundler/man/bundle-install +1 -1
  23. data/lib/bundler/man/bundle-install.txt +1 -1
  24. data/lib/bundler/man/bundle-package +1 -1
  25. data/lib/bundler/man/bundle-package.txt +1 -1
  26. data/lib/bundler/man/bundle-update +1 -1
  27. data/lib/bundler/man/bundle-update.txt +1 -1
  28. data/lib/bundler/man/bundle.txt +1 -1
  29. data/lib/bundler/man/gemfile.5 +2 -2
  30. data/lib/bundler/man/gemfile.5.txt +2 -2
  31. data/lib/bundler/settings.rb +2 -2
  32. data/lib/bundler/source.rb +2 -3
  33. data/lib/bundler/templates/Executable +1 -1
  34. data/lib/bundler/templates/newgem/Gemfile.tt +1 -1
  35. data/lib/bundler/templates/newgem/bin/newgem.tt +3 -0
  36. data/lib/bundler/templates/newgem/newgem.gemspec.tt +11 -12
  37. data/lib/bundler/version.rb +1 -1
  38. data/lib/bundler/vlad.rb +9 -0
  39. data/man/bundle-config.ronn +90 -0
  40. data/man/bundle-exec.ronn +98 -0
  41. data/man/bundle-install.ronn +310 -0
  42. data/man/bundle-package.ronn +59 -0
  43. data/man/bundle-update.ronn +176 -0
  44. data/man/bundle.ronn +77 -0
  45. data/man/gemfile.5.ronn +254 -0
  46. data/man/index.txt +6 -0
  47. data/spec/cache/gems_spec.rb +205 -0
  48. data/spec/cache/git_spec.rb +9 -0
  49. data/spec/cache/path_spec.rb +27 -0
  50. data/spec/cache/platform_spec.rb +57 -0
  51. data/spec/install/deploy_spec.rb +171 -0
  52. data/spec/install/deprecated_spec.rb +43 -0
  53. data/spec/install/gems/c_ext_spec.rb +48 -0
  54. data/spec/install/gems/env_spec.rb +107 -0
  55. data/spec/install/gems/flex_spec.rb +272 -0
  56. data/spec/install/gems/groups_spec.rb +209 -0
  57. data/spec/install/gems/locked_spec.rb +48 -0
  58. data/spec/install/gems/packed_spec.rb +72 -0
  59. data/spec/install/gems/platform_spec.rb +181 -0
  60. data/spec/install/gems/resolving_spec.rb +72 -0
  61. data/spec/install/gems/simple_case_spec.rb +709 -0
  62. data/spec/install/gems/sudo_spec.rb +77 -0
  63. data/spec/install/gems/win32_spec.rb +26 -0
  64. data/spec/install/gemspec_spec.rb +96 -0
  65. data/spec/install/git_spec.rb +552 -0
  66. data/spec/install/invalid_spec.rb +17 -0
  67. data/spec/install/path_spec.rb +335 -0
  68. data/spec/install/upgrade_spec.rb +26 -0
  69. data/spec/lock/flex_spec.rb +625 -0
  70. data/spec/lock/git_spec.rb +35 -0
  71. data/spec/other/check_spec.rb +221 -0
  72. data/spec/other/config_spec.rb +40 -0
  73. data/spec/other/console_spec.rb +102 -0
  74. data/spec/other/exec_spec.rb +241 -0
  75. data/spec/other/ext_spec.rb +16 -0
  76. data/spec/other/gem_helper_spec.rb +116 -0
  77. data/spec/other/help_spec.rb +36 -0
  78. data/spec/other/init_spec.rb +40 -0
  79. data/spec/other/newgem_spec.rb +24 -0
  80. data/spec/other/open_spec.rb +51 -0
  81. data/spec/other/show_spec.rb +99 -0
  82. data/spec/pack/gems_spec.rb +22 -0
  83. data/spec/quality_spec.rb +55 -0
  84. data/spec/resolver/basic_spec.rb +20 -0
  85. data/spec/resolver/platform_spec.rb +57 -0
  86. data/spec/runtime/environment_rb_spec.rb +170 -0
  87. data/spec/runtime/executable_spec.rb +110 -0
  88. data/spec/runtime/load_spec.rb +107 -0
  89. data/spec/runtime/platform_spec.rb +90 -0
  90. data/spec/runtime/require_spec.rb +261 -0
  91. data/spec/runtime/setup_spec.rb +412 -0
  92. data/spec/runtime/with_clean_env_spec.rb +15 -0
  93. data/spec/spec_helper.rb +81 -0
  94. data/spec/support/builders.rb +566 -0
  95. data/spec/support/helpers.rb +243 -0
  96. data/spec/support/indexes.rb +113 -0
  97. data/spec/support/matchers.rb +89 -0
  98. data/spec/support/path.rb +71 -0
  99. data/spec/support/platforms.rb +49 -0
  100. data/spec/support/ruby_ext.rb +19 -0
  101. data/spec/support/rubygems_ext.rb +30 -0
  102. data/spec/support/rubygems_hax/rubygems_plugin.rb +9 -0
  103. data/spec/support/sudo.rb +21 -0
  104. data/spec/update/gems_spec.rb +86 -0
  105. data/spec/update/git_spec.rb +159 -0
  106. data/spec/update/source_spec.rb +50 -0
  107. metadata +170 -32
  108. data/ROADMAP.md +0 -36
@@ -42,7 +42,7 @@ module Bundler
42
42
  if manpages.include?(command)
43
43
  root = File.expand_path("../man", __FILE__)
44
44
 
45
- if have_groff?
45
+ if have_groff? && root !~ %r{^file:/.+!/META-INF/jruby.home/.+}
46
46
  groff = "groff -Wall -mtty-char -mandoc -Tascii"
47
47
  pager = ENV['MANPAGER'] || ENV['PAGER'] || 'more'
48
48
 
@@ -211,7 +211,7 @@ module Bundler
211
211
  Bundler.settings[:path] = opts[:path] if opts[:path]
212
212
  Bundler.settings[:bin] = opts["binstubs"] if opts[:binstubs]
213
213
  Bundler.settings[:disable_shared_gems] = '1' if Bundler.settings[:path]
214
- Bundler.settings.without = opts[:without]
214
+ Bundler.settings.without = opts[:without] unless opts[:without].empty?
215
215
  Bundler.ui.be_quiet! if opts[:quiet]
216
216
 
217
217
  Installer.install(Bundler.root, Bundler.definition, opts)
@@ -398,9 +398,12 @@ module Bundler
398
398
  def open(name)
399
399
  editor = [ENV['BUNDLER_EDITOR'], ENV['VISUAL'], ENV['EDITOR']].find{|e| !e.nil? && !e.empty? }
400
400
  if editor
401
- command = "#{editor} #{locate_gem(name)}"
402
- success = system(command)
403
- Bundler.ui.info "Could not run '#{command}'" unless success
401
+ gem_path = locate_gem(name)
402
+ Dir.chdir(gem_path) do
403
+ command = "#{editor} #{gem_path}"
404
+ success = system(command)
405
+ Bundler.ui.info "Could not run '#{command}'" unless success
406
+ end
404
407
  else
405
408
  Bundler.ui.info("To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR")
406
409
  end
@@ -453,24 +456,23 @@ module Bundler
453
456
  end
454
457
 
455
458
  desc "gem GEM", "Creates a skeleton for creating a rubygem"
459
+ method_option :bin, :type => :boolean, :default => false, :aliases => '-b', :banner => "Generate a binary for your library."
456
460
  def gem(name)
457
461
  target = File.join(Dir.pwd, name)
458
- if File.exist?(name)
459
- Bundler.ui.error "File already exists at #{File.join(Dir.pwd, name)}"
460
- exit 1
461
- end
462
-
463
462
  constant_name = name.split('_').map{|p| p.capitalize}.join
464
463
  constant_name = constant_name.split('-').map{|q| q.capitalize}.join('::') if constant_name =~ /-/
465
464
  constant_array = constant_name.split('::')
466
465
  FileUtils.mkdir_p(File.join(target, 'lib', name))
467
466
  opts = {:name => name, :constant_name => constant_name, :constant_array => constant_array}
468
- template(File.join('newgem', 'Gemfile.tt'), File.join(target, 'Gemfile'), opts)
469
- template(File.join('newgem', 'Rakefile.tt'), File.join(target, 'Rakefile'), opts)
470
- template(File.join('newgem', 'gitignore.tt'), File.join(target, '.gitignore'), opts)
471
- template(File.join('newgem', 'newgem.gemspec.tt'), File.join(target, "#{name}.gemspec"), opts)
472
- template(File.join('newgem', 'lib', 'newgem.rb.tt'), File.join(target, 'lib', "#{name}.rb"), opts)
473
- template(File.join('newgem', 'lib', 'newgem', 'version.rb.tt'), File.join(target, 'lib', name, 'version.rb'), opts)
467
+ template(File.join("newgem/Gemfile.tt"), File.join(target, "Gemfile"), opts)
468
+ template(File.join("newgem/Rakefile.tt"), File.join(target, "Rakefile"), opts)
469
+ template(File.join("newgem/gitignore.tt"), File.join(target, ".gitignore"), opts)
470
+ template(File.join("newgem/newgem.gemspec.tt"), File.join(target, "#{name}.gemspec"), opts)
471
+ template(File.join("newgem/lib/newgem.rb.tt"), File.join(target, "lib/#{name}.rb"), opts)
472
+ template(File.join("newgem/lib/newgem/version.rb.tt"), File.join(target, "lib/#{name}/version.rb"), opts)
473
+ if options[:bin]
474
+ template(File.join("newgem/bin/newgem.tt"), File.join(target, 'bin', name), opts)
475
+ end
474
476
  Bundler.ui.info "Initializating git repo in #{target}"
475
477
  Dir.chdir(target) { `git init`; `git add .` }
476
478
  end
@@ -0,0 +1,37 @@
1
+ module Bundler
2
+ class Deployment
3
+ def self.define_task(context, task_method = :task, opts = {})
4
+ context.send :namespace, :bundle do
5
+ send :desc, <<-DESC
6
+ Install the current Bundler environment. By default, gems will be \
7
+ installed to the shared/bundle path. Gems in the development and \
8
+ test group will not be installed. The install command is executed \
9
+ with the --deployment and --quiet flags. You can override any of \
10
+ these defaults by setting the variables shown below. If the bundle \
11
+ cmd cannot be found then you can override the bundle_cmd variable \
12
+ to specifiy which one it should use.
13
+
14
+ set :bundle_gemfile, "Gemfile"
15
+ set :bundle_dir, File.join(fetch(:shared_path), 'bundle')
16
+ set :bundle_flags, "--deployment --quiet"
17
+ set :bundle_without, [:development, :test]
18
+ set :bundle_cmd, "bundle" # e.g. change to "/opt/ruby/bin/bundle"
19
+ DESC
20
+ send task_method, :install, opts do
21
+ bundle_cmd = context.fetch(:bundle_cmd, "bundle")
22
+ bundle_flags = context.fetch(:bundle_flags, "--deployment --quiet")
23
+ bundle_dir = context.fetch(:bundle_dir, File.join(context.fetch(:shared_path), 'bundle'))
24
+ bundle_gemfile = context.fetch(:bundle_gemfile, "Gemfile")
25
+ bundle_without = [*context.fetch(:bundle_without, [:development, :test])].compact
26
+
27
+ args = ["--gemfile #{File.join(context.fetch(:current_release), bundle_gemfile)}"]
28
+ args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
29
+ args << bundle_flags.to_s
30
+ args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty?
31
+
32
+ run "#{bundle_cmd} install #{args.join(' ')}"
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -32,11 +32,11 @@ module Bundler
32
32
  spec = Gem::Specification.load(gemspecs.first)
33
33
  gem spec.name, :path => path
34
34
  spec.runtime_dependencies.each do |dep|
35
- gem dep.name, dep.requirement.to_s
35
+ gem dep.name, *dep.requirement.as_list
36
36
  end
37
37
  group(development_group) do
38
38
  spec.development_dependencies.each do |dep|
39
- gem dep.name, dep.requirement.to_s
39
+ gem dep.name, *dep.requirement.as_list
40
40
  end
41
41
  end
42
42
  when 0
@@ -226,7 +226,7 @@ module Bundler
226
226
 
227
227
  opts["source"] ||= @source
228
228
  opts["env"] ||= @env
229
- opts["platforms"] = @platforms.dup
229
+ opts["platforms"] = platforms.dup
230
230
  opts["group"] = groups
231
231
  end
232
232
 
@@ -6,7 +6,7 @@ module Bundler
6
6
  class GemHelper
7
7
  def self.install_tasks(opts = nil)
8
8
  dir = caller.find{|c| /Rakefile:/}[/^(.*?)\/Rakefile:/, 1]
9
- GemHelper.new(dir, opts && opts[:name]).install
9
+ self.new(dir, opts && opts[:name]).install
10
10
  end
11
11
 
12
12
  attr_reader :spec_path, :base, :gemspec
@@ -40,7 +40,7 @@ module Bundler
40
40
  def build_gem
41
41
  file_name = nil
42
42
  sh("gem build #{spec_path}") { |out, err|
43
- raise err if err[/ERROR/]
43
+ raise err if !out[/Successfully/]
44
44
  file_name = File.basename(built_gem_path)
45
45
  FileUtils.mkdir_p(File.join(base, 'pkg'))
46
46
  FileUtils.mv(built_gem_path, 'pkg')
@@ -52,11 +52,8 @@ module Bundler
52
52
  def install_gem
53
53
  built_gem_path = build_gem
54
54
  out, err, code = sh_with_code("gem install #{built_gem_path}")
55
- if err[/ERROR/]
56
- Bundler.ui.error err
57
- else
58
- Bundler.ui.confirm "#{name} (#{version}) installed"
59
- end
55
+ raise err if err[/ERROR/]
56
+ Bundler.ui.confirm "#{name} (#{version}) installed"
60
57
  end
61
58
 
62
59
  def release_gem
@@ -1,7 +1,7 @@
1
1
  module Bundler
2
2
  class Graph
3
3
 
4
- USER_OPTIONS = {:style => 'filled, bold', :fillcolor => '#cccccc'}.freeze
4
+ USER_OPTIONS = {:style => 'filled', :fillcolor => '#B9B9D5'}.freeze
5
5
 
6
6
  def initialize(env)
7
7
  @env = env
@@ -21,7 +21,7 @@ module Bundler
21
21
  require 'graphviz'
22
22
  populate
23
23
 
24
- graph_viz = GraphViz::new('Gemfile', {:concentrate => true, :dpi => 65 } )
24
+ graph_viz = GraphViz::new('Gemfile', {:concentrate => true, :normalize => true, :nodesep => 0.55})
25
25
  graph_viz.edge[:fontname] = graph_viz.node[:fontname] = 'Arial, Helvetica, SansSerif'
26
26
  graph_viz.edge[:fontsize] = 12
27
27
 
@@ -38,7 +38,7 @@ module Bundler
38
38
 
39
39
  group_nodes = {}
40
40
  @groups.each do |name, dependencies|
41
- group_nodes[name] = graph_viz.add_node(name.to_s, { :shape => 'folder', :fontsize => 16 }.merge(USER_OPTIONS))
41
+ group_nodes[name] = graph_viz.add_node(name.to_s, { :shape => 'box3d', :fontsize => 16 }.merge(USER_OPTIONS))
42
42
  dependencies.each do |dependency|
43
43
  options = { :weight => 2 }
44
44
  if show_dependency_requirements && (dependency.requirement.to_s != ">= 0")
@@ -71,6 +71,7 @@ module Bundler
71
71
  bin_path = Bundler.bin_path
72
72
  template = File.read(File.expand_path('../templates/Executable', __FILE__))
73
73
  relative_gemfile_path = Bundler.default_gemfile.relative_path_from(bin_path)
74
+ ruby_command = Thor::Util.ruby_command
74
75
 
75
76
  spec.executables.each do |executable|
76
77
  next if executable == "bundle"
@@ -11,7 +11,7 @@ module Bundler
11
11
  @specs = []
12
12
  @state = :source
13
13
 
14
- lockfile.split(/\n+/).each do |line|
14
+ lockfile.split(/(\r?\n)+/).each do |line|
15
15
  if line == "DEPENDENCIES"
16
16
  @state = :dependency
17
17
  elsif line == "PLATFORMS"
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE" "1" "August 2010" "" ""
4
+ .TH "BUNDLE" "1" "October 2010" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\fR \- Ruby Dependency Management
@@ -0,0 +1,92 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "BUNDLE\-CONFIG" "1" "October 2010" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBbundle\-config\fR \- Set bundler configuration options
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBbundle config\fR [\fIname\fR [\fIvalue\fR]]
11
+ .
12
+ .SH "DESCRIPTION"
13
+ This command allows you to interact with bundler\'s configuration system\. Bundler retrieves its configuration from the local application (\fBapp/\.bundle/config\fR), environment variables, and the user\'s home directory (\fB~/\.bundle/config\fR), in that order of priority\.
14
+ .
15
+ .P
16
+ Executing \fBbundle config\fR with no parameters will print a list of all bundler configuration for the current bundle, and where that configuration was set\.
17
+ .
18
+ .P
19
+ Executing \fBbundle config <name>\fR will print the value of that configuration setting, and where it was set\.
20
+ .
21
+ .P
22
+ Executing \fBbundle config <name> <value>\fR will set that configuration to the value specified for all bundles executed as the current user\. The configuration will be stored in \fB~/\.bundle/config\fR\.
23
+ .
24
+ .SH "BUILD OPTIONS"
25
+ You can use \fBbundle config\fR to give bundler the flags to pass to the gem installer every time bundler tries to install a particular gem\.
26
+ .
27
+ .P
28
+ A very common example, the \fBmysql\fR gem, requires Snow Leopard users to pass configuration flags to \fBgem install\fR to specify where to find the \fBmysql_config\fR executable\.
29
+ .
30
+ .IP "" 4
31
+ .
32
+ .nf
33
+
34
+ gem install mysql \-\- \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
35
+ .
36
+ .fi
37
+ .
38
+ .IP "" 0
39
+ .
40
+ .P
41
+ Since the specific location of that executable can change from machine to machine, you can specify these flags on a per\-machine basis\.
42
+ .
43
+ .IP "" 4
44
+ .
45
+ .nf
46
+
47
+ bundle config build\.mysql \-\-with\-mysql\-config=/usr/local/mysql/bin/mysql_config
48
+ .
49
+ .fi
50
+ .
51
+ .IP "" 0
52
+ .
53
+ .P
54
+ After running this command, every time bundler needs to install the \fBmysql\fR gem, it will pass along the flags you specified\.
55
+ .
56
+ .SH "CONFIGURATION KEYS"
57
+ Configuration keys in bundler have two forms: the canonical form and the environment variable form\.
58
+ .
59
+ .P
60
+ For instance, passing the \fB\-\-without\fR flag to bundle install(1) \fIbundle\-install\.1\.html\fR prevents Bundler from installing certain groups specified in the Gemfile(5)\. Bundler persists this value in \fBapp/\.bundle/config\fR so that calls to \fBBundler\.setup\fR do not try to find gems from the \fBGemfile\fR that you didn\'t install\. Additionally, subsequent calls to bundle install(1) \fIbundle\-install\.1\.html\fR remember this setting and skip those groups\.
61
+ .
62
+ .P
63
+ The canonical form of this configuration is \fB"without"\fR\. To convert the canonical form to the environment variable form, capitalize it, and prepend \fBBUNDLE_\fR\. The environment variable form of \fB"without"\fR is \fBBUNDLE_WITHOUT\fR\.
64
+ .
65
+ .SH "LIST OF AVAILABLE KEYS"
66
+ The following is a list of all configuration keys and their purpose\. You can learn more about their operation in bundle install(1) \fIbundle\-install\.1\.html\fR\.
67
+ .
68
+ .TP
69
+ \fBpath\fR (\fBBUNDLE_PATH\fR)
70
+ The location on disk to install gems\. Defaults to \fB$GEM_HOME\fR in development and \fBvendor/bundler\fR when \fB\-\-deployment\fR is used
71
+ .
72
+ .TP
73
+ \fBfrozen\fR (\fBBUNDLE_FROZEN\fR)
74
+ Disallow changes to the \fBGemfile\fR\. Defaults to \fBtrue\fR when \fB\-\-deployment\fR is used\.
75
+ .
76
+ .TP
77
+ \fBwithout\fR (\fBBUNDLE_WITHOUT\fR)
78
+ A \fB:\fR\-separated list of groups whose gems bundler should not install
79
+ .
80
+ .TP
81
+ \fBbin\fR (\fBBUNDLE_BIN\fR)
82
+ Install executables from gems in the bundle to the specified directory\. Defaults to \fBfalse\fR\.
83
+ .
84
+ .TP
85
+ \fBgemfile\fR (\fBBUNDLE_GEMFILE\fR)
86
+ The name of the file that bundler should use as the \fBGemfile\fR\. This location of this file also sets the root of the project, which is used to resolve relative paths in the \fBGemfile\fR, among other things\. By default, bundler will search up from the current working directory until it finds a \fBGemfile\fR\.
87
+ .
88
+ .P
89
+ In general, you should set these settings per\-application by using the applicable flag to the bundle install(1) \fIbundle\-install\.1\.html\fR command\.
90
+ .
91
+ .P
92
+ You can set them globally either via environment variables or \fBbundle config\fR, whichever is preferable for your setup\. If you use both, environment variables will take preference over global settings\.
@@ -1,66 +1,108 @@
1
+ BUNDLE-CONFIG(1) BUNDLE-CONFIG(1)
1
2
 
2
3
 
3
4
 
5
+ NAME
6
+ bundle-config - Set bundler configuration options
4
7
 
8
+ SYNOPSIS
9
+ bundle config [name [value]]
5
10
 
11
+ DESCRIPTION
12
+ This command allows you to interact with bundler's configuration sys-
13
+ tem. Bundler retrieves its configuration from the local application
14
+ (app/.bundle/config), environment variables, and the user's home direc-
15
+ tory (~/.bundle/config), in that order of priority.
6
16
 
17
+ Executing bundle config with no parameters will print a list of all
18
+ bundler configuration for the current bundle, and where that configura-
19
+ tion was set.
7
20
 
21
+ Executing bundle config <name> will print the value of that configura-
22
+ tion setting, and where it was set.
8
23
 
24
+ Executing bundle config <name> <value> will set that configuration to
25
+ the value specified for all bundles executed as the current user. The
26
+ configuration will be stored in ~/.bundle/config.
9
27
 
28
+ BUILD OPTIONS
29
+ You can use bundle config to give bundler the flags to pass to the gem
30
+ installer every time bundler tries to install a particular gem.
10
31
 
32
+ A very common example, the mysql gem, requires Snow Leopard users to
33
+ pass configuration flags to gem install to specify where to find the
34
+ mysql_config executable.
11
35
 
12
36
 
13
37
 
38
+ gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
14
39
 
15
40
 
16
41
 
42
+ Since the specific location of that executable can change from machine
43
+ to machine, you can specify these flags on a per-machine basis.
17
44
 
18
45
 
19
46
 
47
+ bundle config build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
20
48
 
21
49
 
22
50
 
51
+ After running this command, every time bundler needs to install the
52
+ mysql gem, it will pass along the flags you specified.
23
53
 
54
+ CONFIGURATION KEYS
55
+ Configuration keys in bundler have two forms: the canonical form and
56
+ the environment variable form.
24
57
 
58
+ For instance, passing the --without flag to bundle install(1) bun-
59
+ dle-install.1.html prevents Bundler from installing certain groups
60
+ specified in the Gemfile(5). Bundler persists this value in app/.bun-
61
+ dle/config so that calls to Bundler.setup do not try to find gems from
62
+ the Gemfile that you didn't install. Additionally, subsequent calls to
63
+ bundle install(1) bundle-install.1.html remember this setting and skip
64
+ those groups.
25
65
 
66
+ The canonical form of this configuration is "without". To convert the
67
+ canonical form to the environment variable form, capitalize it, and
68
+ prepend BUNDLE_. The environment variable form of "without" is BUN-
69
+ DLE_WITHOUT.
26
70
 
71
+ LIST OF AVAILABLE KEYS
72
+ The following is a list of all configuration keys and their purpose.
73
+ You can learn more about their operation in bundle install(1) bun-
74
+ dle-install.1.html.
27
75
 
76
+ path (BUNDLE_PATH)
77
+ The location on disk to install gems. Defaults to $GEM_HOME in
78
+ development and vendor/bundler when --deployment is used
28
79
 
80
+ frozen (BUNDLE_FROZEN)
81
+ Disallow changes to the Gemfile. Defaults to true when --deploy-
82
+ ment is used.
29
83
 
84
+ without (BUNDLE_WITHOUT)
85
+ A :-separated list of groups whose gems bundler should not
86
+ install
30
87
 
88
+ bin (BUNDLE_BIN)
89
+ Install executables from gems in the bundle to the specified
90
+ directory. Defaults to false.
31
91
 
92
+ gemfile (BUNDLE_GEMFILE)
93
+ The name of the file that bundler should use as the Gemfile.
94
+ This location of this file also sets the root of the project,
95
+ which is used to resolve relative paths in the Gemfile, among
96
+ other things. By default, bundler will search up from the cur-
97
+ rent working directory until it finds a Gemfile.
32
98
 
99
+ In general, you should set these settings per-application by using the
100
+ applicable flag to the bundle install(1) bundle-install.1.html command.
33
101
 
102
+ You can set them globally either via environment variables or bundle
103
+ config, whichever is preferable for your setup. If you use both, envi-
104
+ ronment variables will take preference over global settings.
34
105
 
35
106
 
36
107
 
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
108
+ October 2010 BUNDLE-CONFIG(1)
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "BUNDLE\-EXEC" "1" "August 2010" "" ""
4
+ .TH "BUNDLE\-EXEC" "1" "October 2010" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBbundle\-exec\fR \- Execute a command in the context of the bundle