boxgrinder-build 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. data/CHANGELOG +12 -0
  2. data/Manifest +6 -5
  3. data/README.md +1 -1
  4. data/Rakefile +13 -20
  5. data/boxgrinder-build.gemspec +7 -10
  6. data/lib/boxgrinder-build/helpers/aws-helper.rb +81 -0
  7. data/lib/boxgrinder-build/helpers/ec2-helper.rb +182 -0
  8. data/lib/boxgrinder-build/helpers/guestfs-helper.rb +5 -1
  9. data/lib/boxgrinder-build/helpers/s3-helper.rb +124 -0
  10. data/lib/boxgrinder-build/plugins/delivery/ebs/ebs-plugin.rb +95 -299
  11. data/lib/boxgrinder-build/plugins/delivery/elastichosts/elastichosts-plugin.rb +2 -1
  12. data/lib/boxgrinder-build/plugins/delivery/s3/s3-plugin.rb +67 -133
  13. data/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb +15 -14
  14. data/rubygem-boxgrinder-build.spec +23 -28
  15. data/spec/appliance-spec.rb +1 -0
  16. data/spec/helpers/augeas-helper-spec.rb +1 -0
  17. data/spec/helpers/ec2-helper-spec.rb +260 -0
  18. data/spec/helpers/guestfs-helper-spec.rb +34 -7
  19. data/spec/helpers/image-helper-spec.rb +1 -0
  20. data/spec/helpers/linux-helper-spec.rb +1 -0
  21. data/spec/helpers/package-helper-spec.rb +1 -0
  22. data/spec/helpers/plugin-helper-spec.rb +1 -0
  23. data/spec/helpers/s3-helper-spec.rb +168 -0
  24. data/spec/managers/plugin-manager-spec.rb +1 -0
  25. data/spec/plugins/base-plugin-spec.rb +1 -1
  26. data/spec/plugins/delivery/ebs/ebs-plugin-spec.rb +115 -204
  27. data/spec/plugins/delivery/elastichosts/elastichosts-plugin-spec.rb +5 -4
  28. data/spec/plugins/delivery/local/local-plugin-spec.rb +1 -0
  29. data/spec/plugins/delivery/s3/s3-plugin-spec.rb +143 -134
  30. data/spec/plugins/delivery/sftp/sftp-plugin-spec.rb +1 -0
  31. data/spec/plugins/os/centos/centos-plugin-spec.rb +1 -0
  32. data/spec/plugins/os/fedora/fedora-plugin-spec.rb +1 -0
  33. data/spec/plugins/os/rhel/rhel-plugin-spec.rb +1 -0
  34. data/spec/plugins/os/rpm-based/kickstart-spec.rb +5 -1
  35. data/spec/plugins/os/rpm-based/rpm-based-os-plugin-spec.rb +9 -7
  36. data/spec/plugins/os/rpm-based/rpm-dependency-validator-spec.rb +1 -0
  37. data/spec/plugins/os/sl/sl-plugin-spec.rb +1 -0
  38. data/spec/plugins/platform/ec2/ec2-plugin-spec.rb +1 -0
  39. data/spec/plugins/platform/virtualbox/virtualbox-plugin-spec.rb +1 -0
  40. data/spec/plugins/platform/vmware/vmware-plugin-spec.rb +1 -0
  41. metadata +17 -23
@@ -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-build/plugins/delivery/sftp/sftp-plugin'
21
22
 
22
23
  module BoxGrinder
@@ -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-build/plugins/os/centos/centos-plugin'
21
22
  require 'hashery/opencascade'
22
23
 
@@ -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-build/plugins/os/fedora/fedora-plugin'
21
22
  require 'hashery/opencascade'
22
23
 
@@ -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-build/plugins/os/rhel/rhel-plugin'
21
22
  require 'hashery/opencascade'
22
23
 
@@ -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-build/plugins/os/rpm-based/kickstart'
21
22
  require 'hashery/opencascade'
22
23
 
@@ -32,6 +33,8 @@ module BoxGrinder
32
33
  def prepare_kickstart(repos = {})
33
34
  @config = mock('Config')
34
35
  @appliance_config = mock('ApplianceConfig')
36
+ @dir = mock('Some directory')
37
+ @dir.stub!(:tmp).and_return('baloney')
35
38
 
36
39
  @appliance_config.stub!(:path).and_return(OpenCascade.new({:build => 'build/path'}))
37
40
  @appliance_config.stub!(:name).and_return('full')
@@ -39,8 +42,9 @@ module BoxGrinder
39
42
  @appliance_config.stub!(:release).and_return(0)
40
43
  @appliance_config.stub!(:os).and_return(OpenCascade.new({:name => 'fedora', :version => '11', :password => 'boxgrinder'}))
