bootsnap 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c6a61ff4456f0b745e1872ed315eef0d9a644c7
4
- data.tar.gz: 0515f1b08b95f0d88fb32829f6c99a07494af996
3
+ metadata.gz: 70088eed4fdd70bd8fe272c65b175961a5fa4f42
4
+ data.tar.gz: 50a34792fa1273b8e04d2e86c02209f309bdc9dd
5
5
  SHA512:
6
- metadata.gz: 4ce3ba2a352a495e8d8f421ca404273013fcf5ee524e224086e78c4fc106de7505e703481f664fb11068735ead27e4e4b606dc1a67c17fc138b6bf58bcf11c58
7
- data.tar.gz: fb992465d5f226f6f2d26ecf7491db4d41c4061a3e0742d9991f202c9c7db209a13e4ec40e5fe9f210e4c5119ada8e1b56637f764b55ef4640d655c91587eb1e
6
+ metadata.gz: 7fd194c0993c6f09454d1a47cc728943cf8ae3e1df2f5e603775b241e533343d0c12e3f64b437d9be728f0fbbe48ae49f2dee3705866a2817bcab4a5d6297074
7
+ data.tar.gz: 73217d9ce9ffdac00a191c87cf18fe0f664bdc025f97cef71db4d2f5343de7fae0e37ac384c1ff2298fe073adeca33260d60a75513455506edc935ac7a919458
@@ -1,3 +1,8 @@
1
+ # 0.3.2
2
+
3
+ * Minor performance savings around checking validity of cache in the presence of relative paths.
4
+ * When coverage is enabled, skips optimization instead of exploding.
5
+
1
6
  # 0.3.1
2
7
 
3
8
  * Don't whitelist paths under `RbConfig::CONFIG['prefix']` as stable; instead use `['libdir']` (#41).
data/README.md CHANGED
@@ -12,6 +12,8 @@ methods to optimize and cache expensive computations. See [the How Does This Wor
12
12
 
13
13
  ## Usage
14
14
 
15
+ This gem works on MacOS and Linux.
16
+
15
17
  Add `bootsnap` to your `Gemfile`:
16
18
 
17
19
  ```ruby
@@ -12,6 +12,12 @@ module Bootsnap
12
12
  RubyVM::InstructionSequence.compile_file(path).to_binary
13
13
  rescue SyntaxError
14
14
  raise Uncompilable, 'syntax error'
15
+ rescue RuntimeError => e
16
+ if e.message == 'should not compile with coverage'
17
+ raise Uncompilable, 'coverage is enabled'
18
+ else
19
+ raise
20
+ end
15
21
  end
16
22
 
17
23
  def self.storage_to_output(binary)
@@ -46,7 +46,7 @@ module Bootsnap
46
46
  # Try to resolve this feature to an absolute path without traversing the
47
47
  # loadpath.
48
48
  def find(feature)
49
- reinitialize if dir_changed? || stale?
49
+ reinitialize if (@has_relative_paths && dir_changed?) || stale?
50
50
  feature = feature.to_s
51
51
  return feature if feature.start_with?(SLASH)
52
52
  return File.expand_path(feature) if feature.start_with?('./')
@@ -130,6 +130,7 @@ module Bootsnap
130
130
  @store.transaction do
131
131
  paths.map(&:to_s).each do |path|
132
132
  p = Path.new(path)
133
+ @has_relative_paths = true if p.relative?
133
134
  next if p.non_directory?
134
135
  entries, dirs = p.entries_and_dirs(@store)
135
136
  # push -> low precedence -> set only if unset
@@ -1,3 +1,3 @@
1
1
  module Bootsnap
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
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: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burke Libbey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-29 00:00:00.000000000 Z
11
+ date: 2017-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler