veewee 0.3.0.beta2 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/doc/requirements.md +7 -1
  2. data/lib/python/parallels_send_string.py +76 -0
  3. data/lib/veewee/provider/core/helper/scancode.rb +31 -48
  4. data/lib/veewee/provider/parallels/box/helper/console_type.rb +54 -76
  5. data/lib/veewee/provider/virtualbox/box/helper/buildinfo.rb +2 -2
  6. data/lib/veewee/provider/virtualbox/box/helper/create.rb +1 -1
  7. data/lib/veewee/provider/virtualbox/box/helper/guest_additions.rb +1 -2
  8. data/lib/veewee/provider/virtualbox/box/helper/version.rb +8 -0
  9. data/lib/veewee/version.rb +1 -1
  10. data/templates/Debian-6.0.5-i386-netboot/virtualbox.sh +1 -1
  11. data/templates/Debian-6.0.6-amd64-netboot/base.sh +27 -0
  12. data/templates/Debian-6.0.6-amd64-netboot/chef.sh +2 -0
  13. data/templates/Debian-6.0.6-amd64-netboot/cleanup-virtualbox.sh +4 -0
  14. data/templates/Debian-6.0.6-amd64-netboot/cleanup.sh +17 -0
  15. data/templates/Debian-6.0.6-amd64-netboot/definition.rb +49 -0
  16. data/templates/Debian-6.0.6-amd64-netboot/preseed.cfg +315 -0
  17. data/templates/Debian-6.0.6-amd64-netboot/puppet.sh +2 -0
  18. data/templates/Debian-6.0.6-amd64-netboot/ruby.sh +10 -0
  19. data/templates/Debian-6.0.6-amd64-netboot/vagrant.sh +25 -0
  20. data/templates/Debian-6.0.6-amd64-netboot/virtualbox.sh +13 -0
  21. data/templates/Debian-6.0.6-amd64-netboot/zerodisk.sh +3 -0
  22. data/templates/Debian-6.0.6-i386-netboot/base.sh +27 -0
  23. data/templates/Debian-6.0.6-i386-netboot/chef.sh +2 -0
  24. data/templates/Debian-6.0.6-i386-netboot/cleanup-virtualbox.sh +4 -0
  25. data/templates/Debian-6.0.6-i386-netboot/cleanup.sh +17 -0
  26. data/templates/Debian-6.0.6-i386-netboot/definition.rb +51 -0
  27. data/templates/Debian-6.0.6-i386-netboot/preseed.cfg +315 -0
  28. data/templates/Debian-6.0.6-i386-netboot/puppet.sh +2 -0
  29. data/templates/Debian-6.0.6-i386-netboot/ruby.sh +10 -0
  30. data/templates/Debian-6.0.6-i386-netboot/vagrant.sh +25 -0
  31. data/templates/Debian-6.0.6-i386-netboot/virtualbox.sh +13 -0
  32. data/templates/Debian-6.0.6-i386-netboot/zerodisk.sh +3 -0
  33. data/templates/Debian-7.0-b2-i386-netboot/base.sh +27 -0
  34. data/templates/Debian-7.0-b2-i386-netboot/chef.sh +2 -0
  35. data/templates/Debian-7.0-b2-i386-netboot/cleanup-virtualbox.sh +4 -0
  36. data/templates/Debian-7.0-b2-i386-netboot/cleanup.sh +17 -0
  37. data/templates/Debian-7.0-b2-i386-netboot/definition.rb +51 -0
  38. data/templates/Debian-7.0-b2-i386-netboot/preseed.cfg +315 -0
  39. data/templates/Debian-7.0-b2-i386-netboot/puppet.sh +2 -0
  40. data/templates/Debian-7.0-b2-i386-netboot/ruby.sh +10 -0
  41. data/templates/Debian-7.0-b2-i386-netboot/vagrant.sh +25 -0
  42. data/templates/Debian-7.0-b2-i386-netboot/virtualbox.sh +13 -0
  43. data/templates/Debian-7.0-b2-i386-netboot/zerodisk.sh +3 -0
  44. data/templates/Fedora-17-i386/ks.cfg +4 -0
  45. data/templates/Fedora-17-x86_64/ks.cfg +4 -0
  46. data/templates/freebsd-9.0-RELEASE-amd64/definition.rb +19 -0
  47. data/templates/freebsd-9.0-RELEASE-amd64/postinstall.sh +93 -0
  48. data/templates/ubuntu-12.04.1-server-amd64/definition.rb +1 -1
  49. data/templates/ubuntu-12.10-server-amd64-packages/definition.rb +35 -0
  50. data/templates/ubuntu-12.10-server-amd64-packages/postinstall.sh +75 -0
  51. data/templates/ubuntu-12.10-server-amd64-packages/preseed.cfg +87 -0
  52. data/templates/ubuntu-12.10-server-amd64/definition.rb +35 -0
  53. data/templates/ubuntu-12.10-server-amd64/postinstall.sh +97 -0
  54. data/templates/ubuntu-12.10-server-amd64/preseed.cfg +87 -0
  55. data/templates/ubuntu-12.10-server-i386-packages/definition.rb +35 -0
  56. data/templates/ubuntu-12.10-server-i386-packages/postinstall.sh +75 -0
  57. data/templates/ubuntu-12.10-server-i386-packages/preseed.cfg +87 -0
  58. data/templates/ubuntu-12.10-server-i386/definition.rb +35 -0
  59. data/templates/ubuntu-12.10-server-i386/postinstall.sh +98 -0
  60. data/templates/ubuntu-12.10-server-i386/preseed.cfg +87 -0
  61. data/test/veewee/provider/virtualbox/box/helper/guest_additions_test.rb +95 -0
  62. data/test/veewee/provider/virtualbox/box/helper/version.rb +67 -0
  63. data/validation/features/steps/veewee_steps.rb +1 -1
  64. metadata +54 -4
@@ -0,0 +1,95 @@
1
+ require 'test/unit'
2
+ require 'veewee/provider/virtualbox/box/helper/guest_additions'
3
+ require 'veewee/provider/virtualbox/box/helper/version'
4
+ require 'logger'
5
+
6
+ class TestVboxGuestAdditionsHelper < Test::Unit::TestCase
7
+ include Veewee::Provider::Virtualbox::BoxCommand
8
+ def setup
9
+ @fd = IO.sysopen("/dev/null", "w")
10
+ end
11
+
12
+ def ui
13
+ @ui ||= Logger.new(IO.new(@fd))
14
+ end
15
+
16
+ def affected_versions
17
+ {
18
+ "4.2.1" => "4.2.0",
19
+ "4.1.23" => "4.1.22"
20
+ }
21
+ end
22
+
23
+ def verify_version(vbox_version, guest_version, msg="", scope)
24
+ set_vbox_version(vbox_version)
25
+
26
+ scope.class.instance_eval do
27
+ define_method :download_iso do |url, isofile|
28
+ expected_url_prefix = "http://download.virtualbox.org/virtualbox/#{guest_version}/"
29
+
30
+ assert(url.include?(expected_url_prefix), msg)
31
+ assert_equal("VBoxGuestAdditions_#{guest_version}.iso", isofile, msg)
32
+ end
33
+ end
34
+
35
+ download_vbox_guest_additions_iso({})
36
+ end
37
+
38
+ def verify_affected_versions(msg="", scope)
39
+ affected_versions.each do |vbox_version, guest_version|
40
+ verify_version(vbox_version, guest_version, msg, scope)
41
+ end
42
+ end
43
+
44
+ def test_affected_osx_version_returns_downpatched_ga_version
45
+ set_ruby_platform("darwin")
46
+ msg = "affected osx version did not return downpatched ga version"
47
+
48
+ verify_affected_versions(msg, self)
49
+ end
50
+
51
+ def test_unaffected_osx_version_returns_same_version
52
+ set_ruby_platform("darwin")
53
+ msg = "unaffected osx version did not return same version"
54
+ verify_version("4.1.22","4.1.22", msg, self)
55
+ end
56
+
57
+ def test_affected_linux_version_returns_same_version
58
+ set_ruby_platform("linux")
59
+ msg = "affected linux version did not return same version"
60
+ affected_versions.keys.each do |version|
61
+ verify_version(version, version, msg, self)
62
+ end
63
+ end
64
+
65
+ def test_unaffected_linux_version_returns_same_version
66
+ set_ruby_platform("linux")
67
+ msg = "unaffected linux version did not return same version"
68
+ verify_version("4.0.19","4.0.19", msg, self)
69
+ end
70
+
71
+ def test_affected_mswin_version_returns_same_version
72
+ set_ruby_platform("mswin")
73
+ msg = "affected mswin version did not return same version"
74
+ affected_versions.keys.each do |version|
75
+ verify_version(version, version, msg, self)
76
+ end
77
+ end
78
+
79
+ def test_unaffected_mswin_version_returns_same_version
80
+ set_ruby_platform("mswin")
81
+ msg = "unaffected mswin version did not return same version"
82
+ verify_version("4.0.19","4.0.19", msg, self)
83
+ end
84
+
85
+ private
86
+ def set_ruby_platform(platform)
87
+ Object.const_set("RUBY_PLATFORM", platform)
88
+ end
89
+
90
+ def set_vbox_version(ver)
91
+ Veewee::Provider::Virtualbox::BoxCommand.send(:define_method, :vbox_version) do
92
+ ver
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,67 @@
1
+ require 'test/unit'
2
+ require 'veewee/provider/virtualbox/box/helper/version'
3
+ require 'logger'
4
+
5
+ class TestVboxGuestAdditionsHelper < Test::Unit::TestCase
6
+ include Veewee::Provider::Virtualbox::BoxCommand
7
+
8
+ def affected_versions
9
+ {
10
+ "4.2.1" => "4.2.0",
11
+ "4.1.23" => "4.1.22"
12
+ }
13
+ end
14
+
15
+ def test_affected_osx_version_returns_downpatched_ga_version
16
+ set_ruby_platform("darwin")
17
+ affected_versions.each do |vbox_version, guest_version|
18
+ set_vbox_version(vbox_version)
19
+ assert_equal(guest_version, self.vboxga_version)
20
+ end
21
+ end
22
+
23
+ def test_unaffected_osx_version_returns_same_version
24
+ set_ruby_platform("darwin")
25
+ set_vbox_version("4.1.22")
26
+ assert_equal("4.1.22", self.vboxga_version)
27
+ end
28
+
29
+ def test_affected_linux_version_returns_same_version
30
+ set_ruby_platform("linux")
31
+ affected_versions.keys.each do |version|
32
+ set_vbox_version(version)
33
+ assert_equal(version, self.vboxga_version)
34
+ end
35
+ end
36
+
37
+ def test_unaffected_linux_version_returns_same_version
38
+ set_ruby_platform("linux")
39
+ set_vbox_version("4.0.19")
40
+ assert_equal("4.0.19", self.vboxga_version)
41
+ end
42
+
43
+ def test_affected_mswin_version_returns_same_version
44
+ set_ruby_platform("mswin")
45
+ affected_versions.keys.each do |version|
46
+ set_vbox_version(version)
47
+ assert_equal(version, self.vboxga_version)
48
+ end
49
+ end
50
+
51
+ def test_unaffected_mswin_version_returns_same_version
52
+ set_ruby_platform("mswin")
53
+ set_vbox_version("4.0.19")
54
+ assert_equal("4.0.19", self.vboxga_version)
55
+ end
56
+
57
+ private
58
+ def set_ruby_platform(platform)
59
+ Object.const_set("RUBY_PLATFORM", platform)
60
+ end
61
+
62
+ def set_vbox_version(ver)
63
+ Veewee::Provider::Virtualbox::BoxCommand.send(:define_method, :vbox_version) do
64
+ ver
65
+ end
66
+ end
67
+ end
@@ -9,7 +9,7 @@ Given /^a veeweebox was build$/ do
9
9
  end
10
10
 
11
11
  When /^I sudorun "([^\"]*)" over ssh$/ do |command|
12
- @box.exec("echo '#{command}' > /tmp/validation.sh")
12
+ @box.exec("echo '#{command}' > /tmp/validation.sh && chmod a+x /tmp/validation.sh")
13
13
  @sshresult=@box.exec(@box.sudo("/tmp/validation.sh"))
14
14
  end
15
15
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: veewee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.beta2
5
- prerelease: 6
4
+ version: 0.3.1
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Patrick Debois
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-05 00:00:00.000000000 Z
12
+ date: 2012-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: vagrant
@@ -304,6 +304,7 @@ files:
304
304
  - lib/net/vnc/vnc.rb
305
305
  - lib/python/parallels_sdk_check.py
306
306
  - lib/python/parallels_send_key.py
307
+ - lib/python/parallels_send_string.py
307
308
  - lib/vagrant_init.rb
308
309
  - lib/veewee.rb
309
310
  - lib/veewee/cli.rb
@@ -705,6 +706,39 @@ files:
705
706
  - templates/Debian-6.0.5-i386-netboot/vagrant.sh
706
707
  - templates/Debian-6.0.5-i386-netboot/virtualbox.sh
707
708
  - templates/Debian-6.0.5-i386-netboot/zerodisk.sh
