bundler-source-aws-s3 0.2.1 → 0.2.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -3
  3. data/plugins.rb +5 -5
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4d5919d913b511b4bd0cc2bbc5cb08bed308eb5ccc10d8790d094c107eb88e1
4
- data.tar.gz: 120ca809b0c776de957420b09c6ce851d3cd1b02f67ab0fd66c0ca8f122c9c81
3
+ metadata.gz: b9108559ce8bed82c1fb1a00a68aa3bd2d774da2fe14ac3b3dbfeb848e58127a
4
+ data.tar.gz: de681ec7243bac4cda46e035a77dd0e42a0f6b03fe69c2dd01ca6fd9f5928d33
5
5
  SHA512:
6
- metadata.gz: 458a8571991308cc317c652a6aabeebf37eaaa58572ee2e6829135dd369ca653419fb6138574258cdf9da47f272996750c714d8301915a68c625ef421a044b5a
7
- data.tar.gz: ff95b41d255ce9e9a8e691c0778f15e2b32c5bda6daa6829ab5bdaf47f1159e4753cd8f2956233ab329d687ad0ab6f5cc2dbc297bc1ca96248a89a72bdf1de9a
6
+ metadata.gz: b259dbc6a4dabac784bf002b44f42f6326b3103a24f97517db085d2c434bb1190af6bfc1ba443add24e1591946eddcbd54d61d68ab4369c352d35166cfc4726d
7
+ data.tar.gz: f5a2e7271c218d303844975265e56d92e41c354632f06ac845eaa362d19514e9511b9411f68aa591961bf3e6d2afaa6b2a9a2bed579ebc4f7d9dcf13a07e8027
data/README.md CHANGED
@@ -29,13 +29,35 @@ etc) to be able to run that command.
29
29
  In your Gemfile, add a source like this:
30
30
 
31
31
  ```ruby
32
- source('s3://my-bucket/gems', type: 'aws-s3') do
32
+ source 's3://my-bucket/gems', type: 'aws-s3' do
33
33
  gem 'my-cool-gem'
34
34
  end
35
35
  ```
36
36
 
37
- When Bundler sees the `type: 'aws-s3'` it will automatically install and use
38
- this plugin to install gems from your s3 source.
37
+ Bundler will infer that this gem is the plugin for the 'aws-s3' type and fetch
38
+ and install it automatically.
39
+
40
+ For libraries, it can be normal to declare your dependencies in your gemspec
41
+ file. In those cases, your Gemfile will normall be mostly empty. You can still
42
+ use your s3 sourced gems in your gemspec if you add the plugin and source to
43
+ your Gemfile. For example:
44
+
45
+ ```ruby
46
+ # In your gemspec you might have some dependencies like:
47
+
48
+ spec.add_development_dependency 'private-gem-in-my-s3'
49
+ spec.add_dependency 'another-private-gem-in-s3'
50
+
51
+ # And, your Gemfile would contain:
52
+
53
+ source 'https://rubygems.org'
54
+ source 's3://my-super-private-bucket-of-gems', type: 'aws-s3' do
55
+ # It's okay to leave this empty. Unfortunately, bundler currently requires
56
+ # the block for sources which have a `type`.
57
+ end
58
+
59
+ gemspec
60
+ ```
39
61
 
40
62
  ## Development
41
63
 
data/plugins.rb CHANGED
@@ -49,7 +49,7 @@ class BundlerSourceAwsS3 < Bundler::Plugin::API
49
49
  end
50
50
 
51
51
  def remote?
52
- @remote
52
+ @remote ||= false
53
53
  end
54
54
 
55
55
  # TODO What is bundler telling us if unlock! is called?
@@ -80,7 +80,7 @@ class BundlerSourceAwsS3 < Bundler::Plugin::API
80
80
  end
81
81
 
82
82
  # We will use this value as the given spec's loaded_from. It should be the
83
- # path fo the installed gem's gemspec.
83
+ # path of the installed gem's gemspec.
84
84
  def loaded_from_for(spec)
85
85
  destination = install_path.join(spec.full_name)
86
86
  destination.join("#{spec.full_name}.gemspec").to_s
@@ -110,9 +110,9 @@ class BundlerSourceAwsS3 < Bundler::Plugin::API
110
110
 
111
111
  Bundler.mkdir_p(s3_gems_path)
112
112
 
113
- output, status = Open3.capture2e(sync_cmd)
114
-
115
- @pull = status.success?
113
+ unless @pull = system(sync_cmd)
114
+ raise "[aws-s3] #{sync_cmd.inspect} failed."
115
+ end
116
116
  end
117
117
 
118
118
  # Produces a list of Gem::Package for the s3 gems.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-source-aws-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric K Idema
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-29 00:00:00.000000000 Z
11
+ date: 2019-06-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Add aws-s3 source to bundler via plugin.
14
14
  email: