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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b48a3126100217a68d9b58345c07aa2f87806d8b
4
- data.tar.gz: 540ab69aef10b3365533329e5ac9d3f5f9602bba
3
+ metadata.gz: 11f82b361bb97d7f9abff3dee8e09ac3530b0da3
4
+ data.tar.gz: 6331db06e138b00e8bbdf5a2a821e98f78ce89ae
5
5
  SHA512:
6
- metadata.gz: b7b47b9669f4b7fda4b950e10f9cf38ee04270c786221326887556fe3c4427b1a1c64302b0080db180ce6e956030f0d9b0334b95dfdda0e122140768cf772202
7
- data.tar.gz: fb25cdc7cf1d94f12e163ef2d6e4cfd0bee0295600cbcb2546208f9c68b1b4e685f364fa2de7cd3ae103a3fecdc795a52e5128d56f89184e890b47a802027107
6
+ metadata.gz: 7b8ff87846c90ff1f2e94fc573635054f44cfa71210008c32a63f8af476d99ed3997f47bf2392409e043076ac28f99a29211494d470711158c6406599fbbc501
7
+ data.tar.gz: d22049c78fbf07a26c0287f88426ffca48a3a620f003f8fbce96c0b0214062ff4b835a951fbf4c28801369de1e2a5fb602f46d0674cacbf06b23ed3bc6331a6c
@@ -1,8 +1,5 @@
1
1
 
2
- require 'configuration'
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
- require 'configuration'
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
- port = conf.port || '22'
31
+ port = conf.port || '22'
29
32
  Net::SSH.start(conf.host, conf.user, :port => port) do |session|
30
- session.scp.upload!(tar, conf.dest)
31
- end
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}")
@@ -1,3 +1,3 @@
1
1
  module Opskeleton
2
- VERSION = '0.8.9'
2
+ VERSION = '0.8.10'
3
3
  end
@@ -2,8 +2,8 @@ require 'serverspec'
2
2
  require 'pathname'
3
3
  require 'net/ssh'
4
4
 
5
- include SpecInfra::Helper::Ssh
6
- include SpecInfra::Helper::DetectOS
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
- sshuser = match[1]
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
- sshuser = 'vagrant'
58
+ options[:user] = 'vagrant'
59
59
  end
60
- c.ssh = Net::SSH.start(sshhost, sshuser, options)
60
+ set :host, sshhost
61
+ set :ssh_options,options
61
62
  end
62
63
 
63
64
  c.after :suite do
@@ -1,12 +1,12 @@
1
1
  source "https://rubygems.org"
2
2
 
3
3
  # base
4
- gem 'puppet'
4
+ gem 'puppet','= 3.7.5'
5
5
 
6
6
  group :testing do
7
7
  gem 'rspec-puppet'
8
8
  gem 'puppetlabs_spec_helper', '>= 0.1.0'
9
- gem 'serverspec', '~> 1.14.0'
9
+ gem 'serverspec'
10
10
  end
11
11
 
12
12
  group :build 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.9
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-17 00:00:00.000000000 Z
11
+ date: 2015-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor