rubygems-update 3.0.3 → 3.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/.travis.yml +2 -0
  4. data/CODE_OF_CONDUCT.md +10 -8
  5. data/CONTRIBUTING.md +7 -0
  6. data/History.txt +152 -0
  7. data/Manifest.txt +5 -3
  8. data/README.md +6 -0
  9. data/Rakefile +27 -7
  10. data/bundler/lib/bundler/build_metadata.rb +2 -2
  11. data/lib/rubygems.rb +7 -12
  12. data/lib/rubygems/command_manager.rb +6 -0
  13. data/lib/rubygems/commands/build_command.rb +28 -13
  14. data/lib/rubygems/commands/owner_command.rb +2 -0
  15. data/lib/rubygems/commands/push_command.rb +2 -0
  16. data/lib/rubygems/commands/setup_command.rb +9 -11
  17. data/lib/rubygems/commands/uninstall_command.rb +16 -6
  18. data/lib/rubygems/commands/which_command.rb +1 -3
  19. data/lib/rubygems/defaults.rb +1 -8
  20. data/lib/rubygems/dependency.rb +1 -1
  21. data/lib/rubygems/dependency_installer.rb +1 -2
  22. data/lib/rubygems/dependency_list.rb +1 -1
  23. data/lib/rubygems/exceptions.rb +0 -4
  24. data/lib/rubygems/gemcutter_utilities.rb +9 -5
  25. data/lib/rubygems/installer.rb +8 -5
  26. data/lib/rubygems/installer_test_case.rb +2 -2
  27. data/lib/rubygems/package/tar_header.rb +11 -2
  28. data/lib/rubygems/rdoc.rb +2 -2
  29. data/lib/rubygems/remote_fetcher.rb +15 -54
  30. data/lib/rubygems/request.rb +1 -1
  31. data/lib/rubygems/request_set/gem_dependency_api.rb +11 -10
  32. data/lib/rubygems/requirement.rb +0 -4
  33. data/lib/rubygems/resolver.rb +4 -1
  34. data/lib/rubygems/s3_uri_signer.rb +183 -0
  35. data/lib/rubygems/security_option.rb +0 -1
  36. data/lib/rubygems/specification.rb +21 -23
  37. data/lib/rubygems/ssl_certs/{index.rubygems.org → rubygems.org}/GlobalSignRootCA.pem +0 -0
  38. data/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +21 -0
  39. data/lib/rubygems/stub_specification.rb +1 -2
  40. data/lib/rubygems/test_case.rb +22 -12
  41. data/lib/rubygems/uninstaller.rb +1 -1
  42. data/lib/rubygems/util.rb +12 -0
  43. data/rubygems-update.gemspec +1 -1
  44. data/test/rubygems/ca_cert.pem +74 -65
  45. data/test/rubygems/client.pem +103 -45
  46. data/test/rubygems/ssl_cert.pem +78 -17
  47. data/test/rubygems/ssl_key.pem +25 -13
  48. data/test/rubygems/test_bundled_ca.rb +8 -5
  49. data/test/rubygems/test_gem.rb +45 -11
  50. data/test/rubygems/test_gem_bundler_version_finder.rb +4 -0
  51. data/test/rubygems/test_gem_command_manager.rb +10 -0
  52. data/test/rubygems/test_gem_commands_build_command.rb +1 -0
  53. data/test/rubygems/test_gem_commands_push_command.rb +15 -0
  54. data/test/rubygems/test_gem_commands_setup_command.rb +11 -7
  55. data/test/rubygems/test_gem_commands_uninstall_command.rb +80 -1
  56. data/test/rubygems/test_gem_ext_cmake_builder.rb +1 -1
  57. data/test/rubygems/test_gem_indexer.rb +15 -8
  58. data/test/rubygems/test_gem_installer.rb +85 -22
  59. data/test/rubygems/test_gem_package_tar_header.rb +41 -0
  60. data/test/rubygems/test_gem_rdoc.rb +1 -135
  61. data/test/rubygems/test_gem_remote_fetcher.rb +133 -14
  62. data/test/rubygems/test_gem_request.rb +4 -4
  63. data/test/rubygems/test_gem_request_set_gem_dependency_api.rb +80 -57
  64. data/test/rubygems/test_gem_security_policy.rb +1 -1
  65. data/test/rubygems/test_gem_specification.rb +29 -0
  66. data/test/rubygems/test_gem_stream_ui.rb +2 -2
  67. data/test/rubygems/test_gem_uninstaller.rb +21 -2
  68. data/test/rubygems/test_gem_util.rb +8 -0
  69. data/util/ci +6 -1
  70. data/util/cops/deprecations.rb +52 -0
  71. data/util/create_certs.sh +27 -0
  72. data/util/create_encrypted_key.rb +4 -4
  73. data/util/update_bundled_ca_certificates.rb +1 -3
  74. metadata +12 -57
  75. data/bundler/man/bundle-add.1 +0 -58
  76. data/bundler/man/bundle-binstubs.1 +0 -40
  77. data/bundler/man/bundle-check.1 +0 -31
  78. data/bundler/man/bundle-clean.1 +0 -24
  79. data/bundler/man/bundle-config.1 +0 -497
  80. data/bundler/man/bundle-doctor.1 +0 -44
  81. data/bundler/man/bundle-exec.1 +0 -165
  82. data/bundler/man/bundle-gem.1 +0 -80
  83. data/bundler/man/bundle-info.1 +0 -20
  84. data/bundler/man/bundle-init.1 +0 -25
  85. data/bundler/man/bundle-inject.1 +0 -33
  86. data/bundler/man/bundle-install.1 +0 -308
  87. data/bundler/man/bundle-list.1 +0 -50
  88. data/bundler/man/bundle-lock.1 +0 -84
  89. data/bundler/man/bundle-open.1 +0 -32
  90. data/bundler/man/bundle-outdated.1 +0 -155
  91. data/bundler/man/bundle-package.1 +0 -55
  92. data/bundler/man/bundle-platform.1 +0 -61
  93. data/bundler/man/bundle-pristine.1 +0 -34
  94. data/bundler/man/bundle-remove.1 +0 -31
  95. data/bundler/man/bundle-show.1 +0 -23
  96. data/bundler/man/bundle-update.1 +0 -394
  97. data/bundler/man/bundle-viz.1 +0 -39
  98. data/bundler/man/bundle.1 +0 -136
  99. data/lib/rubygems/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem +0 -23
  100. data/lib/rubygems/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem +0 -25
