bincache 0.1.0 → 0.1.1
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 +20 -23
- data/lib/bincache.rb +5 -5
- data/lib/bincache/provider/bincache.rb +1 -1
- metadata +8 -9
- data/.gitignore +0 -23
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/bincache.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
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.1"
|
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{
|
12
|
+
s.date = %q{2011-03-11}
|
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.
|
@@ -19,38 +19,35 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = ["bincache"]
|
20
20
|
s.extra_rdoc_files = [
|
21
21
|
"LICENSE",
|
22
|
-
|
22
|
+
"README.rdoc"
|
23
23
|
]
|
24
24
|
s.files = [
|
25
25
|
".document",
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
"test/test_bincache.rb"
|
26
|
+
"LICENSE",
|
27
|
+
"README.rdoc",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"bin/bincache",
|
31
|
+
"bincache.gemspec",
|
32
|
+
"lib/bincache.rb",
|
33
|
+
"lib/bincache/provider/bincache.rb",
|
34
|
+
"lib/bincache/resource/bincache.rb",
|
35
|
+
"scripts/script1",
|
36
|
+
"scripts/script2",
|
37
|
+
"scripts/script3",
|
38
|
+
"test/helper.rb",
|
39
|
+
"test/test_bincache.rb"
|
41
40
|
]
|
42
41
|
s.homepage = %q{http://github.com/ermal14/bincache}
|
43
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
44
42
|
s.require_paths = ["lib"]
|
45
|
-
s.rubygems_version = %q{1.
|
43
|
+
s.rubygems_version = %q{1.5.2}
|
46
44
|
s.summary = %q{bincache caches binaries}
|
47
45
|
s.test_files = [
|
48
46
|
"test/helper.rb",
|
49
|
-
|
47
|
+
"test/test_bincache.rb"
|
50
48
|
]
|
51
49
|
|
52
50
|
if s.respond_to? :specification_version then
|
53
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
54
51
|
s.specification_version = 3
|
55
52
|
|
56
53
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
data/lib/bincache.rb
CHANGED
@@ -29,19 +29,19 @@ class BinCache
|
|
29
29
|
@right_s3_interface = RightAws::S3Interface.new(ENV['BINCACHE_S3_ACCESS_KEY'],ENV['BINCACHE_S3_SECRET_KEY'])
|
30
30
|
end
|
31
31
|
|
32
|
-
def run_series_once(directory=nil, scripts=nil, cwd=nil)
|
33
|
-
hash
|
34
|
-
run_series(directory,scripts,cwd
|
32
|
+
def run_series_once(directory=nil, scripts=nil, cwd=nil, hash=nil)
|
33
|
+
hash ||= Digest::MD5.hexdigest("#{directory.inspect}#{scripts.inspect}")
|
34
|
+
run_series(directory,scripts,cwd) unless File.exist?(File.join(directory,".#{hash}"))
|
35
35
|
end
|
36
36
|
|
37
|
-
def run_series(directory, scripts, cwd=nil)
|
37
|
+
def run_series(directory, scripts, cwd=nil, hash=nil)
|
38
38
|
## exit if given bogus input
|
39
39
|
print_and_exit "bogus input in run_series" if directory.nil? || scripts.nil?
|
40
40
|
|
41
41
|
## clear out directory if we are starting a new sequence
|
42
42
|
`rm -rf #{directory} && mkdir -p #{directory}` && return if scripts.empty?
|
43
43
|
|
44
|
-
hash
|
44
|
+
hash ||= Digest::MD5.hexdigest("#{directory.inspect}#{scripts.inspect}")
|
45
45
|
|
46
46
|
## pop the last script
|
47
47
|
pop = scripts.pop
|
@@ -23,7 +23,7 @@ class Chef
|
|
23
23
|
## run bincache
|
24
24
|
require 'bincache'
|
25
25
|
bincache = BinCache.new
|
26
|
-
bincache.
|
26
|
+
bincache.run_series_once(@new_resource.directory,scripts,@new_resource.cwd,@new_resource.script_hash)
|
27
27
|
end
|
28
28
|
|
29
29
|
|
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:
|
5
|
-
prerelease:
|
4
|
+
hash: 25
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
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:
|
18
|
+
date: 2011-03-11 00:00:00 -08:00
|
19
19
|
default_executable: bincache
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -43,7 +43,6 @@ extra_rdoc_files:
|
|
43
43
|
- README.rdoc
|
44
44
|
files:
|
45
45
|
- .document
|
46
|
-
- .gitignore
|
47
46
|
- LICENSE
|
48
47
|
- README.rdoc
|
49
48
|
- Rakefile
|
@@ -63,8 +62,8 @@ homepage: http://github.com/ermal14/bincache
|
|
63
62
|
licenses: []
|
64
63
|
|
65
64
|
post_install_message:
|
66
|
-
rdoc_options:
|
67
|
-
|
65
|
+
rdoc_options: []
|
66
|
+
|
68
67
|
require_paths:
|
69
68
|
- lib
|
70
69
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -88,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
87
|
requirements: []
|
89
88
|
|
90
89
|
rubyforge_project:
|
91
|
-
rubygems_version: 1.
|
90
|
+
rubygems_version: 1.5.2
|
92
91
|
signing_key:
|
93
92
|
specification_version: 3
|
94
93
|
summary: bincache caches binaries
|
data/.gitignore
DELETED