prebundler 0.9.1 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/lib/prebundler/cli/install.rb +24 -4
- data/lib/prebundler/gemfile_interpreter.rb +13 -0
- data/lib/prebundler/s3_backend.rb +9 -5
- data/lib/prebundler/version.rb +3 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58c4ae382f45ded05a5d464ece05649f9908040cffc272d7b3969e1916b3a8f8
|
4
|
+
data.tar.gz: 2cc5be058b8c06f8b116e857175de0e98f5d5267719098fe59944730cac1016c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 144ea989dddf9d08228df39b9546de46359f44a751732f8d550caff65c3cc2ccb052d6b8140d2180082708ad7ac4e8662d07fb4d28edb24185057ffc9e1b4aa4
|
7
|
+
data.tar.gz: 10787d0ae6fea5816c31effcd1c1ca68e7bb74420d6696a209b234e158751f3d3bcb523f51839a58dc951f7abad1d85628e546e91ff233f0b4aaa151e1c334f6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,25 @@
|
|
1
|
+
0.11.3
|
2
|
+
===
|
3
|
+
- Support (well, add stubs for) `ruby` and `git_source` methods in Gemfiles.
|
4
|
+
- Don't attempt to install gems we can't get a spec for.
|
5
|
+
|
6
|
+
0.11.2
|
7
|
+
===
|
8
|
+
- Always run `bundle install` just in case.
|
9
|
+
- Make sure `bundle check` is the _last_ thing that runs.
|
10
|
+
|
11
|
+
0.11.1
|
12
|
+
===
|
13
|
+
- Exit with nonzero status code if fallback `bundle install` fails.
|
14
|
+
|
15
|
+
0.11.0
|
16
|
+
===
|
17
|
+
- Allow the caller to pass in a s3 client for non-standard setups
|
18
|
+
|
19
|
+
0.10.0
|
20
|
+
===
|
21
|
+
- Update aws-sdk client creation to be able to support non-aws s3 api endpoints (e.g. minio)
|
22
|
+
|
1
23
|
0.9.1
|
2
24
|
===
|
3
25
|
- Woops, also use platform version when determining the gems that have already been built.
|
@@ -6,13 +6,26 @@ require 'yaml'
|
|
6
6
|
|
7
7
|
module Prebundler
|
8
8
|
module Cli
|
9
|
+
class BundleFailedError < StandardError
|
10
|
+
attr_reader :exitstatus
|
11
|
+
|
12
|
+
def initialize(message, exitstatus)
|
13
|
+
super(message)
|
14
|
+
@exitstatus = exitstatus
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
9
18
|
class Install < Base
|
10
19
|
def run
|
11
20
|
prepare
|
12
21
|
install
|
13
22
|
update_bundle_config
|
14
23
|
generate_binstubs
|
15
|
-
|
24
|
+
# always run `bundle install` just in case
|
25
|
+
bundle_install
|
26
|
+
rescue BundleFailedError => e
|
27
|
+
out.puts e.message
|
28
|
+
exit e.exitstatus
|
16
29
|
end
|
17
30
|
|
18
31
|
private
|
@@ -124,12 +137,19 @@ module Prebundler
|
|
124
137
|
out.puts 'Done generating binstubs'
|
125
138
|
end
|
126
139
|
|
127
|
-
def
|
140
|
+
def bundle_install
|
141
|
+
system "bundle install #{bundle_install_args}"
|
142
|
+
|
143
|
+
if $?.exitstatus != 0
|
144
|
+
raise BundleFailedError.new(
|
145
|
+
"bundler exited with status code #{$?.exitstatus}", $?.exitstatus
|
146
|
+
)
|
147
|
+
end
|
148
|
+
|
128
149
|
system "bundle check --gemfile #{gemfile_path}"
|
129
150
|
|
130
151
|
if $?.exitstatus != 0
|
131
|
-
|
132
|
-
system "bundle install #{bundle_install_args}"
|
152
|
+
raise BundleFailedError.new('bundle could not be satisfied', $?.exitstatus)
|
133
153
|
end
|
134
154
|
end
|
135
155
|
|
@@ -23,6 +23,12 @@ module Prebundler
|
|
23
23
|
gems[spec.name].spec = spec
|
24
24
|
gems[spec.name].dependencies = spec.dependencies.map(&:name)
|
25
25
|
end
|
26
|
+
|
27
|
+
# Get rid of gems without a spec, as they are likely not supposed
|
28
|
+
# to be installed. This happens for gems like tzinfo-data which are
|
29
|
+
# listed in the standard rails Gemfile but only installed on
|
30
|
+
# certain platforms.
|
31
|
+
gems.reject! { |_, g| g.spec.nil? }
|
26
32
|
end
|
27
33
|
|
28
34
|
def current_context
|
@@ -34,6 +40,13 @@ module Prebundler
|
|
34
40
|
}
|
35
41
|
end
|
36
42
|
|
43
|
+
def ruby(*args)
|
44
|
+
end
|
45
|
+
|
46
|
+
# this is probably the wrong thing to do
|
47
|
+
def git_source(*args)
|
48
|
+
end
|
49
|
+
|
37
50
|
def gem(name, *args)
|
38
51
|
options = args.find { |a| a.is_a?(Hash) } || {}
|
39
52
|
gems[name] = GemRef.create(name, bundle_path, current_context.merge(options))
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'aws-sdk'
|
2
4
|
|
3
5
|
module Prebundler
|
@@ -5,10 +7,12 @@ module Prebundler
|
|
5
7
|
attr_reader :access_key_id, :secret_access_key, :bucket, :region
|
6
8
|
|
7
9
|
def initialize(options = {})
|
8
|
-
@
|
9
|
-
|
10
|
-
@
|
11
|
-
@
|
10
|
+
@bucket = options.fetch(:bucket)
|
11
|
+
|
12
|
+
@client = options.fetch(:client, nil)
|
13
|
+
@access_key_id = options.fetch(:access_key_id, nil)
|
14
|
+
@secret_access_key = options.fetch(:secret_access_key, nil)
|
15
|
+
@region = options.fetch(:region) { ENV['AWS_REGION'] || 'us-east-1' }
|
12
16
|
end
|
13
17
|
|
14
18
|
def store_file(source_file, dest_file)
|
@@ -31,7 +35,7 @@ module Prebundler
|
|
31
35
|
files = []
|
32
36
|
base_options = {
|
33
37
|
bucket: bucket,
|
34
|
-
prefix: "#{Bundler.local_platform
|
38
|
+
prefix: "#{Bundler.local_platform}/#{Prebundler.platform_version}/#{Gem.extension_api_version}"
|
35
39
|
}
|
36
40
|
|
37
41
|
while truncated
|
data/lib/prebundler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prebundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -114,7 +114,7 @@ files:
|
|
114
114
|
homepage: http://github.com/camertron
|
115
115
|
licenses: []
|
116
116
|
metadata: {}
|
117
|
-
post_install_message:
|
117
|
+
post_install_message:
|
118
118
|
rdoc_options: []
|
119
119
|
require_paths:
|
120
120
|
- lib
|
@@ -129,9 +129,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
|
-
|
133
|
-
|
134
|
-
signing_key:
|
132
|
+
rubygems_version: 3.1.4
|
133
|
+
signing_key:
|
135
134
|
specification_version: 4
|
136
135
|
summary: Gem dependency prebuilder
|
137
136
|
test_files: []
|