bootsnap 1.4.0 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +126 -0
  3. data/README.md +68 -13
  4. data/exe/bootsnap +5 -0
  5. data/ext/bootsnap/bootsnap.c +285 -87
  6. data/ext/bootsnap/extconf.rb +20 -14
  7. data/lib/bootsnap/bundler.rb +1 -0
  8. data/lib/bootsnap/cli/worker_pool.rb +135 -0
  9. data/lib/bootsnap/cli.rb +281 -0
  10. data/lib/bootsnap/compile_cache/iseq.rb +24 -7
  11. data/lib/bootsnap/compile_cache/json.rb +79 -0
  12. data/lib/bootsnap/compile_cache/yaml.rb +145 -39
  13. data/lib/bootsnap/compile_cache.rb +25 -3
  14. data/lib/bootsnap/explicit_require.rb +1 -0
  15. data/lib/bootsnap/load_path_cache/cache.rb +44 -9
  16. data/lib/bootsnap/load_path_cache/change_observer.rb +5 -1
  17. data/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb +30 -6
  18. data/lib/bootsnap/load_path_cache/core_ext/loaded_features.rb +11 -0
  19. data/lib/bootsnap/load_path_cache/loaded_features_index.rb +43 -11
  20. data/lib/bootsnap/load_path_cache/path.rb +3 -2
  21. data/lib/bootsnap/load_path_cache/path_scanner.rb +53 -27
  22. data/lib/bootsnap/load_path_cache/realpath_cache.rb +5 -5
  23. data/lib/bootsnap/load_path_cache/store.rb +28 -14
  24. data/lib/bootsnap/load_path_cache.rb +10 -16
  25. data/lib/bootsnap/setup.rb +2 -33
  26. data/lib/bootsnap/version.rb +2 -1
  27. data/lib/bootsnap.rb +96 -17
  28. metadata +18 -29
  29. data/.gitignore +0 -17
  30. data/.rubocop.yml +0 -20
  31. data/.travis.yml +0 -24
  32. data/CODE_OF_CONDUCT.md +0 -74
  33. data/CONTRIBUTING.md +0 -21
  34. data/Gemfile +0 -8
  35. data/README.jp.md +0 -231
  36. data/Rakefile +0 -12
  37. data/bin/ci +0 -10
  38. data/bin/console +0 -14
  39. data/bin/setup +0 -8
  40. data/bin/test-minimal-support +0 -7
  41. data/bin/testunit +0 -8
  42. data/bootsnap.gemspec +0 -45
  43. data/dev.yml +0 -10
  44. data/lib/bootsnap/load_path_cache/core_ext/active_support.rb +0 -100
  45. data/shipit.rubygems.yml +0 -4
@@ -1,9 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative('../explicit_require')
2
4
 
3
5
  module Bootsnap
4
6
  module LoadPathCache
5
7
  module PathScanner
6
- ALL_FILES = "/{,**/*/**/}*"
7
8
  REQUIRABLE_EXTENSIONS = [DOT_RB] + DL_EXTENSIONS
8
9
  NORMALIZE_NATIVE_EXTENSIONS = !DL_EXTENSIONS.include?(LoadPathCache::DOT_SO)
9
10
  ALTERNATIVE_NATIVE_EXTENSIONS_PATTERN = /\.(o|bundle|dylib)\z/
@@ -11,37 +12,62 @@ module Bootsnap
11
12
  BUNDLE_PATH = if Bootsnap.bundler?
12
13
  (Bundler.bundle_path.cleanpath.to_s << LoadPathCache::SLASH).freeze
13
14
  else
14
- ''.freeze
15
+ ''
15
16
  end
16
17
 
