bincache 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bincache.gemspec +1 -1
- data/lib/bincache.rb +5 -9
- data/scripts/script1 +1 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/bincache.gemspec
CHANGED
data/lib/bincache.rb
CHANGED
@@ -7,22 +7,19 @@ require 'right_aws'
|
|
7
7
|
class BinCache
|
8
8
|
|
9
9
|
def initialize()
|
10
|
-
@bucket = 'devs-us-west'
|
11
|
-
@prefix = 'martin/bincache/'
|
12
10
|
@download_dir = '/tmp'
|
13
11
|
|
14
|
-
print_and_exit "s3 keys not set. Please set
|
12
|
+
print_and_exit "s3 keys not set. Please set S3_BUCKET and S3_PREFIX" unless ENV['S3_BUCKET'] && ENV['S3_PREFIX']
|
13
|
+
@bucket = ENV['S3_BUCKET']
|
14
|
+
@prefix = ENV['S3_PREFIX']
|
15
|
+
|
15
16
|
|
17
|
+
print_and_exit "s3 keys not set. Please set S3_ACCESS_KEY and S3_SECRET_KEY" unless ENV['S3_ACCESS_KEY'] && ENV['S3_SECRET_KEY']
|
16
18
|
@right_s3 = RightAws::S3.new(ENV['S3_ACCESS_KEY'],ENV['S3_SECRET_KEY'])
|
17
19
|
@right_s3_bucket = @right_s3.bucket(@bucket)
|
18
20
|
@right_s3_interface = RightAws::S3Interface.new(ENV['S3_ACCESS_KEY'],ENV['S3_SECRET_KEY'])
|
19
21
|
end
|
20
22
|
|
21
|
-
|
22
|
-
def bincache(script,dir)
|
23
|
-
script_hash = Digest::MD5.hexdigest(script)
|
24
|
-
end
|
25
|
-
|
26
23
|
def run_series(directory, scripts)
|
27
24
|
## exit if given bogus input
|
28
25
|
print_and_exit "bogus input in run_series" if directory.nil? || scripts.nil?
|
@@ -41,7 +38,6 @@ class BinCache
|
|
41
38
|
|
42
39
|
## step this script
|
43
40
|
step(pop,directory,hash)
|
44
|
-
|
45
41
|
end
|
46
42
|
|
47
43
|
def check_for_hash?(hash)
|
data/scripts/script1
CHANGED
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: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Martin Rhoads
|