vagrant-gq 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.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/Gemfile +14 -0
- data/LICENSE +22 -0
- data/README.md +169 -0
- data/Rakefile +21 -0
- data/example_box/README.md +13 -0
- data/example_box/metadata.json +3 -0
- data/greenqloud-generic.box +0 -0
- data/lib/vagrant-gq/action/connect_gq.rb +47 -0
- data/lib/vagrant-gq/action/is_created.rb +18 -0
- data/lib/vagrant-gq/action/is_stopped.rb +18 -0
- data/lib/vagrant-gq/action/message_already_created.rb +16 -0
- data/lib/vagrant-gq/action/message_not_created.rb +16 -0
- data/lib/vagrant-gq/action/message_will_not_destroy.rb +16 -0
- data/lib/vagrant-gq/action/read_ssh_info.rb +53 -0
- data/lib/vagrant-gq/action/read_state.rb +38 -0
- data/lib/vagrant-gq/action/run_instance.rb +247 -0
- data/lib/vagrant-gq/action/start_instance.rb +81 -0
- data/lib/vagrant-gq/action/stop_instance.rb +28 -0
- data/lib/vagrant-gq/action/sync_folders.rb +118 -0
- data/lib/vagrant-gq/action/terminate_instance.rb +47 -0
- data/lib/vagrant-gq/action/timed_provision.rb +21 -0
- data/lib/vagrant-gq/action/wait_for_state.rb +41 -0
- data/lib/vagrant-gq/action/warn_networks.rb +19 -0
- data/lib/vagrant-gq/action.rb +190 -0
- data/lib/vagrant-gq/config.rb +372 -0
- data/lib/vagrant-gq/errors.rb +31 -0
- data/lib/vagrant-gq/plugin.rb +73 -0
- data/lib/vagrant-gq/provider.rb +50 -0
- data/lib/vagrant-gq/util/timer.rb +17 -0
- data/lib/vagrant-gq/version.rb +5 -0
- data/lib/vagrant-gq.rb +18 -0
- data/locales/en.yml +122 -0
- data/spec/vagrant-gq/config_spec.rb +216 -0
- data/vagrant-gq.gemspec +58 -0
- metadata +148 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
require "log4r"
|
2
|
+
require "vagrant"
|
3
|
+
|
4
|
+
module VagrantPlugins
|
5
|
+
module GQ
|
6
|
+
class Provider < Vagrant.plugin("2", :provider)
|
7
|
+
def initialize(machine)
|
8
|
+
@machine = machine
|
9
|
+
end
|
10
|
+
|
11
|
+
def action(name)
|
12
|
+
# Attempt to get the action method from the Action class if it
|
13
|
+
# exists, otherwise return nil to show that we don't support the
|
14
|
+
# given action.
|
15
|
+
action_method = "action_#{name}"
|
16
|
+
return Action.send(action_method) if Action.respond_to?(action_method)
|
17
|
+
nil
|
18
|
+
end
|
19
|
+
|
20
|
+
def ssh_info
|
21
|
+
# Run a custom action called "read_ssh_info" which does what it
|
22
|
+
# says and puts the resulting SSH info into the `:machine_ssh_info`
|
23
|
+
# key in the environment.
|
24
|
+
env = @machine.action("read_ssh_info")
|
25
|
+
env[:machine_ssh_info]
|
26
|
+
end
|
27
|
+
|
28
|
+
def state
|
29
|
+
# Run a custom action we define called "read_state" which does
|
30
|
+
# what it says. It puts the state in the `:machine_state_id`
|
31
|
+
# key in the environment.
|
32
|
+
env = @machine.action("read_state")
|
33
|
+
|
34
|
+
state_id = env[:machine_state_id]
|
35
|
+
|
36
|
+
# Get the short and long description
|
37
|
+
short = I18n.t("vagrant_gq.states.short_#{state_id}")
|
38
|
+
long = I18n.t("vagrant_gq.states.long_#{state_id}")
|
39
|
+
|
40
|
+
# Return the MachineState object
|
41
|
+
Vagrant::MachineState.new(state_id, short, long)
|
42
|
+
end
|
43
|
+
|
44
|
+
def to_s
|
45
|
+
id = @machine.id.nil? ? "new" : @machine.id
|
46
|
+
"GQ (#{id})"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module GQ
|
3
|
+
module Util
|
4
|
+
class Timer
|
5
|
+
# A basic utility method that times the execution of the given
|
6
|
+
# block and returns it.
|
7
|
+
def self.time
|
8
|
+
start_time = Time.now.to_f
|
9
|
+
yield
|
10
|
+
end_time = Time.now.to_f
|
11
|
+
|
12
|
+
end_time - start_time
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/vagrant-gq.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require "pathname"
|
2
|
+
|
3
|
+
require "vagrant-gq/plugin"
|
4
|
+
|
5
|
+
module VagrantPlugins
|
6
|
+
module GQ
|
7
|
+
lib_path = Pathname.new(File.expand_path("../vagrant-gq", __FILE__))
|
8
|
+
autoload :Action, lib_path.join("action")
|
9
|
+
autoload :Errors, lib_path.join("errors")
|
10
|
+
|
11
|
+
# This returns the path to the source of this plugin.
|
12
|
+
#
|
13
|
+
# @return [Pathname]
|
14
|
+
def self.source_root
|
15
|
+
@source_root ||= Pathname.new(File.expand_path("../../", __FILE__))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/locales/en.yml
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
en:
|
2
|
+
vagrant_gq:
|
3
|
+
already_status: |-
|
4
|
+
The machine is already %{status}.
|
5
|
+
launching_instance: |-
|
6
|
+
Launching an instance with the following settings...
|
7
|
+
launch_no_keypair: |-
|
8
|
+
Warning! You didn't specify a keypair to launch your instance with.
|
9
|
+
This can sometimes result in not being able to access your instance.
|
10
|
+
launch_vpc_warning: |-
|
11
|
+
Warning! You're launching this instance into a VPC without an
|
12
|
+
elastic IP. Please verify you're properly connected to a VPN so
|
13
|
+
you can access this machine, otherwise Vagrant will not be able
|
14
|
+
to SSH into it.
|
15
|
+
not_created: |-
|
16
|
+
Instance is not created. Please run `vagrant up` first.
|
17
|
+
ready: |-
|
18
|
+
Machine is booted and ready for use!
|
19
|
+
rsync_not_found_warning: |-
|
20
|
+
Warning! Folder sync disabled because the rsync binary is missing in the %{side}.
|
21
|
+
Make sure rsync is installed and the binary can be found in the PATH.
|
22
|
+
rsync_folder: |-
|
23
|
+
Rsyncing folder: %{hostpath} => %{guestpath}
|
24
|
+
starting: |-
|
25
|
+
Starting the instance...
|
26
|
+
stopping: |-
|
27
|
+
Stopping the instance...
|
28
|
+
terminating: |-
|
29
|
+
Terminating the instance...
|
30
|
+
waiting_for_ready: |-
|
31
|
+
Waiting for instance to become "ready"...
|
32
|
+
waiting_for_ssh: |-
|
33
|
+
Waiting for SSH to become available...
|
34
|
+
warn_networks: |-
|
35
|
+
Warning! The GreenQloud provider doesn't support any of the Vagrant
|
36
|
+
high-level network configurations (`config.vm.network`). They
|
37
|
+
will be silently ignored.
|
38
|
+
warn_ssh_access: |-
|
39
|
+
Warning! Vagrant might not be able to SSH into the instance.
|
40
|
+
Please check your security groups settings.
|
41
|
+
will_not_destroy: |-
|
42
|
+
The instance '%{name}' will not be destroyed, since the confirmation
|
43
|
+
was declined.
|
44
|
+
|
45
|
+
config:
|
46
|
+
access_key_id_required: |-
|
47
|
+
An access key ID must be specified via "access_key_id"
|
48
|
+
ami_required: |-
|
49
|
+
An AMI must be configured via "ami" (region: #{region})
|
50
|
+
private_key_missing: |-
|
51
|
+
The specified private key for GreenQloud could not be found
|
52
|
+
region_required: |-
|
53
|
+
A region must be specified via "region"
|
54
|
+
secret_access_key_required: |-
|
55
|
+
A secret access key is required via "secret_access_key"
|
56
|
+
subnet_id_required_with_public_ip: |-
|
57
|
+
If you assign a public IP address to an instance in a VPC, a subnet must be specifed via "subnet_id"
|
58
|
+
|
59
|
+
errors:
|
60
|
+
fog_error: |-
|
61
|
+
There was an error talking to GreenQloud. The error message is shown
|
62
|
+
below:
|
63
|
+
|
64
|
+
%{message}
|
65
|
+
internal_fog_error: |-
|
66
|
+
There was an error talking to GreenQloud. The error message is shown
|
67
|
+
below:
|
68
|
+
|
69
|
+
Error: %{error}
|
70
|
+
Response: %{response}
|
71
|
+
instance_ready_timeout: |-
|
72
|
+
The instance never became "ready" in GreenQloud. The timeout currently
|
73
|
+
set waiting for the instance to become ready is %{timeout} seconds.
|
74
|
+
Please verify that the machine properly boots. If you need more time
|
75
|
+
set the `instance_ready_timeout` configuration on the GreenQloud provider.
|
76
|
+
rsync_error: |-
|
77
|
+
There was an error when attempting to rsync a share folder.
|
78
|
+
Please inspect the error message below for more info.
|
79
|
+
|
80
|
+
Host path: %{hostpath}
|
81
|
+
Guest path: %{guestpath}
|
82
|
+
Error: %{stderr}
|
83
|
+
mkdir_error: |-
|
84
|
+
There was an error when attempting to create a shared host folder.
|
85
|
+
Please inspect the error message below for more info.
|
86
|
+
|
87
|
+
Host path: %{hostpath}
|
88
|
+
Error: %{err}
|
89
|
+
|
90
|
+
states:
|
91
|
+
short_not_created: |-
|
92
|
+
not created
|
93
|
+
long_not_created: |-
|
94
|
+
The GreenQloud instance is not created. Run `vagrant up` to create it.
|
95
|
+
|
96
|
+
short_stopped: |-
|
97
|
+
stopped
|
98
|
+
long_stopped: |-
|
99
|
+
The GreenQloud instance is stopped. Run `vagrant up` to start it.
|
100
|
+
|
101
|
+
short_stopping: |-
|
102
|
+
stopping
|
103
|
+
long_stopping: |-
|
104
|
+
The GreenQloud instance is stopping. Wait until is completely stopped to
|
105
|
+
run `vagrant up` and start it.
|
106
|
+
|
107
|
+
short_pending: |-
|
108
|
+
pending
|
109
|
+
long_pending: |-
|
110
|
+
The GreenQloud instance is pending a start (i.e. this is a transition state).
|
111
|
+
|
112
|
+
short_running: |-
|
113
|
+
running
|
114
|
+
long_running: |-
|
115
|
+
The GreenQloud instance is running. To stop this machine, you can run
|
116
|
+
`vagrant halt`. To destroy the machine, you can run `vagrant destroy`.
|
117
|
+
|
118
|
+
short_pending: |-
|
119
|
+
pending
|
120
|
+
long_pending: |-
|
121
|
+
The GreenQloud instance is still being initialized. To destroy this machine,
|
122
|
+
you can run `vagrant destroy`.
|
@@ -0,0 +1,216 @@
|
|
1
|
+
require "vagrant-gq/config"
|
2
|
+
|
3
|
+
describe VagrantPlugins::GQ::Config do
|
4
|
+
let(:instance) { described_class.new }
|
5
|
+
|
6
|
+
# Ensure tests are not affected by GQ credential environment variables
|
7
|
+
before :each do
|
8
|
+
ENV.stub(:[] => nil)
|
9
|
+
end
|
10
|
+
|
11
|
+
describe "defaults" do
|
12
|
+
subject do
|
13
|
+
instance.tap do |o|
|
14
|
+
o.finalize!
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
its("access_key_id") { should be_nil }
|
19
|
+
its("ami") { should be_nil }
|
20
|
+
its("availability_zone") { should be_nil }
|
21
|
+
its("instance_ready_timeout") { should == 120 }
|
22
|
+
its("instance_type") { should == "m1.small" }
|
23
|
+
its("keypair_name") { should be_nil }
|
24
|
+
its("private_ip_address") { should be_nil }
|
25
|
+
its("region") { should == "us-east-1" }
|
26
|
+
its("secret_access_key") { should be_nil }
|
27
|
+
its("security_groups") { should == [] }
|
28
|
+
its("subnet_id") { should be_nil }
|
29
|
+
its("iam_instance_profile_arn") { should be_nil }
|
30
|
+
its("iam_instance_profile_name") { should be_nil }
|
31
|
+
its("tags") { should == {} }
|
32
|
+
its("user_data") { should be_nil }
|
33
|
+
its("use_iam_profile") { should be_false }
|
34
|
+
its("block_device_mapping") {should == [] }
|
35
|
+
its("elastic_ip") { should be_nil }
|
36
|
+
its("terminate_on_shutdown") { should == false }
|
37
|
+
its("ssh_host_attribute") { should be_nil }
|
38
|
+
its("monitoring") { should == false }
|
39
|
+
its("ebs_optimized") { should == false }
|
40
|
+
its("associate_public_ip") { should == false }
|
41
|
+
end
|
42
|
+
|
43
|
+
describe "overriding defaults" do
|
44
|
+
# I typically don't meta-program in tests, but this is a very
|
45
|
+
# simple boilerplate test, so I cut corners here. It just sets
|
46
|
+
# each of these attributes to "foo" in isolation, and reads the value
|
47
|
+
# and asserts the proper result comes back out.
|
48
|
+
[:access_key_id, :ami, :availability_zone, :instance_ready_timeout,
|
49
|
+
:instance_type, :keypair_name, :ssh_host_attribute, :ebs_optimized,
|
50
|
+
:region, :secret_access_key, :monitoring, :associate_public_ip,
|
51
|
+
:subnet_id, :tags, :elastic_ip, :terminate_on_shutdown,
|
52
|
+
:iam_instance_profile_arn, :iam_instance_profile_name,
|
53
|
+
:use_iam_profile, :user_data, :block_device_mapping].each do |attribute|
|
54
|
+
|
55
|
+
it "should not default #{attribute} if overridden" do
|
56
|
+
instance.send("#{attribute}=".to_sym, "foo")
|
57
|
+
instance.finalize!
|
58
|
+
instance.send(attribute).should == "foo"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
it "should not default security_groups if overridden" do
|
62
|
+
instance.security_groups = "foo"
|
63
|
+
instance.finalize!
|
64
|
+
instance.security_groups.should == ["foo"]
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
describe "getting credentials from environment" do
|
69
|
+
context "without EC2 credential environment variables" do
|
70
|
+
subject do
|
71
|
+
instance.tap do |o|
|
72
|
+
o.finalize!
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
its("access_key_id") { should be_nil }
|
77
|
+
its("secret_access_key") { should be_nil }
|
78
|
+
end
|
79
|
+
|
80
|
+
context "with EC2 credential environment variables" do
|
81
|
+
before :each do
|
82
|
+
ENV.stub(:[]).with("EC2_ACCESS_KEY").and_return("access_key")
|
83
|
+
ENV.stub(:[]).with("EC2_SECRET_KEY").and_return("secret_key")
|
84
|
+
end
|
85
|
+
|
86
|
+
subject do
|
87
|
+
instance.tap do |o|
|
88
|
+
o.finalize!
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
its("access_key_id") { should == "access_key" }
|
93
|
+
its("secret_access_key") { should == "secret_key" }
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
describe "region config" do
|
98
|
+
let(:config_access_key_id) { "foo" }
|
99
|
+
let(:config_ami) { "foo" }
|
100
|
+
let(:config_instance_type) { "foo" }
|
101
|
+
let(:config_keypair_name) { "foo" }
|
102
|
+
let(:config_region) { "foo" }
|
103
|
+
let(:config_secret_access_key) { "foo" }
|
104
|
+
|
105
|
+
def set_test_values(instance)
|
106
|
+
instance.access_key_id = config_access_key_id
|
107
|
+
instance.ami = config_ami
|
108
|
+
instance.instance_type = config_instance_type
|
109
|
+
instance.keypair_name = config_keypair_name
|
110
|
+
instance.region = config_region
|
111
|
+
instance.secret_access_key = config_secret_access_key
|
112
|
+
end
|
113
|
+
|
114
|
+
it "should raise an exception if not finalized" do
|
115
|
+
expect { instance.get_region_config("us-east-1") }.
|
116
|
+
to raise_error
|
117
|
+
end
|
118
|
+
|
119
|
+
context "with no specific config set" do
|
120
|
+
subject do
|
121
|
+
# Set the values on the top-level object
|
122
|
+
set_test_values(instance)
|
123
|
+
|
124
|
+
# Finalize so we can get the region config
|
125
|
+
instance.finalize!
|
126
|
+
|
127
|
+
# Get a lower level region
|
128
|
+
instance.get_region_config("us-east-1")
|
129
|
+
end
|
130
|
+
|
131
|
+
its("access_key_id") { should == config_access_key_id }
|
132
|
+
its("ami") { should == config_ami }
|
133
|
+
its("instance_type") { should == config_instance_type }
|
134
|
+
its("keypair_name") { should == config_keypair_name }
|
135
|
+
its("region") { should == config_region }
|
136
|
+
its("secret_access_key") { should == config_secret_access_key }
|
137
|
+
end
|
138
|
+
|
139
|
+
context "with a specific config set" do
|
140
|
+
let(:region_name) { "hashi-region" }
|
141
|
+
|
142
|
+
subject do
|
143
|
+
# Set the values on a specific region
|
144
|
+
instance.region_config region_name do |config|
|
145
|
+
set_test_values(config)
|
146
|
+
end
|
147
|
+
|
148
|
+
# Finalize so we can get the region config
|
149
|
+
instance.finalize!
|
150
|
+
|
151
|
+
# Get the region
|
152
|
+
instance.get_region_config(region_name)
|
153
|
+
end
|
154
|
+
|
155
|
+
its("access_key_id") { should == config_access_key_id }
|
156
|
+
its("ami") { should == config_ami }
|
157
|
+
its("instance_type") { should == config_instance_type }
|
158
|
+
its("keypair_name") { should == config_keypair_name }
|
159
|
+
its("region") { should == region_name }
|
160
|
+
its("secret_access_key") { should == config_secret_access_key }
|
161
|
+
end
|
162
|
+
|
163
|
+
describe "inheritance of parent config" do
|
164
|
+
let(:region_name) { "hashi-region" }
|
165
|
+
|
166
|
+
subject do
|
167
|
+
# Set the values on a specific region
|
168
|
+
instance.region_config region_name do |config|
|
169
|
+
config.ami = "child"
|
170
|
+
end
|
171
|
+
|
172
|
+
# Set some top-level values
|
173
|
+
instance.access_key_id = "parent"
|
174
|
+
instance.ami = "parent"
|
175
|
+
|
176
|
+
# Finalize and get the region
|
177
|
+
instance.finalize!
|
178
|
+
instance.get_region_config(region_name)
|
179
|
+
end
|
180
|
+
|
181
|
+
its("access_key_id") { should == "parent" }
|
182
|
+
its("ami") { should == "child" }
|
183
|
+
end
|
184
|
+
|
185
|
+
describe "shortcut configuration" do
|
186
|
+
subject do
|
187
|
+
# Use the shortcut configuration to set some values
|
188
|
+
instance.region_config "us-east-1", :ami => "child"
|
189
|
+
instance.finalize!
|
190
|
+
instance.get_region_config("us-east-1")
|
191
|
+
end
|
192
|
+
|
193
|
+
its("ami") { should == "child" }
|
194
|
+
end
|
195
|
+
|
196
|
+
describe "merging" do
|
197
|
+
let(:first) { described_class.new }
|
198
|
+
let(:second) { described_class.new }
|
199
|
+
|
200
|
+
it "should merge the tags and block_device_mappings" do
|
201
|
+
first.tags["one"] = "one"
|
202
|
+
second.tags["two"] = "two"
|
203
|
+
first.block_device_mapping = [{:one => "one"}]
|
204
|
+
second.block_device_mapping = [{:two => "two"}]
|
205
|
+
|
206
|
+
third = first.merge(second)
|
207
|
+
third.tags.should == {
|
208
|
+
"one" => "one",
|
209
|
+
"two" => "two"
|
210
|
+
}
|
211
|
+
third.block_device_mapping.index({:one => "one"}).should_not be_nil
|
212
|
+
third.block_device_mapping.index({:two => "two"}).should_not be_nil
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
data/vagrant-gq.gemspec
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
$:.unshift File.expand_path("../lib", __FILE__)
|
2
|
+
require "vagrant-gq/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "vagrant-gq"
|
6
|
+
s.version = VagrantPlugins::GQ::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.license = "MIT"
|
9
|
+
s.authors = "GreenQloud"
|
10
|
+
s.email = "info@greenqloud.com"
|
11
|
+
s.homepage = "https://www.greenqloud.com"
|
12
|
+
s.summary = "Enables Vagrant to manage machines in GreenQloud."
|
13
|
+
s.description = "Enables Vagrant to manage machines in GreenQloud."
|
14
|
+
|
15
|
+
s.required_rubygems_version = ">= 1.3.6"
|
16
|
+
|
17
|
+
s.add_runtime_dependency "fog", "~> 1.18"
|
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
|
+
|
24
|
+
# The following block of code determines the files that should be included
|
25
|
+
# in the gem. It does this by reading all the files in the directory where
|
26
|
+
# this gemspec is, and parsing out the ignored files from the gitignore.
|
27
|
+
# Note that the entire gitignore(5) syntax is not supported, specifically
|
28
|
+
# the "!" syntax, but it should mostly work correctly.
|
29
|
+
root_path = File.dirname(__FILE__)
|
30
|
+
all_files = Dir.chdir(root_path) { Dir.glob("**/{*,.*}") }
|
31
|
+
all_files.reject! { |file| [".", ".."].include?(File.basename(file)) }
|
32
|
+
gitignore_path = File.join(root_path, ".gitignore")
|
33
|
+
gitignore = File.readlines(gitignore_path)
|
34
|
+
gitignore.map! { |line| line.chomp.strip }
|
35
|
+
gitignore.reject! { |line| line.empty? || line =~ /^(#|!)/ }
|
36
|
+
|
37
|
+
unignored_files = all_files.reject do |file|
|
38
|
+
# Ignore any directories, the gemspec only cares about files
|
39
|
+
next true if File.directory?(file)
|
40
|
+
|
41
|
+
# Ignore any paths that match anything in the gitignore. We do
|
42
|
+
# two tests here:
|
43
|
+
#
|
44
|
+
# - First, test to see if the entire path matches the gitignore.
|
45
|
+
# - Second, match if the basename does, this makes it so that things
|
46
|
+
# like '.DS_Store' will match sub-directories too (same behavior
|
47
|
+
# as git).
|
48
|
+
#
|
49
|
+
gitignore.any? do |ignore|
|
50
|
+
File.fnmatch(ignore, file, File::FNM_PATHNAME) ||
|
51
|
+
File.fnmatch(ignore, File.basename(file), File::FNM_PATHNAME)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
s.files = unignored_files
|
56
|
+
s.executables = unignored_files.map { |f| f[/^bin\/(.*)/, 1] }.compact
|
57
|
+
s.require_path = 'lib'
|
58
|
+
end
|
metadata
ADDED
@@ -0,0 +1,148 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-gq
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- GreenQloud
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-05-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: fog
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.18'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.18'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
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'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec-core
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.12.2
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.12.2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-expectations
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.12.1
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.12.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec-mocks
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.12.1
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.12.1
|
83
|
+
description: Enables Vagrant to manage machines in GreenQloud.
|
84
|
+
email: info@greenqloud.com
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files: []
|
88
|
+
files:
|
89
|
+
- ".gitignore"
|
90
|
+
- Gemfile
|
91
|
+
- LICENSE
|
92
|
+
- README.md
|
93
|
+
- Rakefile
|
94
|
+
- example_box/README.md
|
95
|
+
- example_box/metadata.json
|
96
|
+
- greenqloud-generic.box
|
97
|
+
- lib/vagrant-gq.rb
|
98
|
+
- lib/vagrant-gq/action.rb
|
99
|
+
- lib/vagrant-gq/action/connect_gq.rb
|
100
|
+
- lib/vagrant-gq/action/is_created.rb
|
101
|
+
- lib/vagrant-gq/action/is_stopped.rb
|
102
|
+
- lib/vagrant-gq/action/message_already_created.rb
|
103
|
+
- lib/vagrant-gq/action/message_not_created.rb
|
104
|
+
- lib/vagrant-gq/action/message_will_not_destroy.rb
|
105
|
+
- lib/vagrant-gq/action/read_ssh_info.rb
|
106
|
+
- lib/vagrant-gq/action/read_state.rb
|
107
|
+
- lib/vagrant-gq/action/run_instance.rb
|
108
|
+
- lib/vagrant-gq/action/start_instance.rb
|
109
|
+
- lib/vagrant-gq/action/stop_instance.rb
|
110
|
+
- lib/vagrant-gq/action/sync_folders.rb
|
111
|
+
- lib/vagrant-gq/action/terminate_instance.rb
|
112
|
+
- lib/vagrant-gq/action/timed_provision.rb
|
113
|
+
- lib/vagrant-gq/action/wait_for_state.rb
|
114
|
+
- lib/vagrant-gq/action/warn_networks.rb
|
115
|
+
- lib/vagrant-gq/config.rb
|
116
|
+
- lib/vagrant-gq/errors.rb
|
117
|
+
- lib/vagrant-gq/plugin.rb
|
118
|
+
- lib/vagrant-gq/provider.rb
|
119
|
+
- lib/vagrant-gq/util/timer.rb
|
120
|
+
- lib/vagrant-gq/version.rb
|
121
|
+
- locales/en.yml
|
122
|
+
- spec/vagrant-gq/config_spec.rb
|
123
|
+
- vagrant-gq.gemspec
|
124
|
+
homepage: https://www.greenqloud.com
|
125
|
+
licenses:
|
126
|
+
- MIT
|
127
|
+
metadata: {}
|
128
|
+
post_install_message:
|
129
|
+
rdoc_options: []
|
130
|
+
require_paths:
|
131
|
+
- lib
|
132
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 1.3.6
|
142
|
+
requirements: []
|
143
|
+
rubyforge_project:
|
144
|
+
rubygems_version: 2.2.2
|
145
|
+
signing_key:
|
146
|
+
specification_version: 4
|
147
|
+
summary: Enables Vagrant to manage machines in GreenQloud.
|
148
|
+
test_files: []
|