17
- def self.call(path)
18
- path = path.to_s
19
-
20
- relative_slice = (path.size + 1)..-1
21
- # If the bundle path is a descendent of this path, we do additional
22
- # checks to prevent recursing into the bundle path as we recurse
23
- # through this path. We don't want to scan the bundle path because
24
- # anything useful in it will be present on other load path items.
25
- #
26
- # This can happen if, for example, the user adds '.' to the load path,
27
- # and the bundle path is '.bundle'.
28
- contains_bundle_path = BUNDLE_PATH.start_with?(path)
29
-
30
- dirs = []
31
- requirables = []
32
-
33
- Dir.glob(path + ALL_FILES).each do |absolute_path|
34
- next if contains_bundle_path && absolute_path.start_with?(BUNDLE_PATH)
35
- relative_path = absolute_path.slice(relative_slice)
36
-
37
- if File.directory?(absolute_path)
38
- dirs << relative_path
39
- elsif REQUIRABLE_EXTENSIONS.include?(File.extname(relative_path))
40
- requirables << relative_path
18
+ class << self
19
+ def call(path)
20
+ path = File.expand_path(path.to_s).freeze
21
+ return [[], []] unless File.directory?(path)
22
+
23
+ # If the bundle path is a descendent of this path, we do additional
24
+ # checks to prevent recursing into the bundle path as we recurse
25
+ # through this path. We don't want to scan the bundle path because
26
+ # anything useful in it will be present on other load path items.
27
+ #
28
+ # This can happen if, for example, the user adds '.' to the load path,
29
+ # and the bundle path is '.bundle'.
30
+ contains_bundle_path = BUNDLE_PATH.start_with?(path)
31
+
32
+ dirs = []
33
+ requirables = []
34
+ walk(path, nil) do |relative_path, absolute_path, is_directory|
35
+ if is_directory
36
+ dirs << os_path(relative_path)
37
+ !contains_bundle_path || !absolute_path.start_with?(BUNDLE_PATH)
38
+ elsif relative_path.end_with?(*REQUIRABLE_EXTENSIONS)
39
+ requirables << os_path(relative_path)
40
+ end
41
+ end
42
+ [requirables, dirs]
43
+ end
44
+
45
+ def walk(absolute_dir_path, relative_dir_path, &block)
46
+ Dir.foreach(absolute_dir_path) do |name|
47
+ next if name.start_with?('.')
48
+ relative_path = relative_dir_path ? File.join(relative_dir_path, name) : name
49
+
50
+ absolute_path = "#{absolute_dir_path}/#{name}"
51
+ if File.directory?(absolute_path)
52
+ if yield relative_path, absolute_path, true
53
+ walk(absolute_path, relative_path, &block)
54
+ end
55
+ else
56
+ yield relative_path, absolute_path, false
57
+ end
41
58
  end
42
59
  end
43
60
 
44
- [requirables, dirs]
61
+ if RUBY_VERSION >= '3.1'
62
+ def os_path(path)
63
+ path.freeze
64
+ end
65
+ else
66
+ def os_path(path)
67
+ path.force_encoding(Encoding::US_ASCII) if path.ascii_only?
68
+ path.freeze
69
+ end
70
+ end
45
71
  end
46
72
  end
47
73
  end
@@ -15,15 +15,15 @@ module Bootsnap
15
15
 
16
16
  def realpath(caller_location, path)
17
17
  base = File.dirname(caller_location)
18
- file = find_file(File.expand_path(path, base))
19
- dir = File.dirname(file)
20
- File.join(dir, File.basename(file))
18
+ abspath = File.expand_path(path, base).freeze
19
+ find_file(abspath)
21
20
  end
22
21
 
23
22
  def find_file(name)
24
- ['', *CACHED_EXTENSIONS].each do |ext|
23
+ return File.realpath(name).freeze if File.exist?(name)
24
+ CACHED_EXTENSIONS.each do |ext|
25
25
  filename = "#{name}#{ext}"
26
- return File.realpath(filename) if File.exist?(filename)
26
+ return File.realpath(filename).freeze if File.exist?(filename)
27
27
  end
28
28
  name
29
29
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative('../explicit_require')
2
3
 
