rubygems-update 4.0.0.beta1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,211 +0,0 @@
1
- # Upgrading
2
-
3
- ## Bundler 4
4
-
5
- In order to prepare for Bundler 4, you can easily configure Bundler 2.7 to
6
- behave exactly like Bundler 4 will behave. To do so, set the environment
7
- variable `BUNDLE_SIMULATE_VERSION` to `4`. Alternatively, you can use `bundle
8
- config` and enable "Bundler 4 mode" either globally through `bundle config set
9
- --global simulate_version 4`, or locally through `bundle config set --local
10
- simulate_version 4`. From now on in this document we will assume that all three
11
- of these configuration options are available, but will only mention `bundle
12
- config set <option> <value>`.
13
-
14
- The following is a summary of the changes that we plan to introduce in Bundler
15
- 4, and why we will be making those changes. Some of them should be well known
16
- already by existing users, because we have been printing deprecation messages
17
- for years, but some of them are defaults that will be switched in Bundler 4 and
18
- needs some heads up.
19
-
20
- ### Running just `bundle` will print help usage
21
-
22
- We're changing this default to make Bundler more friendly for new users. We do
23
- understand that long time users already know how Bundler works and find useful
24
- that just `bundle` defaults to `bundle install`. Those users can keep the
25
- existing default by configuring
26
-
27
- ```
28
- bundle config default_cli_command install
29
- ```
30
-
31
- ### Flags passed to `bundle install` that relied on being remembered across invocations will be removed
32
-
33
- In particular, the `--clean`, `--deployment`, `--frozen`, `--no-prune`,
34
- `--path`, `--shebang`, `--system`, `--without`, and `--with` options to `bundle
35
- install`.
36
-
37
- Remembering CLI options has been a source of historical confusion and bug
38
- reports, not only for beginners but also for experienced users. A CLI tool
39
- should not behave differently across exactly the same invocations _unless_
40
- explicitly configured to do so. This is what configuration is about after all,
41
- and things should never be silently configured without the user knowing about
42
- it.
43
-
44
- The problem with changing this behavior is that very common workflows are
45
- relying on it. For example, when you run `bundle install --without
46
- development:test` in production, those flags are persisted in the app's
47
- configuration file and further `bundle` invocations will happily ignore
48
- development and test gems. This magic will disappear from bundler 4, and you
49
- will explicitly need to configure it, either through environment variables,
50
- application configuration, or machine configuration. For example, with `bundle
51
- config set --local without development test`.
52
-
53
- ### Bundler will include checksums in new lockfiles by default
54
-
55
- We shipped this security feature recently and we believe it's time to turn it on
56
- by default, so that everyone benefits from the extra security assurances. So
57
- whenever you create a new lockfile, Bundler will include a CHECKSUMS section.
58
- Bundler will not automatically add a CHECKSUMS section to existing
59
- lockfiles, though, unless explicitly requested through `bundle lock
60
- --add-checksums`.
61
-
62
- ### Strict source pinning in Gemfile is enforced by default
63
-
64
- In bundler 4, the source for every dependency will be unambiguously defined, and
65
- Bundler will refuse to run otherwise.
66
-
67
- * Multiple global Gemfile sources will no longer be supported.
68
-
69
- Instead of something like this:
70
-
71
- ```ruby
72
- source "https://main_source"
73
- source "https://another_source"
74
-
75
- gem "dependency1"
76
- gem "dependency2"
77
- ```
78
-
79
- do something like this:
80
-
81
- ```ruby
82
- source "https://main_source"
83
-
84
- gem "dependency1"
85
-
86
- source "https://another_source" do
87
- gem "dependency2"
88
- end
89
- ```
90
-
91
- * Global `path` and `git` sources will no longer be supported.
92
-
93
- Instead of something like this:
94
-
95
- ```ruby
96
- path "/my/path/with/gems"
97
- git "https://my_git_repo_with_gems"
98
-
99
- gem "dependency1"
100
- gem "dependency2"
101
- ```
102
-
103
- do something like this:
104
-
105
- ```ruby
106
- gem "dependency1", path: "/my/path/with/gems"
107
- gem "dependency2", git: "https://my_git_repo_with_gems"
108
- ```
109
-
110
- or use the block forms if you have multiple gems for each source and you want
111
- to be a bit DRYer:
112
-
113
-
114
- ```ruby
115
- path "/my/path/with/gems" do
116
- # gem "dependency1"
117
- # ...
118
- # gem "dependencyn"
119
- end
120
-
121
- git "https://my_git_repo_with_gems" do
122
- # gem "dependency1"
123
- # ...
124
- # gem "dependencyn"
125
- end
126
- ```
127
-
128
- #### Notable CLI changes
129
-
130
- * `bundle viz` will be removed and extracted to a plugin.
131
-
132
- This is the only bundler command requiring external dependencies, both an OS
133
- dependency (the `graphviz` package) and a gem dependency (the `ruby-graphviz`
134
- gem). Removing these dependencies will make development easier and it was also
135
- seen by the bundler team as an opportunity to develop a bundler plugin that
136
- it's officially maintained by the bundler team, and that users can take as a
137
- reference to develop their own plugins. The plugin will contain the same code
138
- as the old core command, the only difference being that the command is now
139
- implemented as `bundle graph` which is much easier to understand. However, the
140
- details of the plugin are under discussion. See [#3333](https://github.com/ruby/rubygems/issues/3333).
141
-
142
- * The `bundle install` command will no longer accept a `--binstubs` flag.
143
-
144
- The `--binstubs` option has been removed from `bundle install` and replaced
145
- with the `bundle binstubs` command. The `--binstubs` flag would create
146
- binstubs for all executables present inside the gems in the project. This was
147
- hardly useful since most users will only use a subset of all the binstubs
148
- available to them. Also, it would force the introduction of a bunch of most
149
- likely unused files into source control. Because of this, binstubs now must
150
- be created and checked into version control individually.
151
-
152
- * The `bundle inject` command will be replaced with `bundle add`
153
-
154
- We believe the new command fits the user's mental model better and it supports
155
- a wider set of use cases. The interface supported by `bundle inject` works
156
- exactly the same in `bundle add`, so it should be easy to migrate to the new
157
- command.
158
-
159
- ### Other notable changes
160
-
161
- * Git and Path gems will be included in `vendor/cache` by default
162
-
163
- If you have a `vendor/cache` directory (to support offline scenarios, for
164
- example), Bundler will start including gems from `path` and `git` sources in
165
- there. We're unsure why these gems were treated specially so we'll start
166
- caching them normally.
167
-
168
- * Bundler will use cached local data if available when network issues are found
169
- during resolution.
170
-
171
- Just trying to provide a more resilient behavior here.
172
-
173
- * `Bundler.clean_env`, `Bundler.with_clean_env`, `Bundler.clean_system`, and `Bundler.clean_exec` will be removed
174
-
175
- All of these helpers ultimately use `Bundler.clean_env` under the hood, which
176
- makes sure all bundler-related environment are removed inside the block it
177
- yields.
178
-
179
- After quite a lot user reports, we noticed that users don't usually want this
180
- but instead want the bundler environment as it was before the current process
181
- was started. Thus, `Bundler.with_original_env`, `Bundler.original_system`, and
182
- `Bundler.original_exec` were born. They all use the new `Bundler.original_env`
183
- under the hood.
184
-
185
- There's however some specific cases where the good old `Bundler.clean_env`
186
- behavior can be useful. For example, when testing Rails generators, you really
187
- want an environment where `bundler` is out of the picture. This is why we
188
- decided to keep the old behavior under a new more clear name, because we
189
- figured the word "clean" was too ambiguous. So we have introduced
190
- `Bundler.unbundled_env`, `Bundler.with_unbundled_env`,
191
- `Bundler.unbundled_system`, and `Bundler.unbundled_exec`.
192
-
193
- * `Bundler.environment` is deprecated in favor of `Bundler.load`.
194
-
195
- We're not sure how people might be using this directly but we have removed the
196
- `Bundler::Environment` class which was instantiated by `Bundler.environment`
197
- since we realized the `Bundler::Runtime` class was the same thing. During the
198
- transition `Bundler.environment` will delegate to `Bundler.load`, which holds
199
- the reference to the `Bundler::Environment`.
200
-
201
- * Deployment helpers for `vlad` and `capistrano` are being removed.
202
-
203
- These are natural deprecations since the `vlad` tool has had no activity for
204
- years whereas `capistrano` 3 has built-in Bundler integration in the form of
205
- the `capistrano-bundler` gem, and everyone using Capistrano 3 should be
206
- already using that instead. If for some reason, you are still using Capistrano
207
- 2, feel free to copy the Capistrano tasks out of the Bundler 2 file
208
- `lib/bundler/deployment.rb` and put them into your app.
209
-
210
- In general, we don't want to maintain integrations for every deployment system
211
- out there, so that's why we are removing these.
@@ -1,15 +0,0 @@
1
- # How to upgrade/downgrade Rubygems:
2
-
3
- ## Downgrade Recipe
4
-
5
- $ gem update --system 3.1.4
6
-
7
- ## Upgrade Recipe
8
-
9
- $ gem update --system
10
-
11
- ## Install from source
12
-
13
- * Download from: https://rubygems.org/pages/download
14
- * Unpack into a directory and `cd` there
15
- * Install with: `ruby setup.rb`