boxgrinder-core 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +5 -0
- data/Manifest +0 -29
- data/Rakefile +7 -12
- data/boxgrinder-core.gemspec +2 -2
- data/lib/boxgrinder-core/models/appliance-config.rb +2 -0
- data/lib/boxgrinder-core/schemas/appliance_schema_0.8.0.yaml +3 -0
- data/lib/boxgrinder-core/schemas/appliance_schema_0.9.0.yaml +3 -0
- data/rubygem-boxgrinder-core.spec +8 -3
- data/spec/appliance-parser-spec.rb +1 -0
- data/spec/appliance-validator-spec.rb +1 -0
- data/spec/helpers/appliance-config-helper-spec.rb +1 -0
- data/spec/helpers/appliance-definition-helper-spec.rb +13 -2
- data/spec/helpers/appliance-transformation-helper-spec.rb +1 -0
- data/spec/helpers/exec-helper-spec.rb +1 -0
- data/spec/helpers/log-helper-spec.rb +1 -0
- data/spec/models/config-spec.rb +1 -0
- metadata +4 -4
data/CHANGELOG
CHANGED
data/Manifest
CHANGED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
CHANGELOG
|
|
2
|
-
LICENSE
|
|
3
|
-
Manifest
|
|
4
|
-
README
|
|
5
|
-
Rakefile
|
|
6
|
-
boxgrinder-core.gemspec
|
|
7
|
-
lib/boxgrinder-core.rb
|
|
8
|
-
lib/boxgrinder-core/appliance-parser.rb
|
|
9
|
-
lib/boxgrinder-core/appliance-validator.rb
|
|
10
|
-
lib/boxgrinder-core/errors.rb
|
|
11
|
-
lib/boxgrinder-core/helpers/appliance-config-helper.rb
|
|
12
|
-
lib/boxgrinder-core/helpers/appliance-definition-helper.rb
|
|
13
|
-
lib/boxgrinder-core/helpers/appliance-transformation-helper.rb
|
|
14
|
-
lib/boxgrinder-core/helpers/exec-helper.rb
|
|
15
|
-
lib/boxgrinder-core/helpers/log-helper.rb
|
|
16
|
-
lib/boxgrinder-core/models/appliance-config.rb
|
|
17
|
-
lib/boxgrinder-core/models/config.rb
|
|
18
|
-
lib/boxgrinder-core/models/task.rb
|
|
19
|
-
lib/boxgrinder-core/schemas/appliance_schema_0.8.0.yaml
|
|
20
|
-
lib/boxgrinder-core/schemas/appliance_schema_0.9.0.yaml
|
|
21
|
-
rubygem-boxgrinder-core.spec
|
|
22
|
-
spec/appliance-parser-spec.rb
|
|
23
|
-
spec/appliance-validator-spec.rb
|
|
24
|
-
spec/helpers/appliance-config-helper-spec.rb
|
|
25
|
-
spec/helpers/appliance-definition-helper-spec.rb
|
|
26
|
-
spec/helpers/appliance-transformation-helper-spec.rb
|
|
27
|
-
spec/helpers/exec-helper-spec.rb
|
|
28
|
-
spec/helpers/log-helper-spec.rb
|
|
29
|
-
spec/models/config-spec.
|
data/Rakefile
CHANGED
|
@@ -17,12 +17,7 @@
|
|
|
17
17
|
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
18
18
|
|
|
19
19
|
require 'rubygems'
|
|
20
|
-
|
|
21
|
-
begin
|
|
22
|
-
require 'rake/dsl'
|
|
23
|
-
rescue LoadError
|
|
24
|
-
end
|
|
25
|
-
|
|
20
|
+
require 'rspec/core/rake_task'
|
|
26
21
|
require 'echoe'
|
|
27
22
|
|
|
28
23
|
Echoe.new("boxgrinder-core") do |p|
|
|
@@ -35,16 +30,16 @@ Echoe.new("boxgrinder-core") do |p|
|
|
|
35
30
|
p.runtime_dependencies << 'open4 >=1.0.0' unless RUBY_PLATFORM =~ /java/
|
|
36
31
|
end
|
|
37
32
|
|
|
38
|
-
|
|
33
|
+
RSpec::Core::RakeTask.new('spec') do |t|
|
|
39
34
|
t.rcov = false
|
|
40
|
-
t.
|
|
41
|
-
t.
|
|
35
|
+
t.pattern = "spec/**/*-spec.rb"
|
|
36
|
+
t.rspec_opts = ['--colour', '--format', 'doc', '-b']
|
|
42
37
|
t.verbose = true
|
|
43
38
|
end
|
|
44
39
|
|
|
45
|
-
|
|
46
|
-
t.
|
|
47
|
-
t.
|
|
40
|
+
RSpec::Core::RakeTask.new('spec:coverage') do |t|
|
|
41
|
+
t.pattern = "spec/**/*-spec.rb"
|
|
42
|
+
t.rspec_opts = ['--colour', '--format', 'html', '--out', 'pkg/rspec_report.html', '-b']
|
|
48
43
|
t.rcov = true
|
|
49
44
|
t.rcov_opts = ['--exclude', 'spec,teamcity/*,/usr/lib/ruby/,.gem/ruby,/boxgrinder-build/,/gems/']
|
|
50
45
|
t.verbose = true
|
data/boxgrinder-core.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{boxgrinder-core}
|
|
5
|
-
s.version = "0.3.
|
|
5
|
+
s.version = "0.3.5"
|
|
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 = %q{2011-
|
|
9
|
+
s.date = %q{2011-08-17}
|
|
10
10
|
s.description = %q{Core library for BoxGrinder}
|
|
11
11
|
s.email = %q{info@boxgrinder.org}
|
|
12
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/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"]
|
|
@@ -59,6 +59,9 @@ mapping:
|
|
|
59
59
|
- type: str # Now allowing spaces due to group labels (these map to real groups with no spaces, but confuses users) https://issues.jboss.org/browse/BGBUILD-220
|
|
60
60
|
pattern: /^[\w\-+.@#\s]+$/ #fedora packaging standard http://bit.ly/h0JN9u (plus a few more, disallow symbols)
|
|
61
61
|
length: { min: 1 }
|
|
62
|
+
"default_repos":
|
|
63
|
+
type: bool
|
|
64
|
+
default: true
|
|
62
65
|
"repos":
|
|
63
66
|
type: seq
|
|
64
67
|
sequence:
|
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
Summary: Core library for BoxGrinder
|
|
7
7
|
Name: rubygem-%{gemname}
|
|
8
|
-
Version: 0.3.
|
|
8
|
+
Version: 0.3.5
|
|
9
9
|
Release: 1%{?dist}
|
|
10
10
|
Group: Development/Languages
|
|
11
11
|
License: LGPLv3+
|
|
12
12
|
URL: http://boxgrinder.org/
|
|
13
13
|
Source0: http://rubygems.org/gems/%{gemname}-%{version}.gem
|
|
14
|
-
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
15
14
|
|
|
16
15
|
Requires: ruby(abi) = %{rubyabi}
|
|
17
16
|
Requires: rubygem(open4)
|
|
@@ -19,11 +18,12 @@ Requires: rubygem(hashery)
|
|
|
19
18
|
Requires: rubygem(kwalify)
|
|
20
19
|
|
|
21
20
|
BuildRequires: rubygem(rake)
|
|
22
|
-
BuildRequires: rubygem(rspec)
|
|
23
21
|
BuildRequires: rubygem(open4)
|
|
24
22
|
BuildRequires: rubygem(hashery)
|
|
25
23
|
BuildRequires: rubygem(echoe)
|
|
26
24
|
BuildRequires: rubygem(kwalify)
|
|
25
|
+
# Use rspec-core until rspec are migrated to RSpec 2.x
|
|
26
|
+
BuildRequires: rubygem(rspec-core)
|
|
27
27
|
|
|
28
28
|
BuildArch: noarch
|
|
29
29
|
Provides: rubygem(%{gemname}) = %{version}
|
|
@@ -76,6 +76,11 @@ popd
|
|
|
76
76
|
%{gemdir}/doc/%{gemname}-%{version}
|
|
77
77
|
|
|
78
78
|
%changelog
|
|
79
|
+
* Wed Jul 13 2011 Marek Goldmann <mgoldman@redhat.com> - 0.3.5-1
|
|
80
|
+
- Upstream release: 0.3.5
|
|
81
|
+
- [BGBUILD-273] Move to RSpec2
|
|
82
|
+
- [BGBUILD-275] default_repos setting is not included in schema and is not documented
|
|
83
|
+
|
|
79
84
|
* Tue Jun 28 2011 Marc Savy <msavy@redhat.com> - 0.3.4-1
|
|
80
85
|
- Upstream release: 0.3.4
|
|
81
86
|
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
18
18
|
|
|
19
19
|
require 'rubygems'
|
|
20
|
+
require 'rspec'
|
|
20
21
|
require 'boxgrinder-core/helpers/appliance-definition-helper'
|
|
21
22
|
require 'boxgrinder-core/appliance-parser'
|
|
22
23
|
|
|
@@ -161,9 +162,8 @@ module BoxGrinder
|
|
|
161
162
|
|
|
162
163
|
@helper.appliance_parser.should_receive(:parse_definition).ordered.with('a.appl').and_return(appliance_a)
|
|
163
164
|
@helper.appliance_parser.should_receive(:parse_definition).ordered.with('./b2.appl').and_return(appliance_b2)
|
|
164
|
-
@helper.appliance_parser.should_receive(:parse_definition).ordered.with('./c.appl').and_return(appliance_c)
|
|
165
|
+
@helper.appliance_parser.should_receive(:parse_definition).ordered.once.with('./c.appl').and_return(appliance_c)
|
|
165
166
|
@helper.appliance_parser.should_receive(:parse_definition).ordered.with('./b1.appl').and_return(appliance_b1)
|
|
166
|
-
@helper.appliance_parser.should_not_receive(:parse_definition).ordered.with('./c.appl')
|
|
167
167
|
|
|
168
168
|
@helper.read_definitions("a.appl")
|
|
169
169
|
|
|
@@ -179,6 +179,17 @@ module BoxGrinder
|
|
|
179
179
|
appliance.name.should == 'abc'
|
|
180
180
|
appliance.os.version.should == '13'
|
|
181
181
|
appliance.hardware.partitions['/']['size'].should == 6
|
|
182
|
+
appliance.default_repos.should == true
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
it "should read YAML content instead of loading a file with default repos disabled" do
|
|
186
|
+
yaml = "name: abc\nos:\n name: fedora\n version: '13'\npackages:\n - @core\nhardware:\n partitions:\n \"/\":\n size: 6\ndefault_repos: false"
|
|
187
|
+
appliance = @helper.read_definitions(yaml).last
|
|
188
|
+
|
|
189
|
+
appliance.name.should == 'abc'
|
|
190
|
+
appliance.os.version.should == '13'
|
|
191
|
+
appliance.hardware.partitions['/']['size'].should == 6
|
|
192
|
+
appliance.default_repos.should == false
|
|
182
193
|
end
|
|
183
194
|
|
|
184
195
|
it "should read invalid YAML content" do #ApplianceValidationError: :
|
data/spec/models/config-spec.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: boxgrinder-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 25
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 3
|
|
9
|
-
-
|
|
10
|
-
version: 0.3.
|
|
9
|
+
- 5
|
|
10
|
+
version: 0.3.5
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Marek Goldmann
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-
|
|
18
|
+
date: 2011-08-17 00:00:00 +02:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|