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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bincache.gemspec +2 -2
  3. data/lib/bincache.rb +4 -2
  4. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bincache}
8
- s.version = "0.1.3"
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-04-19}
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.
@@ -92,7 +92,9 @@ class BinCache
92
92
 
93
93
  ## attempt to download the hash from s3
94
94
  begin
95
- File.open(File.join(@cache_dir,hash) , 'w') {|f| f.write( @right_s3_interface.get_object(@bucket, "#{@prefix}#{hash}") ) }
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(0544,script_path)
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: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
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-04-19 00:00:00 -07:00
18
+ date: 2011-05-05 00:00:00 -07:00
19
19
  default_executable: bincache
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency