specinfra 0.0.10 → 0.0.11

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: ed85bd6489ebcc166afd25dc73387e5cdfc40c7d
4
- data.tar.gz: b5ce3cbed78d97a0fb100ccee580f13e62041774
3
+ metadata.gz: 6118703ee530caa196ace37a17e7bb1d8e3c3eca
4
+ data.tar.gz: 59a757a847c01020d1779f615aac634489d267c0
5
5
  SHA512:
6
- metadata.gz: 6d41a358c947bd8a3a38441f3f6b5cdbc2a1e596d0ac737b44e74d0937912a721e1e0104d436b1a809dee6300ce623645999d31f20c6b81f5741b5564c41a36f
7
- data.tar.gz: 064f30d4450802ffe0fa555f74451cb98fd79cd98371d53da784f15c5f956a3acda470e2d32cef6aec6db1fe83db26b437cb2a089563c3a764a8edc4500455a9
6
+ metadata.gz: e01163f076632e187e9233343f9f2136a2c5b14da639bb4820948faf44b3f5b42681216e7eacfc57bed46f6e94eddae660db0bc69d4677077739d7f03f407ba3
7
+ data.tar.gz: a588c2c8a429eb37134b54b3bf5fa810f7aa3e20fc1361f7ea447f05c1e1ac7724f2a921cfb465352a0269680b64ef3b30892b69c4b20d9653eb832dfa6ee6f5
@@ -4,11 +4,9 @@ module SpecInfra
4
4
  eval <<-EOF
5
5
  module #{type}
6
6
  def backend(commands_object=nil)
7
- called_by_detect_os = caller[0] =~ /detect_os\.rb/
8
- if ! respond_to?(:commands) || called_by_detect_os
7
+ if ! respond_to?(:commands)
9
8
  commands_object = SpecInfra::Command::Base.new
10
9
  end
11
-
12
10
  instance = SpecInfra::Backend::#{type}.instance
13
11
  instance.set_commands(commands_object || commands)
14
12
  instance
@@ -8,7 +8,8 @@ module SpecInfra
8
8
  if property[:os_by_host][host]
9
9
  os = property[:os_by_host][host]
10
10
  else
11
- os = backend.check_os
11
+ # Set command object explicitly to avoid `stack too deep`
12
+ os = backend(SpecInfra::Command::Base.new).check_os
12
13
  property[:os_by_host][host] = os
13
14
  end
14
15
  self.class.const_get('SpecInfra').const_get('Command').const_get(os[:family]).new
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
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: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-11 00:00:00.000000000 Z
11
+ date: 2013-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler