bootsnap 1.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,47 @@
1
+ require_relative '../bootsnap'
2
+
3
+ env = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || ENV['ENV']
4
+ development_mode = ['', nil, 'development'].include?(env)
5
+
6
+ # only enable on 'ruby' (MRI), POSIX (darin, linux, *bsd), and >= 2.3.0
7
+ enable_cc = \
8
+ RUBY_ENGINE == 'ruby' && \
9
+ RUBY_PLATFORM =~ /darwin|linux|bsd/ && \
10
+ RUBY_VERSION # "1.9.3"
11
+ .split('.') # ["1", "9", "3"]
12
+ .map(&:to_i) # [1, 9, 3]
13
+ .zip([2, 3, -1]) # [[1, 2], [9, 3], [3, -1]]
14
+ .map { |a, b| a <=> b } # [-1, 1, 1]
15
+ .detect { |e| !e.zero? } # -1
16
+ .==(1) # false
17
+
18
+ cache_dir = ENV['BOOTSNAP_CACHE_DIR']
19
+ unless cache_dir
20
+ config_dir_frame = caller.detect do |line|
21
+ line.include?('/config/')
22
+ end
23
+
24
+ unless config_dir_frame
25
+ $stderr.puts "[bootsnap/setup] couldn't infer cache directory! Either:"
26
+ $stderr.puts "[bootsnap/setup] 1. require bootsnap/setup from your application's config directory; or"
27
+ $stderr.puts "[bootsnap/setup] 2. Define the environment variable BOOTSNAP_CACHE_DIR"
28
+
29
+ raise "couldn't infer bootsnap cache directory"
30
+ end
31
+
32
+ path = config_dir_frame.split(/:\d+:/).first
33
+ path = File.dirname(path) until File.basename(path) == 'config'
34
+ app_root = File.dirname(path)
35
+
36
+ cache_dir = File.join(app_root, 'tmp', 'cache')
37
+ end
38
+
39
+ Bootsnap.setup(
40
+ cache_dir: cache_dir,
41
+ development_mode: development_mode,
42
+ load_path_cache: true,
43
+ autoload_paths_cache: true, # assume rails. open to PRs to impl. detection
44
+ disable_trace: false,
45
+ compile_cache_iseq: enable_cc,
46
+ compile_cache_yaml: enable_cc
47
+ )
@@ -0,0 +1,3 @@
1
+ module Bootsnap
2
+ VERSION = "1.1.0"
3
+ end
metadata ADDED
@@ -0,0 +1,160 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bootsnap
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.0
5
+ platform: java
6
+ authors:
7
+ - Burke Libbey
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-06-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '1'
19
+ name: bundler
20
+ prerelease: false
21
+ type: :development
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1'
27
+ - !ruby/object:Gem::Dependency
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '10.0'
33
+ name: rake
34
+ prerelease: false
35
+ type: :development
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ name: rake-compiler
48
+ prerelease: false
49
+ type: :development
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '5.0'
61
+ name: minitest
62
+ prerelease: false
63
+ type: :development
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '5.0'
69
+ - !ruby/object:Gem::Dependency
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '1.2'
75
+ name: mocha
76
+ prerelease: false
77
+ type: :development
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.2'
83
+ - !ruby/object:Gem::Dependency
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '1.0'
89
+ name: msgpack
90
+ prerelease: false
91
+ type: :runtime
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.0'
97
+ description: wip.
98
+ email:
99
+ - burke.libbey@shopify.com
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - ".gitignore"
105
+ - ".rubocop.yml"
106
+ - ".travis.yml"
107
+ - CHANGELOG.md
108
+ - CONTRIBUTING.md
109
+ - Gemfile
110
+ - LICENSE
111
+ - README.md
112
+ - Rakefile
113
+ - bin/console
114
+ - bin/setup
115
+ - bin/testunit
116
+ - bootsnap.gemspec
117
+ - dev.yml
118
+ - ext/bootsnap/bootsnap.c
119
+ - ext/bootsnap/bootsnap.h
120
+ - ext/bootsnap/extconf.rb
121
+ - lib/bootsnap.rb
122
+ - lib/bootsnap/compile_cache.rb
123
+ - lib/bootsnap/compile_cache/iseq.rb
124
+ - lib/bootsnap/compile_cache/yaml.rb
125
+ - lib/bootsnap/explicit_require.rb
126
+ - lib/bootsnap/load_path_cache.rb
127
+ - lib/bootsnap/load_path_cache/cache.rb
128
+ - lib/bootsnap/load_path_cache/change_observer.rb
129
+ - lib/bootsnap/load_path_cache/core_ext/active_support.rb
130
+ - lib/bootsnap/load_path_cache/core_ext/kernel_require.rb
131
+ - lib/bootsnap/load_path_cache/path.rb
132
+ - lib/bootsnap/load_path_cache/path_scanner.rb
133
+ - lib/bootsnap/load_path_cache/store.rb
134
+ - lib/bootsnap/setup.rb
135
+ - lib/bootsnap/version.rb
136
+ homepage: https://github.com/Shopify/bootsnap
137
+ licenses:
138
+ - MIT
139
+ metadata: {}
140
+ post_install_message:
141
+ rdoc_options: []
142
+ require_paths:
143
+ - lib
144
+ required_ruby_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: 2.0.0
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ requirements: []
155
+ rubyforge_project:
156
+ rubygems_version: 2.4.8
157
+ signing_key:
158
+ specification_version: 4
159
+ summary: wip
160
+ test_files: []