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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab3820cc872b378eb1157615c60772812ecc51de
4
- data.tar.gz: 3fe8b65314493d58539ae0bd98ee9e58c7fa00b1
3
+ metadata.gz: 02ae335e1959787204447d1b773a79a39c266953
4
+ data.tar.gz: d69f35462442aa8478066d3133a42031082e8759
5
5
  SHA512:
6
- metadata.gz: 9a7b92a818a42e34dd8625edf47a4724794be578db5c8363bc3a8875b890545ac3fa63a8831bebd15e062986d0644127041a6abdfd6e9c974992e5e4b89d2457
7
- data.tar.gz: 52d14b2b97959fe84c6529c1c6b335218c8f5394c60c0712924cc607e5caf041009db1314e5b0d40b22ba1837ddf0667efc87cdc7d09e84a908b728b5ac9f3db
6
+ metadata.gz: 954e34b845d79e6a63dbae19abbc4898f3f722be54b7131bb24fdc73e74f67271a8cb29a094d76d72bdf3027652c4e7a3ef8bb4b7c1a00e78c5c3c956e7f2370
7
+ data.tar.gz: 7ea174d5fe37d3d81b905902796df74ec27d796529c1f24797b7c55ffa928a0b77d1c6f33bc69ef086475ca05b07e5798894fa80aea12d153cb28efaeeb8002a
@@ -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
 
@@ -22,5 +22,9 @@ class Specinfra::Command::Arch::Base::Package < Specinfra::Command::Linux::Base:
22
22
  def sync_repos
23
23
  "pacman -Syy"
24
24
  end
25
+
26
+ def remove(package, option='')
27
+ "pacman -R --noconfirm #{option} #{package}"
28
+ end
25
29
  end
26
30
  end
@@ -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
 
@@ -22,6 +22,10 @@ class Specinfra::Command::Redhat::Base::Package < Specinfra::Command::Linux::Bas
22
22
  end
23
23
  cmd = "yum -y #{option} install #{full_package}"
24
24
  end
25
+
26
+ def remove(package, option='')
27
+ "yum -y #{option} remove #{package}"
28
+ end
25
29
  end
26
30
  end
27
31
 
@@ -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 = "/opt/local/bin/pkgin list 2> /dev/null | grep -qw ^#{escape(package)}"
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
- "pkgin list | cut -f 1 -d ' ' | grep -E '^#{escape(package)}-([^-])+$' | grep -Eo '(\\.|\\w)+$'"
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> /dev/null | grep -wx '^enabled.*true$'"
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 -l #{escape(service)} status 2> /dev/null |grep -wx '^state.*online$'"
8
+ "svcs -Ho state #{escape(service)} 2>/dev/null |grep '^online$' >/dev/null"
9
9
  end
10
10
  end
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.18.1"
2
+ VERSION = "2.18.2"
3
3
  end
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 vagrant up centos65
27
- code: vagrant up centos65 --provider=digital_ocean
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.1
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-04 00:00:00.000000000 Z
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