bootsnap 1.1.2-java → 1.1.3-java

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3de4e572dbc468d64b1e33737e1cdd7fc9e9d4ae
4
- data.tar.gz: 8de88da65c3dcaaf771be08ec15c2430f11fea4d
3
+ metadata.gz: 1e5ced86d8f4b8e5cd77fd68bc776e0023d9486d
4
+ data.tar.gz: 8e75434679474db2f1c3883495679ba11ad87a1f
5
5
  SHA512:
6
- metadata.gz: 4d6d119ca0754e0d3ff9ab084b7628f25f1c2c04e9f07ff1b82e700d2766ccf6787c7cc8b0364a5bb26672f1d02be80aeb45ea4f8ad18188a8d2ae16e6976ba3
7
- data.tar.gz: 0a87a74e0984b0beaa064c21ea84dff920ccd5a55e402dce73442bafce2aa10c8a7802e718ca73cb8b7b9129268f6a7112e2eeb5526beeeb582dcf4ca2fcbb40
6
+ metadata.gz: edc9608549f1e313b4c3bdc6fc788eb055918628116caa1ec3c397de5a3a7ed0cc97aa59b83a493553acce302dae5c44b23582138ec369584ad04288b60c332a
7
+ data.tar.gz: b4b93d00b10ef0471fe056b068e97c8bb4295b0ce6c8091a5a8cf5d25c988cd2e23f9bc900fbcb12a4d639c8cd48cb34c3ea5c1e7284862dd5c7eec547bab811
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.1.3
2
+
3
+ * Properly resolve symlinked path entries
4
+
1
5
  # 1.1.2
2
6
 
3
7
  * Minor fix: deprecation warning
data/README.md CHANGED
@@ -132,7 +132,7 @@ result too, raising a `LoadError` without touching the filesystem at all.
132
132
 
133
133
  Ruby has complex grammar and parsing it is not a particularly cheap operation. Since 1.9, Ruby has
134
134
  translated ruby source to an internal bytecode format, which is then executed by the Ruby VM. Since
