specinfra 2.0.0.beta40 → 2.0.0.beta41

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: 415fa68c9465d8581bed706262749f345b44ffca
4
- data.tar.gz: 8c972ee50cbd48223f08516e318e6433fc0d2620
3
+ metadata.gz: 30b73b82ccf55b2f7047d78b079e9ae2fadbe0e7
4
+ data.tar.gz: 47df260b0df6d2185fdd0513ecb1bcd8fdde4fc8
5
5
  SHA512:
6
- metadata.gz: c359f55bf22ff89d027966259e9437f6889364046497fa3333a5af2caa5cccf01aa49aab7f49ef8b1b73940f1a9413fdaf055a124074181a8e470b4f0d36dfa6
7
- data.tar.gz: f95f1216c907051bff437c917c8099a6e762272e1820ba459e11f8b9de496b21dab087ebd3b5e875f6493f9da144cfa49ff92be8c924872a09d735696de62ff1
6
+ metadata.gz: 1d496d2017cf292f64f487765f81e69b8a64954522d31aea4d2ab90e62e1e8903bb8b5421e0233c93097e59614d880c5c2e76e947c1173928c56040c60b5ecf0
7
+ data.tar.gz: 3ee92a0a6782fccdb59ad4151a661df3fe4b059c01352b61fe03437d82b5dc387b825819c9c1ac6789bb482b2ba401ba1c39d6f47efb5e7690cb272029a57b11
@@ -115,7 +115,7 @@ module Specinfra::Backend
115
115
 
116
116
  channel.on_extended_data do |ch, type, data|
117
117
  if data.match /you must have a tty to run sudo/
118
- abort 'Please set "Specinfra.configuration.request_pty = true" or "c.request_pty = true" in your spec_helper.rb or other appropriate file.'
118
+ abort 'Please write "set :request_pty, true" in your spec_helper.rb or other appropriate file.'
119
119
  end
120
120
 
121
121
  if data.match /^sudo: no tty present and no askpass program specified/
@@ -12,9 +12,9 @@ class Specinfra::Command::Arch::Base::Package < Specinfra::Command::Linux::Base:
12
12
  "pacman -Qi #{package} | grep Version | awk '{print $3}'"
13
13
  end
14
14
 
15
- def install(package, version=nil)
15
+ def install(package, version=nil, option='')
16
16
  # Pacman doesn't support to install specific version.
17
- "pacman -S --noconfirm #{package}"
17
+ "pacman -S --noconfirm #{option} #{package}"
18
18
  end
19
19
 
20
20
  # Should this method be here or not ?
@@ -17,9 +17,9 @@ class Specinfra::Command::Darwin::Base::Package < Specinfra::Command::Base::Pack
17
17
  cmd = "#{cmd} | grep '^version: #{escape(version)}'" if version
18
18
  end
19
19
 
20
- def install(package, version=nil)
20
+ def install(package, version=nil, option='')
21
21
  # Homebrew doesn't support to install specific version.
22
- cmd = "brew install '#{package}'"
22
+ cmd = "brew install #{option} '#{package}'"
23
23
  end
24
24
  end
25
25
  end
@@ -12,13 +12,13 @@ class Specinfra::Command::Debian::Base::Package < Specinfra::Command::Linux::Bas
12
12
 
13
13
  alias :check_is_installed_by_apt :check_is_installed
14
14
 
15
- def install(package, version=nil)
15
+ def install(package, version=nil, option='')
16
16
  if version
17
17
  full_package = "#{package}=#{version}"
18
18
  else
19
19
  full_package = package
20
20
  end
21
- "DEBIAN_FRONTEND='noninteractive' apt-get -y install #{full_package}"
21
+ "DEBIAN_FRONTEND='noninteractive' apt-get -y #{option} install #{full_package}"
22
22
  end
23
23
 
24
24
  def get_version(package, opts=nil)
@@ -8,8 +8,8 @@ class Specinfra::Command::Freebsd::Base::Package < Specinfra::Command::Base::Pac
8
8
  end
9
9
  end
10
10
 
11
- def install(package, version=nil)
12
- "pkg_add -r install #{package}"
11
+ def install(package, version=nil, option='')
12
+ "pkg_add -r #{option} install #{package}"
13
13
  end
14
14
 
15
15
  def get_version(package, opts=nil)
@@ -8,8 +8,8 @@ class Specinfra::Command::Freebsd::V10::Package < Specinfra::Command::Freebsd::B
8
8
  end
9
9
  end
10
10
 
11
- def install(package, version=nil)
12
- "pkg install -y #{package}"
11
+ def install(package, version=nil, option='')
12
+ "pkg install -y #{option} #{package}"
13
13
  end
14
14
 
15
15
  def get_version(package, opts=nil)
@@ -10,8 +10,8 @@ class Specinfra::Command::Nixos::Base::Package < Specinfra::Command::Linux::Base
10
10
 
11
11
  alias :check_is_installed_by_nix :check_is_installed
12
12
 
13
- def install(package, version=nil)
14
- "nix-env -i #{package}"
13
+ def install(package, version=nil, option='')
14
+ "nix-env -i #{option} #{package}"
15
15
  end
16
16
  end
17
17
  end
@@ -8,8 +8,8 @@ class Specinfra::Command::Openbsd::Base::Package < Specinfra::Command::Base::Pac
8
8
  end
9
9
  end
10
10
 
11
- def install(package, version=nil)
12
- "pkg_add #{package}"
11
+ def install(package, version=nil, option='')
12
+ "pkg_add #{option} #{package}"
13
13
  end
14
14
  end
15
15
  end
@@ -14,13 +14,13 @@ class Specinfra::Command::Redhat::Base::Package < Specinfra::Command::Linux::Bas
14
14
  "rpm -qi #{package} | grep Version | awk '{print $3}'"
15
15
  end
16
16
 
17
- def install(package, version=nil)
17
+ def install(package, version=nil, option='')
18
18
  if version
19
19
  full_package = "#{package}-#{version}"
20
20
  else
21
21
  full_package = package
22
22
  end
23
- cmd = "yum -y install #{full_package}"
23
+ cmd = "yum -y #{option} install #{full_package}"
24
24
  end
25
25
  end
26
26
  end
@@ -10,8 +10,8 @@ class Specinfra::Command::Suse::Base::Package < Specinfra::Command::Linux::Base:
10
10
 
11
11
  alias :check_is_installed_by_rpm :check_is_installed
12
12
 
13
- def install(package, version=nil)
14
- cmd = "zypper -n install #{package}"
13
+ def install(package, version=nil, option='')
14
+ cmd = "zypper -n #{option} install #{package}"
15
15
  end
16
16
 
17
17
  def get_version(package, opts=nil)
@@ -36,7 +36,7 @@ module Specinfra
36
36
  def method_missing(meth, val=nil)
37
37
  key = meth.to_s
38
38
  key.gsub!(/=$/, '')
39
- if val
39
+ if ! val.nil?
40
40
  instance_variable_set("@#{key}", val)
41
41
  RSpec.configuration.send(:"#{key}=", val) if defined?(RSpec)
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.0.0.beta40"
2
+ VERSION = "2.0.0.beta41"
3
3
  end
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.beta40
4
+ version: 2.0.0.beta41
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-08-25 00:00:00.000000000 Z
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh