devops 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/host/default.rb +15 -2
- data/lib/ops/console.rb +4 -0
- data/lib/version.rb +1 -1
- metadata +2 -2
data/lib/host/default.rb
CHANGED
@@ -82,9 +82,22 @@ module Host
|
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
|
-
def
|
86
|
-
|
85
|
+
def scp_to_host( src, dest )
|
86
|
+
scp_cmd = [ "scp" ]
|
87
|
+
|
88
|
+
raise( IOError, "Error: HostName invalid." ) if @host_name.nil?
|
89
|
+
|
90
|
+
scp_cmd << [ "-i", ssh_pem ] unless ssh_pem.nil?
|
91
|
+
scp_cmd << "#{ src } #{ @user }@#{ @host_name }:#{ dest }"
|
87
92
|
|
93
|
+
begin
|
94
|
+
`#{ scp_cmd.join(" ") }`
|
95
|
+
rescue => e
|
96
|
+
raise( IOError, "Could not call scp. #{ e.message }" )
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
def shell_exec!( command, opts = {} )
|
88
101
|
options = { :keys => ssh_pem }
|
89
102
|
|
90
103
|
color = Color.random_color
|
data/lib/ops/console.rb
CHANGED
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devops
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-09-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|