3
4
  Bootsnap::ExplicitRequire.with_gems('msgpack') { require('msgpack') }
@@ -11,7 +12,7 @@ module Bootsnap
11
12
 
12
13
  def initialize(store_path)
13
14
  @store_path = store_path
14
- @in_txn = false
15
+ @txn_mutex = Mutex.new
15
16
  @dirty = false
16
17
  load_data
17
18
  end
@@ -21,7 +22,7 @@ module Bootsnap
21
22
  end
22
23
 
23
24
  def fetch(key)
24
- raise(SetOutsideTransactionNotAllowed) unless @in_txn
25
+ raise(SetOutsideTransactionNotAllowed) unless @txn_mutex.owned?
25
26
  v = get(key)
26
27
  unless v
27
28
  @dirty = true
@@ -32,7 +33,7 @@ module Bootsnap
32
33
  end
33
34
 
34
35
  def set(key, value)
35
- raise(SetOutsideTransactionNotAllowed) unless @in_txn
36
+ raise(SetOutsideTransactionNotAllowed) unless @txn_mutex.owned?
36
37
  if value != @data[key]
37
38
  @dirty = true
38
39
  @data[key] = value
@@ -40,12 +41,14 @@ module Bootsnap
40
41
  end
41
42
 
42
43
  def transaction
43
- raise(NestedTransactionError) if @in_txn
44
- @in_txn = true
45
- yield
46
- ensure
47
- commit_transaction
48
- @in_txn = false
44
+ raise(NestedTransactionError) if @txn_mutex.owned?
45
+ @txn_mutex.synchronize do
46
+ begin
47
+ yield
48
+ ensure
49
+ commit_transaction
50
+ end
51
+ end
49
52
  end
50
53
 
51
54
  private
@@ -59,10 +62,18 @@ module Bootsnap
59
62
 
60
63
  def load_data
61
64
  @data = begin
62
- MessagePack.load(File.binread(@store_path))
63
- # handle malformed data due to upgrade incompatability
64
- rescue Errno::ENOENT, MessagePack::MalformedFormatError, MessagePack::UnknownExtTypeError, EOFError
65
- {}
65
+ File.open(@store_path, encoding: Encoding::BINARY) do |io|
66
+ MessagePack.load(io)
67
+ end
68
+ # handle malformed data due to upgrade incompatibility
69
+ rescue Errno::ENOENT, MessagePack::MalformedFormatError, MessagePack::UnknownExtTypeError, EOFError
70
+ {}
71
+ rescue ArgumentError => error
72
+ if error.message =~ /negative array size/
73
+ {}
74
+ else
75
+ raise
76
+ end
66
77
  end
67
78
  end
68
79
 
@@ -74,10 +85,13 @@ module Bootsnap
74
85
  exclusive_write = File::Constants::CREAT | File::Constants::EXCL | File::Constants::WRONLY
75
86
  # `encoding:` looks redundant wrt `binwrite`, but necessary on windows
76
87
  # because binary is part of mode.
77
- File.binwrite(tmp, MessagePack.dump(@data), mode: exclusive_write, encoding: Encoding::BINARY)
88
+ File.open(tmp, mode: exclusive_write, encoding: Encoding::BINARY) do |io|
89
+ MessagePack.dump(@data, io, freeze: true)
90
+ end
78
91
  FileUtils.mv(tmp, @store_path)
79
92
  rescue Errno::EEXIST
80
93
  retry
94
+ rescue SystemCallError
81
95
  end
82
96
  end
83
97
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Bootsnap
2
4
  module LoadPathCache
3
5
  ReturnFalse = Class.new(StandardError)
@@ -7,6 +9,11 @@ module Bootsnap
7
9
  DOT_SO = '.so'
8
10
  SLASH = '/'
9
11
 
