specinfra 2.18.1 → 2.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specinfra/command.rb +1 -0
- data/lib/specinfra/command/arch/base/package.rb +4 -0
- data/lib/specinfra/command/debian/base/package.rb +4 -0
- data/lib/specinfra/command/redhat/base/package.rb +4 -0
- data/lib/specinfra/command/smartos/base/file.rb +11 -0
- data/lib/specinfra/command/smartos/base/package.rb +2 -2
- data/lib/specinfra/command/smartos/base/service.rb +2 -2
- data/lib/specinfra/version.rb +1 -1
- data/wercker.yml +2 -64
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02ae335e1959787204447d1b773a79a39c266953
|
4
|
+
data.tar.gz: d69f35462442aa8478066d3133a42031082e8759
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 954e34b845d79e6a63dbae19abbc4898f3f722be54b7131bb24fdc73e74f67271a8cb29a094d76d72bdf3027652c4e7a3ef8bb4b7c1a00e78c5c3c956e7f2370
|
7
|
+
data.tar.gz: 7ea174d5fe37d3d81b905902796df74ec27d796529c1f24797b7c55ffa928a0b77d1c6f33bc69ef086475ca05b07e5798894fa80aea12d153cb28efaeeb8002a
|
data/lib/specinfra/command.rb
CHANGED
@@ -220,6 +220,7 @@ require 'specinfra/command/solaris/v10/user'
|
|
220
220
|
# SmartOS (inherit Solaris)
|
221
221
|
require 'specinfra/command/smartos'
|
222
222
|
require 'specinfra/command/smartos/base'
|
223
|
+
require 'specinfra/command/smartos/base/file'
|
223
224
|
require 'specinfra/command/smartos/base/package'
|
224
225
|
require 'specinfra/command/smartos/base/service'
|
225
226
|
|
@@ -24,6 +24,10 @@ class Specinfra::Command::Debian::Base::Package < Specinfra::Command::Linux::Bas
|
|
24
24
|
def get_version(package, opts=nil)
|
25
25
|
"dpkg-query -f '${Status} ${Version}' -W #{package} | sed -n 's/^install ok installed //p'"
|
26
26
|
end
|
27
|
+
|
28
|
+
def remove(package, option='')
|
29
|
+
"DEBIAN_FRONTEND='noninteractive' apt-get -y #{option} remove #{package}"
|
30
|
+
end
|
27
31
|
end
|
28
32
|
end
|
29
33
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Specinfra::Command::Smartos::Base::File < Specinfra::Command::Solaris::Base::File
|
2
|
+
class << self
|
3
|
+
def get_md5sum(file)
|
4
|
+
"/usr/bin/digest -a md5 -v #{escape(file)} | cut -d '=' -f 2 | cut -c 2-"
|
5
|
+
end
|
6
|
+
|
7
|
+
def get_sha256sum(file)
|
8
|
+
"/usr/bin/digest -a sha256 -v #{escape(file)} | cut -d '=' -f 2 | cut -c 2-"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class Specinfra::Command::Smartos::Base::Package < Specinfra::Command::Solaris::Base::Package
|
2
2
|
class << self
|
3
3
|
def check_is_installed(package, version=nil)
|
4
|
-
cmd = "
|
4
|
+
cmd = "pkg_info -qE #{escape(package)}"
|
5
5
|
if version
|
6
6
|
cmd = "#{cmd}-#{escape(version)}"
|
7
7
|
end
|
@@ -9,7 +9,7 @@ class Specinfra::Command::Smartos::Base::Package < Specinfra::Command::Solaris::
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def get_version(package, opts=nil)
|
12
|
-
"
|
12
|
+
"pkg_info -E #{escape(package)} | awk -F '-' '{print $NF}'"
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
class Specinfra::Command::Smartos::Base::Service < Specinfra::Command::Solaris::Base::Service
|
2
2
|
class << self
|
3
3
|
def check_is_enabled(service, level=nil)
|
4
|
-
"svcs -l #{escape(service)} 2
|
4
|
+
"svcs -l #{escape(service)} 2>/dev/null | grep '^enabled *true$' >/dev/null"
|
5
5
|
end
|
6
6
|
|
7
7
|
def check_is_running(service)
|
8
|
-
"svcs -
|
8
|
+
"svcs -Ho state #{escape(service)} 2>/dev/null |grep '^online$' >/dev/null"
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
data/lib/specinfra/version.rb
CHANGED
data/wercker.yml
CHANGED
@@ -1,74 +1,12 @@
|
|
1
1
|
box: mizzy/serverspec-base@0.0.6
|
2
2
|
build:
|
3
3
|
steps:
|
4
|
-
- script:
|
5
|
-
name: Make $HOME/.ssh directory
|
6
|
-
code: mkdir -p $HOME/.ssh
|
7
|
-
- create-file:
|
8
|
-
name: Put SSH public key
|
9
|
-
filename: $HOME/.ssh/id_rsa.pub
|
10
|
-
overwrite: true
|
11
|
-
hide-from-log: true
|
12
|
-
content: $DIGITALOCEAN_SSH_KEY_PUBLIC
|
13
|
-
- create-file:
|
14
|
-
name: Put SSH private key
|
15
|
-
filename: $HOME/.ssh/id_rsa
|
16
|
-
overwrite: true
|
17
|
-
hide-from-log: true
|
18
|
-
content: $DIGITALOCEAN_SSH_KEY_PRIVATE
|
19
|
-
- script:
|
20
|
-
name: Run chmod 0400 $HOME/.ssh/id_rsa
|
21
|
-
code: chmod 0400 $HOME/.ssh/id_rsa
|
22
4
|
- script:
|
23
5
|
name: Run setup.sh
|
24
6
|
code: $WORKING_DIR/setup.sh
|
25
7
|
- script:
|
26
|
-
name: Run
|
27
|
-
code:
|
28
|
-
cwd: $WORKING_DIR
|
29
|
-
- script:
|
30
|
-
name: Run itamae
|
31
|
-
code: bundle exec itamae ssh --host centos65 --vagrant recipe.rb
|
32
|
-
cwd: $WORKING_DIR
|
33
|
-
- script:
|
34
|
-
name: Run vagrant reload centos65
|
35
|
-
code: vagrant reload centos65
|
36
|
-
cwd: $WORKING_DIR
|
37
|
-
- script:
|
38
|
-
name: Run rake spec:centos65
|
39
|
-
code: DIGITALOCEAN=true rake spec:centos65
|
40
|
-
cwd: $WORKING_DIR
|
41
|
-
- script:
|
42
|
-
name: Run vagrant up centos70
|
43
|
-
code: vagrant up centos70 --provider=digital_ocean
|
44
|
-
cwd: $WORKING_DIR
|
45
|
-
- script:
|
46
|
-
name: Run itamae
|
47
|
-
code: bundle exec itamae ssh --host centos70 --vagrant recipe.rb
|
48
|
-
cwd: $WORKING_DIR
|
49
|
-
- script:
|
50
|
-
name: Run vagrant reload centos70
|
51
|
-
code: vagrant reload centos70
|
52
|
-
cwd: $WORKING_DIR
|
53
|
-
- script:
|
54
|
-
name: Run rake spec:centos70
|
55
|
-
code: DIGITALOCEAN=true rake spec:centos70
|
56
|
-
cwd: $WORKING_DIR
|
57
|
-
- script:
|
58
|
-
name: Run vagrant up ubuntu1404
|
59
|
-
code: vagrant up ubuntu1404 --provider=digital_ocean
|
60
|
-
cwd: $WORKING_DIR
|
61
|
-
- script:
|
62
|
-
name: Run itamae
|
63
|
-
code: bundle exec itamae ssh --host ubuntu1404 --vagrant recipe.rb
|
64
|
-
cwd: $WORKING_DIR
|
65
|
-
- script:
|
66
|
-
name: Run vagrant reload ubuntu1404
|
67
|
-
code: vagrant reload ubuntu1404
|
68
|
-
cwd: $WORKING_DIR
|
69
|
-
- script:
|
70
|
-
name: Run rake spec:ubuntu1404
|
71
|
-
code: DIGITALOCEAN=true rake spec:ubuntu1404
|
8
|
+
name: Run walter
|
9
|
+
code: ./walter
|
72
10
|
cwd: $WORKING_DIR
|
73
11
|
|
74
12
|
after-steps:
|
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.18.
|
4
|
+
version: 2.18.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -277,6 +277,7 @@ files:
|
|
277
277
|
- lib/specinfra/command/redhat/v7/service.rb
|
278
278
|
- lib/specinfra/command/smartos.rb
|
279
279
|
- lib/specinfra/command/smartos/base.rb
|
280
|
+
- lib/specinfra/command/smartos/base/file.rb
|
280
281
|
- lib/specinfra/command/smartos/base/package.rb
|
281
282
|
- lib/specinfra/command/smartos/base/service.rb
|
282
283
|
- lib/specinfra/command/solaris.rb
|