135
- 2.2, Ruby [exposes an API](https://ruby-doc.org/core-2.3.0/RubyVM/InstructionSequence.html) that
135
+ 2.3.0, Ruby [exposes an API](https://ruby-doc.org/core-2.3.0/RubyVM/InstructionSequence.html) that
136
136
  allows caching that bytecode. This allows us to bypass the relatively-expensive compilation step on
137
137
  subsequent loads of the same file.
138
138
 
data/bin/testunit CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/bin/bash
2
2
 
3
3
  if [ $# -eq 0 ]; then
4
- ruby -I"test" -e 'Dir.glob("./test/**/*_test.rb").each { |f| require f }' -- "$@"
4
+ ruby -I"test" -w -e 'Dir.glob("./test/**/*_test.rb").each { |f| require f }' -- "$@"
5
5
  else
6
6
  path=$1
7
- ruby -I"test" -e "require '${path#test/}'" -- "$@"
7
+ ruby -I"test" -w -e "require '${path#test/}'" -- "$@"
8
8
  fi
data/bootsnap.gemspec CHANGED
@@ -11,8 +11,8 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.license = "MIT"
13
13
 
14
- spec.summary = "wip"
15
- spec.description = "wip."
14
+ spec.summary = "Boot large ruby/rails apps faster"
15
+ spec.description = spec.summary
16
16
  spec.homepage = "https://github.com/Shopify/bootsnap"
17
17
 
18
18
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -1,4 +1,3 @@
1
- require_relative '../load_path_cache'
2
1
  require_relative '../explicit_require'
3
2
 
4
3
  module Bootsnap
@@ -11,6 +10,7 @@ module Bootsnap
11
10
  @store = store
12
11
  @mutex = defined?(::Mutex) ? ::Mutex.new : ::Thread::Mutex.new # TODO: Remove once Ruby 2.2 support is dropped.
13
12
  @path_obj = path_obj
13
+ @has_relative_paths = nil
14
14
  reinitialize
15
15
  end
16
16
 
@@ -35,8 +35,8 @@ module Bootsnap
35
35
  acc[base] = nil # enumerator
36
36
 
37
37
  if [DOT_SO, *DL_EXTENSIONS].include?(ext)
38
- DL_EXTENSIONS.each do |ext|
39
- acc["#{base}#{ext}"] = nil # enumerator.bundle
38
+ DL_EXTENSIONS.each do |dl_ext|
39
+ acc["#{base}#{dl_ext}"] = nil # enumerator.bundle
40
40
  end
41
41
  end
42
42
 
@@ -152,7 +152,7 @@ module Bootsnap
152
152
 
153
153
  def unshift_paths_locked(*paths)
154
154
  @store.transaction do
155
- paths.map(&:to_s).reverse.each do |path|
155
+ paths.map(&:to_s).reverse_each do |path|
156
156
  p = Path.new(path)
157
157
  next if p.non_directory?
158
158
  entries, dirs = p.entries_and_dirs(@store)
@@ -1,10 +1,18 @@
1
- require_relative '../load_path_cache'
1
+ require_relative '../explicit_require'
2
2
 
3
3
  module Bootsnap
4
4
  module LoadPathCache
5
5
  module PathScanner
6
- REQUIRABLES_AND_DIRS = "/**/*{#{DOT_RB},#{DL_EXTENSIONS.join(',')},/}"
7
- IS_DIR = %r{(.*)/\z}
6
+ # Glob pattern to find requirable files and subdirectories in given path.
7
+ # It expands to:
8
+ #
9
+ # * `/*{.rb,.so,/}` - It matches requirable files, directories and
10
+ # symlinks to directories at given path.
11
+ # * `/*/**/*{.rb,.so,/}` - It matches requirable files and
12
+ # subdirectories in any (even symlinked) directory at given path at
13
+ # any directory tree depth.
14
+ #
15
+ REQUIRABLES_AND_DIRS = "/{,*/**/}*{#{DOT_RB},#{DL_EXTENSIONS.join(',')},/}"
8
16
  NORMALIZE_NATIVE_EXTENSIONS = !DL_EXTENSIONS.include?(LoadPathCache::DOT_SO)
9
17
  ALTERNATIVE_NATIVE_EXTENSIONS_PATTERN = /\.(o|bundle|dylib)\z/
10
18
  BUNDLE_PATH = (Bundler.bundle_path.cleanpath.to_s << LoadPathCache::SLASH).freeze
@@ -29,12 +37,13 @@ module Bootsnap
29
37
  next if contains_bundle_path && absolute_path.start_with?(BUNDLE_PATH)
30
38
  relative_path = absolute_path.slice!(relative_slice)
31
39
 
32
- if md = relative_path.match(IS_DIR)
33
- dirs << md[1]
40
+ if relative_path.end_with?('/')
41
+ dirs << relative_path[0..-2]
34
42
  else
35
43
  requirables << relative_path
36
44
  end
37
45
  end
46
+
38
47
  [requirables, dirs]
39
48
  end
40
49
  end
@@ -11,6 +11,8 @@ module Bootsnap
11
11
 
12
12
  def initialize(store_path)
13
13
  @store_path = store_path
14
+ @in_txn = false
15
+ @dirty = false
14
16
  load_data
15
17
  end
16
18
 
@@ -1,3 +1,3 @@
1
1
  module Bootsnap
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
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: 1.1.2
4
+ version: 1.1.3
5
5
  platform: java
6
6
  authors:
7
7
  - Burke Libbey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-12 00:00:00.000000000 Z
11
+ date: 2017-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +94,7 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.0'
97
- description: wip.
97
+ description: Boot large ruby/rails apps faster
98
98
  email:
99
99
  - burke.libbey@shopify.com
100
100
  executables: []
@@ -156,5 +156,5 @@ rubyforge_project:
156
156
  rubygems_version: 2.4.8
157
157
  signing_key:
158
158
  specification_version: 4
159
- summary: wip
159
+ summary: Boot large ruby/rails apps faster
160
160
  test_files: []