bootsnap 1.1.7-java → 1.1.8-java
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: 23ac7be6b543be8182cd7acf406e53c79e3afc9e
|
4
|
+
data.tar.gz: dd1314fa6f3105181d2ccf741f1a0f6d1cff77a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07086a8ae3f6fdc1090efac81638850ffdb155f89e5ef40020efd2ea46744b0e6dacfbb6aa4d5b0feb2e0f50896f4e7b8f90d7683afac1c44cb61ae69c43738e
|
7
|
+
data.tar.gz: df363388579768bcfa35ca168ebdde47b6305c2c2a13bad5a99be4174a2fd8647ca52aef412bae02064c1faecbfc90b4304fbd43d3871c0b4a58c0adf26e451d
|
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: java
|
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
|
requirement: !ruby/object:Gem::Requirement
|