709
+ - templates/Debian-6.0.6-amd64-netboot/base.sh
710
+ - templates/Debian-6.0.6-amd64-netboot/chef.sh
711
+ - templates/Debian-6.0.6-amd64-netboot/cleanup-virtualbox.sh
712
+ - templates/Debian-6.0.6-amd64-netboot/cleanup.sh
713
+ - templates/Debian-6.0.6-amd64-netboot/definition.rb
714
+ - templates/Debian-6.0.6-amd64-netboot/preseed.cfg
715
+ - templates/Debian-6.0.6-amd64-netboot/puppet.sh
716
+ - templates/Debian-6.0.6-amd64-netboot/ruby.sh
717
+ - templates/Debian-6.0.6-amd64-netboot/vagrant.sh
718
+ - templates/Debian-6.0.6-amd64-netboot/virtualbox.sh
719
+ - templates/Debian-6.0.6-amd64-netboot/zerodisk.sh
720
+ - templates/Debian-6.0.6-i386-netboot/base.sh
721
+ - templates/Debian-6.0.6-i386-netboot/chef.sh
722
+ - templates/Debian-6.0.6-i386-netboot/cleanup-virtualbox.sh
723
+ - templates/Debian-6.0.6-i386-netboot/cleanup.sh
724
+ - templates/Debian-6.0.6-i386-netboot/definition.rb
725
+ - templates/Debian-6.0.6-i386-netboot/preseed.cfg
726
+ - templates/Debian-6.0.6-i386-netboot/puppet.sh
727
+ - templates/Debian-6.0.6-i386-netboot/ruby.sh
728
+ - templates/Debian-6.0.6-i386-netboot/vagrant.sh
729
+ - templates/Debian-6.0.6-i386-netboot/virtualbox.sh
730
+ - templates/Debian-6.0.6-i386-netboot/zerodisk.sh
731
+ - templates/Debian-7.0-b2-i386-netboot/base.sh
732
+ - templates/Debian-7.0-b2-i386-netboot/chef.sh
733
+ - templates/Debian-7.0-b2-i386-netboot/cleanup-virtualbox.sh
734
+ - templates/Debian-7.0-b2-i386-netboot/cleanup.sh
735
+ - templates/Debian-7.0-b2-i386-netboot/definition.rb
736
+ - templates/Debian-7.0-b2-i386-netboot/preseed.cfg
737
+ - templates/Debian-7.0-b2-i386-netboot/puppet.sh
738
+ - templates/Debian-7.0-b2-i386-netboot/ruby.sh
739
+ - templates/Debian-7.0-b2-i386-netboot/vagrant.sh
740
+ - templates/Debian-7.0-b2-i386-netboot/virtualbox.sh
741
+ - templates/Debian-7.0-b2-i386-netboot/zerodisk.sh
708
742
  - templates/Fedora-14-amd64-netboot/definition.rb