41
44
  @appliance_config.stub!(:packages).and_return(["gcc-c++", "wget"])
45
+ @appliance_config.stub!(:repos).and_return(repos)
42
46
 
43
- @kickstart = Kickstart.new(@config, @appliance_config, repos, OpenCascade.new(:base => 'a/base/dir'))
47
+ @kickstart = Kickstart.new(@config, @appliance_config, @dir, OpenCascade.new(:base => 'a/base/dir'))
44
48
  end
45
49
 
46
50
  describe ".build_definition" do
@@ -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-build/plugins/os/rpm-based/rpm-based-os-plugin'
21
22
  require 'hashery/opencascade'
22
23
 
@@ -242,14 +243,15 @@ module BoxGrinder
242
243
  it "should execute additional steps for Fedora 15" do
243
244
  @appliance_config.stub!(:os).and_return(OpenCascade.new({:name => 'fedora', :version => '15'}))
244
245
  @appliance_config.should_receive(:default_repos).and_return(true)
245
- @plugin.should_receive(:add_repos).with({})
246
+ @plugin.should_receive(:add_repos).ordered.with({})
246
247
 
247
248
  do_build do |guestfs, guestfs_helper|
248
- @plugin.should_receive(:disable_biosdevname).with(guestfs)
249
- @plugin.should_receive(:change_runlevel).with(guestfs)
250
- @plugin.should_receive(:disable_netfs).with(guestfs)
251
- @plugin.should_receive(:link_mtab).with(guestfs)
252
- @plugin.should_receive(:recreate_rpm_database).with(guestfs, guestfs_helper)
249
+ @plugin.should_receive(:disable_biosdevname).ordered.with(guestfs)
250
+ @plugin.should_receive(:change_runlevel).ordered.with(guestfs)
251
+ @plugin.should_receive(:disable_netfs).ordered.with(guestfs)
252
+ @plugin.should_receive(:link_mtab).ordered.with(guestfs)
253
+ @plugin.should_receive(:recreate_rpm_database).ordered.with(guestfs, guestfs_helper)
254
+ @plugin.should_receive(:execute_post).ordered.with(guestfs_helper)
253
255
  end
254
256
 
255
257
  @plugin.build_with_appliance_creator('jeos.appl')
@@ -296,7 +298,7 @@ module BoxGrinder
296
298
  end
297
299
 
298
300
  describe ".cleanup_after_appliance_creator" do
299
- it "should cleanup after appliance creator (surprisngly!)" do
301
+ it "should cleanup after appliance creator (surprisingly!)" do
300
302
  Process.should_receive(:kill).with("TERM", 12345)
301
303
  Process.should_receive(:wait).with(12345)
302
304
 
@@ -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-build/plugins/os/rpm-based/rpm-dependency-validator'
21
22
  require 'hashery/opencascade'
22
23
 
@@ -17,6 +17,7 @@
17
17
  # 02110-1301 USA, or see the FSF site: http://www.fsf.org.
18
18
 
19
19
  require 'boxgrinder-build/plugins/os/sl/sl-plugin'
20
+ require 'rspec'
20
21
  require 'hashery/opencascade'
21
22
 
22
23
  module BoxGrinder
@@ -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-build/plugins/platform/ec2/ec2-plugin'
21
22
  require 'boxgrinder-core/helpers/log-helper'
22
23
  require 'hashery/opencascade'
@@ -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-build/plugins/platform/virtualbox/virtualbox-plugin'
21
22
  require 'hashery/opencascade'
22
23
 
@@ -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-build/plugins/platform/vmware/vmware-plugin'
21
22
  require 'hashery/opencascade'
22
23
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxgrinder-build
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 51
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 3
10
- version: 0.9.3
9
+ - 4
10
+ version: 0.9.4
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-06-28 00:00:00 +02:00
18
+ date: 2011-08-17 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -35,7 +35,7 @@ dependencies:
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
38
- name: aws
38
+ name: aws-sdk
39
39
  prerelease: false
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
@@ -49,7 +49,7 @@ dependencies:
49
49
  type: :runtime
50
50
  version_requirements: *id002
51
51
  - !ruby/object:Gem::Dependency
52
- name: amazon-ec2
52
+ name: net-sftp
53
53
  prerelease: false
54
54
  requirement: &id003 !ruby/object:Gem::Requirement
55
55
  none: false
@@ -63,7 +63,7 @@ dependencies:
63
63
  type: :runtime
64
64
  version_requirements: *id003
65
65
  - !ruby/object:Gem::Dependency
66
- name: net-sftp
66
+ name: net-ssh
67
67
  prerelease: false
68
68
  requirement: &id004 !ruby/object:Gem::Requirement
69
69
  none: false
@@ -77,7 +77,7 @@ dependencies:
77
77
  type: :runtime
78
78
  version_requirements: *id004
79
79
  - !ruby/object:Gem::Dependency
80
- name: net-ssh
80
+ name: progressbar
81
81
  prerelease: false
82
82
  requirement: &id005 !ruby/object:Gem::Requirement
83
83
  none: false
@@ -91,7 +91,7 @@ dependencies:
91
91
  type: :runtime
92
92
  version_requirements: *id005
93
93
  - !ruby/object:Gem::Dependency
94
- name: progressbar
94
+ name: rest-client
95
95
  prerelease: false
96
96
  requirement: &id006 !ruby/object:Gem::Requirement
97
97
  none: false
@@ -104,20 +104,6 @@ dependencies:
104
104
  version: "0"
105
105
  type: :runtime
106
106
  version_requirements: *id006
107
- - !ruby/object:Gem::Dependency
108
- name: rest-client
109
- prerelease: false
110
- requirement: &id007 !ruby/object:Gem::Requirement
111
- none: false
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- hash: 3
116
- segments:
117
- - 0
118
- version: "0"
119
- type: :runtime
120
- version_requirements: *id007
121
107
  description: A tool for creating appliances from simple plain text files for various virtual environments.
122
108
  email: info@boxgrinder.org
123
109
  executables:
@@ -132,12 +118,15 @@ extra_rdoc_files:
132
118
  - lib/boxgrinder-build.rb
133
119
  - lib/boxgrinder-build/appliance.rb
134
120
  - lib/boxgrinder-build/helpers/augeas-helper.rb
121
+ - lib/boxgrinder-build/helpers/aws-helper.rb
122
+ - lib/boxgrinder-build/helpers/ec2-helper.rb
135
123
  - lib/boxgrinder-build/helpers/guestfs-helper.rb
136
124
  - lib/boxgrinder-build/helpers/image-helper.rb
137
125
  - lib/boxgrinder-build/helpers/linux-helper.rb
138
126
  - lib/boxgrinder-build/helpers/package-helper.rb
139
127
  - lib/boxgrinder-build/helpers/plugin-helper.rb
140
128
  - lib/boxgrinder-build/helpers/qemu.wrapper
129
+ - lib/boxgrinder-build/helpers/s3-helper.rb
141
130
  - lib/boxgrinder-build/managers/plugin-manager.rb
142
131
  - lib/boxgrinder-build/plugins/base-plugin.rb
143
132
  - lib/boxgrinder-build/plugins/delivery/ebs/ebs-plugin.rb
@@ -200,12 +189,15 @@ files:
200
189
  - lib/boxgrinder-build.rb
201
190
  - lib/boxgrinder-build/appliance.rb
202
191
  - lib/boxgrinder-build/helpers/augeas-helper.rb
192
+ - lib/boxgrinder-build/helpers/aws-helper.rb
193
+ - lib/boxgrinder-build/helpers/ec2-helper.rb
203
194
  - lib/boxgrinder-build/helpers/guestfs-helper.rb
204
195
  - lib/boxgrinder-build/helpers/image-helper.rb
205
196
  - lib/boxgrinder-build/helpers/linux-helper.rb
206
197
  - lib/boxgrinder-build/helpers/package-helper.rb
207
198
  - lib/boxgrinder-build/helpers/plugin-helper.rb
208
199
  - lib/boxgrinder-build/helpers/qemu.wrapper
200
+ - lib/boxgrinder-build/helpers/s3-helper.rb
209
201
  - lib/boxgrinder-build/managers/plugin-manager.rb
210
202
  - lib/boxgrinder-build/plugins/base-plugin.rb
211
203
  - lib/boxgrinder-build/plugins/delivery/ebs/ebs-plugin.rb
@@ -240,11 +232,13 @@ files:
240
232
  - rubygem-boxgrinder-build.spec
241
233
  - spec/appliance-spec.rb
242
234
  - spec/helpers/augeas-helper-spec.rb
235
+ - spec/helpers/ec2-helper-spec.rb
243
236
  - spec/helpers/guestfs-helper-spec.rb
244
237
  - spec/helpers/image-helper-spec.rb
245
238
  - spec/helpers/linux-helper-spec.rb
246
239
  - spec/helpers/package-helper-spec.rb
247
240
  - spec/helpers/plugin-helper-spec.rb
241
+ - spec/helpers/s3-helper-spec.rb
248
242
  - spec/managers/plugin-manager-spec.rb
249
243
  - spec/plugins/base-plugin-spec.rb
250
244
  - spec/plugins/delivery/ebs/ebs-plugin-spec.rb