vagrant-hp 0.1.0

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.
@@ -0,0 +1,42 @@
1
+ require "vagrant-hp/config"
2
+
3
+ describe VagrantPlugins::HP::Config do
4
+ let(:instance) { described_class.new }
5
+
6
+ describe "defaults" do
7
+ subject do
8
+ instance.tap do |o|
9
+ o.finalize!
10
+ end
11
+ end
12
+
13
+ its("access_key") { should be_nil }
14
+ its("tenant_id") { should be_nil }
15
+ its("availability_zone") { should == "az1" }
16
+ its("image") { should be_nil }
17
+ its("keypair_name") { should be_nil }
18
+ its("secret_key") { should be_nil }
19
+ its("ssh_private_key_path") { should be_nil }
20
+ its("ssh_username") { should be_nil }
21
+ its("flavor") { should == "standard.small" }
22
+ its("tenant_id") { should be_nil }
23
+ its("server_name") { should be_nil }
24
+ end
25
+
26
+ describe "overriding defaults" do
27
+ # I typically don't meta-program in tests, but this is a very
28
+ # simple boilerplate test, so I cut corners here. It just sets
29
+ # each of these attributes to "foo" in isolation, and reads the value
30
+ # and asserts the proper result comes back out.
31
+ [:access_key, :tenant_id, :availability_zone, :image,
32
+ :keypair_name,:secret_key,:ssh_private_key_path,:ssh_username,
33
+ :flavor,:tenant_id,:server_name].each do |attribute|
34
+
35
+ it "should not default #{attribute} if overridden" do
36
+ instance.send("#{attribute}=".to_sym, "foo")
37
+ instance.finalize!
38
+ instance.send(attribute).should == "foo"
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,59 @@
1
+ $:.unshift File.expand_path("../lib", __FILE__)
2
+ require "vagrant-hp/version"
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "vagrant-hp"
6
+ s.version = VagrantPlugins::HP::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = "Mohit Sethi"
9
+ s.email = "mohit@sethis.in"
10
+ s.homepage = "http://github.com/mohitsethi/vagrant-hp"
11
+ s.summary = "Enables Vagrant to manage machines on HP Cloud."
12
+ s.description = "Enables Vagrant to manage machines on HP Cloud."
13
+
14
+ s.required_rubygems_version = ">= 1.3.6"
15
+ s.rubyforge_project = "vagrant-hp"
16
+
17
+ s.add_runtime_dependency "fog", "~> 1.10.0"
18
+
19
+ s.add_development_dependency "rake"
20
+ s.add_development_dependency "rspec-core", "~> 2.12.2"
21
+ s.add_development_dependency "rspec-expectations", "~> 2.12.1"
22
+ s.add_development_dependency "rspec-mocks", "~> 2.12.1"
23
+ s.add_development_dependency "rubygems-bundler"
24
+
25
+ # The following block of code determines the files that should be included
26
+ # in the gem. It does this by reading all the files in the directory where
27
+ # this gemspec is, and parsing out the ignored files from the gitignore.
28
+ # Note that the entire gitignore(5) syntax is not supported, specifically
29
+ # the "!" syntax, but it should mostly work correctly.
30
+ root_path = File.dirname(__FILE__)
31
+ all_files = Dir.chdir(root_path) { Dir.glob("**/{*,.*}") }
32
+ all_files.reject! { |file| [".", ".."].include?(File.basename(file)) }
33
+ gitignore_path = File.join(root_path, ".gitignore")
34
+ gitignore = File.readlines(gitignore_path)
35
+ gitignore.map! { |line| line.chomp.strip }
36
+ gitignore.reject! { |line| line.empty? || line =~ /^(#|!)/ }
37
+
38
+ unignored_files = all_files.reject do |file|
39
+ # Ignore any directories, the gemspec only cares about files
40
+ next true if File.directory?(file)
41
+
42
+ # Ignore any paths that match anything in the gitignore. We do
43
+ # two tests here:
44
+ #
45
+ # - First, test to see if the entire path matches the gitignore.
46
+ # - Second, match if the basename does, this makes it so that things
47
+ # like '.DS_Store' will match sub-directories too (same behavior
48
+ # as git).
49
+ #
50
+ gitignore.any? do |ignore|
51
+ File.fnmatch(ignore, file, File::FNM_PATHNAME) ||
52
+ File.fnmatch(ignore, File.basename(file), File::FNM_PATHNAME)
53
+ end
54
+ end
55
+
56
+ s.files = unignored_files
57
+ s.executables = unignored_files.map { |f| f[/^bin\/(.*)/, 1] }.compact
58
+ s.require_path = 'lib'
59
+ end
metadata ADDED
@@ -0,0 +1,176 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-hp
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Mohit Sethi
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-04-01 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: fog
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 1.10.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.10.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec-core
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 2.12.2
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 2.12.2
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec-expectations
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 2.12.1
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 2.12.1
78
+ - !ruby/object:Gem::Dependency
79
+ name: rspec-mocks
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 2.12.1
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 2.12.1
94
+ - !ruby/object:Gem::Dependency
95
+ name: rubygems-bundler
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ description: Enables Vagrant to manage machines on HP Cloud.
111
+ email: mohit@sethis.in
112
+ executables: []
113
+ extensions: []
114
+ extra_rdoc_files: []
115
+ files:
116
+ - CHANGELOG.md
117
+ - dummy_hp.box
118
+ - example_box/metadata.json
119
+ - example_box/README.md
120
+ - example_box/Vagrantfile
121
+ - Gemfile
122
+ - lib/vagrant-hp/action/connect_hp.rb
123
+ - lib/vagrant-hp/action/create_server.rb
124
+ - lib/vagrant-hp/action/delete_server.rb
125
+ - lib/vagrant-hp/action/halt_server.rb
126
+ - lib/vagrant-hp/action/is_created.rb
127
+ - lib/vagrant-hp/action/is_running.rb
128
+ - lib/vagrant-hp/action/message_already_created.rb
129
+ - lib/vagrant-hp/action/message_not_created.rb
130
+ - lib/vagrant-hp/action/read_ssh_info.rb
131
+ - lib/vagrant-hp/action/read_state.rb
132
+ - lib/vagrant-hp/action/sync_folders.rb
133
+ - lib/vagrant-hp/action/timed_provision.rb
134
+ - lib/vagrant-hp/action/warn_networks.rb
135
+ - lib/vagrant-hp/action.rb
136
+ - lib/vagrant-hp/config.rb
137
+ - lib/vagrant-hp/errors.rb
138
+ - lib/vagrant-hp/plugin.rb
139
+ - lib/vagrant-hp/provider.rb
140
+ - lib/vagrant-hp/util/timer.rb
141
+ - lib/vagrant-hp/version.rb
142
+ - lib/vagrant-hp.rb
143
+ - locales/en.yml
144
+ - Rakefile
145
+ - README.md
146
+ - spec/vagrant-hp/config_spec.rb
147
+ - vagrant-hp.gemspec
148
+ - .gitignore
149
+ homepage: http://github.com/mohitsethi/vagrant-hp
150
+ licenses: []
151
+ post_install_message:
152
+ rdoc_options: []
153
+ require_paths:
154
+ - lib
155
+ required_ruby_version: !ruby/object:Gem::Requirement
156
+ none: false
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ segments:
162
+ - 0
163
+ hash: 984541779
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ none: false
166
+ requirements:
167
+ - - ! '>='
168
+ - !ruby/object:Gem::Version
169
+ version: 1.3.6
170
+ requirements: []
171
+ rubyforge_project: vagrant-hp
172
+ rubygems_version: 1.8.24
173
+ signing_key:
174
+ specification_version: 3
175
+ summary: Enables Vagrant to manage machines on HP Cloud.
176
+ test_files: []