scatter 0.0.3 → 0.0.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/lib/scatter.rb +1 -0
- data/lib/scatter/commands/sync.rb +25 -0
- data/lib/scatter/version.rb +1 -1
- metadata +5 -4
data/lib/scatter.rb
CHANGED
@@ -15,6 +15,7 @@ require File.dirname(__FILE__) + '/scatter/commands/node'
|
|
15
15
|
require File.dirname(__FILE__) + '/scatter/commands/node/add'
|
16
16
|
require File.dirname(__FILE__) + '/scatter/commands/node/list'
|
17
17
|
require File.dirname(__FILE__) + '/scatter/commands/node/rm'
|
18
|
+
require File.dirname(__FILE__) + '/scatter/commands/sync'
|
18
19
|
require File.dirname(__FILE__) + '/scatter/commands/init'
|
19
20
|
require File.dirname(__FILE__) + '/scatter/config'
|
20
21
|
require File.dirname(__FILE__) + '/scatter/logger'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Scatter
|
2
|
+
module Commands
|
3
|
+
class Sync < Scatter::Command
|
4
|
+
usage "Push all gems installed on this machine to another node", <<-end
|
5
|
+
end
|
6
|
+
|
7
|
+
def initialize(out, node_name)
|
8
|
+
super(out)
|
9
|
+
@node_name = node_name
|
10
|
+
end
|
11
|
+
|
12
|
+
def execute!
|
13
|
+
gemlist = Dir.glob("#{ENV['GEM_HOME']}/cache/*.gem")
|
14
|
+
gemlist.each do |gemfile|
|
15
|
+
@out.puts "Pushing gem #{File.basename(gemfile)} to #{@node_name} ..."
|
16
|
+
node.push(gemfile)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def node
|
21
|
+
@node ||= Scatter::Config.find_node(@node_name)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/scatter/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scatter
|
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
|
- imedo GmbH
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-02-17 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -43,6 +43,7 @@ files:
|
|
43
43
|
- lib/scatter/commands/remote/list.rb
|
44
44
|
- lib/scatter/commands/remote/rm.rb
|
45
45
|
- lib/scatter/commands/remote.rb
|
46
|
+
- lib/scatter/commands/sync.rb
|
46
47
|
- lib/scatter/config.rb
|
47
48
|
- lib/scatter/gemlist.rb
|
48
49
|
- lib/scatter/logger.rb
|