specinfra 2.0.0.beta47 → 2.0.0.beta48

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a484b18deb5a7c3741669f1e31036b9b4e8175e4
4
- data.tar.gz: 43f6be61279cd7e7a97e083fce8db300050f1ec0
3
+ metadata.gz: 577fd3b2ff3d56cf563cae10864298009865e6d4
4
+ data.tar.gz: 9492bf5c9b869f970fe038cf922d51f29ff8df23
5
5
  SHA512:
6
- metadata.gz: 1569faa6cdd2f048747c902d0f7ac6804c4fa2c27fcde68cc57f87a17363578a9fae55cf8bcd531d96fd3dc44efb953d410e5f25e2662ea016fdacaa0a2894fc
7
- data.tar.gz: 152313739da25255bde4adf19b52c27d5568224d52638c38d49166964bd0a83901e6de3338939f592bd844d3612ce737a21ce3290b46f38280c23f5ac775c0d6
6
+ metadata.gz: 2c39424a9216178cc408ec808164e122846646761f36aaf3b5f09d7e978758667c8429da2a50f285c0e5e721af5f1bfd23a409e6673bf9ec4cdb4948c0ee4ebb
7
+ data.tar.gz: 59806cff36f20271f23f12f027f57ecf8905e220db0ef80347c82abad76a7dd3e24a93596f92fb939d7739e91d91d9ffe199edf50bc386b9dc9f66d7e0c20814
@@ -1,9 +1,10 @@
1
+ # -*- coding: utf-8 -*-
1
2
  module Specinfra::Backend
2
3
  class Dockerfile < Specinfra::Backend::Base
3
4
  def initialize
4
5
  @lines = []
5
6
  ObjectSpace.define_finalizer(self) {
6
- File.write("Dockerfile", @lines.join("\n"))
7
+ puts @lines
7
8
  }
8
9
  end
9
10
 
@@ -4,7 +4,7 @@ module Specinfra::Backend
4
4
  class ShellScript < Base
5
5
  def initialize
6
6
  @lines = [ "#!/bin/sh", "" ]
7
- ObjectSpace.define_finalizer(self, Writer.new("spec.sh", @lines))
7
+ ObjectSpace.define_finalizer(self, Writer.new(@lines))
8
8
  end
9
9
 
10
10
  def run_command(cmd, opts={})
@@ -13,13 +13,12 @@ module Specinfra::Backend
13
13
  end
14
14
 
15
15
  class Writer
16
- def initialize(file, lines)
17
- @file = file
16
+ def initialize(lines)
18
17
  @lines = lines
19
18
  end
20
19
 
21
20
  def call(*args)
22
- File.write(@file, @lines.join("\n"))
21
+ puts @lines
23
22
  end
24
23
  end
25
24
  end
@@ -7,5 +7,5 @@ require 'specinfra/backend/cmd'
7
7
  require 'specinfra/backend/docker'
8
8
  require 'specinfra/backend/lxc'
9
9
  require 'specinfra/backend/winrm'
10
- require 'specinfra/backend/shellscript'
10
+ require 'specinfra/backend/shell_script'
11
11
  require 'specinfra/backend/dockerfile'
@@ -7,5 +7,9 @@ class Specinfra::Command::Openbsd::Base::Interface < Specinfra::Command::Base::I
7
7
  def check_has_ipv4_address(interface, ip_address)
8
8
  "ifconfig #{interface} | grep -w inet | cut -d ' ' -f 2"
9
9
  end
10
+
11
+ def check_has_ipv6_address(interface, ip_address)
12
+ "ifconfig #{interface} | grep -w inet6 | cut -d ' ' -f 2"
13
+ end
10
14
  end
11
15
  end
@@ -1,11 +1,11 @@
1
1
  class Specinfra::Command::Openbsd::Base::Service < Specinfra::Command::Base::Service
2
2
  class << self
3
3
  def check_is_enabled(service, level=nil)
4
- "egrep '(#{escape(service)}_flags=|^pkg_scripts=\"(.*)#{escape(service)}(.*)\")' /etc/rc.conf.local | grep -v \=NO"
4
+ "rcctl status #{escape(service)}"
5
5
  end
6
6
 
7
7
  def check_is_running(service)
8
- "/etc/rc.d/#{escape(service)} status"
8
+ "rcctl check #{escape(service)}"
9
9
  end
10
10
  end
11
11
  end
@@ -1,7 +1,7 @@
1
1
  class Specinfra::Helper::DetectOs::Openbsd < Specinfra::Helper::DetectOs
2
2
  def self.detect
3
3
  if run_command('uname -s').stdout =~ /OpenBSD/i
4
- { :family => 'OpenBSD', :release => nil }
4
+ { :family => 'openbsd', :release => nil }
5
5
  end
6
6
  end
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.0.0.beta47"
2
+ VERSION = "2.0.0.beta48"
3
3
  end
@@ -17,6 +17,8 @@ describe 'create_command_class work correctly' do
17
17
  set :os, :family => 'redhat'
18
18
  end
19
19
  it { expect(Specinfra.command.send(:create_command_class, 'file')).to eq Specinfra::Command::Redhat::Base::File }
20
+
21
+ it { expect(Specinfra.command.send(:create_command_class, 'selinux')).to eq Specinfra::Command::Linux::Base::Selinux }
20
22
  end
21
23
 
22
24
  context 'family: redhat, release: 7' do
@@ -26,11 +28,3 @@ describe 'create_command_class work correctly' do
26
28
  it { expect(Specinfra.command.send(:create_command_class, 'file')).to eq Specinfra::Command::Redhat::V7::File }
27
29
  end
28
30
  end
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta47
4
+ version: 2.0.0.beta48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-11 00:00:00.000000000 Z
11
+ date: 2014-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
@@ -132,7 +132,7 @@ files:
132
132
  - lib/specinfra/backend/powershell/support/is_port_listening.ps1
133
133
  - lib/specinfra/backend/powershell/support/is_remote_port_listening.ps1
134
134
  - lib/specinfra/backend/powershell/support/list_windows_features.ps1
135
- - lib/specinfra/backend/shellscript.rb
135
+ - lib/specinfra/backend/shell_script.rb
136
136
  - lib/specinfra/backend/ssh.rb
137
137
  - lib/specinfra/backend/winrm.rb
138
138
  - lib/specinfra/command.rb