bundler 1.14.6 → 1.15.0.pre.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.
- checksums.yaml +5 -5
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +131 -43
- data/.travis.yml +5 -5
- data/CHANGELOG.md +52 -8
- data/CONTRIBUTING.md +10 -29
- data/README.md +13 -6
- data/Rakefile +4 -2
- data/bin/rubocop +1 -1
- data/doc/README.md +30 -0
- data/doc/TROUBLESHOOTING.md +64 -0
- data/doc/contributing/BUG_TRIAGE.md +36 -0
- data/doc/contributing/COMMUNITY.md +13 -0
- data/doc/contributing/GETTING_HELP.md +11 -0
- data/doc/contributing/HOW_YOU_CAN_HELP.md +27 -0
- data/doc/contributing/ISSUES.md +51 -0
- data/doc/contributing/README.md +38 -0
- data/doc/development/NEW_FEATURES.md +10 -0
- data/doc/development/PULL_REQUESTS.md +40 -0
- data/doc/development/README.md +19 -0
- data/doc/development/RELEASING.md +9 -0
- data/doc/development/SETUP.md +29 -0
- data/doc/documentation/README.md +29 -0
- data/doc/documentation/VISION.md +26 -0
- data/doc/documentation/WRITING.md +54 -0
- data/exe/bundle +4 -1
- data/lib/bundler.rb +20 -13
- data/lib/bundler/cli.rb +67 -3
- data/lib/bundler/cli/add.rb +26 -0
- data/lib/bundler/cli/config.rb +24 -6
- data/lib/bundler/cli/gem.rb +13 -8
- data/lib/bundler/cli/info.rb +51 -0
- data/lib/bundler/cli/inject.rb +8 -2
- data/lib/bundler/cli/install.rb +1 -1
- data/lib/bundler/cli/issue.rb +40 -0
- data/lib/bundler/cli/outdated.rb +16 -18
- data/lib/bundler/cli/pristine.rb +33 -0
- data/lib/bundler/cli/viz.rb +1 -1
- data/lib/bundler/definition.rb +64 -48
- data/lib/bundler/dsl.rb +6 -0
- data/lib/bundler/endpoint_specification.rb +3 -9
- data/lib/bundler/env.rb +3 -3
- data/lib/bundler/errors.rb +1 -1
- data/lib/bundler/fetcher/downloader.rb +3 -2
- data/lib/bundler/gem_helper.rb +5 -0
- data/lib/bundler/index.rb +9 -3
- data/lib/bundler/injector.rb +32 -11
- data/lib/bundler/installer.rb +1 -1
- data/lib/bundler/installer/parallel_installer.rb +15 -1
- data/lib/bundler/lazy_specification.rb +6 -0
- data/lib/bundler/lockfile_parser.rb +42 -34
- data/lib/bundler/mirror.rb +2 -0
- data/lib/bundler/plugin.rb +5 -1
- data/lib/bundler/plugin/api/source.rb +1 -1
- data/lib/bundler/plugin/index.rb +2 -0
- data/lib/bundler/remote_specification.rb +16 -7
- data/lib/bundler/resolver.rb +13 -3
- data/lib/bundler/rubygems_ext.rb +8 -3
- data/lib/bundler/rubygems_integration.rb +85 -36
- data/lib/bundler/runtime.rb +4 -1
- data/lib/bundler/settings.rb +2 -1
- data/lib/bundler/setup.rb +1 -1
- data/lib/bundler/shared_helpers.rb +26 -1
- data/lib/bundler/source.rb +17 -1
- data/lib/bundler/source/git.rb +16 -0
- data/lib/bundler/source/path.rb +13 -3
- data/lib/bundler/source/path/installer.rb +2 -2
- data/lib/bundler/source/rubygems.rb +5 -2
- data/lib/bundler/spec_set.rb +22 -13
- data/lib/bundler/stub_specification.rb +64 -2
- data/lib/bundler/templates/Executable +1 -1
- data/lib/bundler/templates/Executable.standalone +5 -5
- data/lib/bundler/templates/newgem/Gemfile.tt +2 -2
- data/lib/bundler/templates/newgem/LICENSE.txt.tt +1 -1
- data/lib/bundler/templates/newgem/README.md.tt +12 -6
- data/lib/bundler/templates/newgem/Rakefile.tt +5 -5
- data/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +4 -4
- data/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt +3 -3
- data/lib/bundler/templates/newgem/lib/newgem.rb.tt +6 -6
- data/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +4 -4
- data/lib/bundler/templates/newgem/newgem.gemspec.tt +9 -9
- data/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +3 -0
- data/lib/bundler/templates/newgem/test/newgem_test.rb.tt +1 -1
- data/lib/bundler/templates/newgem/test/test_helper.rb.tt +3 -3
- data/lib/bundler/ui/shell.rb +9 -6
- data/lib/bundler/vendor/thor/lib/thor.rb +31 -23
- data/lib/bundler/vendor/thor/lib/thor/actions.rb +21 -22
- data/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +2 -2
- data/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +8 -8
- data/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +23 -12
- data/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +10 -14
- data/lib/bundler/vendor/thor/lib/thor/base.rb +30 -30
- data/lib/bundler/vendor/thor/lib/thor/command.rb +9 -9
- data/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +9 -1
- data/lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb +7 -5
- data/lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb +94 -63
- data/lib/bundler/vendor/thor/lib/thor/error.rb +3 -3
- data/lib/bundler/vendor/thor/lib/thor/group.rb +12 -12
- data/lib/bundler/vendor/thor/lib/thor/invocation.rb +4 -5
- data/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +4 -7
- data/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +16 -16
- data/lib/bundler/vendor/thor/lib/thor/parser/option.rb +40 -19
- data/lib/bundler/vendor/thor/lib/thor/parser/options.rb +7 -5
- data/lib/bundler/vendor/thor/lib/thor/runner.rb +25 -25
- data/lib/bundler/vendor/thor/lib/thor/shell.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +41 -26
- data/lib/bundler/vendor/thor/lib/thor/shell/color.rb +1 -1
- data/lib/bundler/vendor/thor/lib/thor/shell/html.rb +4 -4
- data/lib/bundler/vendor/thor/lib/thor/util.rb +8 -7
- data/lib/bundler/vendor/thor/lib/thor/version.rb +1 -1
- data/lib/bundler/version.rb +14 -1
- data/lib/bundler/version_ranges.rb +75 -0
- data/lib/bundler/worker.rb +2 -1
- data/man/bundle-check.ronn +26 -0
- data/man/bundle-clean.ronn +18 -0
- data/man/bundle-config.ronn +4 -1
- data/man/bundle-info.ronn +17 -0
- data/man/bundle-init.ronn +18 -0
- data/man/bundle-inject.ronn +22 -0
- data/man/bundle-open.ronn +19 -0
- data/man/bundle-show.ronn +20 -0
- data/man/bundle-update.ronn +5 -2
- data/man/bundle-viz.ronn +30 -0
- data/man/bundle.ronn +3 -0
- data/man/gemfile.5.ronn +24 -64
- data/task/release.rake +115 -0
- metadata +49 -5
- data/DEVELOPMENT.md +0 -150
- data/ISSUES.md +0 -117
data/man/bundle-config.ronn
CHANGED
@@ -48,7 +48,7 @@ If these options must be remembered,they must be set using `bundle config`
|
|
48
48
|
|
49
49
|
The options that can be configured are:
|
50
50
|
|
51
|
-
* `
|
51
|
+
* `bin`:
|
52
52
|
Creates a directory (defaults to `~/bin`) and place any executables from the
|
53
53
|
gem there. These executables run in Bundler's context. If used, you might add
|
54
54
|
this directory to your environment's `PATH` variable. For instance, if the
|
@@ -219,6 +219,9 @@ learn more about their operation in [bundle install(1)][bundle-install].
|
|
219
219
|
The location where RubyGems installs binstubs. Defaults to `Gem.bindir`.
|
220
220
|
* `user_agent` (`BUNDLE_USER_AGENT`):
|
221
221
|
The custom user agent fragment Bundler includes in API requests.
|
222
|
+
* `gem.push_key` (`BUNDLE_GEM__PUSH_KEY`):
|
223
|
+
Sets the `--key` paramter for `gem push` when using the `rake release`
|
224
|
+
command with a private gemstash server.
|
222
225
|
|
223
226
|
In general, you should set these settings per-application by using the applicable
|
224
227
|
flag to the [bundle install(1)][bundle-install] or [bundle package(1)][bundle-package] command.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
bundle-info(1) -- Show information for the given gem in your bundle
|
2
|
+
=========================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle info` [GEM]
|
7
|
+
[--path]
|
8
|
+
|
9
|
+
## DESCRIPTION
|
10
|
+
|
11
|
+
Print the basic information about the provided GEM such as homepage, version,
|
12
|
+
path and summary.
|
13
|
+
|
14
|
+
## OPTIONS
|
15
|
+
|
16
|
+
* `--path`:
|
17
|
+
Print the path of the given gem
|
@@ -0,0 +1,18 @@
|
|
1
|
+
bundle-init(1) -- Generates a Gemfile into the current working directory
|
2
|
+
========================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle init` [--gemspec=FILE]
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
Init generates a default `Gemfile(5)` in the current working directory. When
|
11
|
+
adding a `Gemfile(5)` to a gem with a gemspec, the `--gemspec` option will
|
12
|
+
automatically add each dependency listed in the gemspec file to the newly
|
13
|
+
created `Gemfile(5)`.
|
14
|
+
|
15
|
+
## OPTIONS
|
16
|
+
|
17
|
+
* `--gemspec`:
|
18
|
+
Use the specified .gemspec to create the `Gemfile(5)`
|
@@ -0,0 +1,22 @@
|
|
1
|
+
bundle-inject(1) -- Add named gem(s) with version requirements to Gemfile
|
2
|
+
=========================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle inject` [GEM] [VERSION]
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
Adds the named gem(s) with their version requirements to the resolved
|
11
|
+
`Gemfile(5)`.
|
12
|
+
|
13
|
+
This command will add the gem to both your `Gemfile(5)` and Gemfile.lock if it
|
14
|
+
isn't listed yet.
|
15
|
+
|
16
|
+
Example:
|
17
|
+
|
18
|
+
bundle install
|
19
|
+
bundle inject 'rack' '> 0'
|
20
|
+
|
21
|
+
This will inject the 'rack' gem with a version greater than 0 in your
|
22
|
+
`Gemfile(5)` and Gemfile.lock
|
@@ -0,0 +1,19 @@
|
|
1
|
+
bundle-open(1) -- Opens the source directory for a gem in your bundle
|
2
|
+
=====================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle open` [GEM]
|
7
|
+
|
8
|
+
## DESCRIPTION
|
9
|
+
|
10
|
+
Opens the source directory of the provided GEM in your editor.
|
11
|
+
|
12
|
+
For this to work the `EDITOR` or `BUNDLER_EDITOR` environment variable has to
|
13
|
+
be set.
|
14
|
+
|
15
|
+
Example:
|
16
|
+
|
17
|
+
bundle open 'rack'
|
18
|
+
|
19
|
+
Will open the source directory for the 'rack' gem in your bundle.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
bundle-show(1) -- Shows all the gems in your bundle, or the path to a gem
|
2
|
+
=========================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle show` [GEM]
|
7
|
+
[--paths]
|
8
|
+
|
9
|
+
## DESCRIPTION
|
10
|
+
|
11
|
+
Without the [GEM] option, `show` will print a list of the names and versions of
|
12
|
+
all gems that are required by your `Gemfile(5)`.
|
13
|
+
|
14
|
+
Calling show with [GEM] will list the exact location of that gem on your
|
15
|
+
machine.
|
16
|
+
|
17
|
+
## OPTIONS
|
18
|
+
|
19
|
+
* `--paths`:
|
20
|
+
List the paths of all gems that are required by your `Gemfile(5)`.
|
data/man/bundle-update.ronn
CHANGED
@@ -51,8 +51,11 @@ gem.
|
|
51
51
|
* `--full-index`:
|
52
52
|
Fall back to using the single-file index of all gems.
|
53
53
|
|
54
|
-
* `--jobs`:
|
55
|
-
Specify the number of jobs to run in parallel.
|
54
|
+
* `--jobs=[<number>]`:
|
55
|
+
Specify the number of jobs to run in parallel. The default is `1`.
|
56
|
+
|
57
|
+
* `--retry=[<number>]`:
|
58
|
+
Retry failed network or git requests for <number> times.
|
56
59
|
|
57
60
|
* `--quiet`:
|
58
61
|
Only output warnings and errors.
|
data/man/bundle-viz.ronn
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
bundle-viz(1) -- Generates a visual dependency graph for your Gemfile
|
2
|
+
=====================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
|
6
|
+
`bundle viz` [--file=FILE]
|
7
|
+
[--format=FORMAT]
|
8
|
+
[--requirements]
|
9
|
+
[--version]
|
10
|
+
[--without=GROUP GROUP]
|
11
|
+
|
12
|
+
## DESCRIPTION
|
13
|
+
|
14
|
+
`viz` generates a PNG file of the current `Gemfile(5)` as a dependency graph.
|
15
|
+
`viz` requires the ruby-graphviz gem (and its dependencies).
|
16
|
+
|
17
|
+
The associated gems must also be installed via `bundle install(1)`.
|
18
|
+
|
19
|
+
## OPTIONS
|
20
|
+
|
21
|
+
* `--file`:
|
22
|
+
The name to use for the generated file. See `--format` option
|
23
|
+
* `--format`:
|
24
|
+
This is output format option. Supported format is png, jpg, svg, dot ...
|
25
|
+
* `--requirements`:
|
26
|
+
Set to show the version of each required dependency.
|
27
|
+
* `--version`:
|
28
|
+
Set to show each gem version.
|
29
|
+
* `--without`:
|
30
|
+
Exclude gems that are part of the specified named group.
|
data/man/bundle.ronn
CHANGED
@@ -48,6 +48,9 @@ We divide `bundle` subcommands into primary commands and utilities.
|
|
48
48
|
|
49
49
|
## UTILITIES
|
50
50
|
|
51
|
+
* `bundle binstubs(1)`:
|
52
|
+
Generate binstubs for executables in a gem
|
53
|
+
|
51
54
|
* `bundle check(1)`:
|
52
55
|
Determine whether the requirements for your application are installed
|
53
56
|
and available to bundler
|
data/man/gemfile.5.ronn
CHANGED
@@ -30,7 +30,7 @@ Sources are checked for gems following the heuristics described in
|
|
30
30
|
will print a warning after installing the gem indicating which source was used,
|
31
31
|
and listing the other sources where the gem is available. A specific source can
|
32
32
|
be selected for gems that need to use a non-standard repository, suppressing
|
33
|
-
this warning, by using the [`:source` option](#SOURCE
|
33
|
+
this warning, by using the [`:source` option](#SOURCE) or a
|
34
34
|
[`source` block](#BLOCK-FORM-OF-SOURCE-GIT-PATH-GROUP-and-PLATFORMS).
|
35
35
|
|
36
36
|
### CREDENTIALS
|
@@ -173,78 +173,38 @@ There are a number of `Gemfile` platforms:
|
|
173
173
|
|
174
174
|
* `ruby`:
|
175
175
|
C Ruby (MRI) or Rubinius, but `NOT` Windows
|
176
|
-
* `ruby_18`:
|
177
|
-
_ruby_ `AND` version 1.8
|
178
|
-
* `ruby_19`:
|
179
|
-
_ruby_ `AND` version 1.9
|
180
|
-
* `ruby_20`:
|
181
|
-
_ruby_ `AND` version 2.0
|
182
|
-
* `ruby_21`:
|
183
|
-
_ruby_ `AND` version 2.1
|
184
|
-
* `ruby_22`:
|
185
|
-
_ruby_ `AND` version 2.2
|
186
|
-
* `ruby_23`:
|
187
|
-
_ruby_ `AND` version 2.3
|
188
|
-
* `ruby_24`:
|
189
|
-
_ruby_ `AND` version 2.4
|
190
|
-
* `ruby_25`:
|
191
|
-
_ruby_ `AND` version 2.5
|
192
176
|
* `mri`:
|
193
177
|
Same as _ruby_, but not Rubinius
|
194
|
-
* `
|
195
|
-
|
196
|
-
* `
|
197
|
-
|
198
|
-
* `mri_20`:
|
199
|
-
_mri_ `AND` version 2.0
|
200
|
-
* `mri_21`:
|
201
|
-
_mri_ `AND` version 2.1
|
202
|
-
* `mri_22`:
|
203
|
-
_mri_ `AND` version 2.2
|
204
|
-
* `mri_23`:
|
205
|
-
_mri_ `AND` version 2.3
|
206
|
-
* `mri_24`:
|
207
|
-
_mri_ `AND` version 2.4
|
208
|
-
* `mri_25`:
|
209
|
-
_mri_ `AND` version 2.5
|
178
|
+
* `mingw`:
|
179
|
+
Windows 32 bit 'mingw32' platform (aka RubyInstaller)
|
180
|
+
* `x64_mingw`:
|
181
|
+
Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
|
210
182
|
* `rbx`:
|
211
183
|
Same as _ruby_, but only Rubinius (not MRI)
|
212
184
|
* `jruby`:
|
213
185
|
JRuby
|
214
186
|
* `mswin`:
|
215
187
|
Windows
|
188
|
+
|
189
|
+
You can restrict further by platform and version for all platforms *except* for
|
190
|
+
`rbx`, `jruby`, and `mswin`.
|
191
|
+
|
192
|
+
To specify a version in addition to a platform, append the version number without
|
193
|
+
the delimiter to the platform. For example, to specify that a gem should only be
|
194
|
+
used on platforms with Ruby 2.3, use:
|
195
|
+
|
196
|
+
ruby_23
|
197
|
+
|
198
|
+
The full list of platforms and supported versions includes:
|
199
|
+
|
200
|
+
* `ruby`:
|
201
|
+
1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
202
|
+
* `mri`:
|
203
|
+
1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
216
204
|
* `mingw`:
|
217
|
-
|
218
|
-
* `mingw_18`:
|
219
|
-
_mingw_ `AND` version 1.8
|
220
|
-
* `mingw_19`:
|
221
|
-
_mingw_ `AND` version 1.9
|
222
|
-
* `mingw_20`:
|
223
|
-
_mingw_ `AND` version 2.0
|
224
|
-
* `mingw_21`:
|
225
|
-
_mingw_ `AND` version 2.1
|
226
|
-
* `mingw_22`:
|
227
|
-
_mingw_ `AND` version 2.2
|
228
|
-
* `mingw_23`:
|
229
|
-
_mingw_ `AND` version 2.3
|
230
|
-
* `mingw_24`:
|
231
|
-
_mingw_ `AND` version 2.4
|
232
|
-
* `mingw_25`:
|
233
|
-
_mingw_ `AND` version 2.5
|
205
|
+
1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
234
206
|
* `x64_mingw`:
|
235
|
-
|
236
|
-
* `x64_mingw_20`:
|
237
|
-
_x64_mingw_ `AND` version 2.0
|
238
|
-
* `x64_mingw_21`:
|
239
|
-
_x64_mingw_ `AND` version 2.1
|
240
|
-
* `x64_mingw_22`:
|
241
|
-
_x64_mingw_ `AND` version 2.2
|
242
|
-
* `x64_mingw_23`:
|
243
|
-
_x64_mingw_ `AND` version 2.3
|
244
|
-
* `x64_mingw_24`:
|
245
|
-
_x64_mingw_ `AND` version 2.4
|
246
|
-
* `x64_mingw_25`:
|
247
|
-
_x64_mingw_ `AND` version 2.5
|
207
|
+
2.0, 2.1, 2.2, 2.3, 2.4, 2.5
|
248
208
|
|
249
209
|
As with groups, you can specify one or more platforms:
|
250
210
|
|
@@ -273,7 +233,7 @@ back on global sources using the ordering described in [SOURCE PRIORITY][].
|
|
273
233
|
|
274
234
|
Selecting a specific source repository this way also suppresses the ambiguous
|
275
235
|
gem warning described above in
|
276
|
-
[GLOBAL SOURCES (#source)](#GLOBAL-SOURCES
|
236
|
+
[GLOBAL SOURCES (#source)](#GLOBAL-SOURCES).
|
277
237
|
|
278
238
|
### GIT
|
279
239
|
|
data/task/release.rake
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
namespace :release do
|
3
|
+
def confirm(prompt = "")
|
4
|
+
loop do
|
5
|
+
print(prompt)
|
6
|
+
print(": ") unless prompt.empty?
|
7
|
+
break if $stdin.gets.strip == "y"
|
8
|
+
end
|
9
|
+
rescue Interrupt
|
10
|
+
abort
|
11
|
+
end
|
12
|
+
|
13
|
+
def gh_api_request(opts)
|
14
|
+
require "net/http"
|
15
|
+
require "json"
|
16
|
+
host = opts.fetch(:host) { "https://api.github.com/" }
|
17
|
+
path = opts.fetch(:path)
|
18
|
+
response = Net::HTTP.get_response(URI.join(host, path))
|
19
|
+
|
20
|
+
links = Hash[*(response["Link"] || "").split(", ").map do |link|
|
21
|
+
href, name = link.match(/<(.*?)>; rel="(\w+)"/).captures
|
22
|
+
|
23
|
+
[name.to_sym, href]
|
24
|
+
end.flatten]
|
25
|
+
|
26
|
+
parsed_response = JSON.parse(response.body)
|
27
|
+
|
28
|
+
if n = links[:next]
|
29
|
+
parsed_response.concat gh_api_request(:host => host, :path => n)
|
30
|
+
end
|
31
|
+
|
32
|
+
parsed_response
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Make a patch release with the PRs from master in the patch milestone"
|
36
|
+
task :patch, :version do |_t, args|
|
37
|
+
version = args.version
|
38
|
+
|
39
|
+
version ||= begin
|
40
|
+
version = BUNDLER_SPEC.version
|
41
|
+
segments = version.segments
|
42
|
+
if segments.last.is_a?(String)
|
43
|
+
segments << "1"
|
44
|
+
else
|
45
|
+
segments[-1] += 1
|
46
|
+
end
|
47
|
+
segments.join(".")
|
48
|
+
end
|
49
|
+
|
50
|
+
confirm "You are about to release #{version}, currently #{BUNDLER_SPEC.version}"
|
51
|
+
|
52
|
+
milestones = gh_api_request(:path => "repos/bundler/bundler/milestones?state=open")
|
53
|
+
unless patch_milestone = milestones.find {|m| m["title"] == version }
|
54
|
+
abort "failed to find #{version} milestone on GitHub"
|
55
|
+
end
|
56
|
+
prs = gh_api_request(:path => "repos/bundler/bundler/issues?milestone=#{patch_milestone["number"]}&state=all")
|
57
|
+
prs.map! do |pr|
|
58
|
+
abort "#{pr["html_url"]} hasn't been closed yet!" unless pr["state"] == "closed"
|
59
|
+
next unless pr["pull_request"]
|
60
|
+
pr["number"].to_s
|
61
|
+
end.compact
|
62
|
+
|
63
|
+
version_file = "lib/bundler/version.rb"
|
64
|
+
version_contents = File.read(version_file)
|
65
|
+
unless version_contents.sub!(/^(\s*VERSION = )"#{Gem::Version::VERSION_PATTERN}"/, "\\1#{version.to_s.dump}")
|
66
|
+
abort "failed to update #{version_file}, is it in the expected format?"
|
67
|
+
end
|
68
|
+
File.open(version_file, "w") {|f| f.write(version_contents) }
|
69
|
+
|
70
|
+
BUNDLER_SPEC.version = version
|
71
|
+
|
72
|
+
branch = version.split(".", 3)[0, 2].push("stable").join("-")
|
73
|
+
sh("git", "checkout", branch)
|
74
|
+
|
75
|
+
commits = `git log --oneline origin/master --`.split("\n").map {|l| l.split(/\s/, 2) }.reverse
|
76
|
+
commits.select! {|_sha, message| message =~ /(Auto merge of|Merge pull request) ##{Regexp.union(*prs)}/ }
|
77
|
+
|
78
|
+
abort "Could not find commits for all PRs" unless commits.size == prs.size
|
79
|
+
|
80
|
+
unless system("git", "cherry-pick", "-x", "-m", "1", *commits.map(&:first))
|
81
|
+
abort unless system("zsh")
|
82
|
+
end
|
83
|
+
|
84
|
+
prs.each do |pr|
|
85
|
+
system("open", "https://github.com/bundler/bundler/pull/#{pr}")
|
86
|
+
confirm "Add to the changelog"
|
87
|
+
end
|
88
|
+
|
89
|
+
confirm "Update changelog"
|
90
|
+
sh("git", "commit", "-am", "Version #{version} with changelog")
|
91
|
+
sh("rake", "release")
|
92
|
+
sh("git", "checkout", "master")
|
93
|
+
sh("git", "pull")
|
94
|
+
sh("git", "merge", "v#{version}", "--no-edit")
|
95
|
+
sh("git", "push")
|
96
|
+
end
|
97
|
+
|
98
|
+
desc "Open all PRs that have not been included in a stable release"
|
99
|
+
task :open_unreleased_prs do
|
100
|
+
def prs(on = "master")
|
101
|
+
commits = `git log --oneline origin/#{on} --`.split("\n")
|
102
|
+
commits.reverse_each.map {|c| c =~ /(Auto merge of|Merge pull request) #(\d+)/ && $2 }.compact
|
103
|
+
end
|
104
|
+
|
105
|
+
last_stable = `git ls-remote origin`.split("\n").map {|r| r =~ %r{refs/tags/v([\d.]+)$} && $1 }.compact.map {|v| Gem::Version.create(v) }.max
|
106
|
+
last_stable = last_stable.segments[0, 2].<<("stable").join("-")
|
107
|
+
|
108
|
+
in_release = prs("HEAD") - prs(last_stable)
|
109
|
+
|
110
|
+
in_release.each do |pr|
|
111
|
+
system("open", "https://github.com/bundler/bundler/pull/#{pr}")
|
112
|
+
confirm
|
113
|
+
end
|
114
|
+
end
|
115
|
+
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: 1.
|
4
|
+
version: 1.15.0.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Arko
|
@@ -17,7 +17,7 @@ authors:
|
|
17
17
|
autorequire:
|
18
18
|
bindir: exe
|
19
19
|
cert_chain: []
|
20
|
-
date: 2017-
|
20
|
+
date: 2017-04-17 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: automatiek
|
@@ -122,8 +122,6 @@ files:
|
|
122
122
|
- CHANGELOG.md
|
123
123
|
- CODE_OF_CONDUCT.md
|
124
124
|
- CONTRIBUTING.md
|
125
|
-
- DEVELOPMENT.md
|
126
|
-
- ISSUES.md
|
127
125
|
- LICENSE.md
|
128
126
|
- README.md
|
129
127
|
- Rakefile
|
@@ -132,12 +130,29 @@ files:
|
|
132
130
|
- bin/rubocop
|
133
131
|
- bin/with_rubygems
|
134
132
|
- bundler.gemspec
|
133
|
+
- doc/README.md
|
134
|
+
- doc/TROUBLESHOOTING.md
|
135
|
+
- doc/contributing/BUG_TRIAGE.md
|
136
|
+
- doc/contributing/COMMUNITY.md
|
137
|
+
- doc/contributing/GETTING_HELP.md
|
138
|
+
- doc/contributing/HOW_YOU_CAN_HELP.md
|
139
|
+
- doc/contributing/ISSUES.md
|
140
|
+
- doc/contributing/README.md
|
141
|
+
- doc/development/NEW_FEATURES.md
|
142
|
+
- doc/development/PULL_REQUESTS.md
|
143
|
+
- doc/development/README.md
|
144
|
+
- doc/development/RELEASING.md
|
145
|
+
- doc/development/SETUP.md
|
146
|
+
- doc/documentation/README.md
|
147
|
+
- doc/documentation/VISION.md
|
148
|
+
- doc/documentation/WRITING.md
|
135
149
|
- exe/bundle
|
136
150
|
- exe/bundle_ruby
|
137
151
|
- exe/bundler
|
138
152
|
- lib/bundler.rb
|
139
153
|
- lib/bundler/capistrano.rb
|
140
154
|
- lib/bundler/cli.rb
|
155
|
+
- lib/bundler/cli/add.rb
|
141
156
|
- lib/bundler/cli/binstubs.rb
|
142
157
|
- lib/bundler/cli/cache.rb
|
143
158
|
- lib/bundler/cli/check.rb
|
@@ -148,15 +163,18 @@ files:
|
|
148
163
|
- lib/bundler/cli/doctor.rb
|
149
164
|
- lib/bundler/cli/exec.rb
|
150
165
|
- lib/bundler/cli/gem.rb
|
166
|
+
- lib/bundler/cli/info.rb
|
151
167
|
- lib/bundler/cli/init.rb
|
152
168
|
- lib/bundler/cli/inject.rb
|
153
169
|
- lib/bundler/cli/install.rb
|
170
|
+
- lib/bundler/cli/issue.rb
|
154
171
|
- lib/bundler/cli/lock.rb
|
155
172
|
- lib/bundler/cli/open.rb
|
156
173
|
- lib/bundler/cli/outdated.rb
|
157
174
|
- lib/bundler/cli/package.rb
|
158
175
|
- lib/bundler/cli/platform.rb
|
159
176
|
- lib/bundler/cli/plugin.rb
|
177
|
+
- lib/bundler/cli/pristine.rb
|
160
178
|
- lib/bundler/cli/show.rb
|
161
179
|
- lib/bundler/cli/update.rb
|
162
180
|
- lib/bundler/cli/viz.rb
|
@@ -335,12 +353,19 @@ files:
|
|
335
353
|
- lib/bundler/vendored_persistent.rb
|
336
354
|
- lib/bundler/vendored_thor.rb
|
337
355
|
- lib/bundler/version.rb
|
356
|
+
- lib/bundler/version_ranges.rb
|
338
357
|
- lib/bundler/vlad.rb
|
339
358
|
- lib/bundler/worker.rb
|
340
359
|
- lib/bundler/yaml_serializer.rb
|
341
360
|
- man/bundle-binstubs.1
|
342
361
|
- man/bundle-binstubs.1.txt
|
343
362
|
- man/bundle-binstubs.ronn
|
363
|
+
- man/bundle-check.1
|
364
|
+
- man/bundle-check.1.txt
|
365
|
+
- man/bundle-check.ronn
|
366
|
+
- man/bundle-clean.1
|
367
|
+
- man/bundle-clean.1.txt
|
368
|
+
- man/bundle-clean.ronn
|
344
369
|
- man/bundle-config.1
|
345
370
|
- man/bundle-config.1.txt
|
346
371
|
- man/bundle-config.ronn
|
@@ -350,12 +375,24 @@ files:
|
|
350
375
|
- man/bundle-gem.1
|
351
376
|
- man/bundle-gem.1.txt
|
352
377
|
- man/bundle-gem.ronn
|
378
|
+
- man/bundle-info.1
|
379
|
+
- man/bundle-info.1.txt
|
380
|
+
- man/bundle-info.ronn
|
381
|
+
- man/bundle-init.1
|
382
|
+
- man/bundle-init.1.txt
|
383
|
+
- man/bundle-init.ronn
|
384
|
+
- man/bundle-inject.1
|
385
|
+
- man/bundle-inject.1.txt
|
386
|
+
- man/bundle-inject.ronn
|
353
387
|
- man/bundle-install.1
|
354
388
|
- man/bundle-install.1.txt
|
355
389
|
- man/bundle-install.ronn
|
356
390
|
- man/bundle-lock.1
|
357
391
|
- man/bundle-lock.1.txt
|
358
392
|
- man/bundle-lock.ronn
|
393
|
+
- man/bundle-open.1
|
394
|
+
- man/bundle-open.1.txt
|
395
|
+
- man/bundle-open.ronn
|
359
396
|
- man/bundle-outdated.1
|
360
397
|
- man/bundle-outdated.1.txt
|
361
398
|
- man/bundle-outdated.ronn
|
@@ -365,9 +402,15 @@ files:
|
|
365
402
|
- man/bundle-platform.1
|
366
403
|
- man/bundle-platform.1.txt
|
367
404
|
- man/bundle-platform.ronn
|
405
|
+
- man/bundle-show.1
|
406
|
+
- man/bundle-show.1.txt
|
407
|
+
- man/bundle-show.ronn
|
368
408
|
- man/bundle-update.1
|
369
409
|
- man/bundle-update.1.txt
|
370
410
|
- man/bundle-update.ronn
|
411
|
+
- man/bundle-viz.1
|
412
|
+
- man/bundle-viz.1.txt
|
413
|
+
- man/bundle-viz.ronn
|
371
414
|
- man/bundle.1
|
372
415
|
- man/bundle.1.txt
|
373
416
|
- man/bundle.ronn
|
@@ -375,6 +418,7 @@ files:
|
|
375
418
|
- man/gemfile.5.ronn
|
376
419
|
- man/gemfile.5.txt
|
377
420
|
- man/index.txt
|
421
|
+
- task/release.rake
|
378
422
|
homepage: http://bundler.io
|
379
423
|
licenses:
|
380
424
|
- MIT
|
@@ -395,7 +439,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
395
439
|
version: 1.3.6
|
396
440
|
requirements: []
|
397
441
|
rubyforge_project:
|
398
|
-
rubygems_version: 2.6.
|
442
|
+
rubygems_version: 2.6.11
|
399
443
|
signing_key:
|
400
444
|
specification_version: 4
|
401
445
|
summary: The best way to manage your application's dependencies
|