vagrant-guests-solaris11 0.0.1a → 0.0.1.dev

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTQwZjFmMGY4OTMwOWEzZDdmYjk1NTdmN2I0ZDIwYTc1NzhmYTNhYw==
4
+ YjNlMmFjMDg3MGU5ODI4ODdlMzRiYjQxZmE3Mjc0MWY3NzZmNDE1Yg==
5
5
  data.tar.gz: !binary |-
6
- Y2UzYWVjYTNjZTljMDA1NDU4MjIzZjVlMGM4NjM2ZDgzYjdmZGEwZA==
6
+ ZTNmZGUxZGZmZWUxMjBjZmYzZGEzM2FhOTY0MjllYzMwOTUxOTRjYw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZmUxNDg1OWRkYWM4Mzg0MWQyZjg4N2M1YzZhMGVhMmM0NjIxNmYxOWI1OGM2
10
- MmRkNTE0YWNlYTM0MmFlZTlmZTM0NjQxNWFlNTQ0MGMwZTIzMzhkNThkZWUz
11
- MGM5ZDEzZDA5NGI3MjJiNGZhYjgxNjQxMjY5NWRiM2JmNzk5Nzk=
9
+ YWE1ZWE2MjE0ZTE3ZjI0ZDc3MDg1ZDYwYWQ3MmEyYjhhMmIyZjJlNGRhNWFk
10
+ MTdmYTIzODU3MTY2YWQyODdmZmE4ZTM1ZTAyOGQwNjcwZGQ2ZWQ0ZmQwZmI2
11
+ ZjcxNDc3YjM5MTYzY2Y1YjVjYzFkMjcxOThhNTdmZDM5YjQ1MjE=
12
12
  data.tar.gz: !binary |-
13
- ZjEzNjNlMDhjMjY3M2ExODU1YmZiNmY3NWFiODcxM2U1YzM0ZWMwNTY0ZjE2
14
- ZjVhMWNhN2MwNjU0YjViZGY1ZDRhYjU1ZTZiMjUwYzY5ZjkyZTM2MzNjYjZi
15
- OTRiMTM3NTNhMmE5M2JlZTk0NzFlNDg0NzE2NGNmZjYwMDkwZjQ=
13
+ NWI3YmJmMTE4MzhkMGQxMTY1ZDBmOTY3YzJlYzEyNGJjM2FmNjRjNzczNjQy
14
+ NGRkMzZkNWViZDJlZjhjZDE5OWFhZTg4M2VlYTEzMjg2OTYyYzQzOWE3NWQ5
15
+ M2IzZTkyNGU5MmFiNTVkNGQzOWIxMDVlODUzOWMwNDY2ZTBiY2M=
data/Gemfile CHANGED
@@ -8,10 +8,4 @@ group :development do
8
8
  # gem dependency because we expect to be installed within the
9
9
  # Vagrant environment itself using `vagrant plugin`.
10
10
  gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
11
-
12
- gem "shoulda", ">= 0"
13
- gem "rdoc"
14
- gem "bundler", "~> 1.0"
15
- gem "jeweler", "~> 1.8.7"
16
- gem "version"
17
11
  end
data/README.md CHANGED
@@ -28,9 +28,73 @@ Vagrant.configure("2") do |config|
28
28
  config.vm.guest = :solaris11
