travis_bundle_cache 0.0.1 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51e3d47f4cb66ef1f3a31a1758e8c47fd59d492f
4
- data.tar.gz: 89ddc01522b4650b092576f37914e4d63f3cce02
3
+ metadata.gz: 42adc486f606b44906f28a9dd069aa6d7f045fd4
4
+ data.tar.gz: a46faff6b54312e2562ceb916658fe79a3dc8917
5
5
  SHA512:
6
- metadata.gz: 15a4cf836fc301f427ea47a7dbc8dc727d276fc56f44e2ded5ae0f03da0e7686aa025e2367d86cd9c5101f6a5aa325ea9fa0a270f347bf86cb8a76073b6bc665
7
- data.tar.gz: 9795b30ebb39eaaf25ed66f6d269938edfdefd60a8d79bcc52b0a0f0deb15d55fb56224097ad6eff5f48b064cb1a96ca4415c55383892d89abe1d62e102d4704
6
+ metadata.gz: 330f71e824959f68f5f1f2a466ada6cfe13a6bf532b52145f440f397ab675a1e9e24b4bb5328c17af688f35a25c902b0c593e6018de1ea092c2d0dd0ce94d306
7
+ data.tar.gz: 9d60d535cb835e85477659a74e125b3e81c75a1444efcc2bacfe0d2279a03a53b605005fe08f90f7bb6494d97542480138aeec6535ceb1d9899fa6c6b983f6df
@@ -3,6 +3,6 @@ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
3
3
 
4
4
  require 'travis_bundle_cache/cache'
5
5
 
6
- TravisBundleCache::Cache.new.cache
6
+ TravisBundleCache::Cache.new.cache_bundle
7
7
 
8
8
  exit 0
@@ -14,9 +14,9 @@ module TravisBundleCache
14
14
  end
15
15
 
16
16
  def install
17
- `cd ~ && wget -O "remote_#{@file_name}" "https://#{@bucket_name}.s3.amazonaws.com/#{@file_name}" && tar -xf "remote_#{@file_name}"`
18
- `cd ~ && wget -O "remote_#{@file_name}.sha2" "https://#{@bucket_name}.s3.amazonaws.com/#{@file_name}.sha2"`
19
- `bundle install --without #{ENV['BUNDLE_WITHOUT'] || "development production"} --path=~/.bundle`
17
+ run_command %(cd ~ && wget -O "remote_#{@file_name}" "https://#{@bucket_name}.s3.amazonaws.com/#{@file_name}" && tar -xf "remote_#{@file_name}")
18
+ run_command %(cd ~ && wget -O "remote_#{@file_name}.sha2" "https://#{@bucket_name}.s3.amazonaws.com/#{@file_name}.sha2")
19
+ run_command %(bundle install --without #{ENV['BUNDLE_WITHOUT'] || "development production"} --path=~/.bundle)
20
20
  end
21
21
 
22
22
  def cache_bundle
@@ -82,6 +82,16 @@ module TravisBundleCache
82
82
 
83
83
  protected
84
84
 
85
+ def run_command(cmd)
86
+ puts "Running: #{cmd}"
87
+ IO.popen(cmd) do |f|
88
+ begin
89
+ print f.readchar while true
90
+ rescue EOFError
91
+ end
92
+ end
93
+ end
94
+
85
95
  def storage
86
96
  @storage ||= Fog::Storage.new({
87
97
  :provider => "AWS",
@@ -1,3 +1,3 @@
1
1
  module TravisBundleCache
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: travis_bundle_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Genord II