@@ -1,44 +0,0 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "BUNDLE\-DOCTOR" "1" "October 2018" "" ""
5
- .
6
- .SH "NAME"
7
- \fBbundle\-doctor\fR \- Checks the bundle for common problems
8
- .
9
- .SH "SYNOPSIS"
10
- \fBbundle doctor\fR [\-\-quiet] [\-\-gemfile=GEMFILE]
11
- .
12
- .SH "DESCRIPTION"
13
- Checks your Gemfile and gem environment for common problems\. If issues are detected, Bundler prints them and exits status 1\. Otherwise, Bundler prints a success message and exits status 0\.
14
- .
15
- .P
16
- Examples of common problems caught by bundle\-doctor include:
17
- .
18
- .IP "\(bu" 4
19
- Invalid Bundler settings
20
- .
21
- .IP "\(bu" 4
22
- Mismatched Ruby versions
23
- .
24
- .IP "\(bu" 4
25
- Mismatched platforms
26
- .
27
- .IP "\(bu" 4
28
- Uninstalled gems
29
- .
30
- .IP "\(bu" 4
31
- Missing dependencies
32
- .
33
- .IP "" 0
34
- .
35
- .SH "OPTIONS"
36
- .
37
- .TP
38
- \fB\-\-quiet\fR
39
- Only output warnings and errors\.
40
- .
41
- .TP
42
- \fB\-\-gemfile=<gemfile>\fR
43
- The location of the Gemfile(5) which Bundler should use\. This defaults to a Gemfile(5) in the current working directory\. In general, Bundler will assume that the location of the Gemfile(5) is also the project\'s root and will try to find \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to this location\.
44
-
@@ -1,165 +0,0 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "BUNDLE\-EXEC" "1" "October 2018" "" ""
5
- .
6
- .SH "NAME"
7
- \fBbundle\-exec\fR \- Execute a command in the context of the bundle
8
- .
9
- .SH "SYNOPSIS"
10
- \fBbundle exec\fR [\-\-keep\-file\-descriptors] \fIcommand\fR
11
- .
12
- .SH "DESCRIPTION"
13
- This command executes the command, making all gems specified in the [\fBGemfile(5)\fR][Gemfile(5)] available to \fBrequire\fR in Ruby programs\.
14
- .
15
- .P
16
- Essentially, if you would normally have run something like \fBrspec spec/my_spec\.rb\fR, and you want to use the gems specified in the [\fBGemfile(5)\fR][Gemfile(5)] and installed via bundle install(1) \fIbundle\-install\.1\.html\fR, you should run \fBbundle exec rspec spec/my_spec\.rb\fR\.
17
- .
18
- .P
19
- Note that \fBbundle exec\fR does not require that an executable is available on your shell\'s \fB$PATH\fR\.
20
- .
21
- .SH "OPTIONS"
22
- .
23
- .TP
24
- \fB\-\-keep\-file\-descriptors\fR
25
- Exec in Ruby 2\.0 began discarding non\-standard file descriptors\. When this flag is passed, exec will revert to the 1\.9 behaviour of passing all file descriptors to the new process\.
26
- .
27
- .SH "BUNDLE INSTALL \-\-BINSTUBS"
28
- If you use the \fB\-\-binstubs\fR flag in bundle install(1) \fIbundle\-install\.1\.html\fR, Bundler will automatically create a directory (which defaults to \fBapp_root/bin\fR) containing all of the executables available from gems in the bundle\.
29
- .
30
- .P
31
- After using \fB\-\-binstubs\fR, \fBbin/rspec spec/my_spec\.rb\fR is identical to \fBbundle exec rspec spec/my_spec\.rb\fR\.
32
- .
33
- .SH "ENVIRONMENT MODIFICATIONS"
34
- \fBbundle exec\fR makes a number of changes to the shell environment, then executes the command you specify in full\.
35
- .
36
- .IP "\(bu" 4
37
- make sure that it\'s still possible to shell out to \fBbundle\fR from inside a command invoked by \fBbundle exec\fR (using \fB$BUNDLE_BIN_PATH\fR)
38
- .
39
- .IP "\(bu" 4
40
- put the directory containing executables (like \fBrails\fR, \fBrspec\fR, \fBrackup\fR) for your bundle on \fB$PATH\fR
41
- .
42
- .IP "\(bu" 4
43
- make sure that if bundler is invoked in the subshell, it uses the same \fBGemfile\fR (by setting \fBBUNDLE_GEMFILE\fR)
44
- .
45
- .IP "\(bu" 4
46
- add \fB\-rbundler/setup\fR to \fB$RUBYOPT\fR, which makes sure that Ruby programs invoked in the subshell can see the gems in the bundle
47
- .
48
- .IP "" 0
49
- .
50
- .P
51
- It also modifies Rubygems:
52
- .
53
- .IP "\(bu" 4
54
- disallow loading additional gems not in the bundle
55
- .
56
- .IP "\(bu" 4
57
- modify the \fBgem\fR method to be a no\-op if a gem matching the requirements is in the bundle, and to raise a \fBGem::LoadError\fR if it\'s not
58
- .
59
- .IP "\(bu" 4
60
- Define \fBGem\.refresh\fR to be a no\-op, since the source index is always frozen when using bundler, and to prevent gems from the system leaking into the environment
61
- .
62
- .IP "\(bu" 4
63
- Override \fBGem\.bin_path\fR to use the gems in the bundle, making system executables work
64
- .
65
- .IP "\(bu" 4
66
- Add all gems in the bundle into Gem\.loaded_specs
67
- .
68
- .IP "" 0
69
- .
70
- .P
71
- Finally, \fBbundle exec\fR also implicitly modifies \fBGemfile\.lock\fR if the lockfile and the Gemfile do not match\. Bundler needs the Gemfile to determine things such as a gem\'s groups, \fBautorequire\fR, and platforms, etc\., and that information isn\'t stored in the lockfile\. The Gemfile and lockfile must be synced in order to \fBbundle exec\fR successfully, so \fBbundle exec\fR updates the lockfile beforehand\.
72
- .
73
- .SS "Loading"
74
- By default, when attempting to \fBbundle exec\fR to a file with a ruby shebang, Bundler will \fBKernel\.load\fR that file instead of using \fBKernel\.exec\fR\. For the vast majority of cases, this is a performance improvement\. In a rare few cases, this could cause some subtle side\-effects (such as dependence on the exact contents of \fB$0\fR or \fB__FILE__\fR) and the optimization can be disabled by enabling the \fBdisable_exec_load\fR setting\.
75
- .
76
- .SS "Shelling out"
77
- Any Ruby code that opens a subshell (like \fBsystem\fR, backticks, or \fB%x{}\fR) will automatically use the current Bundler environment\. If you need to shell out to a Ruby command that is not part of your current bundle, use the \fBwith_clean_env\fR method with a block\. Any subshells created inside the block will be given the environment present before Bundler was activated\. For example, Homebrew commands run Ruby, but don\'t work inside a bundle:
78
- .
79
- .IP "" 4
80
- .
81
- .nf
82
-
83
- Bundler\.with_clean_env do
84
- `brew install wget`
85
- end
86
- .
87
- .fi
88
- .
89
- .IP "" 0
90
- .
91
- .P
92
- Using \fBwith_clean_env\fR is also necessary if you are shelling out to a different bundle\. Any Bundler commands run in a subshell will inherit the current Gemfile, so commands that need to run in the context of a different bundle also need to use \fBwith_clean_env\fR\.
93
- .
94
- .IP "" 4
95
- .
96
- .nf
97
-
98
- Bundler\.with_clean_env do
99
- Dir\.chdir "/other/bundler/project" do
100
- `bundle exec \./script`
101
- end
102
- end
103
- .
104
- .fi
105
- .
106
- .IP "" 0
107
- .
108
- .P
109
- Bundler provides convenience helpers that wrap \fBsystem\fR and \fBexec\fR, and they can be used like this:
110
- .
111
- .IP "" 4
112
- .
113
- .nf
114
-
115
- Bundler\.clean_system(\'brew install wget\')
116
- Bundler\.clean_exec(\'brew install wget\')
117
- .
118
- .fi
119
- .
120
- .IP "" 0
121
- .
122
- .SH "RUBYGEMS PLUGINS"
123
- At present, the Rubygems plugin system requires all files named \fBrubygems_plugin\.rb\fR on the load path of \fIany\fR installed gem when any Ruby code requires \fBrubygems\.rb\fR\. This includes executables installed into the system, like \fBrails\fR, \fBrackup\fR, and \fBrspec\fR\.
124
- .
125
- .P
126
- Since Rubygems plugins can contain arbitrary Ruby code, they commonly end up activating themselves or their dependencies\.
127
- .
128
- .P
129
- For instance, the \fBgemcutter 0\.5\fR gem depended on \fBjson_pure\fR\. If you had that version of gemcutter installed (even if you \fIalso\fR had a newer version without this problem), Rubygems would activate \fBgemcutter 0\.5\fR and \fBjson_pure <latest>\fR\.
130
- .
131
- .P
132
- If your Gemfile(5) also contained \fBjson_pure\fR (or a gem with a dependency on \fBjson_pure\fR), the latest version on your system might conflict with the version in your Gemfile(5), or the snapshot version in your \fBGemfile\.lock\fR\.
133
- .
134
- .P
135
- If this happens, bundler will say:
136
- .
137
- .IP "" 4
138
- .
139
- .nf
140
-
141
- You have already activated json_pure 1\.4\.6 but your Gemfile
142
- requires json_pure 1\.4\.3\. Consider using bundle exec\.
143
- .
144
- .fi
145
- .
146
- .IP "" 0
147
- .
148
- .P
149
- In this situation, you almost certainly want to remove the underlying gem with the problematic gem plugin\. In general, the authors of these plugins (in this case, the \fBgemcutter\fR gem) have released newer versions that are more careful in their plugins\.
150
- .
151
- .P
152
- You can find a list of all the gems containing gem plugins by running
153
- .
154
- .IP "" 4
155
- .
156
- .nf
157
-
158
- ruby \-rubygems \-e "puts Gem\.find_files(\'rubygems_plugin\.rb\')"
159
- .
160
- .fi
161
- .
162
- .IP "" 0
163
- .
164
- .P
165
- At the very least, you should remove all but the newest version of each gem plugin, and also remove all gem plugins that you aren\'t using (\fBgem uninstall gem_name\fR)\.
@@ -1,80 +0,0 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "BUNDLE\-GEM" "1" "October 2018" "" ""
5
- .
6
- .SH "NAME"
7
- \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
8
- .
9
- .SH "SYNOPSIS"
10
- \fBbundle gem\fR \fIGEM_NAME\fR \fIOPTIONS\fR
11
- .
12
- .SH "DESCRIPTION"
13
- Generates a directory named \fBGEM_NAME\fR with a \fBRakefile\fR, \fBGEM_NAME\.gemspec\fR, and other supporting files and directories that can be used to develop a rubygem with that name\.
14
- .
15
- .P
16
- Run \fBrake \-T\fR in the resulting project for a list of Rake tasks that can be used to test and publish the gem to rubygems\.org\.
17
- .
18
- .P
19
- The generated project skeleton can be customized with OPTIONS, as explained below\. Note that these options can also be specified via Bundler\'s global configuration file using the following names:
20
- .
21
- .IP "\(bu" 4
22
- \fBgem\.coc\fR
23
- .
24
- .IP "\(bu" 4
25
- \fBgem\.mit\fR
26
- .
27
- .IP "\(bu" 4
28
- \fBgem\.test\fR
29
- .
30
- .IP "" 0
31
- .
32
- .SH "OPTIONS"
33
- .
34
- .TP
35
- \fB\-\-exe\fR or \fB\-b\fR or \fB\-\-bin\fR
36
- Specify that Bundler should create a binary executable (as \fBexe/GEM_NAME\fR) in the generated rubygem project\. This binary will also be added to the \fBGEM_NAME\.gemspec\fR manifest\. This behavior is disabled by default\.
37
- .
38
- .TP
39
- \fB\-\-no\-exe\fR
40
- Do not create a binary (overrides \fB\-\-exe\fR specified in the global config)\.
41
- .
42
- .TP
43
- \fB\-\-coc\fR
44
- Add a \fBCODE_OF_CONDUCT\.md\fR file to the root of the generated project\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler\'s global config for future \fBbundle gem\fR use\.
45
- .
46
- .TP
47
- \fB\-\-no\-coc\fR
48
- Do not create a \fBCODE_OF_CONDUCT\.md\fR (overrides \fB\-\-coc\fR specified in the global config)\.
49
- .
50
- .TP
51
- \fB\-\-ext\fR
52
- Add boilerplate for C extension code to the generated project\. This behavior is disabled by default\.
53
- .
54
- .TP
55
- \fB\-\-no\-ext\fR
56
- Do not add C extension code (overrides \fB\-\-ext\fR specified in the global config)\.
57
- .
58
- .TP
59
- \fB\-\-mit\fR
60
- Add an MIT license to a \fBLICENSE\.txt\fR file in the root of the generated project\. Your name from the global git config is used for the copyright statement\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler\'s global config for future \fBbundle gem\fR use\.
61
- .
62
- .TP
63
- \fB\-\-no\-mit\fR
64
- Do not create a \fBLICENSE\.txt\fR (overrides \fB\-\-mit\fR specified in the global config)\.
65
- .
66
- .TP
67
- \fB\-t\fR, \fB\-\-test=minitest\fR, \fB\-\-test=rspec\fR
68
- Specify the test framework that Bundler should use when generating the project\. Acceptable values are \fBminitest\fR and \fBrspec\fR\. The \fBGEM_NAME\.gemspec\fR will be configured and a skeleton test/spec directory will be created based on this option\. If this option is unspecified, an interactive prompt will be displayed and the answer will be saved in Bundler\'s global config for future \fBbundle gem\fR use\. If no option is specified, the default testing framework is RSpec\.
69
- .
70
- .TP
71
- \fB\-e\fR, \fB\-\-edit[=EDITOR]\fR
72
- Open the resulting GEM_NAME\.gemspec in EDITOR, or the default editor if not specified\. The default is \fB$BUNDLER_EDITOR\fR, \fB$VISUAL\fR, or \fB$EDITOR\fR\.
73
- .
74
- .SH "SEE ALSO"
75
- .
76
- .IP "\(bu" 4
77
- bundle config(1) \fIbundle\-config\.1\.html\fR
78
- .
79
- .IP "" 0
80
-
@@ -1,20 +0,0 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "BUNDLE\-INFO" "1" "May 2018" "" ""
5
- .
6
- .SH "NAME"
7
- \fBbundle\-info\fR \- Show information for the given gem in your bundle
8
- .
9
- .SH "SYNOPSIS"
10
- \fBbundle info\fR [GEM] [\-\-path]
11
- .
12
- .SH "DESCRIPTION"
13
- Print the basic information about the provided GEM such as homepage, version, path and summary\.
14
- .
15
- .SH "OPTIONS"
16
- .
17
- .TP
18
- \fB\-\-path\fR
19
- Print the path of the given gem
20
-
@@ -1,25 +0,0 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "BUNDLE\-INIT" "1" "October 2018" "" ""
5
- .
6
- .SH "NAME"
7
- \fBbundle\-init\fR \- Generates a Gemfile into the current working directory
8
- .
9
- .SH "SYNOPSIS"
10
- \fBbundle init\fR [\-\-gemspec=FILE]
11
- .
12
- .SH "DESCRIPTION"
13
- Init generates a default [\fBGemfile(5)\fR][Gemfile(5)] in the current working directory\. When adding a [\fBGemfile(5)\fR][Gemfile(5)] to a gem with a gemspec, the \fB\-\-gemspec\fR option will automatically add each dependency listed in the gemspec file to the newly created [\fBGemfile(5)\fR][Gemfile(5)]\.
14
- .
15
- .SH "OPTIONS"
16
- .
17
- .TP
18
- \fB\-\-gemspec\fR
19
- Use the specified \.gemspec to create the [\fBGemfile(5)\fR][Gemfile(5)]
20
- .
21
- .SH "FILES"
22
- Included in the default [\fBGemfile(5)\fR][Gemfile(5)] generated is the line \fB# frozen_string_literal: true\fR\. This is a magic comment supported for the first time in Ruby 2\.3\. The presence of this line results in all string literals in the file being implicitly frozen\.
23
- .
24
- .SH "SEE ALSO"
25
- Gemfile(5) \fIhttp://bundler\.io/man/gemfile\.5\.html\fR
@@ -1,33 +0,0 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "BUNDLE\-INJECT" "1" "October 2018" "" ""
5
- .
6
- .SH "NAME"
7
- \fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
8
- .
9
- .SH "SYNOPSIS"
10
- \fBbundle inject\fR [GEM] [VERSION]
11
- .
12
- .SH "DESCRIPTION"
13
- Adds the named gem(s) with their version requirements to the resolved [\fBGemfile(5)\fR][Gemfile(5)]\.
14
- .
15
- .P
16
- This command will add the gem to both your [\fBGemfile(5)\fR][Gemfile(5)] and Gemfile\.lock if it isn\'t listed yet\.
17
- .
18
- .P
19
- Example:
20
- .
21
- .IP "" 4
22
- .
23
- .nf
24
-
25
- bundle install
26
- bundle inject \'rack\' \'> 0\'
27
- .
28
- .fi
29
- .
30
- .IP "" 0
31
- .
32
- .P
33
- This will inject the \'rack\' gem with a version greater than 0 in your [\fBGemfile(5)\fR][Gemfile(5)] and Gemfile\.lock
@@ -1,308 +0,0 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "BUNDLE\-INSTALL" "1" "January 2019" "" ""
5
- .
6
- .SH "NAME"
7
- \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
8
- .
9
- .SH "SYNOPSIS"
10
- \fBbundle install\fR [\-\-binstubs[=DIRECTORY]] [\-\-clean] [\-\-deployment] [\-\-force] [\-\-frozen] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-jobs=NUMBER] [\-\-local] [\-\-no\-cache] [\-\-no\-prune] [\-\-path PATH] [\-\-quiet] [\-\-retry=NUMBER] [\-\-shebang] [\-\-standalone[=GROUP[ GROUP\.\.\.]]] [\-\-system] [\-\-trust\-policy=POLICY] [\-\-with=GROUP[ GROUP\.\.\.]] [\-\-without=GROUP[ GROUP\.\.\.]]
11
- .
12
- .SH "DESCRIPTION"
13
- Install the gems specified in your Gemfile(5)\. If this is the first time you run bundle install (and a \fBGemfile\.lock\fR does not exist), Bundler will fetch all remote sources, resolve dependencies and install all needed gems\.
14
- .
15
- .P
16
- If a \fBGemfile\.lock\fR does exist, and you have not updated your Gemfile(5), Bundler will fetch all remote sources, but use the dependencies specified in the \fBGemfile\.lock\fR instead of resolving dependencies\.
17
- .
18
- .P
19
- If a \fBGemfile\.lock\fR does exist, and you have updated your Gemfile(5), Bundler will use the dependencies in the \fBGemfile\.lock\fR for all gems that you did not update, but will re\-resolve the dependencies of gems that you did update\. You can find more information about this update process below under \fICONSERVATIVE UPDATING\fR\.
20
- .
21
- .SH "OPTIONS"
22
- To apply any of \fB\-\-binstubs\fR, \fB\-\-deployment\fR, \fB\-\-path\fR, or \fB\-\-without\fR every time \fBbundle install\fR is run, use \fBbundle config\fR (see bundle\-config(1))\.
23
- .
24
- .TP
25
- \fB\-\-binstubs[=<directory>]\fR
26
- Creates a directory (defaults to \fB~/bin\fR) and place any executables from the gem there\. These executables run in Bundler\'s context\. If used, you might add this directory to your environment\'s \fBPATH\fR variable\. For instance, if the \fBrails\fR gem comes with a \fBrails\fR executable, this flag will create a \fBbin/rails\fR executable that ensures that all referred dependencies will be resolved using the bundled gems\.
27
- .
28
- .TP
29
- \fB\-\-clean\fR
30
- On finishing the installation Bundler is going to remove any gems not present in the current Gemfile(5)\. Don\'t worry, gems currently in use will not be removed\.
31
- .
32
- .TP
33
- \fB\-\-deployment\fR
34
- In \fIdeployment mode\fR, Bundler will \'roll\-out\' the bundle for production or CI use\. Please check carefully if you want to have this option enabled in your development environment\.
35
- .
36
- .TP
37
- \fB\-\-force\fR
38
- Force download every gem, even if the required versions are already available locally\. \fB\-\-redownload\fR is an alias of this option\.
39
- .
40
- .TP
41
- \fB\-\-frozen\fR
42
- Do not allow the Gemfile\.lock to be updated after this install\. Exits non\-zero if there are going to be changes to the Gemfile\.lock\.
43
- .
44
- .TP
45
- \fB\-\-full\-index\fR
46
- Bundler will not call Rubygems\' API endpoint (default) but download and cache a (currently big) index file of all gems\. Performance can be improved for large bundles that seldom change by enabling this option\.
47
- .
48
- .TP
49
- \fB\-\-gemfile=<gemfile>\fR
50
- The location of the Gemfile(5) which Bundler should use\. This defaults to a Gemfile(5) in the current working directory\. In general, Bundler will assume that the location of the Gemfile(5) is also the project\'s root and will try to find \fBGemfile\.lock\fR and \fBvendor/cache\fR relative to this location\.
51
- .
52
- .TP
53
- \fB\-\-jobs=[<number>]\fR, \fB\-j[<number>]\fR
54
- The maximum number of parallel download and install jobs\. The default is \fB1\fR\.
55
- .
56
- .TP
57
- \fB\-\-local\fR
58
- Do not attempt to connect to \fBrubygems\.org\fR\. Instead, Bundler will use the gems already present in Rubygems\' cache or in \fBvendor/cache\fR\. Note that if a appropriate platform\-specific gem exists on \fBrubygems\.org\fR it will not be found\.
59
- .
60
- .TP
61
- \fB\-\-no\-cache\fR
62
- Do not update the cache in \fBvendor/cache\fR with the newly bundled gems\. This does not remove any gems in the cache but keeps the newly bundled gems from being cached during the install\.
63
- .
64
- .TP
65
- \fB\-\-no\-prune\fR
66
- Don\'t remove stale gems from the cache when the installation finishes\.
67
- .
68
- .TP
69
- \fB\-\-path=<path>\fR
70
- The location to install the specified gems to\. This defaults to Rubygems\' setting\. Bundler shares this location with Rubygems, \fBgem install \.\.\.\fR will have gem installed there, too\. Therefore, gems installed without a \fB\-\-path \.\.\.\fR setting will show up by calling \fBgem list\fR\. Accordingly, gems installed to other locations will not get listed\.
71
- .
72
- .TP
73
- \fB\-\-quiet\fR
74
- Do not print progress information to the standard output\. Instead, Bundler will exit using a status code (\fB$?\fR)\.
75
- .
76
- .TP
77
- \fB\-\-retry=[<number>]\fR
78
- Retry failed network or git requests for \fInumber\fR times\.
79
- .
80
- .TP
81
- \fB\-\-shebang=<ruby\-executable>\fR
82
- Uses the specified ruby executable (usually \fBruby\fR) to execute the scripts created with \fB\-\-binstubs\fR\. In addition, if you use \fB\-\-binstubs\fR together with \fB\-\-shebang jruby\fR these executables will be changed to execute \fBjruby\fR instead\.
83
- .
84
- .TP
85
- \fB\-\-standalone[=<list>]\fR
86
- Makes a bundle that can work without depending on Rubygems or Bundler at runtime\. A space separated list of groups to install has to be specified\. Bundler creates a directory named \fBbundle\fR and installs the bundle there\. It also generates a \fBbundle/bundler/setup\.rb\fR file to replace Bundler\'s own setup in the manner required\. Using this option implicitly sets \fBpath\fR, which is a [remembered option][REMEMBERED OPTIONS]\.
87
- .
88
- .TP
89
- \fB\-\-system\fR
90
- Installs the gems specified in the bundle to the system\'s Rubygems location\. This overrides any previous configuration of \fB\-\-path\fR\.
91
- .
92
- .TP
93
- \fB\-\-trust\-policy=[<policy>]\fR
94
- Apply the Rubygems security policy \fIpolicy\fR, where policy is one of \fBHighSecurity\fR, \fBMediumSecurity\fR, \fBLowSecurity\fR, \fBAlmostNoSecurity\fR, or \fBNoSecurity\fR\. For more details, please see the Rubygems signing documentation linked below in \fISEE ALSO\fR\.
95
- .
96
- .TP
97
- \fB\-\-with=<list>\fR
98
- A space\-separated list of groups referencing gems to install\. If an optional group is given it is installed\. If a group is given that is in the remembered list of groups given to \-\-without, it is removed from that list\.
99
- .
100
- .TP
101
- \fB\-\-without=<list>\fR
102
- A space\-separated list of groups referencing gems to skip during installation\. If a group is given that is in the remembered list of groups given to \-\-with, it is removed from that list\.
103
- .
104
- .SH "DEPLOYMENT MODE"
105
- Bundler\'s defaults are optimized for development\. To switch to defaults optimized for deployment and for CI, use the \fB\-\-deployment\fR flag\. Do not activate deployment mode on development machines, as it will cause an error when the Gemfile(5) is modified\.
106
- .
107
- .IP "1." 4
108
- A \fBGemfile\.lock\fR is required\.
109
- .
110
- .IP
111
- To ensure that the same versions of the gems you developed with and tested with are also used in deployments, a \fBGemfile\.lock\fR is required\.
112
- .
113
- .IP
114
- This is mainly to ensure that you remember to check your \fBGemfile\.lock\fR into version control\.
115
- .
116
- .IP "2." 4
117
- The \fBGemfile\.lock\fR must be up to date
118
- .
119
- .IP
120
- In development, you can modify your Gemfile(5) and re\-run \fBbundle install\fR to \fIconservatively update\fR your \fBGemfile\.lock\fR snapshot\.
121
- .
122
- .IP
123
- In deployment, your \fBGemfile\.lock\fR should be up\-to\-date with changes made in your Gemfile(5)\.
124
- .
125
- .IP "3." 4
126
- Gems are installed to \fBvendor/bundle\fR not your default system location
127
- .
128
- .IP
129
- In development, it\'s convenient to share the gems used in your application with other applications and other scripts that run on the system\.
130
- .
131
- .IP
132
- In deployment, isolation is a more important default\. In addition, the user deploying the application may not have permission to install gems to the system, or the web server may not have permission to read them\.
133
- .
134
- .IP
135
- As a result, \fBbundle install \-\-deployment\fR installs gems to the \fBvendor/bundle\fR directory in the application\. This may be overridden using the \fB\-\-path\fR option\.
136
- .
137
- .IP "" 0
138
- .
139
- .SH "SUDO USAGE"
140
- By default, Bundler installs gems to the same location as \fBgem install\fR\.
141
- .
142
- .P
143
- In some cases, that location may not be writable by your Unix user\. In that case, Bundler will stage everything in a temporary directory, then ask you for your \fBsudo\fR password in order to copy the gems into their system location\.
144
- .
145
- .P
146
- From your perspective, this is identical to installing the gems directly into the system\.
147
- .
148
- .P
149
- You should never use \fBsudo bundle install\fR\. This is because several other steps in \fBbundle install\fR must be performed as the current user:
150
- .
151
- .IP "\(bu" 4
152
- Updating your \fBGemfile\.lock\fR
153
- .
154
- .IP "\(bu" 4
155
- Updating your \fBvendor/cache\fR, if necessary
156
- .
157
- .IP "\(bu" 4
158
- Checking out private git repositories using your user\'s SSH keys
159
- .
160
- .IP "" 0
161
- .
162
- .P
163
- Of these three, the first two could theoretically be performed by \fBchown\fRing the resulting files to \fB$SUDO_USER\fR\. The third, however, can only be performed by invoking the \fBgit\fR command as the current user\. Therefore, git gems are downloaded and installed into \fB~/\.bundle\fR rather than $GEM_HOME or $BUNDLE_PATH\.
164
- .
165
- .P
166
- As a result, you should run \fBbundle install\fR as the current user, and Bundler will ask for your password if it is needed to put the gems into their final location\.
167
- .
168
- .SH "INSTALLING GROUPS"
169
- By default, \fBbundle install\fR will install all gems in all groups in your Gemfile(5), except those declared for a different platform\.
170
- .
171
- .P
172
- However, you can explicitly tell Bundler to skip installing certain groups with the \fB\-\-without\fR option\. This option takes a space\-separated list of groups\.
173
- .
174
- .P
175
- While the \fB\-\-without\fR option will skip \fIinstalling\fR the gems in the specified groups, it will still \fIdownload\fR those gems and use them to resolve the dependencies of every gem in your Gemfile(5)\.
176
- .
177
- .P
178
- This is so that installing a different set of groups on another machine (such as a production server) will not change the gems and versions that you have already developed and tested against\.
179
- .
180
- .P
181
- \fBBundler offers a rock\-solid guarantee that the third\-party code you are running in development and testing is also the third\-party code you are running in production\. You can choose to exclude some of that code in different environments, but you will never be caught flat\-footed by different versions of third\-party code being used in different environments\.\fR
182
- .
183
- .P
184
- For a simple illustration, consider the following Gemfile(5):
185
- .
186
- .IP "" 4
187
- .
188
- .nf
189
-
190
- source \'https://rubygems\.org\'
191
-
192
- gem \'sinatra\'
193
-
194
- group :production do
195
- gem \'rack\-perftools\-profiler\'
196
- end
197
- .
198
- .fi
199
- .
200
- .IP "" 0
201
- .
202
- .P
203
- In this case, \fBsinatra\fR depends on any version of Rack (\fB>= 1\.0\fR), while \fBrack\-perftools\-profiler\fR depends on 1\.x (\fB~> 1\.0\fR)\.
204
- .
205
- .P
206
- When you run \fBbundle install \-\-without production\fR in development, we look at the dependencies of \fBrack\-perftools\-profiler\fR as well\. That way, you do not spend all your time developing against Rack 2\.0, using new APIs unavailable in Rack 1\.x, only to have Bundler switch to Rack 1\.2 when the \fBproduction\fR group \fIis\fR used\.
207
- .
208
- .P
209
- This should not cause any problems in practice, because we do not attempt to \fBinstall\fR the gems in the excluded groups, and only evaluate as part of the dependency resolution process\.
210
- .
211
- .P
212
- This also means that you cannot include different versions of the same gem in different groups, because doing so would result in different sets of dependencies used in development and production\. Because of the vagaries of the dependency resolution process, this usually affects more than the gems you list in your Gemfile(5), and can (surprisingly) radically change the gems you are using\.
213
- .
214
- .SH "THE GEMFILE\.LOCK"
215
- When you run \fBbundle install\fR, Bundler will persist the full names and versions of all gems that you used (including dependencies of the gems specified in the Gemfile(5)) into a file called \fBGemfile\.lock\fR\.
216
- .
217
- .P
218
- Bundler uses this file in all subsequent calls to \fBbundle install\fR, which guarantees that you always use the same exact code, even as your application moves across machines\.
219
- .
220
- .P
221
- Because of the way dependency resolution works, even a seemingly small change (for instance, an update to a point\-release of a dependency of a gem in your Gemfile(5)) can result in radically different gems being needed to satisfy all dependencies\.
222
- .
223
- .P
224
- As a result, you \fBSHOULD\fR check your \fBGemfile\.lock\fR into version control, in both applications and gems\. If you do not, every machine that checks out your repository (including your production server) will resolve all dependencies again, which will result in different versions of third\-party code being used if \fBany\fR of the gems in the Gemfile(5) or any of their dependencies have been updated\.
225
- .
226
- .P
227
- When Bundler first shipped, the \fBGemfile\.lock\fR was included in the \fB\.gitignore\fR file included with generated gems\. Over time, however, it became clear that this practice forces the pain of broken dependencies onto new contributors, while leaving existing contributors potentially unaware of the problem\. Since \fBbundle install\fR is usually the first step towards a contribution, the pain of broken dependencies would discourage new contributors from contributing\. As a result, we have revised our guidance for gem authors to now recommend checking in the lock for gems\.
228
- .
229
- .SH "CONSERVATIVE UPDATING"
230
- When you make a change to the Gemfile(5) and then run \fBbundle install\fR, Bundler will update only the gems that you modified\.
231
- .
232
- .P
233
- In other words, if a gem that you \fBdid not modify\fR worked before you called \fBbundle install\fR, it will continue to use the exact same versions of all dependencies as it used before the update\.
234
- .
235
- .P
236
- Let\'s take a look at an example\. Here\'s your original Gemfile(5):
237
- .
238
- .IP "" 4
239
- .
240
- .nf
241
-
242
- source \'https://rubygems\.org\'
243
-
244
- gem \'actionpack\', \'2\.3\.8\'
245
- gem \'activemerchant\'
246
- .
247
- .fi
248
- .
249
- .IP "" 0
250
- .
251
- .P
252
- In this case, both \fBactionpack\fR and \fBactivemerchant\fR depend on \fBactivesupport\fR\. The \fBactionpack\fR gem depends on \fBactivesupport 2\.3\.8\fR and \fBrack ~> 1\.1\.0\fR, while the \fBactivemerchant\fR gem depends on \fBactivesupport >= 2\.3\.2\fR, \fBbraintree >= 2\.0\.0\fR, and \fBbuilder >= 2\.0\.0\fR\.
253
- .
254
- .P
255
- When the dependencies are first resolved, Bundler will select \fBactivesupport 2\.3\.8\fR, which satisfies the requirements of both gems in your Gemfile(5)\.
256
- .
257
- .P
258
- Next, you modify your Gemfile(5) to:
259
- .
260
- .IP "" 4
261
- .
262
- .nf
263
-
264
- source \'https://rubygems\.org\'
265
-
266
- gem \'actionpack\', \'3\.0\.0\.rc\'
267
- gem \'activemerchant\'
268
- .
269
- .fi
270
- .
271
- .IP "" 0
272
- .
273
- .P
274
- The \fBactionpack 3\.0\.0\.rc\fR gem has a number of new dependencies, and updates the \fBactivesupport\fR dependency to \fB= 3\.0\.0\.rc\fR and the \fBrack\fR dependency to \fB~> 1\.2\.1\fR\.
275
- .
276
- .P
277
- When you run \fBbundle install\fR, Bundler notices that you changed the \fBactionpack\fR gem, but not the \fBactivemerchant\fR gem\. It evaluates the gems currently being used to satisfy its requirements:
278
- .
279
- .TP
280
- \fBactivesupport 2\.3\.8\fR
281
- also used to satisfy a dependency in \fBactivemerchant\fR, which is not being updated
282
- .
283
- .TP
284
- \fBrack ~> 1\.1\.0\fR
285
- not currently being used to satisfy another dependency
286
- .
287
- .P
288
- Because you did not explicitly ask to update \fBactivemerchant\fR, you would not expect it to suddenly stop working after updating \fBactionpack\fR\. However, satisfying the new \fBactivesupport 3\.0\.0\.rc\fR dependency of actionpack requires updating one of its dependencies\.
289
- .
290
- .P
291
- Even though \fBactivemerchant\fR declares a very loose dependency that theoretically matches \fBactivesupport 3\.0\.0\.rc\fR, Bundler treats gems in your Gemfile(5) that have not changed as an atomic unit together with their dependencies\. In this case, the \fBactivemerchant\fR dependency is treated as \fBactivemerchant 1\.7\.1 + activesupport 2\.3\.8\fR, so \fBbundle install\fR will report that it cannot update \fBactionpack\fR\.
292
- .
293
- .P
294
- To explicitly update \fBactionpack\fR, including its dependencies which other gems in the Gemfile(5) still depend on, run \fBbundle update actionpack\fR (see \fBbundle update(1)\fR)\.
295
- .
296
- .P
297
- \fBSummary\fR: In general, after making a change to the Gemfile(5) , you should first try to run \fBbundle install\fR, which will guarantee that no other gem in the Gemfile(5) is impacted by the change\. If that does not work, run bundle update(1) \fIbundle\-update\.1\.html\fR\.
298
- .
299
- .SH "SEE ALSO"
300
- .
301
- .IP "\(bu" 4
302
- Gem install docs \fIhttp://guides\.rubygems\.org/rubygems\-basics/#installing\-gems\fR
303
- .
304
- .IP "\(bu" 4
305
- Rubygems signing docs \fIhttp://guides\.rubygems\.org/security/\fR
306
- .
307
- .IP "" 0
308
-