travis_bundle_cache 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/travis_bundle_cache +1 -1
- data/lib/travis_bundle_cache/cache.rb +13 -3
- data/lib/travis_bundle_cache/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42adc486f606b44906f28a9dd069aa6d7f045fd4
|
4
|
+
data.tar.gz: a46faff6b54312e2562ceb916658fe79a3dc8917
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 330f71e824959f68f5f1f2a466ada6cfe13a6bf532b52145f440f397ab675a1e9e24b4bb5328c17af688f35a25c902b0c593e6018de1ea092c2d0dd0ce94d306
|
7
|
+
data.tar.gz: 9d60d535cb835e85477659a74e125b3e81c75a1444efcc2bacfe0d2279a03a53b605005fe08f90f7bb6494d97542480138aeec6535ceb1d9899fa6c6b983f6df
|
data/bin/travis_bundle_cache
CHANGED
@@ -14,9 +14,9 @@ module TravisBundleCache
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def install
|
17
|
-
|
18
|
-
|
19
|
-
|
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",
|