devops 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/lib/host/default.rb CHANGED
@@ -82,9 +82,22 @@ module Host
82
82
  end
83
83
  end
84
84
 
85
- def shell_exec!( command, opts = {} )
86
- ssh_pem
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
@@ -54,4 +54,8 @@ class String
54
54
  def warning
55
55
  replace Color.print( self , [ :bold, :yellow ] )
56
56
  end
57
+
58
+ def bold
59
+ replace Color.print( self , [ :bold ] )
60
+ end
57
61
  end
data/lib/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Ops
2
2
 
3
3
  def self.version
4
- "0.1.0"
4
+ "0.1.1"
5
5
  end
6
6
  end
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.0
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-05-07 00:00:00.000000000 Z
13
+ date: 2013-09-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler