boxgrinder-core 0.3.13 → 0.3.14
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/Manifest +2 -0
- data/Rakefile +1 -1
- data/boxgrinder-core.gemspec +4 -7
- data/lib/boxgrinder-core/astruct.rb +16 -0
- data/lib/boxgrinder-core/astruct_mixin.rb +59 -0
- data/lib/boxgrinder-core/helpers/exec-helper.rb +1 -1
- data/lib/boxgrinder-core/models/appliance-config.rb +4 -4
- data/lib/boxgrinder-core/models/config.rb +3 -3
- data/lib/boxgrinder-core/schemas/appliance_schema_0.8.0.yaml +2 -2
- data/lib/boxgrinder-core/schemas/appliance_schema_0.9.0.yaml +2 -2
- data/lib/boxgrinder-core/schemas/appliance_schema_0.9.6.yaml +2 -2
- data/rubygem-boxgrinder-core.spec +5 -3
- data/spec/appliance-validator-spec.rb +6 -6
- data/spec/helpers/exec-helper-spec.rb +4 -4
- metadata +6 -18
data/CHANGELOG
CHANGED
data/Manifest
CHANGED
@@ -6,6 +6,8 @@ Rakefile
|
|
6
6
|
lib/boxgrinder-core.rb
|
7
7
|
lib/boxgrinder-core/appliance-parser.rb
|
8
8
|
lib/boxgrinder-core/appliance-validator.rb
|
9
|
+
lib/boxgrinder-core/astruct.rb
|
10
|
+
lib/boxgrinder-core/astruct_mixin.rb
|
9
11
|
lib/boxgrinder-core/compat/color.rb
|
10
12
|
lib/boxgrinder-core/compat/yaml19.rb
|
11
13
|
lib/boxgrinder-core/errors.rb
|
data/Rakefile
CHANGED
@@ -26,7 +26,7 @@ Echoe.new("boxgrinder-core") do |p|
|
|
26
26
|
p.summary = "Core library for BoxGrinder"
|
27
27
|
p.url = "http://boxgrinder.org"
|
28
28
|
p.email = "info@boxgrinder.org"
|
29
|
-
p.runtime_dependencies = ['
|
29
|
+
p.runtime_dependencies = ['kwalify >=0.7.2', 'term-ansicolor >=1.0.0']
|
30
30
|
p.runtime_dependencies << 'open4 >=1.0.0' unless RUBY_PLATFORM =~ /java/
|
31
31
|
end
|
32
32
|
|
data/boxgrinder-core.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "boxgrinder-core"
|
5
|
-
s.version = "0.3.
|
5
|
+
s.version = "0.3.14"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Marek Goldmann"]
|
9
|
-
s.date = "2012-
|
9
|
+
s.date = "2012-09-04"
|
10
10
|
s.description = "Core library for BoxGrinder"
|
11
11
|
s.email = "info@boxgrinder.org"
|
12
|
-
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "lib/boxgrinder-core.rb", "lib/boxgrinder-core/appliance-parser.rb", "lib/boxgrinder-core/appliance-validator.rb", "lib/boxgrinder-core/compat/color.rb", "lib/boxgrinder-core/compat/yaml19.rb", "lib/boxgrinder-core/errors.rb", "lib/boxgrinder-core/helpers/appliance-config-helper.rb", "lib/boxgrinder-core/helpers/appliance-definition-helper.rb", "lib/boxgrinder-core/helpers/appliance-transformation-helper.rb", "lib/boxgrinder-core/helpers/exec-helper.rb", "lib/boxgrinder-core/helpers/log-helper.rb", "lib/boxgrinder-core/models/appliance-config.rb", "lib/boxgrinder-core/models/config.rb", "lib/boxgrinder-core/models/task.rb", "lib/boxgrinder-core/schemas/appliance_schema_0.8.0.yaml", "lib/boxgrinder-core/schemas/appliance_schema_0.9.0.yaml", "lib/boxgrinder-core/schemas/appliance_schema_0.9.6.yaml"]
|
13
|
-
s.files = ["CHANGELOG", "LICENSE", "Manifest", "README", "Rakefile", "lib/boxgrinder-core.rb", "lib/boxgrinder-core/appliance-parser.rb", "lib/boxgrinder-core/appliance-validator.rb", "lib/boxgrinder-core/compat/color.rb", "lib/boxgrinder-core/compat/yaml19.rb", "lib/boxgrinder-core/errors.rb", "lib/boxgrinder-core/helpers/appliance-config-helper.rb", "lib/boxgrinder-core/helpers/appliance-definition-helper.rb", "lib/boxgrinder-core/helpers/appliance-transformation-helper.rb", "lib/boxgrinder-core/helpers/exec-helper.rb", "lib/boxgrinder-core/helpers/log-helper.rb", "lib/boxgrinder-core/models/appliance-config.rb", "lib/boxgrinder-core/models/config.rb", "lib/boxgrinder-core/models/task.rb", "lib/boxgrinder-core/schemas/appliance_schema_0.8.0.yaml", "lib/boxgrinder-core/schemas/appliance_schema_0.9.0.yaml", "lib/boxgrinder-core/schemas/appliance_schema_0.9.6.yaml", "rubygem-boxgrinder-core.spec", "spec/appliance-parser-spec.rb", "spec/appliance-validator-spec.rb", "spec/helpers/appliance-config-helper-spec.rb", "spec/helpers/appliance-definition-helper-spec.rb", "spec/helpers/appliance-transformation-helper-spec.rb", "spec/helpers/exec-helper-spec.rb", "spec/helpers/log-helper-spec.rb", "spec/models/appliance-config-spec.rb", "spec/models/config-spec.rb", "spec/rcov_helper.rb", "spec/rspec/ls/one", "spec/rspec/ls/two", "spec/rspec/src/appliances/0.8.x.appl", "spec/rspec/src/appliances/0.9.x-invalid.appl", "spec/rspec/src/appliances/0.9.x.appl", "spec/rspec/src/appliances/comments.appl", "spec/rspec/src/appliances/ephemeral-repo.appl", "spec/rspec/src/appliances/full.appl", "spec/rspec/src/appliances/invalid-yaml.appl", "spec/rspec/src/appliances/legacy.appl", "spec/rspec/src/appliances/repo.appl", "spec/rspec/src/config/empty", "spec/rspec/src/config/valid", "spec/spec_helper.rb", "boxgrinder-core.gemspec"]
|
12
|
+
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "lib/boxgrinder-core.rb", "lib/boxgrinder-core/appliance-parser.rb", "lib/boxgrinder-core/appliance-validator.rb", "lib/boxgrinder-core/astruct.rb", "lib/boxgrinder-core/astruct_mixin.rb", "lib/boxgrinder-core/compat/color.rb", "lib/boxgrinder-core/compat/yaml19.rb", "lib/boxgrinder-core/errors.rb", "lib/boxgrinder-core/helpers/appliance-config-helper.rb", "lib/boxgrinder-core/helpers/appliance-definition-helper.rb", "lib/boxgrinder-core/helpers/appliance-transformation-helper.rb", "lib/boxgrinder-core/helpers/exec-helper.rb", "lib/boxgrinder-core/helpers/log-helper.rb", "lib/boxgrinder-core/models/appliance-config.rb", "lib/boxgrinder-core/models/config.rb", "lib/boxgrinder-core/models/task.rb", "lib/boxgrinder-core/schemas/appliance_schema_0.8.0.yaml", "lib/boxgrinder-core/schemas/appliance_schema_0.9.0.yaml", "lib/boxgrinder-core/schemas/appliance_schema_0.9.6.yaml"]
|
13
|
+
s.files = ["CHANGELOG", "LICENSE", "Manifest", "README", "Rakefile", "lib/boxgrinder-core.rb", "lib/boxgrinder-core/appliance-parser.rb", "lib/boxgrinder-core/appliance-validator.rb", "lib/boxgrinder-core/astruct.rb", "lib/boxgrinder-core/astruct_mixin.rb", "lib/boxgrinder-core/compat/color.rb", "lib/boxgrinder-core/compat/yaml19.rb", "lib/boxgrinder-core/errors.rb", "lib/boxgrinder-core/helpers/appliance-config-helper.rb", "lib/boxgrinder-core/helpers/appliance-definition-helper.rb", "lib/boxgrinder-core/helpers/appliance-transformation-helper.rb", "lib/boxgrinder-core/helpers/exec-helper.rb", "lib/boxgrinder-core/helpers/log-helper.rb", "lib/boxgrinder-core/models/appliance-config.rb", "lib/boxgrinder-core/models/config.rb", "lib/boxgrinder-core/models/task.rb", "lib/boxgrinder-core/schemas/appliance_schema_0.8.0.yaml", "lib/boxgrinder-core/schemas/appliance_schema_0.9.0.yaml", "lib/boxgrinder-core/schemas/appliance_schema_0.9.6.yaml", "rubygem-boxgrinder-core.spec", "spec/appliance-parser-spec.rb", "spec/appliance-validator-spec.rb", "spec/helpers/appliance-config-helper-spec.rb", "spec/helpers/appliance-definition-helper-spec.rb", "spec/helpers/appliance-transformation-helper-spec.rb", "spec/helpers/exec-helper-spec.rb", "spec/helpers/log-helper-spec.rb", "spec/models/appliance-config-spec.rb", "spec/models/config-spec.rb", "spec/rcov_helper.rb", "spec/rspec/ls/one", "spec/rspec/ls/two", "spec/rspec/src/appliances/0.8.x.appl", "spec/rspec/src/appliances/0.9.x-invalid.appl", "spec/rspec/src/appliances/0.9.x.appl", "spec/rspec/src/appliances/comments.appl", "spec/rspec/src/appliances/ephemeral-repo.appl", "spec/rspec/src/appliances/full.appl", "spec/rspec/src/appliances/invalid-yaml.appl", "spec/rspec/src/appliances/legacy.appl", "spec/rspec/src/appliances/repo.appl", "spec/rspec/src/config/empty", "spec/rspec/src/config/valid", "spec/spec_helper.rb", "boxgrinder-core.gemspec"]
|
14
14
|
s.homepage = "http://boxgrinder.org"
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Boxgrinder-core", "--main", "README"]
|
16
16
|
s.require_paths = ["lib"]
|
@@ -22,18 +22,15 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.specification_version = 3
|
23
23
|
|
24
24
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
25
|
-
s.add_runtime_dependency(%q<hashery>, [">= 1.3.0"])
|
26
25
|
s.add_runtime_dependency(%q<kwalify>, [">= 0.7.2"])
|
27
26
|
s.add_runtime_dependency(%q<term-ansicolor>, [">= 1.0.0"])
|
28
27
|
s.add_runtime_dependency(%q<open4>, [">= 1.0.0"])
|
29
28
|
else
|
30
|
-
s.add_dependency(%q<hashery>, [">= 1.3.0"])
|
31
29
|
s.add_dependency(%q<kwalify>, [">= 0.7.2"])
|
32
30
|
s.add_dependency(%q<term-ansicolor>, [">= 1.0.0"])
|
33
31
|
s.add_dependency(%q<open4>, [">= 1.0.0"])
|
34
32
|
end
|
35
33
|
else
|
36
|
-
s.add_dependency(%q<hashery>, [">= 1.3.0"])
|
37
34
|
s.add_dependency(%q<kwalify>, [">= 0.7.2"])
|
38
35
|
s.add_dependency(%q<term-ansicolor>, [">= 1.0.0"])
|
39
36
|
s.add_dependency(%q<open4>, [">= 1.0.0"])
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'boxgrinder-core/astruct_mixin'
|
2
|
+
|
3
|
+
module BoxGrinder
|
4
|
+
|
5
|
+
class AStruct < Hash
|
6
|
+
|
7
|
+
include AStructMixin
|
8
|
+
|
9
|
+
def initialize(hash=nil, cascade_for_nils=true)
|
10
|
+
cascade_for_nils! if cascade_for_nils
|
11
|
+
hash.each { |k,v| self[k]=v } if hash
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module BoxGrinder
|
2
|
+
|
3
|
+
module AStructMixin
|
4
|
+
|
5
|
+
def cascade_for_nils!
|
6
|
+
@cascade_for_nils = true
|
7
|
+
self
|
8
|
+
end
|
9
|
+
|
10
|
+
def key?(key)
|
11
|
+
super( key ) || super( key.to_sym ) || super( key.to_s )
|
12
|
+
end
|
13
|
+
|
14
|
+
def [](key)
|
15
|
+
r = [key, key.to_sym, key.to_s].find { |fk| !super(fk).nil? }
|
16
|
+
transform_entry( key, super(r) )
|
17
|
+
end
|
18
|
+
|
19
|
+
def method_missing(sym, *args, &blk)
|
20
|
+
type = sym.to_s[-1,1]
|
21
|
+
name = sym.to_s.gsub(/[=!?]$/, '').to_sym
|
22
|
+
case type
|
23
|
+
when '='
|
24
|
+
self[name] = args.first
|
25
|
+
when '!'
|
26
|
+
__send__(name, *args, &blk)
|
27
|
+
when '?'
|
28
|
+
self[name]
|
29
|
+
else
|
30
|
+
if key?(name)
|
31
|
+
self[name]
|
32
|
+
elsif @cascade_for_nils
|
33
|
+
self[name] = AStruct.new.cascade_for_nils!
|
34
|
+
self[name]
|
35
|
+
else
|
36
|
+
nil
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def transform_entry(for_key, entry)
|
42
|
+
case(entry)
|
43
|
+
when AStructMixin
|
44
|
+
entry
|
45
|
+
when Hash
|
46
|
+
entry.extend(AStructMixin)
|
47
|
+
when Array
|
48
|
+
entry.map!{|i| transform_entry(for_key, i)}
|
49
|
+
else
|
50
|
+
entry
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def inspect
|
55
|
+
"AStruct<#{super.to_s}>"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
@@ -78,7 +78,7 @@ module BoxGrinder
|
|
78
78
|
# to get reliable status for processes both on MRI and JRuby
|
79
79
|
#
|
80
80
|
# http://jira.codehaus.org/browse/JRUBY-5673
|
81
|
-
status =
|
81
|
+
status = AStruct.new(:exitstatus => 0)
|
82
82
|
|
83
83
|
fakepid, status = Process.waitpid2(pid) if process_alive?(pid)
|
84
84
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
18
18
|
|
19
19
|
require 'rubygems'
|
20
|
-
require '
|
20
|
+
require 'boxgrinder-core/astruct'
|
21
21
|
|
22
22
|
module BoxGrinder
|
23
23
|
class ApplianceConfig
|
@@ -28,14 +28,14 @@ module BoxGrinder
|
|
28
28
|
|
29
29
|
@default_repos = true
|
30
30
|
|
31
|
-
@os =
|
31
|
+
@os = AStruct.new
|
32
32
|
|
33
33
|
@os.name = nil
|
34
34
|
@os.version = nil
|
35
35
|
@os.password = nil
|
36
36
|
@os.pae = true
|
37
37
|
|
38
|
-
@hardware =
|
38
|
+
@hardware = AStruct.new
|
39
39
|
|
40
40
|
@hardware.cpus = 1
|
41
41
|
@hardware.memory = 256
|
@@ -106,7 +106,7 @@ module BoxGrinder
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def initialize_paths
|
109
|
-
@path =
|
109
|
+
@path = AStruct.new
|
110
110
|
|
111
111
|
@path.os = "#{@os.name}/#{@os.version}"
|
112
112
|
@path.version = "#{@version}.#{@release}"
|
@@ -17,12 +17,12 @@
|
|
17
17
|
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
18
18
|
|
19
19
|
require 'rubygems'
|
20
|
-
require '
|
20
|
+
require 'boxgrinder-core/astruct'
|
21
21
|
require 'yaml'
|
22
22
|
require 'etc'
|
23
23
|
|
24
24
|
module BoxGrinder
|
25
|
-
class Config <
|
25
|
+
class Config < AStruct
|
26
26
|
def initialize(values = {})
|
27
27
|
super({})
|
28
28
|
|
@@ -90,4 +90,4 @@ module BoxGrinder
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
end
|
93
|
-
end
|
93
|
+
end
|
@@ -15,7 +15,7 @@ mapping:
|
|
15
15
|
"release":
|
16
16
|
type: int
|
17
17
|
"os":
|
18
|
-
class:
|
18
|
+
class: AStruct
|
19
19
|
type: map
|
20
20
|
mapping:
|
21
21
|
"name":
|
@@ -28,7 +28,7 @@ mapping:
|
|
28
28
|
"password":
|
29
29
|
type: str
|
30
30
|
"hardware":
|
31
|
-
class:
|
31
|
+
class: AStruct
|
32
32
|
type: map
|
33
33
|
name: Hardware
|
34
34
|
mapping:
|
@@ -15,7 +15,7 @@ mapping:
|
|
15
15
|
"release":
|
16
16
|
type: int
|
17
17
|
"os":
|
18
|
-
class:
|
18
|
+
class: AStruct
|
19
19
|
type: map
|
20
20
|
mapping:
|
21
21
|
"name":
|
@@ -28,7 +28,7 @@ mapping:
|
|
28
28
|
"password":
|
29
29
|
type: str
|
30
30
|
"hardware":
|
31
|
-
class:
|
31
|
+
class: AStruct
|
32
32
|
type: map
|
33
33
|
name: Hardware
|
34
34
|
mapping:
|
@@ -15,7 +15,7 @@ mapping:
|
|
15
15
|
"release":
|
16
16
|
type: int
|
17
17
|
"os":
|
18
|
-
class:
|
18
|
+
class: AStruct
|
19
19
|
type: map
|
20
20
|
mapping:
|
21
21
|
"name":
|
@@ -28,7 +28,7 @@ mapping:
|
|
28
28
|
"password":
|
29
29
|
type: str
|
30
30
|
"hardware":
|
31
|
-
class:
|
31
|
+
class: AStruct
|
32
32
|
type: map
|
33
33
|
name: Hardware
|
34
34
|
mapping:
|
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
Summary: Core library for BoxGrinder
|
13
13
|
Name: rubygem-%{gem_name}
|
14
|
-
Version: 0.3.
|
14
|
+
Version: 0.3.14
|
15
15
|
Release: 1%{?dist}
|
16
16
|
Group: Development/Languages
|
17
17
|
License: LGPLv3+
|
@@ -20,13 +20,11 @@ Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
20
20
|
|
21
21
|
Requires: ruby(abi) = %{rubyabi}
|
22
22
|
Requires: rubygem(open4)
|
23
|
-
Requires: rubygem(hashery)
|
24
23
|
Requires: rubygem(kwalify)
|
25
24
|
Requires: rubygem(term-ansicolor)
|
26
25
|
|
27
26
|
BuildRequires: rubygem(rake)
|
28
27
|
BuildRequires: rubygem(open4)
|
29
|
-
BuildRequires: rubygem(hashery)
|
30
28
|
BuildRequires: rubygem(echoe)
|
31
29
|
BuildRequires: rubygem(kwalify)
|
32
30
|
BuildRequires: rubygems-devel
|
@@ -89,6 +87,10 @@ popd
|
|
89
87
|
%{gem_docdir}
|
90
88
|
|
91
89
|
%changelog
|
90
|
+
* Tue Sep 4 2012 Marc Savy <msavy@redhat.com> - 0.3.14
|
91
|
+
- Upstream release: 0.3.14
|
92
|
+
- [BGBUILD-373] Remove hashery dependency
|
93
|
+
|
92
94
|
* Mon Jun 18 2012 Marc Savy <msavy@redhat.com> - 0.3.13
|
93
95
|
- Upstream release: 0.3.13
|
94
96
|
- [BGBUILD-364] Validate length of appliance name
|
@@ -17,7 +17,7 @@
|
|
17
17
|
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
18
18
|
|
19
19
|
require 'boxgrinder-core/appliance-validator'
|
20
|
-
require '
|
20
|
+
require 'boxgrinder-core/astruct'
|
21
21
|
|
22
22
|
module BoxGrinder
|
23
23
|
describe ApplianceValidator do
|
@@ -32,21 +32,21 @@ module BoxGrinder
|
|
32
32
|
context "repository" do
|
33
33
|
it "should generate error when no baseurl or mirrorlist is specified for repository" do
|
34
34
|
a = []
|
35
|
-
@validator.validate_hook({},
|
35
|
+
@validator.validate_hook({}, AStruct.new(:name => 'Repository'), '/', a)
|
36
36
|
a.size.should == 1
|
37
37
|
a.first.message.should == 'Please specify either a baseurl or a mirrorlist.'
|
38
38
|
end
|
39
39
|
|
40
40
|
it "should generate error when both baseurl and mirrorlist are specified for repository" do
|
41
41
|
a = []
|
42
|
-
@validator.validate_hook({'baseurl' => 'abc', 'mirrorlist' => 'def'},
|
42
|
+
@validator.validate_hook({'baseurl' => 'abc', 'mirrorlist' => 'def'}, AStruct.new(:name => 'Repository'), '/', a)
|
43
43
|
a.size.should == 1
|
44
44
|
a.first.message.should == 'Please specify either a baseurl or a mirrorlist.'
|
45
45
|
end
|
46
46
|
|
47
47
|
it "should pass if baseurl or mirrorlist is specified for repository" do
|
48
48
|
a = []
|
49
|
-
@validator.validate_hook({'baseurl' => 'abc'},
|
49
|
+
@validator.validate_hook({'baseurl' => 'abc'}, AStruct.new(:name => 'Repository'), '/', a)
|
50
50
|
a.size.should == 0
|
51
51
|
end
|
52
52
|
end
|
@@ -54,14 +54,14 @@ module BoxGrinder
|
|
54
54
|
context "hardware" do
|
55
55
|
it "should allow only multiplicity of 64 for memory" do
|
56
56
|
a = []
|
57
|
-
@validator.validate_hook({'memory' => 235},
|
57
|
+
@validator.validate_hook({'memory' => 235}, AStruct.new(:name => 'Hardware'), '/', a)
|
58
58
|
a.size.should == 1
|
59
59
|
a.first.message.should == "Specified memory amount: 235 is invalid. The value must be a multiple of 64."
|
60
60
|
end
|
61
61
|
|
62
62
|
it "should pass if the memory is 256" do
|
63
63
|
a = []
|
64
|
-
@validator.validate_hook({'memory' => 256},
|
64
|
+
@validator.validate_hook({'memory' => 256}, AStruct.new(:name => 'Hardware'), '/', a)
|
65
65
|
a.size.should == 0
|
66
66
|
end
|
67
67
|
end
|
@@ -40,7 +40,7 @@ module BoxGrinder
|
|
40
40
|
@stdout.should_receive(:each)
|
41
41
|
@stderr.should_receive(:each)
|
42
42
|
Process.should_receive(:getpgid)
|
43
|
-
Process.should_receive(:waitpid2).with(1234).and_return([1234,
|
43
|
+
Process.should_receive(:waitpid2).with(1234).and_return([1234, AStruct.new(:exitstatus => 1)])
|
44
44
|
|
45
45
|
@o4.should_receive(:send).with(:popen4, 'exitstatus').and_return([@pid, @stdin, @stdout, @stderr])
|
46
46
|
|
@@ -51,7 +51,7 @@ module BoxGrinder
|
|
51
51
|
@stdout.should_receive(:each)
|
52
52
|
@stderr.should_receive(:each)
|
53
53
|
Process.should_receive(:getpgid)
|
54
|
-
Process.should_receive(:waitpid2).with(1234).and_return([1234,
|
54
|
+
Process.should_receive(:waitpid2).with(1234).and_return([1234, AStruct.new(:exitstatus => 1)])
|
55
55
|
|
56
56
|
@o4.should_receive(:send).with(:popen4, 'exitstatus').and_return([@pid, @stdin, @stdout, @stderr])
|
57
57
|
|
@@ -63,7 +63,7 @@ module BoxGrinder
|
|
63
63
|
@stdout.should_receive(:each)
|
64
64
|
@stderr.should_receive(:each)
|
65
65
|
Process.should_receive(:getpgid)
|
66
|
-
Process.should_receive(:waitpid2).with(1234).and_return([1234,
|
66
|
+
Process.should_receive(:waitpid2).with(1234).and_return([1234, AStruct.new(:exitstatus => 0)])
|
67
67
|
|
68
68
|
@o4.should_receive(:send).with(:popen4, 'abc').and_return([@pid, @stdin, @stdout, @stderr])
|
69
69
|
|
@@ -85,7 +85,7 @@ module BoxGrinder
|
|
85
85
|
@stdout.should_receive(:each)
|
86
86
|
@stderr.should_receive(:each)
|
87
87
|
Process.should_receive(:getpgid)
|
88
|
-
Process.should_receive(:waitpid2).with(1234).and_return([1234,
|
88
|
+
Process.should_receive(:waitpid2).with(1234).and_return([1234, AStruct.new(:exitstatus => 0)])
|
89
89
|
|
90
90
|
@helper = ExecHelper.new(:log => log)
|
91
91
|
@o4.should_receive(:send).with(:popen4, "ala ma kota i jest fajnie").and_return([@pid, @stdin, @stdout, @stderr])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boxgrinder-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.14
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,24 +9,8 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: hashery
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 1.3.0
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 1.3.0
|
30
14
|
- !ruby/object:Gem::Dependency
|
31
15
|
name: kwalify
|
32
16
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,6 +70,8 @@ extra_rdoc_files:
|
|
86
70
|
- lib/boxgrinder-core.rb
|
87
71
|
- lib/boxgrinder-core/appliance-parser.rb
|
88
72
|
- lib/boxgrinder-core/appliance-validator.rb
|
73
|
+
- lib/boxgrinder-core/astruct.rb
|
74
|
+
- lib/boxgrinder-core/astruct_mixin.rb
|
89
75
|
- lib/boxgrinder-core/compat/color.rb
|
90
76
|
- lib/boxgrinder-core/compat/yaml19.rb
|
91
77
|
- lib/boxgrinder-core/errors.rb
|
@@ -109,6 +95,8 @@ files:
|
|
109
95
|
- lib/boxgrinder-core.rb
|
110
96
|
- lib/boxgrinder-core/appliance-parser.rb
|
111
97
|
- lib/boxgrinder-core/appliance-validator.rb
|
98
|
+
- lib/boxgrinder-core/astruct.rb
|
99
|
+
- lib/boxgrinder-core/astruct_mixin.rb
|
112
100
|
- lib/boxgrinder-core/compat/color.rb
|
113
101
|
- lib/boxgrinder-core/compat/yaml19.rb
|
114
102
|
- lib/boxgrinder-core/errors.rb
|