distributed_cache 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/distributed_cache.gemspec +2 -1
- data/lib/distributed_cache/config.rb +3 -1
- data/lib/distributed_cache/manifest.rb +4 -1
- data/lib/distributed_cache/utils.rb +8 -0
- data/lib/distributed_cache.rb +1 -1
- data/script/console.rb +18 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7382c24dcc40aa19414365e37ea69639fca1ea84
|
4
|
+
data.tar.gz: 947064b4a2e9d5274681d7334103246526db4cbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8aa7d6afcb2402e27afb37d56f099a1952fc111de15445f05bb51be21cdfc907eb7a5a00990bea435c162079a2b84b0423369bdc959e5884cf5872bb43d9f171
|
7
|
+
data.tar.gz: 1e9292321315f66a1e3109a4e82f388b601a5cd005314f40c3b436b438b50e8ffc8d363650f8d5639369323e5dd090f54955083127e219bccb8592d32db3161e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/distributed_cache.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "distributed_cache"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Doug Youch"]
|
@@ -32,6 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
"lib/distributed_cache/config.rb",
|
33
33
|
"lib/distributed_cache/manifest.rb",
|
34
34
|
"lib/distributed_cache/utils.rb",
|
35
|
+
"script/console.rb",
|
35
36
|
"spec/distributed_cache_spec.rb",
|
36
37
|
"spec/helper.rb"
|
37
38
|
]
|
@@ -100,7 +100,10 @@ module DistributedCache
|
|
100
100
|
|
101
101
|
def update_latest_bundle_dir
|
102
102
|
File.unlink(latest_bundle_dir) if File.exists?(latest_bundle_dir)
|
103
|
-
|
103
|
+
dir = File.dirname latest_bundle_dir
|
104
|
+
Dir.chdir(dir) do
|
105
|
+
FileUtils.symlink "#{date}/#{cache_version}", File.basename(latest_bundle_dir)
|
106
|
+
end
|
104
107
|
end
|
105
108
|
|
106
109
|
def self.load(config, manifest_file)
|
@@ -41,5 +41,13 @@ module DistributedCache
|
|
41
41
|
raise "failed to (#{cmd}), status #{status}" unless status == 0
|
42
42
|
end
|
43
43
|
end
|
44
|
+
|
45
|
+
def self.rsync(server)
|
46
|
+
cmd = "rsync -alrz #{DistributedCache.config.bundle_dir}/ #{DistributedCache.config.file_server_user}@#{server}:#{DistributedCache.config.file_server_bundle_dir}/"
|
47
|
+
`#{cmd}`.tap do
|
48
|
+
status = $?
|
49
|
+
raise "failed to (#{cmd}), status #{status}" unless status == 0
|
50
|
+
end
|
51
|
+
end
|
44
52
|
end
|
45
53
|
end
|
data/lib/distributed_cache.rb
CHANGED
data/script/console.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift File.expand_path('../lib', File.dirname(__FILE__))
|
4
|
+
|
5
|
+
require 'distributed_cache'
|
6
|
+
require "irb"
|
7
|
+
|
8
|
+
if __FILE__ == $0
|
9
|
+
IRB.start(__FILE__)
|
10
|
+
else
|
11
|
+
# check -e option
|
12
|
+
if /^-e$/ =~ $0
|
13
|
+
IRB.start(__FILE__)
|
14
|
+
else
|
15
|
+
IRB.setup(__FILE__)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: distributed_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Youch
|
@@ -89,6 +89,7 @@ files:
|
|
89
89
|
- lib/distributed_cache/config.rb
|
90
90
|
- lib/distributed_cache/manifest.rb
|
91
91
|
- lib/distributed_cache/utils.rb
|
92
|
+
- script/console.rb
|
92
93
|
- spec/distributed_cache_spec.rb
|
93
94
|
- spec/helper.rb
|
94
95
|
homepage: http://github.com/sessionm/distributed_cache
|