opskeleton 0.8.9 → 0.8.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opskeleton/deploy_s3.rb +7 -4
- data/lib/opskeleton/deploy_scp.rb +10 -7
- data/lib/opskeleton/version.rb +1 -1
- data/templates/parent/spec/spec_helper.erb +6 -5
- data/templates/puppet/Gemfile.erb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11f82b361bb97d7f9abff3dee8e09ac3530b0da3
|
4
|
+
data.tar.gz: 6331db06e138b00e8bbdf5a2a821e98f78ce89ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b8ff87846c90ff1f2e94fc573635054f44cfa71210008c32a63f8af476d99ed3997f47bf2392409e043076ac28f99a29211494d470711158c6406599fbbc501
|
7
|
+
data.tar.gz: d22049c78fbf07a26c0287f88426ffca48a3a620f003f8fbce96c0b0214062ff4b835a951fbf4c28801369de1e2a5fb602f46d0674cacbf06b23ed3bc6331a6c
|
data/lib/opskeleton/deploy_s3.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
conf = "#{ENV['HOME']}/.configuration.rb"
|
4
|
-
raise "#{conf} not found, please create a conf file with a s3 section" unless File.exists?(conf)
|
5
|
-
require conf
|
2
|
+
|
6
3
|
|
7
4
|
module Opsk
|
8
5
|
class DeployS3 < Thor::Group
|
@@ -17,6 +14,12 @@ module Opsk
|
|
17
14
|
check_root
|
18
15
|
end
|
19
16
|
|
17
|
+
def load_conf
|
18
|
+
require 'configuration'
|
19
|
+
conf = "#{ENV['HOME']}/.configuration.rb"
|
20
|
+
raise "#{conf} not found, please create a conf file with a s3 section" unless File.exists?(conf)
|
21
|
+
require conf
|
22
|
+
end
|
20
23
|
|
21
24
|
def upload
|
22
25
|
require 'aws-sdk'
|
@@ -1,8 +1,5 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
conf = "#{ENV['HOME']}/.configuration.rb"
|
4
|
-
raise "#{conf} not found, please create a conf file with a scp section" unless File.exists?(conf)
|
5
|
-
require conf
|
2
|
+
|
6
3
|
|
7
4
|
module Opsk
|
8
5
|
class DeployScp < Thor::Group
|
@@ -16,6 +13,12 @@ module Opsk
|
|
16
13
|
check_root
|
17
14
|
end
|
18
15
|
|
16
|
+
def load_conf
|
17
|
+
require 'configuration'
|
18
|
+
conf = "#{ENV['HOME']}/.configuration.rb"
|
19
|
+
raise "#{conf} not found, please create a conf file with a scp section" unless File.exists?(conf)
|
20
|
+
require conf
|
21
|
+
end
|
19
22
|
|
20
23
|
def upload
|
21
24
|
require 'net/scp'
|
@@ -25,10 +28,10 @@ module Opsk
|
|
25
28
|
if(File.exists?(tar))
|
26
29
|
begin
|
27
30
|
conf = Configuration.for('scp').send(dest.to_sym)
|
28
|
-
|
31
|
+
port = conf.port || '22'
|
29
32
|
Net::SSH.start(conf.host, conf.user, :port => port) do |session|
|
30
|
-
|
31
|
-
|
33
|
+
session.scp.upload!(tar, conf.dest)
|
34
|
+
end
|
32
35
|
say("deployed #{base} to #{conf.user}@#{conf.host}:#{conf.dest}")
|
33
36
|
rescue Exception => e
|
34
37
|
say("failed to deploy due to #{e}")
|
data/lib/opskeleton/version.rb
CHANGED
@@ -2,8 +2,8 @@ require 'serverspec'
|
|
2
2
|
require 'pathname'
|
3
3
|
require 'net/ssh'
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
|
6
|
+
set :backend, :ssh
|
7
7
|
|
8
8
|
def run(cmd)
|
9
9
|
unless(system(cmd, out: $stdout, err: :out))
|
@@ -45,7 +45,7 @@ RSpec.configure do |c|
|
|
45
45
|
if match = /HostName (.*)/.match(line)
|
46
46
|
sshhost = match[1]
|
47
47
|
elsif match = /User (.*)/.match(line)
|
48
|
-
|
48
|
+
options[:user] = match[1]
|
49
49
|
elsif match = /IdentityFile (.*)/.match(line)
|
50
50
|
options[:keys] = [match[1].gsub(/"/,'')]
|
51
51
|
elsif match = /Port (.*)/.match(line)
|
@@ -55,9 +55,10 @@ RSpec.configure do |c|
|
|
55
55
|
end
|
56
56
|
else
|
57
57
|
sshhost = 'localhost'
|
58
|
-
|
58
|
+
options[:user] = 'vagrant'
|
59
59
|
end
|
60
|
-
|
60
|
+
set :host, sshhost
|
61
|
+
set :ssh_options,options
|
61
62
|
end
|
62
63
|
|
63
64
|
c.after :suite do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opskeleton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- narkisr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04
|
11
|
+
date: 2015-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|