specinfra 1.0.5 → 1.1.0

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: c2f57d9da19ec2b155235143c6a40ddd04db6800
4
- data.tar.gz: 1874bd22d423726bc588f2e488ca580fd1305677
3
+ metadata.gz: fe7b43308802b6c22f9fff57482e67176fbca74b
4
+ data.tar.gz: 64d38d4c0a17ffbe4119b439a6cfbcade30b6609
5
5
  SHA512:
6
- metadata.gz: 9eecd1ae1c866dd4aba4669c65262b33bec282af400340fcb54eab8d53c51d549c0fc1c8cb7efc946087f9345152788b7ee6f4dcae4d403068defb1226d1d946
7
- data.tar.gz: 4b1451674b7f003935a76a3797825aa06a938b64ac7e008c023acb1d54b1e04460fccbb3f2a8378b190ee4e317cb6383a02910241f1c9f6ca078c29e94b2fe0e
6
+ metadata.gz: 5815be4fb6eeaff6f77b16cd202584b94adc96098e151972d0b016f35355be6c8ef550d4c923a9e4194e34458289e5b99a3ab3a8a9ce2fea5119e367edd2fd3f
7
+ data.tar.gz: 9333597c6499c3d6abd074b1c565ab5ee331a9578feecb3aaada090135ab12cac3e309283e8e5760c0df209acecde92ccac20bfefde9535a7beb89e8af1b2328
@@ -233,6 +233,8 @@ module SpecInfra
233
233
  else
234
234
  { :family => 'FreeBSD', :release => nil }
235
235
  end
236
+ elsif run_command('uname -sr').stdout =~ /Arch/i
237
+ { :family => 'Arch', :release => nil }
236
238
  else
237
239
  { :family => 'Base', :release => nil }
238
240
  end
@@ -2,6 +2,7 @@ require "specinfra/command/base"
2
2
 
3
3
  # Linux
4
4
  require "specinfra/command/linux"
5
+ require "specinfra/command/arch"
5
6
  require "specinfra/command/debian"
6
7
  require "specinfra/command/ubuntu"
7
8
  require "specinfra/command/gentoo"
@@ -0,0 +1,37 @@
1
+ module SpecInfra
2
+ module Command
3
+ class Arch < Linux
4
+ def check_access_by_user(file, user, access)
5
+ "runuser -s /bin/sh -c \"test -#{access} #{file}\" #{user}"
6
+ end
7
+
8
+ def check_enabled(service, target="multi-user.target")
9
+ "systemctl --plain list-dependencies #{target} | grep '^#{escape(service)}.service$'"
10
+ end
11
+
12
+ def check_running(service)
13
+ "systemctl is-active #{escape(service)}.service"
14
+ end
15
+
16
+ def check_installed(package,version=nil)
17
+ if version
18
+ "pacman -Q | grep #{escape(package)} #{espace(version)}"
19
+ else
20
+ "pacman -Q | grep #{escape(package)}"
21
+ end
22
+ end
23
+
24
+ def sync_repos
25
+ "pacman -Syy"
26
+ end
27
+
28
+ def install(package)
29
+ "pacman -S --noconfirm #{package}"
30
+ end
31
+
32
+ def get_package_version(package, opts=nil)
33
+ "pacman -Qi #{package} | grep Version | awk '{print $3}'"
34
+ end
35
+ end
36
+ end
37
+ end
@@ -3,6 +3,7 @@ module SpecInfra
3
3
  [
4
4
  'Base',
5
5
  'AIX',
6
+ 'Arch',
6
7
  'Darwin',
7
8
  'Debian',
8
9
  'FreeBSD',
@@ -1,3 +1,3 @@
1
1
  module SpecInfra
2
- VERSION = "1.0.5"
2
+ VERSION = "1.1.0"
3
3
  end
data/wercker.yml CHANGED
@@ -20,57 +20,21 @@ build:
20
20
  name: Run chmod 0400 $HOME/.ssh/id_rsa
21
21
  code: chmod 0400 $HOME/.ssh/id_rsa
22
22
  - script:
23
- name: gem install rspec
24
- code: sudo gem install rspec --no-ri --no-rdoc
25
- - script:
26
- name: gem install octorelease
27
- code: sudo gem install octorelease --no-ri --no-rdoc
28
- - script:
29
- name: rake build
30
- code: rake build
31
- - script:
32
- name: gem install specinfra
33
- code: sudo gem install pkg/specinfra-*.gem --no-ri --no-rdoc
34
- - script:
35
- name: gem install serverspec
36
- code: sudo gem install serverspec --no-ri --no-rdoc
37
- - script:
38
- name: gem install berkshelf
39
- code: sudo gem install berkshelf --no-ri --no-rdoc
40
- - script:
41
- name: Run berks install
42
- code: berks install --path=cookbooks
43
- cwd: integration-test/
44
- - script:
45
- name: Get Vagrant
46
- code: wget https://dl.bintray.com/mitchellh/vagrant/vagrant_1.5.1_x86_64.deb
47
- - script:
48
- name: Install Vagrant
49
- code: sudo dpkg -i vagrant_1.5.1_x86_64.deb
50
- - script:
51
- name: Run vagrant plugin install vagrant-digitalocean
52
- code: vagrant plugin install vagrant-digitalocean
53
- - script:
54
- name: Run vagrant plugin install vagrant-omnibus
55
- code: vagrant plugin install vagrant-omnibus
23
+ name: Run setup.sh
24
+ code: $WORKING_DIR/setup.sh
56
25
  - script:
57
26
  name: Run vagrant up centos65
58
27
  code: vagrant up centos65 --provider=digital_ocean
59
- cwd: integration-test/
28
+ cwd: $WORKING_DIR
60
29
  - script:
61
30
  name: Run rake spec:centos65
62
31
  code: rake spec:centos65
63
- cwd: integration-test/
32
+ cwd: $WORKING_DIR
64
33
 
65
34
  after-steps:
66
35
  - script:
67
36
  name: Run vagrant destroy
68
37
  code: vagrant destroy centos65 --force
69
- cwd: integration-test/
38
+ cwd: $WORKING_DIR
70
39
  - 1syo/idobata-notify@0.1.1:
71
40
  token: $IDOBATA_TOKEN
72
- - wouter/irc-notify:
73
- server: irc.freenode.net
74
- port: 6667
75
- nickname: wercker
76
- channel: serverspec
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: 1.0.5
4
+ version: 1.1.0
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-04-09 00:00:00.000000000 Z
11
+ date: 2014-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -120,6 +120,7 @@ files:
120
120
  - lib/specinfra/backend/winrm.rb
121
121
  - lib/specinfra/command.rb
122
122
  - lib/specinfra/command/aix.rb
123
+ - lib/specinfra/command/arch.rb
123
124
  - lib/specinfra/command/base.rb
124
125
  - lib/specinfra/command/darwin.rb
125
126
  - lib/specinfra/command/debian.rb