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 +4 -4
- data/lib/specinfra/backend/dockerfile.rb +2 -1
- data/lib/specinfra/backend/{shellscript.rb → shell_script.rb} +3 -4
- data/lib/specinfra/backend.rb +1 -1
- data/lib/specinfra/command/openbsd/base/interface.rb +4 -0
- data/lib/specinfra/command/openbsd/base/service.rb +2 -2
- data/lib/specinfra/helper/detect_os/openbsd.rb +1 -1
- data/lib/specinfra/version.rb +1 -1
- data/spec/command/factory_spec.rb +2 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 577fd3b2ff3d56cf563cae10864298009865e6d4
|
4
|
+
data.tar.gz: 9492bf5c9b869f970fe038cf922d51f29ff8df23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c39424a9216178cc408ec808164e122846646761f36aaf3b5f09d7e978758667c8429da2a50f285c0e5e721af5f1bfd23a409e6673bf9ec4cdb4948c0ee4ebb
|
7
|
+
data.tar.gz: 59806cff36f20271f23f12f027f57ecf8905e220db0ef80347c82abad76a7dd3e24a93596f92fb939d7739e91d91d9ffe199edf50bc386b9dc9f66d7e0c20814
|
@@ -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(
|
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(
|
17
|
-
@file = file
|
16
|
+
def initialize(lines)
|
18
17
|
@lines = lines
|
19
18
|
end
|
20
19
|
|
21
20
|
def call(*args)
|
22
|
-
|
21
|
+
puts @lines
|
23
22
|
end
|
24
23
|
end
|
25
24
|
end
|
data/lib/specinfra/backend.rb
CHANGED
@@ -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
|
-
"
|
4
|
+
"rcctl status #{escape(service)}"
|
5
5
|
end
|
6
6
|
|
7
7
|
def check_is_running(service)
|
8
|
-
"
|
8
|
+
"rcctl check #{escape(service)}"
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
data/lib/specinfra/version.rb
CHANGED
@@ -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.
|
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
|
+
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/
|
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
|