12
+ # If a NameError happens several levels deep, don't re-handle it
13
+ # all the way up the chain: mark it once and bubble it up without
14
+ # more retries.
15
+ ERROR_TAG_IVAR = :@__bootsnap_rescued
16
+
10
17
  DL_EXTENSIONS = ::RbConfig::CONFIG
11
18
  .values_at('DLEXT', 'DLEXT2')
12
19
  .reject { |ext| !ext || ext.empty? }
@@ -21,10 +28,9 @@ module Bootsnap
21
28
  CACHED_EXTENSIONS = DLEXT2 ? [DOT_RB, DLEXT, DLEXT2] : [DOT_RB, DLEXT]
22
29
 
23
30
  class << self
24
- attr_reader(:load_path_cache, :autoload_paths_cache,
25
- :loaded_features_index, :realpath_cache)
31
+ attr_reader(:load_path_cache, :loaded_features_index, :realpath_cache)
26
32
 
27
- def setup(cache_path:, development_mode:, active_support: true)
33
+ def setup(cache_path:, development_mode:)
28
34
  unless supported?
29
35
  warn("[bootsnap/setup] Load path caching is not supported on this implementation of Ruby") if $VERBOSE
30
36
  return
@@ -38,23 +44,11 @@ module Bootsnap
38
44
  @load_path_cache = Cache.new(store, $LOAD_PATH, development_mode: development_mode)
39
45
  require_relative('load_path_cache/core_ext/kernel_require')
40
46
  require_relative('load_path_cache/core_ext/loaded_features')
41
-
42
- if active_support
43
- # this should happen after setting up the initial cache because it
44
- # loads a lot of code. It's better to do after +require+ is optimized.
45
- require('active_support/dependencies')
46
- @autoload_paths_cache = Cache.new(
47
- store,
48
- ::ActiveSupport::Dependencies.autoload_paths,
49
- development_mode: development_mode
50
- )
51
- require_relative('load_path_cache/core_ext/active_support')
52
- end
53
47
  end
54
48
 
55
49
  def supported?
56
50
  RUBY_ENGINE == 'ruby' &&
57
- RUBY_PLATFORM =~ /darwin|linux|bsd/
51
+ RUBY_PLATFORM =~ /darwin|linux|bsd|mswin|mingw|cygwin/
58
52
  end
59
53
  end
60
54
  end
@@ -1,35 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative('../bootsnap')
2
3
 
3
- env = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['ENV']
4
- development_mode = ['', nil, 'development'].include?(env)
5
-
6
- cache_dir = ENV['BOOTSNAP_CACHE_DIR']
7
- unless cache_dir
8
- config_dir_frame = caller.detect do |line|
9
- line.include?('/config/')
10
- end
11
-
12
- unless config_dir_frame
13
- $stderr.puts("[bootsnap/setup] couldn't infer cache directory! Either:")
14
- $stderr.puts("[bootsnap/setup] 1. require bootsnap/setup from your application's config directory; or")
15
- $stderr.puts("[bootsnap/setup] 2. Define the environment variable BOOTSNAP_CACHE_DIR")
16
-
17
- raise("couldn't infer bootsnap cache directory")
18
- end
19
-
20
- path = config_dir_frame.split(/:\d+:/).first
21
- path = File.dirname(path) until File.basename(path) == 'config'
22
- app_root = File.dirname(path)
23
-
24
- cache_dir = File.join(app_root, 'tmp', 'cache')
25
- end
26
-
27
- Bootsnap.setup(
28
- cache_dir: cache_dir,
29
- development_mode: development_mode,
30
- load_path_cache: true,
31
- autoload_paths_cache: true, # assume rails. open to PRs to impl. detection
32
- disable_trace: false,
33
- compile_cache_iseq: true,
34
- compile_cache_yaml: true,
35
- )
4
+ Bootsnap.default_setup
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Bootsnap
2
- VERSION = "1.4.0"
3
+ VERSION = "1.9.1"
3
4
  end
data/lib/bootsnap.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative('bootsnap/version')
2
4
  require_relative('bootsnap/bundler')
3
5
  require_relative('bootsnap/load_path_cache')
@@ -6,42 +8,119 @@ require_relative('bootsnap/compile_cache')
6
8
  module Bootsnap
7
9
  InvalidConfiguration = Class.new(StandardError)
8
10
 
11
+ class << self
12
+ attr_reader :logger
13
+ end
14
+
15
+ def self.log!
16
+ self.logger = $stderr.method(:puts)
17
+ end
18
+
19
+ def self.logger=(logger)
20
+ @logger = logger
21
+ if logger.respond_to?(:debug)
22
+ self.instrumentation = ->(event, path) { @logger.debug("[Bootsnap] #{event} #{path}") }
23
+ else
24
+ self.instrumentation = ->(event, path) { @logger.call("[Bootsnap] #{event} #{path}") }
25
+ end
26
+ end
27
+
28
+ def self.instrumentation=(callback)
29
+ @instrumentation = callback
30
+ if respond_to?(:instrumentation_enabled=, true)
31
+ self.instrumentation_enabled = !!callback
32
+ end
33
+ end
34
+
35
+ def self._instrument(event, path)
36
+ @instrumentation.call(event, path)
37
+ end
38
+
9
39
  def self.setup(
10
40
  cache_dir:,
11
41
  development_mode: true,
12
42
  load_path_cache: true,
13
- autoload_paths_cache: true,
14
- disable_trace: false,
43
+ autoload_paths_cache: nil,
44
+ disable_trace: nil,
15
45
  compile_cache_iseq: true,
16
- compile_cache_yaml: true
46
+ compile_cache_yaml: true,
47
+ compile_cache_json: true
17
48
  )
18
- if autoload_paths_cache && !load_path_cache
19
- raise(InvalidConfiguration, "feature 'autoload_paths_cache' depends on feature 'load_path_cache'")
49
+ unless autoload_paths_cache.nil?
50
+ warn "[DEPRECATED] Bootsnap's `autoload_paths_cache:` option is deprecated and will be removed. " \
51
+ "If you use Zeitwerk this option is useless, and if you are still using the classic autoloader " \
52
+ "upgrading is recommended."
20
53
  end
21
54
 
22
- setup_disable_trace if disable_trace
55
+ unless disable_trace.nil?
56
+ warn "[DEPRECATED] Bootsnap's `disable_trace:` option is deprecated and will be removed. " \
57
+ "If you use Ruby 2.5 or newer this option is useless, if not upgrading is recommended."
58
+ end
59
+
60
+ if compile_cache_iseq && !iseq_cache_supported?
61
+ warn "Ruby 2.5 has a bug that break code tracing when code is loaded from cache. It is recommened " \
62
+ "to turn `compile_cache_iseq` off on Ruby 2.5"
63
+ end
23
64
 
24
65
  Bootsnap::LoadPathCache.setup(
25
- cache_path: cache_dir + '/bootsnap-load-path-cache',
66
+ cache_path: cache_dir + '/bootsnap/load-path-cache',
26
67
  development_mode: development_mode,
27
- active_support: autoload_paths_cache
28
68
  ) if load_path_cache
29
69
 
30
70
  Bootsnap::CompileCache.setup(
31
- cache_dir: cache_dir + '/bootsnap-compile-cache',
71
+ cache_dir: cache_dir + '/bootsnap/compile-cache',
32
72
  iseq: compile_cache_iseq,
33
- yaml: compile_cache_yaml
73
+ yaml: compile_cache_yaml,
74
+ json: compile_cache_json,
34
75
  )
35
76
  end
36
77
 
37
- def self.setup_disable_trace
38
- if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.5.0')
39
- warn(
40
- "from #{caller_locations(1, 1)[0]}: The 'disable_trace' method is not allowed with this Ruby version. " \
41
- "current: #{RUBY_VERSION}, allowed version: < 2.5.0",
78
+ def self.iseq_cache_supported?
79
+ return @iseq_cache_supported if defined? @iseq_cache_supported
80
+
81
+ ruby_version = Gem::Version.new(RUBY_VERSION)
82
+ @iseq_cache_supported = ruby_version < Gem::Version.new('2.5.0') || ruby_version >= Gem::Version.new('2.6.0')
83
+ end
84
+
85
+ def self.default_setup
86
+ env = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['ENV']
87
+ development_mode = ['', nil, 'development'].include?(env)
88
+
89
+ unless ENV['DISABLE_BOOTSNAP']
90
+ cache_dir = ENV['BOOTSNAP_CACHE_DIR']
91
+ unless cache_dir
92
+ config_dir_frame = caller.detect do |line|
93
+ line.include?('/config/')
94
+ end
95
+
96
+ unless config_dir_frame
97
+ $stderr.puts("[bootsnap/setup] couldn't infer cache directory! Either:")
98
+ $stderr.puts("[bootsnap/setup] 1. require bootsnap/setup from your application's config directory; or")
99
+ $stderr.puts("[bootsnap/setup] 2. Define the environment variable BOOTSNAP_CACHE_DIR")
100
+
101
+ raise("couldn't infer bootsnap cache directory")
102
+ end
103
+
104
+ path = config_dir_frame.split(/:\d+:/).first
105
+ path = File.dirname(path) until File.basename(path) == 'config'
106
+ app_root = File.dirname(path)
107
+
108
+ cache_dir = File.join(app_root, 'tmp', 'cache')
109
+ end
110
+
111
+
112
+ setup(
113
+ cache_dir: cache_dir,
114
+ development_mode: development_mode,
115
+ load_path_cache: !ENV['DISABLE_BOOTSNAP_LOAD_PATH_CACHE'],
116
+ compile_cache_iseq: !ENV['DISABLE_BOOTSNAP_COMPILE_CACHE'] && iseq_cache_supported?,
117
+ compile_cache_yaml: !ENV['DISABLE_BOOTSNAP_COMPILE_CACHE'],
118
+ compile_cache_json: !ENV['DISABLE_BOOTSNAP_COMPILE_CACHE'],
42
119
  )
43
- else
44
- RubyVM::InstructionSequence.compile_option = { trace_instruction: false }
120
+
121
+ if ENV['BOOTSNAP_LOG']
122
+ log!
123
+ end
45
124
  end
46
125
  end
47
126
  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.4.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burke Libbey
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-11 00:00:00.000000000 Z
11
+ date: 2021-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -28,28 +28,28 @@ dependencies:
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake-compiler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
@@ -97,42 +97,31 @@ dependencies:
97
97
  description: Boot large ruby/rails apps faster
98
98
  email:
99
99
  - burke.libbey@shopify.com
100
- executables: []
100
+ executables:
101
+ - bootsnap
101
102
  extensions:
102
103
  - ext/bootsnap/extconf.rb
103
104
  extra_rdoc_files: []
104
105
  files:
105
- - ".gitignore"
106
- - ".rubocop.yml"
107
- - ".travis.yml"
108
106
  - CHANGELOG.md
109
- - CODE_OF_CONDUCT.md
110
- - CONTRIBUTING.md
111
- - Gemfile
112
107
  - LICENSE.txt
113
- - README.jp.md
114
108
  - README.md
115
- - Rakefile
116
- - bin/ci
117
- - bin/console
118
- - bin/setup
119
- - bin/test-minimal-support
120
- - bin/testunit
121
- - bootsnap.gemspec
122
- - dev.yml
109
+ - exe/bootsnap
123
110
  - ext/bootsnap/bootsnap.c
124
111
  - ext/bootsnap/bootsnap.h
125
112
  - ext/bootsnap/extconf.rb
126
113
  - lib/bootsnap.rb
127
114
  - lib/bootsnap/bundler.rb
115
+ - lib/bootsnap/cli.rb
116
+ - lib/bootsnap/cli/worker_pool.rb
128
117
  - lib/bootsnap/compile_cache.rb
129
118
  - lib/bootsnap/compile_cache/iseq.rb
119
+ - lib/bootsnap/compile_cache/json.rb
130
120
  - lib/bootsnap/compile_cache/yaml.rb
131
121
  - lib/bootsnap/explicit_require.rb
132
122
  - lib/bootsnap/load_path_cache.rb
133
123
  - lib/bootsnap/load_path_cache/cache.rb
134
124
  - lib/bootsnap/load_path_cache/change_observer.rb
135
- - lib/bootsnap/load_path_cache/core_ext/active_support.rb
136
125
  - lib/bootsnap/load_path_cache/core_ext/kernel_require.rb
137
126
  - lib/bootsnap/load_path_cache/core_ext/loaded_features.rb
138
127
  - lib/bootsnap/load_path_cache/loaded_features_index.rb
@@ -142,7 +131,6 @@ files:
142
131
  - lib/bootsnap/load_path_cache/store.rb
143
132
  - lib/bootsnap/setup.rb
144
133
  - lib/bootsnap/version.rb
145
- - shipit.rubygems.yml
146
134
  homepage: https://github.com/Shopify/bootsnap
147
135
  licenses:
148
136
  - MIT
@@ -150,6 +138,7 @@ metadata:
150
138
  bug_tracker_uri: https://github.com/Shopify/bootsnap/issues
151
139
  changelog_uri: https://github.com/Shopify/bootsnap/blob/master/CHANGELOG.md
152
140
  source_code_uri: https://github.com/Shopify/bootsnap
141
+ allowed_push_host: https://rubygems.org
153
142
  post_install_message:
154
143
  rdoc_options: []
155
144
  require_paths:
@@ -158,14 +147,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
147
  requirements:
159
148
  - - ">="
160
149
  - !ruby/object:Gem::Version
161
- version: 2.0.0
150
+ version: 2.3.0
162
151
  required_rubygems_version: !ruby/object:Gem::Requirement
163
152
  requirements:
164
153
  - - ">="
165
154
  - !ruby/object:Gem::Version
166
155
  version: '0'
167
156
  requirements: []
168
- rubygems_version: 3.0.2
157
+ rubygems_version: 3.2.20
169
158
  signing_key:
170
159
  specification_version: 4
171
160
  summary: Boot large ruby/rails apps faster
data/.gitignore DELETED
@@ -1,17 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- *.gem
15
- *.db
16
- mkmf.log
17
- .rubocop-*
data/.rubocop.yml DELETED
@@ -1,20 +0,0 @@
1
- inherit_from:
2
- - http://shopify.github.io/ruby-style-guide/rubocop.yml
3
-
4
- AllCops:
5
- Exclude:
6
- - 'vendor/**/*'
7
- - 'tmp/**/*'
8
- TargetRubyVersion: '2.2'
9
-
10
- # This doesn't take into account retrying from an exception
11
- Lint/HandleExceptions:
12
- Enabled: false
13
-
14
- # allow String.new to create mutable strings
15
- Style/EmptyLiteral:
16
- Enabled: false
17
-
18
- # allow the use of globals which makes sense in a CLI app like this
19
- Style/GlobalVars:
20
- Enabled: false
data/.travis.yml DELETED
@@ -1,24 +0,0 @@
1
- language: ruby
2
- sudo: false
3
-
4
- os:
5
- - linux
6
- - osx
7
-
8
- rvm:
9
- - ruby-2.4
10
- - ruby-2.5
11
- - ruby-head
12
-
13
- matrix:
14
- allow_failures:
15
- - rvm: ruby-head
16
- include:
17
- - rvm: jruby
18
- os: linux
19
- env: MINIMAL_SUPPORT=1
20
- - rvm: truffleruby
21
- os: linux
22
- env: MINIMAL_SUPPORT=1
23
-
24
- script: bin/ci