bincache 0.1.3 → 0.1.4
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.
- data/VERSION +1 -1
- data/bincache.gemspec +2 -2
- data/lib/bincache.rb +4 -2
- metadata +4 -4
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.4
|
data/bincache.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{bincache}
|
|
8
|
-
s.version = "0.1.
|
|
8
|
+
s.version = "0.1.4"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Martin Rhoads"]
|
|
12
|
-
s.date = %q{2011-
|
|
12
|
+
s.date = %q{2011-05-05}
|
|
13
13
|
s.default_executable = %q{bincache}
|
|
14
14
|
s.description = %q{
|
|
15
15
|
BinCache is a system designed to cache compiled binaries. It has support for bash, ruby , and chef.
|
data/lib/bincache.rb
CHANGED
|
@@ -92,7 +92,9 @@ class BinCache
|
|
|
92
92
|
|
|
93
93
|
## attempt to download the hash from s3
|
|
94
94
|
begin
|
|
95
|
-
|
|
95
|
+
object = @right_s3_interface.get_object(@bucket, "#{@prefix}#{hash}")
|
|
96
|
+
return false if object.nil?
|
|
97
|
+
File.open(File.join(@cache_dir,hash) , 'w') {|f| f.write( object ) }
|
|
96
98
|
rescue
|
|
97
99
|
return false
|
|
98
100
|
end
|
|
@@ -127,7 +129,7 @@ class BinCache
|
|
|
127
129
|
Dir.chdir dir unless dir == nil
|
|
128
130
|
script_path = '/tmp/bincache_script'
|
|
129
131
|
File.open(script_path, 'w+') {|f| f.write(command) }
|
|
130
|
-
File.chmod(
|
|
132
|
+
File.chmod(0744,script_path)
|
|
131
133
|
STDERR.puts "about to execute "
|
|
132
134
|
STDERR.puts "#{command}"
|
|
133
135
|
output = `bash #{script_path}`
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bincache
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 19
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 4
|
|
10
|
+
version: 0.1.4
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Martin Rhoads
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-
|
|
18
|
+
date: 2011-05-05 00:00:00 -07:00
|
|
19
19
|
default_executable: bincache
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|