29
29
  ```
30
30
 
31
+ ### Development
32
+
33
+ To work on the `vagrant-guests-solaris11` plugin, clone [this repository
34
+ out](https://github.com/janth/vagrant-guests-solaris11), and use
35
+ [Bundler](http://gembundler.com) to get the dependencies:
36
+
37
+ ```bash
38
+ bundle
39
+ ```
40
+
41
+ Once you have the dependencies, verify the unit tests pass with `rake`:
42
+
43
+ ```bash
44
+ bundle exec rake
45
+ ```
46
+
47
+ Other rake commands:
48
+ ```bash
49
+ bundle exec rake --tasks
50
+ bundle exec rake --trace build
51
+ bundle exec rake --trace install
52
+ bundle exec rake --trace release
53
+ ```
54
+
55
+
56
+ If those pass, you're ready to start developing the plugin. You can test
57
+ the plugin without installing it into your Vagrant environment by just
58
+ creating a `Vagrantfile` in the top level of this directory (it is gitignored)
59
+ and add the following line to your `Vagrantfile`
60
+ ```ruby
61
+ Vagrant.require_plugin "vagrant-guests-solaris11"
62
+ ```
63
+ Use bundler to execute Vagrant:
64
+ ```bash
65
+ bundle exec vagrant up <vagranthost>
66
+ ```
67
+ ### Cleanup
68
+
69
+ ```bash
70
+ bundle exec rake clobber
71
+ ```
72
+
31
73
  ### Changelog
32
74
 
33
75
  ##### 0.0.1 (2013-08-25)
34
76
 
35
77
  * Initial release
36
78
 
79
+ ### Similar projects
80
+
81
+ * [vagrant-guests-openbsd](https://github.com/nabeken/vagrant-guests-openbsd.git)
82
+
83
+ ### Fork
84
+
85
+ <!--
86
+ https://github.com/jamesflorentino/fork-ribbons/blob/master/README.md
87
+ https://github.com/aral/fork-me-on-github-retina-ribbons/blob/master/readme.md
88
+ https://github.com/simonwhitaker/github-fork-ribbon-css
89
+ https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
90
+ -->
91
+
92
+ <a href="https://github.com/janth/vagrant-guests-solarsi11/"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
93
+ <a href="https://github.com/janth/vagrant-guests-solaris11"><img style="position: absolute; top: 0; right: 30px; border: 0;" src="https://github.com/jamesflorentino/fork-ribbons/raw/master/ribbons/green-white.png" alt="Fork me on GitHub"></a>
94
+
95
+ <!-- BOTTOM RIGHT RIBBON: START COPYING HERE -->
96
+ <div class="github-fork-ribbon-wrapper right-bottom">
97
+ <div class="github-fork-ribbon">
98
+ <a href="https://github.com/simonwhitaker/github-fork-ribbon-css">Fork me on GitHub</a>
99
+ </div>
100
+ </div>
data/Rakefile CHANGED
@@ -1,34 +1,19 @@
1
- # encoding: utf-8
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ # For gem creation and bundling
4
+ require "bundler/gem_tasks"
5
+ require 'rspec/core/rake_task'
2
6
 
3
- # Immediately sync all stdout so that tools like buildbot can immediately load in the output.
7
+ # Immediately sync all stdout so that tools like buildbot can
8
+ # immediately load in the output.
4
9
  $stdout.sync = true
5
10
  $stderr.sync = true
6
11
 
7
12
  # Change to the directory of this file.
8
13
  Dir.chdir(File.expand_path("../", __FILE__))
9
14
 
10
- require 'rubygems'
11
- require 'bundler'
12
-
13
- begin
14
- Bundler.setup(:default, :development)
15
- rescue Bundler::BundlerError => e
16
- $stderr.puts e.message
17
- $stderr.puts "Run `bundle install` to install missing gems"
18
- exit e.status_code
19
- end
20
- require 'bundler/setup'
21
-
22
- # For gem creation and bundling
23
- require "bundler/gem_tasks"
24
- require 'rspec/core/rake_task'
25
- require 'rake'
26
- require 'rake/clean'
27
- require 'rake/version_task'
28
- Rake::VersionTask.new
29
-
30
15
  # This installs the tasks that help with gem creation and publishing.
31
- Bundler::GemHelper.install_tasks
16
+ #Bundler::GemHelper.install_tasks
32
17
 
33
18
 
34
19
  # Install the `spec` task so that we can run tests.
@@ -8,7 +8,7 @@ module VagrantPlugins
8
8
  module GuestSolaris11
9
9
  class Guest < Vagrant.plugin("2", :guest)
10
10
  def detect?(machine)
11
- machine.communicate.test('[ "$(uname -s)" = "SunOS" ]')
11
+ machine.communicate.test("uname -s | grep SunOS")
12
12
  end
13
13
  end
14
14
  end
@@ -0,0 +1,11 @@
1
+ # A general Vagrant system implementation for "solaris 11".
2
+ #
3
+ # Contributed by Jan Thomas Moldung <janth@moldung.no>
4
+
5
+ require "vagrant"
6
+
7
+ module VagrantPlugins
8
+ module GuestSolaris11
9
+ VERSION = "0.0.1.dev"
10
+ end
11
+ end
@@ -5,19 +5,19 @@ describe VagrantPlugins::GuestSolaris11::Cap::ChangeHostName do
5
5
  include_context 'machine'
6
6
 
7
7
  it "should change hostname when hostname is differ from current" do
8
- name = 'vagrant-solaris11'
8
+ hostname = 'vagrant-solaris11'
9
9
  communicate.stub(:test).and_return(false)
10
10
  communicate.should_receive(:sudo).with("/usr/sbin/svccfg -s system/identity:node setprop config/nodename=\"#{name}\"")
11
11
  communicate.should_receive(:sudo).with("/usr/sbin/svccfg -s system/identity:node setprop config/loopback=\"#{name}\"")
12
12
  communicate.should_receive(:sudo).with("/usr/sbin/svccfg -s system/identity:node refresh ")
13
13
  communicate.should_receive(:sudo).with("/usr/sbin/svcadm restart system/identity:node ")
14
- described_class.change_host_name(machine, name)
14
+ described_class.change_host_name(machine, hostname)
15
15
  end
16
16
 
17
17
  it "should not change hostname when hostname equals current" do
18
- name = 'vagrant-solaris11'
18
+ hostname = 'vagrant-solaris11'
19
19
  communicate.stub(:test).and_return(true)
20
20
  communicate.should_not_receive(:sudo)
21
- described_class.change_host_name(machine, name)
21
+ described_class.change_host_name(machine, hostname)
22
22
  end
23
23
  end
@@ -0,0 +1,29 @@
1
+ require 'vagrant-guests-solaris11/cap/configure_networks'
2
+ require 'spec_helper'
3
+
4
+ describe VagrantPlugins::GuestSolaris11::Cap::ConfigureNetworks do
5
+ include_context 'machine'
6
+
7
+ it "should configure networks using hostname.in(5)" do
8
+ networks = [
9
+ {:type => :static, :ip => '192.168.10.10', :netmask => '255.255.255.0', :interface => 1},
10
+ {:type => :dhcp, :interface => 2},
11
+ {:type => :static, :ip => '10.168.10.10', :netmask => '255.255.0.0', :interface => 3},
12
+ ]
13
+ communicate.should_receive(:sudo).with("[ -f /etc/hostname.em0 ] && mv /etc/hostname.em0 /tmp")
14
+ communicate.should_receive(:sudo).with("rm /etc/hostname.em* || :")
15
+ communicate.should_receive(:sudo).with("[ -f /tmp/hostname.em0 ] && mv /tmp/hostname.em0 /etc")
16
+
17
+ communicate.should_receive(:sudo).with(
18
+ "su -m root -c 'echo inet #{networks[0][:ip]} #{networks[0][:netmask]} > /etc/hostname.em#{networks[0][:interface]}'")
19
+ communicate.should_receive(:sudo).with("sh /etc/netstart em#{networks[0][:interface]}")
20
+ communicate.should_receive(:sudo).with(
21
+ "su -m root -c 'echo dhcp > /etc/hostname.em#{networks[1][:interface]}'")
22
+ communicate.should_receive(:sudo).with("sh /etc/netstart em#{networks[1][:interface]}")
23
+ communicate.should_receive(:sudo).with(
24
+ "su -m root -c 'echo inet #{networks[2][:ip]} #{networks[2][:netmask]} > /etc/hostname.em#{networks[2][:interface]}'")
25
+ communicate.should_receive(:sudo).with("sh /etc/netstart em#{networks[2][:interface]}")
26
+
27
+ described_class.configure_networks(machine, networks)
28
+ end
29
+ end
@@ -0,0 +1,19 @@
1
+ require 'vagrant-guests-solaris11/cap/mount_nfs_folder'
2
+ require 'spec_helper'
3
+
4
+ describe VagrantPlugins::GuestSolaris11::Cap::MountVirtualBoxSharedFolder do
5
+ include_context 'machine'
6
+
7
+ it "should mount nfs folders" do
8
+ ip = "192.168.1.1"
9
+ folders = {
10
+ 'folder1' => {:guestpath => '/guest1', :hostpath => '/host1'},
11
+ 'folder2' => {:guestpath => '/guest2', :hostpath => '/host2'}
12
+ }
13
+ folders.each do |name, opts|
14
+ communicate.should_receive(:sudo).with("mkdir -p #{opts[:guestpath]}")
15
+ communicate.should_receive(:sudo).with("mount '#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'")
16
+ end
17
+ described_class.mount_nfs_folder(machine, ip, folders)
18
+ end
19
+ end
data/spec/guest_spec.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  require 'spec_helper'
2
2
  require 'vagrant-guests-solaris11/guest'
3
3
 
4
- describe VagrantPlugins::GuestSolaris11::Guest do
4
+ describe VagrantPlugins::GuestSolaris::Guest do
5
5
  include_context 'machine'
6
6
 
7
- it "should be detected with SunOS" do
7
+ it "should be detected with Solaris" do
8
8
  expect(communicate).to receive(:test).with('[ "$(uname -s)" = "SunOS" ]')
9
9
  guest.detect?(machine)
10
10
  end
data/spec/plugin_spec.rb CHANGED
@@ -16,7 +16,7 @@ describe VagrantPlugins::GuestSolaris11::Plugin do
16
16
  :halt => VagrantPlugins::GuestSolaris11::Cap::Halt,
17
17
  :change_host_name => VagrantPlugins::GuestSolaris11::Cap::ChangeHostName,
18
18
  :configure_networks => VagrantPlugins::GuestSolaris11::Cap::ConfigureNetworks,
19
- :mount_virtualbox_shared_folder => VagrantPlugins::GuestSolaris11::Cap::MountVirtualBoxSharedFolder,
19
+ :mount_nfs_folder => VagrantPlugins::GuestSolaris11::Cap::MountVirtualBoxSharedFolder,
20
20
  #:mount_nfs_folder => VagrantPlugins::GuestSolaris11::Cap::MountNFSFolder,
21
21
  }.each do |cap, cls|
22
22
  it "should be capable of #{cap} with #{os}" do
@@ -9,8 +9,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
9
9
  Gem::Specification.new do |spec|
10
10
  spec.name = "vagrant-guests-solaris11"
11
11
  #spec.version = VagrantPlugins::SOLARIS11::VERSION
12
- #spec.version = "0.0.2.dev"
13
- spec.version = File.read('VERSION')
12
+ spec.version = "0.0.1.dev"
14
13
  #spec.platform = Gem::Platform::RUBY
15
14
  spec.authors = "Jan Thomas Moldung"
16
15
  spec.email = "janth@moldung.no"
@@ -24,12 +23,11 @@ Gem::Specification.new do |spec|
24
23
 
25
24
  #spec.add_runtime_dependency "fog", "~> 1.10.0"
26
25
 
27
- spec.add_development_dependency "bundler"
28
- spec.add_development_dependency "jeweler"
26
+ spec.add_development_dependency "bundler", "~> 1.3"
29
27
  spec.add_development_dependency "rake"
30
- spec.add_development_dependency "rspec-core"
31
- spec.add_development_dependency "rspec-expectations"
32
- spec.add_development_dependency "rspec-mocks"
28
+ spec.add_development_dependency "rspec-core", "~> 2.12.2"
29
+ spec.add_development_dependency "rspec-expectations", "~> 2.12.1"
30
+ spec.add_development_dependency "rspec-mocks", "~> 2.12.1"
33
31
 
34
32
  # The following block of code determines the files that should be included
35
33
  # in the gem. It does this by reading all the files in the directory where
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-guests-solaris11
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1a
4
+ version: 0.0.1.dev
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Thomas Moldung
@@ -14,30 +14,16 @@ dependencies:
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: jeweler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ! '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
26
+ version: '1.3'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rake
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -56,44 +42,44 @@ dependencies:
56
42
  name: rspec-core
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - ! '>='
45
+ - - ~>
60
46
  - !ruby/object:Gem::Version
61
- version: '0'
47
+ version: 2.12.2
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - ! '>='
52
+ - - ~>
67
53
  - !ruby/object:Gem::Version
68
- version: '0'
54
+ version: 2.12.2
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rspec-expectations
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - ! '>='
59
+ - - ~>
74
60
  - !ruby/object:Gem::Version
75
- version: '0'
61
+ version: 2.12.1
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - ! '>='
66
+ - - ~>
81
67
  - !ruby/object:Gem::Version
82
- version: '0'
68
+ version: 2.12.1
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: rspec-mocks
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
- - - ! '>='
73
+ - - ~>
88
74
  - !ruby/object:Gem::Version
89
- version: '0'
75
+ version: 2.12.1
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - ! '>='
80
+ - - ~>
95
81
  - !ruby/object:Gem::Version
96
- version: '0'
82
+ version: 2.12.1
97
83
  description: Enables Vagrant to manage Oracle Solaris 11 guests.
98
84
  email: janth@moldung.no
99
85
  executables: []
@@ -105,8 +91,6 @@ files:
105
91
  - LICENSE.txt
106
92
  - README.md
107
93
  - Rakefile
108
- - VERSION
109
- - develop.md
110
94
  - lib/vagrant-guests-solaris11.rb
111
95
  - lib/vagrant-guests-solaris11/cap/change_host_name.rb
112
96
  - lib/vagrant-guests-solaris11/cap/configure_networks.rb
@@ -114,8 +98,11 @@ files:
114
98
  - lib/vagrant-guests-solaris11/cap/mount_virtualbox_shared_folder.rb
115
99
  - lib/vagrant-guests-solaris11/guest.rb
116
100
  - lib/vagrant-guests-solaris11/plugin.rb
101
+ - lib/vagrant-guests-solaris11/version.rb
117
102
  - spec/cap/change_host_name_spec.rb
103
+ - spec/cap/configure_networks_spec.rb
118
104
  - spec/cap/halt_spec.rb
105
+ - spec/cap/mount_virtualbox_shared_folder_spec.rb
119
106
  - spec/guest_spec.rb
120
107
  - spec/plugin_spec.rb
121
108
  - spec/spec_helper.rb
@@ -146,7 +133,9 @@ specification_version: 4
146
133
  summary: Enables Vagrant to manage Oracle Solaris 11 guests.
147
134
  test_files:
148
135
  - spec/cap/change_host_name_spec.rb
136
+ - spec/cap/configure_networks_spec.rb
149
137
  - spec/cap/halt_spec.rb
138
+ - spec/cap/mount_virtualbox_shared_folder_spec.rb
150
139
  - spec/guest_spec.rb
151
140
  - spec/plugin_spec.rb
152
141
  - spec/spec_helper.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.0.1a
data/develop.md DELETED
@@ -1,64 +0,0 @@
1
- ### Development
2
-
3
- To work on the `vagrant-guests-solaris11` plugin, clone [this repository
4
- out](https://github.com/janth/vagrant-guests-solaris11), and use
5
- [Bundler](http://gembundler.com) to get the dependencies:
6
-
7
- ```bash
8
- bundle
9
- ```
10
-
11
- Once you have the dependencies, verify the unit tests pass with `rake`:
12
-
13
- ```bash
14
- bundle exec rake
15
- ```
16
-
17
- Other rake commands:
18
- ```bash
19
- bundle exec rake --tasks
20
- bundle exec rake --trace build
21
- bundle exec rake --trace install
22
- bundle exec rake --trace release
23
- ```
24
-
25
-
26
- If those pass, you're ready to start developing the plugin. You can test
27
- the plugin without installing it into your Vagrant environment by just
28
- creating a `Vagrantfile` in the top level of this directory (it is gitignored)
29
- and add the following line to your `Vagrantfile`
30
- ```ruby
31
- Vagrant.require_plugin "vagrant-guests-solaris11"
32
- ```
33
- Use bundler to execute Vagrant:
34
- ```bash
35
- bundle exec vagrant up <vagranthost>
36
- ```
37
- ### Cleanup
38
-
39
- ```bash
40
- bundle exec rake clobber
41
- ```
42
-
43
- ### Similar projects
44
-
45
- * [vagrant-guests-openbsd](https://github.com/nabeken/vagrant-guests-openbsd.git)
46
-
47
- ### Fork
48
-
49
- <!--
50
- https://github.com/jamesflorentino/fork-ribbons/blob/master/README.md
51
- https://github.com/aral/fork-me-on-github-retina-ribbons/blob/master/readme.md
52
- https://github.com/simonwhitaker/github-fork-ribbon-css
53
- https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
54
- -->
55
-
56
- <a href="https://github.com/janth/vagrant-guests-solarsi11/"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
57
- <a href="https://github.com/janth/vagrant-guests-solaris11"><img style="position: absolute; top: 0; right: 30px; border: 0;" src="https://github.com/jamesflorentino/fork-ribbons/raw/master/ribbons/green-white.png" alt="Fork me on GitHub"></a>
58
-
59
- <!-- BOTTOM RIGHT RIBBON: START COPYING HERE -->
60
- <div class="github-fork-ribbon-wrapper right-bottom">
61
- <div class="github-fork-ribbon">
62
- <a href="https://github.com/simonwhitaker/github-fork-ribbon-css">Fork me on GitHub</a>
63
- </div>
64
- </div>