709
743
  - templates/Fedora-14-amd64-netboot/ks.cfg
710
744
  - templates/Fedora-14-amd64-netboot/postinstall.sh
@@ -777,6 +811,8 @@ files:
777
811
  - templates/freebsd-8.2-pcbsd-i386/definition.rb
778
812
  - templates/freebsd-8.2-pcbsd-i386/pcinstall.fbg.cfg
779
813
  - templates/freebsd-8.2-pcbsd-i386/postinstall.sh
814
+ - templates/freebsd-9.0-RELEASE-amd64/definition.rb
815
+ - templates/freebsd-9.0-RELEASE-amd64/postinstall.sh
780
816
  - templates/funtoo-latest-generic_64-stable/definition.rb
781
817
  - templates/funtoo-latest-generic_64-stable/postinstall.sh
782
818
  - templates/funtoo-latest-generic_64-stable/postinstall2.sh
@@ -989,6 +1025,18 @@ files:
989
1025
  - templates/ubuntu-12.04.1-server-i386/definition.rb
990
1026
  - templates/ubuntu-12.04.1-server-i386/postinstall.sh
991
1027
  - templates/ubuntu-12.04.1-server-i386/preseed.cfg
1028
+ - templates/ubuntu-12.10-server-amd64-packages/definition.rb
1029
+ - templates/ubuntu-12.10-server-amd64-packages/postinstall.sh
1030
+ - templates/ubuntu-12.10-server-amd64-packages/preseed.cfg
1031
+ - templates/ubuntu-12.10-server-amd64/definition.rb
1032
+ - templates/ubuntu-12.10-server-amd64/postinstall.sh
1033
+ - templates/ubuntu-12.10-server-amd64/preseed.cfg
1034
+ - templates/ubuntu-12.10-server-i386-packages/definition.rb
1035
+ - templates/ubuntu-12.10-server-i386-packages/postinstall.sh
1036
+ - templates/ubuntu-12.10-server-i386-packages/preseed.cfg
1037
+ - templates/ubuntu-12.10-server-i386/definition.rb
1038
+ - templates/ubuntu-12.10-server-i386/postinstall.sh
1039
+ - templates/ubuntu-12.10-server-i386/preseed.cfg
992
1040
  - templates/ubuntu-8.04.4-server-amd64/definition.rb
993
1041
  - templates/ubuntu-8.04.4-server-amd64/postinstall.sh
994
1042
  - templates/ubuntu-8.04.4-server-amd64/preseed.cfg
@@ -1134,6 +1182,8 @@ files:
1134
1182
  - test/definitions/test_definition/definition.rb
1135
1183
  - test/definitions/test_definition/enabled_postinstall.sh
1136
1184
  - test/environment_test.rb
1185
+ - test/veewee/provider/virtualbox/box/helper/guest_additions_test.rb
1186
+ - test/veewee/provider/virtualbox/box/helper/version.rb
1137
1187
  - validation/features/steps/ssh_steps.old
1138
1188
  - validation/features/steps/veewee_steps.rb
1139
1189
  - validation/support/env.rb
@@ -1155,7 +1205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
1155
1205
  version: '0'
1156
1206
  segments:
1157
1207
  - 0
1158
- hash: 663821704153200315
1208
+ hash: -4075395840718759052
1159
1209
  required_rubygems_version: !ruby/object:Gem::Requirement
1160
1210
  none: false
1161
1211
  requirements: