bootsnap 1.1.7 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +11 -3
- data/lib/bootsnap/compile_cache/yaml.rb +1 -0
- data/lib/bootsnap/load_path_cache/store.rb +3 -1
- data/lib/bootsnap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6f66d96dbadca08e5c50985c45319350f1e85ca
|
4
|
+
data.tar.gz: c1227f8f8c6ed542abe582c221ccf45318655e87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa366476bf324d6eda9415e7170d67e31eb4a01d08758ff51d9e83c7661db8160cfa334ef9df67777ef059887de24a3f8a7da49b1675f3a1b0bf7704ecf42620
|
7
|
+
data.tar.gz: '06758fb4f8445d041816330983799684a3b79e6ec82ac1e21cf087544d377744b0bb8bc20012146d529876fac6398e1053821eea2468be60c8194c6c07855312'
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -18,13 +18,15 @@ Add `bootsnap` to your `Gemfile`:
|
|
18
18
|
gem 'bootsnap', require: false
|
19
19
|
```
|
20
20
|
|
21
|
-
If you are using
|
21
|
+
If you are using Rails, add this to `config/boot.rb` immediately after `require 'bundler/setup'`:
|
22
22
|
|
23
23
|
```ruby
|
24
24
|
require 'bootsnap/setup'
|
25
25
|
```
|
26
26
|
|
27
|
-
|
27
|
+
You can see how this require works [here](https://github.com/Shopify/bootsnap/blob/master/lib/bootsnap/setup.rb).
|
28
|
+
|
29
|
+
If you are not using Rails, or if you are but want more control over things, add this to your
|
28
30
|
application setup immediately after `require 'bundler/setup'` (i.e. as early as possible: the sooner
|
29
31
|
this is loaded, the sooner it can start optimizing things)
|
30
32
|
|
@@ -49,7 +51,13 @@ will help optimize boot time further if you have an extremely large `$LOAD_PATH`
|
|
49
51
|
Note: Bootsnap and [Spring](https://github.com/rails/spring) are orthogonal tools. While Bootsnap
|
50
52
|
speeds up the loading of individual source files, Spring keeps a copy of a pre-booted Rails process
|
51
53
|
on hand to completely skip parts of the boot process the next time it's needed. The two tools work
|
52
|
-
well together, and are both included in a newly-generated Rails applications by default.
|
54
|
+
well together, and are both included in a newly-generated Rails applications by default.
|
55
|
+
|
56
|
+
### Environments
|
57
|
+
|
58
|
+
All Bootsnap features are enabled in development, test, production, and all other environments according to the configuration in the setup. At Shopify, we use this gem safely in all environments without issue.
|
59
|
+
|
60
|
+
If you would like to disable any feature for a certain environment, we suggest changing the configuration to take into account the appropriate ENV var or configuration according to your needs.
|
53
61
|
|
54
62
|
## How does this work?
|
55
63
|
|
@@ -72,7 +72,9 @@ module Bootsnap
|
|
72
72
|
tmp = "#{@store_path}.#{Process.pid}.#{(rand * 100000).to_i}.tmp"
|
73
73
|
FileUtils.mkpath(File.dirname(tmp))
|
74
74
|
exclusive_write = File::Constants::CREAT | File::Constants::EXCL | File::Constants::WRONLY
|
75
|
-
|
75
|
+
# `encoding:` looks redundant wrt `binwrite`, but necessary on windows
|
76
|
+
# because binary is part of mode.
|
77
|
+
File.binwrite(tmp, MessagePack.dump(@data), mode: exclusive_write, encoding: Encoding::BINARY)
|
76
78
|
FileUtils.mv(tmp, @store_path)
|
77
79
|
rescue Errno::EEXIST
|
78
80
|
retry
|
data/lib/bootsnap/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootsnap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burke Libbey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|