vagrant-rimu 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Vagrantfile +7 -3
- data/lib/vagrant-rimu.rb +10 -0
- data/lib/vagrant-rimu/actions.rb +20 -14
- data/lib/vagrant-rimu/actions/billing_methods.rb +4 -5
- data/lib/vagrant-rimu/actions/connect_to_rimu.rb +1 -1
- data/lib/vagrant-rimu/actions/create.rb +2 -2
- data/lib/vagrant-rimu/actions/list_distributions.rb +4 -5
- data/lib/vagrant-rimu/actions/list_servers.rb +6 -5
- data/lib/vagrant-rimu/actions/move.rb +1 -1
- data/lib/vagrant-rimu/actions/read_ssh_info.rb +2 -2
- data/lib/vagrant-rimu/actions/read_state.rb +2 -2
- data/lib/vagrant-rimu/actions/rebuild.rb +2 -2
- data/lib/vagrant-rimu/actions/reload.rb +2 -2
- data/lib/vagrant-rimu/actions/setup_user.rb +7 -1
- data/lib/vagrant-rimu/actions/start_instance.rb +2 -2
- data/lib/vagrant-rimu/actions/stop_instance.rb +4 -3
- data/lib/vagrant-rimu/actions/terminate_instance.rb +3 -3
- data/lib/vagrant-rimu/config.rb +2 -0
- data/lib/vagrant-rimu/errors.rb +2 -0
- data/lib/vagrant-rimu/logging.rb +28 -0
- data/lib/vagrant-rimu/plugin.rb +11 -37
- data/lib/vagrant-rimu/provider.rb +3 -1
- data/lib/vagrant-rimu/version.rb +1 -1
- data/spec/spec_helper.rb +13 -6
- data/spec/vagrant-rimu/actions/billing_methods_spec.rb +49 -0
- data/spec/vagrant-rimu/actions/is_created_spec.rb +49 -0
- data/spec/vagrant-rimu/actions/is_stopped_spec.rb +49 -0
- data/spec/vagrant-rimu/actions/list_distributions_spec.rb +49 -0
- data/spec/vagrant-rimu/actions/list_servers_spec.rb +51 -0
- data/spec/vagrant-rimu/actions/modify_provision_path_spec.rb +2 -7
- data/spec/vagrant-rimu/actions/read_ssh_info_spec.rb +13 -0
- data/spec/vagrant-rimu/config_spec.rb +1 -1
- data/vagrant-rimu.gemspec +3 -1
- metadata +38 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a03f01ba13d87cf66c51b6708cfee445ea83faf
|
4
|
+
data.tar.gz: 967f4fcc6e0f8461e71c3f6509e3378f828407b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed69f66bd9f6b912a169bf4305ac603eca49ed073f370a81158023b9b48aa8fa0095870d9d018618317888fa01116a9f7f784bdd74d22d8bf32ce119ccb0a12f
|
7
|
+
data.tar.gz: b8b5f0bac476789a3d08759ce1c1911d379b77cfa767e4298e8dda445e4d8f0a65dfd7c7d6b0b99db3085fa33bc2a9ce1cb61c5a71300131f95a415fc3b37a1f
|
data/README.md
CHANGED
@@ -35,7 +35,7 @@ The most basic `Vagrantfile` to create a VPS on Rimu is shown below
|
|
35
35
|
```ruby
|
36
36
|
Vagrant.configure('2') do |config|
|
37
37
|
|
38
|
-
config.vm.provider :rimu do |provider
|
38
|
+
config.vm.provider :rimu do |provider|
|
39
39
|
override.ssh.private_key_path = '~/.ssh/id_rsa'
|
40
40
|
|
41
41
|
provider.api_key = 'YOUR RIMU API KEY'
|
data/Vagrantfile
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
REQUIRED_PLUGINS = %w(vagrant-rimu)
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
Vagrant.configure('2') do |config|
|
4
|
+
config.vm.provider :rimu do |provider, override|
|
5
|
+
override.ssh.private_key_path = 'test/test_rimu_id_rsa'
|
6
|
+
provider.api_key = ENV['RIMU_API_KEY']
|
7
|
+
provider.host_name = 'rimu.example.com'
|
8
|
+
end
|
9
|
+
config.vm.provision "shell", inline: "echo 'done' > ~/provision"
|
6
10
|
end
|
data/lib/vagrant-rimu.rb
CHANGED
@@ -1,11 +1,21 @@
|
|
1
1
|
require 'pathname'
|
2
2
|
|
3
3
|
require 'vagrant-rimu/plugin'
|
4
|
+
require 'vagrant-rimu/logging'
|
4
5
|
|
5
6
|
module VagrantPlugins
|
6
7
|
module Rimu
|
7
8
|
lib_path = Pathname.new(File.expand_path("../vagrant-rimu", __FILE__))
|
8
9
|
autoload :Errors, lib_path.join('errors')
|
10
|
+
|
11
|
+
def self.init_i18n
|
12
|
+
I18n.load_path << File.expand_path('locales/en.yml', source_root)
|
13
|
+
I18n.reload!
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.init_logging
|
17
|
+
Logging.init
|
18
|
+
end
|
9
19
|
|
10
20
|
def self.source_root
|
11
21
|
@source_root ||= Pathname.new(File.expand_path("../../", __FILE__))
|
data/lib/vagrant-rimu/actions.rb
CHANGED
@@ -9,7 +9,7 @@ module VagrantPlugins
|
|
9
9
|
|
10
10
|
# This action is called to terminate the remote machine.
|
11
11
|
def self.action_destroy
|
12
|
-
|
12
|
+
new_builder.tap do |b|
|
13
13
|
b.use Call, DestroyConfirm do |env, b2|
|
14
14
|
if env[:result]
|
15
15
|
b2.use ConfigValidate
|
@@ -32,7 +32,7 @@ module VagrantPlugins
|
|
32
32
|
# resulting state is expected to be put into the `:machine_ssh_info`
|
33
33
|
# key.
|
34
34
|
def self.action_read_ssh_info
|
35
|
-
|
35
|
+
new_builder.tap do |b|
|
36
36
|
b.use ConfigValidate
|
37
37
|
b.use ConnectToRimu
|
38
38
|
b.use ReadSSHInfo
|
@@ -43,7 +43,7 @@ module VagrantPlugins
|
|
43
43
|
# resulting state is expected to be put into the `:machine_state_id`
|
44
44
|
# key.
|
45
45
|
def self.action_read_state
|
46
|
-
|
46
|
+
new_builder.tap do |b|
|
47
47
|
b.use ConfigValidate
|
48
48
|
b.use ConnectToRimu
|
49
49
|
b.use ReadState
|
@@ -52,7 +52,7 @@ module VagrantPlugins
|
|
52
52
|
|
53
53
|
# This action is called to SSH into the machine.
|
54
54
|
def self.action_ssh
|
55
|
-
|
55
|
+
new_builder.tap do |b|
|
56
56
|
b.use ConfigValidate
|
57
57
|
b.use Call, IsCreated do |env, b2|
|
58
58
|
if !env[:result]
|
@@ -66,7 +66,7 @@ module VagrantPlugins
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def self.action_ssh_run
|
69
|
-
|
69
|
+
new_builder.tap do |b|
|
70
70
|
b.use ConfigValidate
|
71
71
|
b.use Call, IsCreated do |env, b2|
|
72
72
|
if !env[:result]
|
@@ -81,7 +81,7 @@ module VagrantPlugins
|
|
81
81
|
|
82
82
|
# This action is called when `vagrant provision` is called.
|
83
83
|
def self.action_provision
|
84
|
-
return
|
84
|
+
return new_builder.tap do |builder|
|
85
85
|
builder.use ConfigValidate
|
86
86
|
builder.use ConnectToRimu
|
87
87
|
builder.use Call, IsCreated do |env, b|
|
@@ -100,7 +100,7 @@ module VagrantPlugins
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def self.action_up
|
103
|
-
return
|
103
|
+
return new_builder.tap do |builder|
|
104
104
|
builder.use ConfigValidate
|
105
105
|
builder.use ConnectToRimu
|
106
106
|
builder.use Call, IsCreated do |env, b|
|
@@ -122,7 +122,7 @@ module VagrantPlugins
|
|
122
122
|
|
123
123
|
# This action is called to halt the remote machine.
|
124
124
|
def self.action_halt
|
125
|
-
|
125
|
+
new_builder.tap do |builder|
|
126
126
|
builder.use ConfigValidate
|
127
127
|
builder.use Call, IsCreated do |env, b1|
|
128
128
|
if env[:result]
|
@@ -142,7 +142,7 @@ module VagrantPlugins
|
|
142
142
|
end
|
143
143
|
|
144
144
|
def self.action_reload
|
145
|
-
return
|
145
|
+
return new_builder.tap do |builder|
|
146
146
|
builder.use ConfigValidate
|
147
147
|
builder.use ConnectToRimu
|
148
148
|
builder.use Call, IsCreated do |env, b|
|
@@ -160,7 +160,7 @@ module VagrantPlugins
|
|
160
160
|
end
|
161
161
|
|
162
162
|
def self.action_rebuild
|
163
|
-
return
|
163
|
+
return new_builder.tap do |builder|
|
164
164
|
builder.use ConfigValidate
|
165
165
|
builder.use ConnectToRimu
|
166
166
|
builder.use Call, IsCreated do |env, b|
|
@@ -178,7 +178,7 @@ module VagrantPlugins
|
|
178
178
|
end
|
179
179
|
|
180
180
|
def self.action_list_distributions
|
181
|
-
|
181
|
+
new_builder.tap do |b|
|
182
182
|
b.use ConfigValidate
|
183
183
|
b.use ConnectToRimu
|
184
184
|
b.use ListDistributions
|
@@ -186,7 +186,7 @@ module VagrantPlugins
|
|
186
186
|
end
|
187
187
|
|
188
188
|
def self.action_list_servers
|
189
|
-
|
189
|
+
new_builder.tap do |b|
|
190
190
|
b.use ConfigValidate
|
191
191
|
b.use ConnectToRimu
|
192
192
|
b.use ListServers
|
@@ -194,7 +194,7 @@ module VagrantPlugins
|
|
194
194
|
end
|
195
195
|
|
196
196
|
def self.action_billing_methods
|
197
|
-
|
197
|
+
new_builder.tap do |b|
|
198
198
|
b.use ConfigValidate
|
199
199
|
b.use ConnectToRimu
|
200
200
|
b.use BillingMethods
|
@@ -202,7 +202,7 @@ module VagrantPlugins
|
|
202
202
|
end
|
203
203
|
|
204
204
|
def self.action_move
|
205
|
-
|
205
|
+
new_builder.tap do |b|
|
206
206
|
b.use ConfigValidate
|
207
207
|
b.use ConnectToRimu
|
208
208
|
b.use Move
|
@@ -232,6 +232,12 @@ module VagrantPlugins
|
|
232
232
|
autoload :MessageNotCreated, action_root.join('message_not_created')
|
233
233
|
autoload :MessageWillNotDestroy, action_root.join('message_will_not_destroy')
|
234
234
|
autoload :MessageAlreadyCreated, action_root.join('message_already_created')
|
235
|
+
|
236
|
+
private
|
237
|
+
|
238
|
+
def self.new_builder
|
239
|
+
Vagrant::Action::Builder.new
|
240
|
+
end
|
235
241
|
end
|
236
242
|
end
|
237
243
|
end
|
@@ -2,15 +2,14 @@ module VagrantPlugins
|
|
2
2
|
module Rimu
|
3
3
|
module Actions
|
4
4
|
class BillingMethods
|
5
|
-
def initialize(app,
|
5
|
+
def initialize(app, _env)
|
6
6
|
@app = app
|
7
|
-
@client = env[:rimu_api]
|
8
7
|
end
|
9
8
|
|
10
9
|
def call(env)
|
11
|
-
env[:ui].info '%-
|
12
|
-
|
13
|
-
env[:ui].info '%-
|
10
|
+
env[:ui].info '%-20s %-20s %s' % ['ID', 'Type', 'Description']
|
11
|
+
env[:rimu_api].billing_methods.each do |b|
|
12
|
+
env[:ui].info '%-20s %-20s %s' % [b.billing_oid, b.billing_method_type, b.description]
|
14
13
|
end
|
15
14
|
@app.call(env)
|
16
15
|
end
|
@@ -13,7 +13,7 @@ module VagrantPlugins
|
|
13
13
|
|
14
14
|
def call(env)
|
15
15
|
@logger.info('Connecting to Rimu api_url...')
|
16
|
-
rimu = ::Rimu.new({:api_url => @config.api_url, :api_key=> @config.api_key})
|
16
|
+
rimu = ::Rimu::RimuAPI.new({:api_url => @config.api_url, :api_key=> @config.api_key})
|
17
17
|
env[:rimu_api] = rimu
|
18
18
|
@app.call(env)
|
19
19
|
end
|
@@ -8,12 +8,12 @@ module VagrantPlugins
|
|
8
8
|
include Vagrant::Util::Retryable
|
9
9
|
def initialize(app, env)
|
10
10
|
@app = app
|
11
|
-
@client = env[:rimu_api]
|
12
11
|
@machine = env[:machine]
|
13
12
|
@logger = Log4r::Logger.new('vagrant::rimu::create')
|
14
13
|
end
|
15
14
|
|
16
15
|
def call(env)
|
16
|
+
client = env[:rimu_api]
|
17
17
|
env[:ui].info I18n.t('vagrant_rimu.creating')
|
18
18
|
params = {
|
19
19
|
:billing_oid => @machine.provider_config.billing_id,
|
@@ -52,7 +52,7 @@ module VagrantPlugins
|
|
52
52
|
if params.has_key?(:instantiation_options)
|
53
53
|
params[:instantiation_options][:password] = root_pass
|
54
54
|
end
|
55
|
-
result =
|
55
|
+
result = client.servers.create(params)
|
56
56
|
@machine.id = result.order_oid
|
57
57
|
env[:ui].info I18n.t('vagrant_rimu.ip_address', {:ip => result.allocated_ips["primary_ip"]})
|
58
58
|
switch_user = @machine.provider_config.setup?
|
@@ -2,15 +2,14 @@ module VagrantPlugins
|
|
2
2
|
module Rimu
|
3
3
|
module Actions
|
4
4
|
class ListDistributions
|
5
|
-
def initialize(app,
|
5
|
+
def initialize(app, _env)
|
6
6
|
@app = app
|
7
|
-
@client = env[:rimu_api]
|
8
7
|
end
|
9
8
|
|
10
9
|
def call(env)
|
11
|
-
env[:ui].info '%-
|
12
|
-
|
13
|
-
env[:ui].info '%-
|
10
|
+
env[:ui].info '%-15s %s' % ['Distro Code', 'Distro Description']
|
11
|
+
env[:rimu_api].distributions.each do |dist|
|
12
|
+
env[:ui].info '%-15s %s' % [dist.distro_code, dist.distro_description]
|
14
13
|
end
|
15
14
|
@app.call(env)
|
16
15
|
end
|
@@ -2,15 +2,16 @@ module VagrantPlugins
|
|
2
2
|
module Rimu
|
3
3
|
module Actions
|
4
4
|
class ListServers
|
5
|
-
def initialize(app,
|
5
|
+
def initialize(app, _env)
|
6
6
|
@app = app
|
7
|
-
@client = env[:rimu_api]
|
8
7
|
end
|
9
8
|
|
10
9
|
def call(env)
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
heading = '%-10s %-30s %-20s %-15s %-15s' % ['ID', 'Hostname', 'Data Centre', 'Host Server', 'Status']
|
11
|
+
env[:ui].info heading
|
12
|
+
env[:rimu_api].orders.orders.each do |o|
|
13
|
+
row = '%-10s %-30s %-20s %-15s %-15s' % [o.order_oid, o.domain_name, o.location["data_center_location_code"], o.host_server_oid, o.running_state]
|
14
|
+
env[:ui].info row
|
14
15
|
end
|
15
16
|
@app.call(env)
|
16
17
|
end
|
@@ -7,11 +7,11 @@ module VagrantPlugins
|
|
7
7
|
def initialize(app, env)
|
8
8
|
@app = app
|
9
9
|
@machine = env[:machine]
|
10
|
-
@client = client
|
11
10
|
@logger = Log4r::Logger.new('vagrant::rimu::move')
|
12
11
|
end
|
13
12
|
|
14
13
|
def call(env)
|
14
|
+
client = env[:rimu_api]
|
15
15
|
env[:ui].info I18n.t('vagrant_rimu.move')
|
16
16
|
fail 'not implemented'
|
17
17
|
@app.call(env)
|
@@ -9,12 +9,12 @@ module VagrantPlugins
|
|
9
9
|
def initialize(app, env)
|
10
10
|
@app = app
|
11
11
|
@machine = env[:machine]
|
12
|
-
@client = env[:rimu_api]
|
13
12
|
@logger = Log4r::Logger.new("vagrant_rimu::action::read_ssh_info")
|
14
13
|
end
|
15
14
|
|
16
15
|
def call(env)
|
17
|
-
env[:
|
16
|
+
client = env[:rimu_api]
|
17
|
+
env[:machine_ssh_info] = read_ssh_info(client, @machine)
|
18
18
|
|
19
19
|
@app.call(env)
|
20
20
|
end
|
@@ -7,12 +7,12 @@ module VagrantPlugins
|
|
7
7
|
def initialize(app, env)
|
8
8
|
@app = app
|
9
9
|
@machine = env[:machine]
|
10
|
-
@client = env[:rimu_api]
|
11
10
|
@logger = Log4r::Logger.new('vagrant_rimu::action::read_state')
|
12
11
|
end
|
13
12
|
|
14
13
|
def call(env)
|
15
|
-
env[:
|
14
|
+
client = env[:rimu_api]
|
15
|
+
env[:machine_state] = read_state(client, @machine)
|
16
16
|
@logger.info "Machine state is '#{env[:machine_state]}'"
|
17
17
|
@app.call(env)
|
18
18
|
end
|
@@ -8,12 +8,12 @@ module VagrantPlugins
|
|
8
8
|
|
9
9
|
def initialize(app, env)
|
10
10
|
@app = app
|
11
|
-
@client = env[:rimu_api]
|
12
11
|
@machine = env[:machine]
|
13
12
|
@logger = Log4r::Logger.new('vagrant::rimu::rebuild')
|
14
13
|
end
|
15
14
|
|
16
15
|
def call(env)
|
16
|
+
client = env[:rimu_api]
|
17
17
|
env[:ui].info I18n.t('vagrant_rimu.rebuilding')
|
18
18
|
params = {
|
19
19
|
:instantiation_options => {
|
@@ -35,7 +35,7 @@ module VagrantPlugins
|
|
35
35
|
}
|
36
36
|
params.delete(:instantiation_via_clone_options) if @machine.provider_config.vps_to_clone.nil?
|
37
37
|
params.delete(:instantiation_options) if params.has_key?(:instantiation_via_clone_options)
|
38
|
-
|
38
|
+
client.servers.reinstall(@machine.id.to_i, params)
|
39
39
|
switch_user = @machine.provider_config.setup?
|
40
40
|
user = @machine.config.ssh.username
|
41
41
|
@machine.config.ssh.username = 'root' if switch_user
|
@@ -6,14 +6,14 @@ module VagrantPlugins
|
|
6
6
|
class Reload
|
7
7
|
def initialize(app, env)
|
8
8
|
@app = app
|
9
|
-
@client = env[:rimu_api]
|
10
9
|
@machine = env[:machine]
|
11
10
|
@logger = Log4r::Logger.new('vagrant::rimu::reload')
|
12
11
|
end
|
13
12
|
|
14
13
|
def call(env)
|
14
|
+
client = env[:rimu_api]
|
15
15
|
env[:ui].info I18n.t('vagrant_rimu.reloading')
|
16
|
-
|
16
|
+
client.servers.reboot(@machine.id.to_i)
|
17
17
|
|
18
18
|
@app.call(env)
|
19
19
|
end
|
@@ -48,7 +48,7 @@ module VagrantPlugins
|
|
48
48
|
path = @machine.config.ssh.private_key_path
|
49
49
|
path = path[0] if path.is_a?(Array)
|
50
50
|
path = File.expand_path(path, @machine.env.root_path)
|
51
|
-
pub_key =
|
51
|
+
pub_key = public_key(path)
|
52
52
|
@machine.communicate.execute(<<-BASH)
|
53
53
|
if ! grep '#{pub_key}' /home/#{user}/.ssh/authorized_keys; then
|
54
54
|
echo '#{pub_key}' >> /home/#{user}/.ssh/authorized_keys;
|
@@ -62,6 +62,12 @@ module VagrantPlugins
|
|
62
62
|
|
63
63
|
@app.call(env)
|
64
64
|
end
|
65
|
+
|
66
|
+
def public_key(private_key_path)
|
67
|
+
File.read("#{private_key_path}.pub")
|
68
|
+
rescue
|
69
|
+
raise Errors::PublicKeyError, :path => "#{private_key_path}.pub"
|
70
|
+
end
|
65
71
|
end
|
66
72
|
end
|
67
73
|
end
|
@@ -6,15 +6,15 @@ module VagrantPlugins
|
|
6
6
|
class StartInstance
|
7
7
|
def initialize(app, env)
|
8
8
|
@app = app
|
9
|
-
@client = env[:rimu_api]
|
10
9
|
@machine = env[:machine]
|
11
10
|
@logger = Log4r::Logger.new("vagrant_rimu::action::start_instance")
|
12
11
|
end
|
13
12
|
|
14
13
|
def call(env)
|
14
|
+
client = env[:rimu_api]
|
15
15
|
env[:ui].info I18n.t('vagrant_rimu.starting')
|
16
16
|
begin
|
17
|
-
result =
|
17
|
+
result = client.servers.start(@machine.id.to_i)
|
18
18
|
raise StandardError, "No response from the API" if result.nil?
|
19
19
|
raise StandardError, "VPS is not be running" if result.running_state != 'RUNNING'
|
20
20
|
rescue StandardError => e
|
@@ -5,9 +5,8 @@ module VagrantPlugins
|
|
5
5
|
module Actions
|
6
6
|
# This stops the running instance.
|
7
7
|
class StopInstance
|
8
|
-
def initialize(app,
|
8
|
+
def initialize(app, _env)
|
9
9
|
@app = app
|
10
|
-
@client = env[:rimu_api]
|
11
10
|
@logger = Log4r::Logger.new('vagrant_rimu::action::stop_instance')
|
12
11
|
end
|
13
12
|
|
@@ -16,8 +15,10 @@ module VagrantPlugins
|
|
16
15
|
env[:ui].info(I18n.t('vagrant_rimu.already_status', :status => env[:machine].state.id))
|
17
16
|
else
|
18
17
|
env[:ui].info(I18n.t('vagrant_rimu.stopping'))
|
19
|
-
|
18
|
+
client = env[:rimu_api]
|
19
|
+
client.servers.shutdown(env[:machine].id.to_i)
|
20
20
|
end
|
21
|
+
|
21
22
|
@app.call(env)
|
22
23
|
end
|
23
24
|
end
|
@@ -5,16 +5,16 @@ module VagrantPlugins
|
|
5
5
|
module Actions
|
6
6
|
# This terminates the running server, if there is one.
|
7
7
|
class TerminateInstance
|
8
|
-
def initialize(app,
|
8
|
+
def initialize(app, _env)
|
9
9
|
@app = app
|
10
|
-
@client = env[:rimu_api]
|
11
10
|
@logger = Log4r::Logger.new("vagrant_rimu::action::terminate_instance")
|
12
11
|
end
|
13
12
|
|
14
13
|
def call(env)
|
15
14
|
if env[:machine].id
|
16
15
|
env[:ui].info(I18n.t("vagrant_rimu.terminating"))
|
17
|
-
|
16
|
+
client = env[:rimu_api]
|
17
|
+
client.servers.cancel(env[:machine].id.to_i)
|
18
18
|
env[:machine].id = nil
|
19
19
|
end
|
20
20
|
|
data/lib/vagrant-rimu/config.rb
CHANGED
data/lib/vagrant-rimu/errors.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Rimu
|
3
|
+
module Logging
|
4
|
+
def self.init
|
5
|
+
level = nil
|
6
|
+
begin
|
7
|
+
level = Log4r.const_get(ENV['VAGRANT_LOG'].upcase)
|
8
|
+
rescue NameError
|
9
|
+
begin
|
10
|
+
level = Log4r.const_get(ENV['VAGRANT_RIMU_LOG'].upcase)
|
11
|
+
rescue NameError
|
12
|
+
level = nil
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
level = nil unless level.is_a?(Integer)
|
17
|
+
|
18
|
+
if level
|
19
|
+
logger = Log4r::Logger.new('vagrant_rimu')
|
20
|
+
out = Log4r::Outputter.stdout
|
21
|
+
out.formatter = Log4r::PatternFormatter.new(pattern: '%d | %5l | %m', date_pattern: '%Y-%m-%d %H:%M')
|
22
|
+
logger.outputters = out
|
23
|
+
logger.level = level
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/vagrant-rimu/plugin.rb
CHANGED
@@ -24,57 +24,31 @@ module VagrantPlugins
|
|
24
24
|
|
25
25
|
provider(:rimu, {:box_optional => true, :parallel => true}) do
|
26
26
|
# Setup logging and i18n
|
27
|
-
|
28
|
-
|
27
|
+
Rimu.init_i18n
|
28
|
+
Rimu.init_logging
|
29
|
+
|
29
30
|
# Return the provider
|
30
31
|
require_relative "provider"
|
31
32
|
Provider
|
32
33
|
end
|
33
34
|
|
34
35
|
command(:rimu) do
|
36
|
+
# Setup logging and i18n
|
37
|
+
Rimu.init_i18n
|
38
|
+
Rimu.init_logging
|
39
|
+
|
35
40
|
require_relative "commands/root"
|
36
41
|
Commands::Root
|
37
42
|
end
|
38
43
|
|
39
44
|
command(:rebuild) do
|
45
|
+
# Setup logging and i18n
|
46
|
+
Rimu.init_i18n
|
47
|
+
Rimu.init_logging
|
48
|
+
|
40
49
|
require_relative "commands/rebuild"
|
41
50
|
Commands::Rebuild
|
42
51
|
end
|
43
|
-
|
44
|
-
# This initializes the internationalization strings.
|
45
|
-
def self.setup_i18n
|
46
|
-
I18n.load_path << File.expand_path("locales/en.yml", Rimu.source_root)
|
47
|
-
I18n.reload!
|
48
|
-
end
|
49
|
-
|
50
|
-
# This sets up our log level to be whatever VAGRANT_LOG is.
|
51
|
-
def self.setup_logging
|
52
|
-
require "log4r"
|
53
|
-
|
54
|
-
level = nil
|
55
|
-
begin
|
56
|
-
level = Log4r.const_get(ENV["VAGRANT_LOG"].upcase)
|
57
|
-
rescue NameError
|
58
|
-
# This means that the logging constant wasn't found,
|
59
|
-
# which is fine. We just keep `level` as `nil`. But
|
60
|
-
# we tell the user.
|
61
|
-
level = nil
|
62
|
-
end
|
63
|
-
|
64
|
-
# Some constants, such as "true" resolve to booleans, so the
|
65
|
-
# above error checking doesn't catch it. This will check to make
|
66
|
-
# sure that the log level is an integer, as Log4r requires.
|
67
|
-
level = nil if !level.is_a?(Integer)
|
68
|
-
|
69
|
-
# Set the logging level on all "vagrant" namespaced
|
70
|
-
# logs as long as we have a valid level.
|
71
|
-
if level
|
72
|
-
logger = Log4r::Logger.new("vagrant_rimu")
|
73
|
-
logger.outputters = Log4r::Outputter.stderr
|
74
|
-
logger.level = level
|
75
|
-
logger = nil
|
76
|
-
end
|
77
|
-
end
|
78
52
|
end
|
79
53
|
end
|
80
54
|
end
|
data/lib/vagrant-rimu/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,14 +1,19 @@
|
|
1
1
|
require 'simplecov'
|
2
|
-
require 'coveralls'
|
3
|
-
require 'codeclimate-test-reporter'
|
4
2
|
|
5
|
-
SimpleCov.start
|
6
3
|
if ENV['CI']=='true'
|
7
4
|
require 'codecov'
|
8
|
-
|
5
|
+
require 'coveralls'
|
6
|
+
require 'codeclimate-test-reporter'
|
7
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
8
|
+
SimpleCov::Formatter::HTMLFormatter,
|
9
|
+
Coveralls::SimpleCov::Formatter,
|
10
|
+
SimpleCov::Formatter::Codecov,
|
11
|
+
CodeClimate::TestReporter::Formatter,
|
12
|
+
]
|
9
13
|
Coveralls.wear!
|
10
14
|
CodeClimate::TestReporter.start
|
11
15
|
end
|
16
|
+
SimpleCov.start
|
12
17
|
|
13
18
|
Dir['lib/**/*.rb'].each do|file|
|
14
19
|
require_string = file.match(/lib\/(.*)\.rb/)[1]
|
@@ -17,8 +22,6 @@ end
|
|
17
22
|
|
18
23
|
require 'rspec/its'
|
19
24
|
|
20
|
-
I18n.load_path << File.expand_path('locales/en.yml', Pathname.new(File.expand_path('../../', __FILE__)))
|
21
|
-
|
22
25
|
RSpec.configure do |config|
|
23
26
|
config.mock_with :rspec do |c|
|
24
27
|
c.syntax = [:should, :expect]
|
@@ -27,3 +30,7 @@ RSpec.configure do |config|
|
|
27
30
|
c.syntax = [:should, :expect]
|
28
31
|
end
|
29
32
|
end
|
33
|
+
|
34
|
+
I18n.load_path << File.expand_path('locales/en.yml', Pathname.new(File.expand_path('../../', __FILE__)))
|
35
|
+
|
36
|
+
VagrantPlugins::Rimu::Logging.init
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
require 'spec_helper'
|
5
|
+
|
6
|
+
# action_root = Pathname.new(File.expand_path('../../../../lib/vagrant-rimu/actions', __FILE__))
|
7
|
+
# autoload :StopInstance, action_root.join('stop_instance')
|
8
|
+
|
9
|
+
describe VagrantPlugins::Rimu::Actions::BillingMethods do
|
10
|
+
let(:billing_methods) { double('billing_methods') }
|
11
|
+
let(:machine) { double('machine') }
|
12
|
+
let(:method1) { OpenStruct.new({:billing_oid => 1012, :billing_method_type => 'TS_WIRE', :description => 'Wire Transfer'}) }
|
13
|
+
let(:method2) { OpenStruct.new({:billing_oid => 2000, :billing_method_type => 'TS_CARD', :description => 'Credit Card'}) }
|
14
|
+
|
15
|
+
|
16
|
+
let(:env) do
|
17
|
+
{}.tap do |env|
|
18
|
+
env[:ui] = double('ui').tap do |ui|
|
19
|
+
ui.stub(:info).with(anything)
|
20
|
+
ui.stub(:error).with(anything)
|
21
|
+
end
|
22
|
+
env[:rimu_api] = double('rimu_api').tap do |os|
|
23
|
+
billing_methods.stub(:each).and_yield(method1).and_yield(method2)
|
24
|
+
os.stub(:billing_methods) { billing_methods }
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
let(:app) do
|
30
|
+
double('app').tap do |app|
|
31
|
+
app.stub(:call).with(anything)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe 'call' do
|
36
|
+
it 'return a billing_methods listing' do
|
37
|
+
expect(env[:rimu_api].billing_methods).to receive(:each)
|
38
|
+
heading = '%-20s %-20s %s' % ['ID', 'Type', 'Description']
|
39
|
+
expect(env[:ui]).to receive(:info).with(heading)
|
40
|
+
[method1, method2].each do |b|
|
41
|
+
row = '%-20s %-20s %s' % [b.billing_oid, b.billing_method_type, b.description]
|
42
|
+
expect(env[:ui]).to receive(:info).with(row)
|
43
|
+
end
|
44
|
+
expect(app).to receive(:call)
|
45
|
+
@action = VagrantPlugins::Rimu::Actions::BillingMethods.new(app, env)
|
46
|
+
@action.call(env)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
# action_root = Pathname.new(File.expand_path('../../../../lib/vagrant-rimu/actions', __FILE__))
|
5
|
+
# autoload :StopInstance, action_root.join('stop_instance')
|
6
|
+
|
7
|
+
describe VagrantPlugins::Rimu::Actions::IsCreated do
|
8
|
+
let(:state) { double('state') }
|
9
|
+
let(:machine) { double('machine') }
|
10
|
+
|
11
|
+
let(:env) do
|
12
|
+
{}.tap do |env|
|
13
|
+
env[:ui] = double('ui').tap do |ui|
|
14
|
+
ui.stub(:info).with(anything)
|
15
|
+
ui.stub(:error).with(anything)
|
16
|
+
end
|
17
|
+
machine.stub(:state) { state }
|
18
|
+
env[:machine] = machine
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
let(:app) do
|
23
|
+
double('app').tap do |app|
|
24
|
+
app.stub(:call).with(anything)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'call' do
|
29
|
+
context 'when server is created' do
|
30
|
+
it 'returns true' do
|
31
|
+
env[:machine].state.stub(:id) { :stopped }
|
32
|
+
expect(app).to receive(:call)
|
33
|
+
@action = VagrantPlugins::Rimu::Actions::IsCreated.new(app, env)
|
34
|
+
@action.call(env)
|
35
|
+
env[:result].should == true
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'when server is not created' do
|
40
|
+
it 'returns false' do
|
41
|
+
env[:machine].state.stub(:id) { :not_created }
|
42
|
+
expect(app).to receive(:call)
|
43
|
+
@action = VagrantPlugins::Rimu::Actions::IsCreated.new(app, env)
|
44
|
+
@action.call(env)
|
45
|
+
env[:result].should == false
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
# action_root = Pathname.new(File.expand_path('../../../../lib/vagrant-rimu/actions', __FILE__))
|
5
|
+
# autoload :StopInstance, action_root.join('stop_instance')
|
6
|
+
|
7
|
+
describe VagrantPlugins::Rimu::Actions::IsStopped do
|
8
|
+
let(:state) { double('state') }
|
9
|
+
let(:machine) { double('machine') }
|
10
|
+
|
11
|
+
let(:env) do
|
12
|
+
{}.tap do |env|
|
13
|
+
env[:ui] = double('ui').tap do |ui|
|
14
|
+
ui.stub(:info).with(anything)
|
15
|
+
ui.stub(:error).with(anything)
|
16
|
+
end
|
17
|
+
machine.stub(:state) { state }
|
18
|
+
env[:machine] = machine
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
let(:app) do
|
23
|
+
double('app').tap do |app|
|
24
|
+
app.stub(:call).with(anything)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'call' do
|
29
|
+
context 'when server is stopped' do
|
30
|
+
it 'returns true' do
|
31
|
+
env[:machine].state.stub(:id) { :stopped }
|
32
|
+
expect(app).to receive(:call)
|
33
|
+
@action = VagrantPlugins::Rimu::Actions::IsStopped.new(app, env)
|
34
|
+
@action.call(env)
|
35
|
+
env[:result].should == true
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'when server is running' do
|
40
|
+
it 'returns false' do
|
41
|
+
env[:machine].state.stub(:id) { :running }
|
42
|
+
expect(app).to receive(:call)
|
43
|
+
@action = VagrantPlugins::Rimu::Actions::IsStopped.new(app, env)
|
44
|
+
@action.call(env)
|
45
|
+
env[:result].should == false
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
require 'spec_helper'
|
5
|
+
|
6
|
+
# action_root = Pathname.new(File.expand_path('../../../../lib/vagrant-rimu/actions', __FILE__))
|
7
|
+
# autoload :StopInstance, action_root.join('stop_instance')
|
8
|
+
|
9
|
+
describe VagrantPlugins::Rimu::Actions::ListDistributions do
|
10
|
+
let(:distributions) { double('distributions') }
|
11
|
+
let(:machine) { double('machine') }
|
12
|
+
let(:distro1) { OpenStruct.new({:distro_code => 'jessie.64', :distro_description => 'Debian 8.0 64-bit (aka Jessie, RimuHosting recommended distro)'}) }
|
13
|
+
let(:distro2) { OpenStruct.new({:distro_code => 'centos6.64', :distro_description => 'Centos6 64-bit'}) }
|
14
|
+
|
15
|
+
|
16
|
+
let(:env) do
|
17
|
+
{}.tap do |env|
|
18
|
+
env[:ui] = double('ui').tap do |ui|
|
19
|
+
ui.stub(:info).with(anything)
|
20
|
+
ui.stub(:error).with(anything)
|
21
|
+
end
|
22
|
+
env[:rimu_api] = double('rimu_api').tap do |os|
|
23
|
+
distributions.stub(:each).and_yield(distro1).and_yield(distro2)
|
24
|
+
os.stub(:distributions) { distributions }
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
let(:app) do
|
30
|
+
double('app').tap do |app|
|
31
|
+
app.stub(:call).with(anything)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe 'call' do
|
36
|
+
it 'return a distribution listing' do
|
37
|
+
expect(env[:rimu_api].distributions).to receive(:each)
|
38
|
+
heading = '%-15s %s' % ['Distro Code', 'Distro Description']
|
39
|
+
expect(env[:ui]).to receive(:info).with(heading)
|
40
|
+
[distro1, distro2].each do |o|
|
41
|
+
row = '%-15s %s' % [o.distro_code, o.distro_description]
|
42
|
+
expect(env[:ui]).to receive(:info).with(row)
|
43
|
+
end
|
44
|
+
expect(app).to receive(:call)
|
45
|
+
@action = VagrantPlugins::Rimu::Actions::ListDistributions.new(app, env)
|
46
|
+
@action.call(env)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
require 'spec_helper'
|
5
|
+
|
6
|
+
# action_root = Pathname.new(File.expand_path('../../../../lib/vagrant-rimu/actions', __FILE__))
|
7
|
+
# autoload :StopInstance, action_root.join('stop_instance')
|
8
|
+
|
9
|
+
describe VagrantPlugins::Rimu::Actions::ListServers do
|
10
|
+
let(:orders) { double('orders') }
|
11
|
+
let(:ordersm) { double('ordersm') }
|
12
|
+
let(:machine) { double('machine') }
|
13
|
+
let(:server1) { OpenStruct.new({:order_oid => 1, :domain_name => 'rimu01.example.com', :location => {:data_center_location_code => 'DCDALLAS'}, :host_server_oid => 200, :running_state => 'RUNNING'}) }
|
14
|
+
let(:server2) { OpenStruct.new({:order_oid => 2, :domain_name => 'rimu02.example.com', :location => {:data_center_location_code => 'DCDALLAS'}, :host_server_oid => 200, :running_state => 'NOTRUNNING'}) }
|
15
|
+
|
16
|
+
|
17
|
+
let(:env) do
|
18
|
+
{}.tap do |env|
|
19
|
+
env[:ui] = double('ui').tap do |ui|
|
20
|
+
ui.stub(:info).with(anything)
|
21
|
+
ui.stub(:error).with(anything)
|
22
|
+
end
|
23
|
+
env[:rimu_api] = double('rimu_api').tap do |os|
|
24
|
+
orders.stub(:each).and_yield(server1).and_yield(server2)
|
25
|
+
ordersm.stub(:orders) { orders }
|
26
|
+
os.stub(:orders) { ordersm }
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
let(:app) do
|
32
|
+
double('app').tap do |app|
|
33
|
+
app.stub(:call).with(anything)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe 'call' do
|
38
|
+
it 'return a server listing' do
|
39
|
+
expect(env[:rimu_api].orders.orders).to receive(:each)
|
40
|
+
heading = '%-10s %-30s %-20s %-15s %-15s' % ['ID', 'Hostname', 'Data Centre', 'Host Server', 'Status']
|
41
|
+
expect(env[:ui]).to receive(:info).with(heading)
|
42
|
+
[server1, server2].each do |o|
|
43
|
+
row = '%-10s %-30s %-20s %-15s %-15s' % [o.order_oid, o.domain_name, o.location["data_center_location_code"], o.host_server_oid, o.running_state]
|
44
|
+
expect(env[:ui]).to receive(:info).with(row)
|
45
|
+
end
|
46
|
+
expect(app).to receive(:call)
|
47
|
+
@action = VagrantPlugins::Rimu::Actions::ListServers.new(app, env)
|
48
|
+
@action.call(env)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -20,12 +20,7 @@ describe VagrantPlugins::Rimu::Actions::ModifyProvisionPath do
|
|
20
20
|
|
21
21
|
let(:config) do
|
22
22
|
double.tap do |config|
|
23
|
-
provisioners.stub(:each)
|
24
|
-
[
|
25
|
-
provisioner,
|
26
|
-
provisioner,
|
27
|
-
]
|
28
|
-
}
|
23
|
+
provisioners.stub(:each).and_yield(provisioner).and_yield(provisioner)
|
29
24
|
vm.stub(:provisioners) { provisioners }
|
30
25
|
config.stub(:vm) { vm }
|
31
26
|
end
|
@@ -72,7 +67,7 @@ describe VagrantPlugins::Rimu::Actions::ModifyProvisionPath do
|
|
72
67
|
expect(env).to receive(:has_key?).with(:provision_enabled)
|
73
68
|
expect(env[:machine]).to receive(:ssh_info)
|
74
69
|
expect(env[:machine].config.vm.provisioners).to receive(:each)
|
75
|
-
|
70
|
+
expect(env[:machine].communicate).to receive(:sudo)
|
76
71
|
@action = VagrantPlugins::Rimu::Actions::ModifyProvisionPath.new(app, env)
|
77
72
|
@action.call(env)
|
78
73
|
end
|
@@ -58,5 +58,18 @@ describe VagrantPlugins::Rimu::Actions::ReadSSHInfo do
|
|
58
58
|
@action.call(env)
|
59
59
|
end
|
60
60
|
end
|
61
|
+
|
62
|
+
context 'when api call returns nil' do
|
63
|
+
it 'should return nil machine id' do
|
64
|
+
env[:machine].id.stub(:nil?) { false }
|
65
|
+
expect(env[:machine].id).to receive(:nil?)
|
66
|
+
expect(order).not_to receive(:allocated_ips)
|
67
|
+
expect(env[:rimu_api].orders).to receive(:order).with(id.to_i).and_return(nil)
|
68
|
+
expect(env[:machine]).to receive(:id=).with(nil)
|
69
|
+
expect(app).to receive(:call)
|
70
|
+
@action = VagrantPlugins::Rimu::Actions::ReadSSHInfo.new(app, env)
|
71
|
+
@action.call(env)
|
72
|
+
end
|
73
|
+
end
|
61
74
|
end
|
62
75
|
end
|
@@ -10,7 +10,7 @@ describe VagrantPlugins::Rimu::Config do
|
|
10
10
|
super().tap(&:finalize!)
|
11
11
|
end
|
12
12
|
|
13
|
-
its(:api_key) { should
|
13
|
+
its(:api_key) { should eq(ENV['RIMU_API_KEY']) }
|
14
14
|
its(:api_url) { should be_nil }
|
15
15
|
its(:distro_code) { should eq("centos6.64") }
|
16
16
|
its(:data_centre) { should be_nil }
|
data/vagrant-rimu.gemspec
CHANGED
@@ -14,9 +14,11 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
15
15
|
gem.name = 'vagrant-rimu'
|
16
16
|
gem.require_paths = ['lib']
|
17
|
+
gem.required_ruby_version = '>= 2.0.0'
|
18
|
+
gem.extra_rdoc_files = ['README.md']
|
17
19
|
gem.version = VagrantPlugins::Rimu::VERSION
|
18
20
|
|
19
|
-
gem.add_runtime_dependency 'rimu', '~> 0.0.
|
21
|
+
gem.add_runtime_dependency 'rimu', '~> 0.0.6'
|
20
22
|
gem.add_development_dependency 'bundler', '~> 1.5'
|
21
23
|
gem.add_development_dependency 'rspec', '~> 3.1.0'
|
22
24
|
gem.add_development_dependency 'rspec-its', '~> 1.0.1'
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-rimu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Colin Kissa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rimu
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.0.
|
19
|
+
version: 0.0.6
|
20
20
|
type: :runtime
|
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.0.
|
26
|
+
version: 0.0.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.5'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 3.1.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 3.1.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec-its
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 1.0.1
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.0.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec-expectations
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 3.1.2
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 3.1.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
description: Rimuhosting provider for Vagrant.
|
@@ -99,13 +99,14 @@ email:
|
|
99
99
|
- andrew@topdog.za.net
|
100
100
|
executables: []
|
101
101
|
extensions: []
|
102
|
-
extra_rdoc_files:
|
102
|
+
extra_rdoc_files:
|
103
|
+
- README.md
|
103
104
|
files:
|
104
|
-
- .codeclimate.yml
|
105
|
-
- .gitignore
|
106
|
-
- .rspec
|
107
|
-
- .rubocop.yml
|
108
|
-
- .travis.yml
|
105
|
+
- ".codeclimate.yml"
|
106
|
+
- ".gitignore"
|
107
|
+
- ".rspec"
|
108
|
+
- ".rubocop.yml"
|
109
|
+
- ".travis.yml"
|
109
110
|
- Gemfile
|
110
111
|
- LICENSE
|
111
112
|
- README.md
|
@@ -146,12 +147,18 @@ files:
|
|
146
147
|
- lib/vagrant-rimu/commands/root.rb
|
147
148
|
- lib/vagrant-rimu/config.rb
|
148
149
|
- lib/vagrant-rimu/errors.rb
|
150
|
+
- lib/vagrant-rimu/logging.rb
|
149
151
|
- lib/vagrant-rimu/plugin.rb
|
150
152
|
- lib/vagrant-rimu/provider.rb
|
151
153
|
- lib/vagrant-rimu/version.rb
|
152
154
|
- locales/en.yml
|
153
155
|
- spec/spec_helper.rb
|
156
|
+
- spec/vagrant-rimu/actions/billing_methods_spec.rb
|
154
157
|
- spec/vagrant-rimu/actions/connect_to_rimu_spec.rb
|
158
|
+
- spec/vagrant-rimu/actions/is_created_spec.rb
|
159
|
+
- spec/vagrant-rimu/actions/is_stopped_spec.rb
|
160
|
+
- spec/vagrant-rimu/actions/list_distributions_spec.rb
|
161
|
+
- spec/vagrant-rimu/actions/list_servers_spec.rb
|
155
162
|
- spec/vagrant-rimu/actions/message_already_created_spec.rb
|
156
163
|
- spec/vagrant-rimu/actions/message_already_off_spec.rb
|
157
164
|
- spec/vagrant-rimu/actions/message_not_created_spec.rb
|
@@ -191,23 +198,28 @@ require_paths:
|
|
191
198
|
- lib
|
192
199
|
required_ruby_version: !ruby/object:Gem::Requirement
|
193
200
|
requirements:
|
194
|
-
- -
|
201
|
+
- - ">="
|
195
202
|
- !ruby/object:Gem::Version
|
196
|
-
version:
|
203
|
+
version: 2.0.0
|
197
204
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
198
205
|
requirements:
|
199
|
-
- -
|
206
|
+
- - ">="
|
200
207
|
- !ruby/object:Gem::Version
|
201
208
|
version: '0'
|
202
209
|
requirements: []
|
203
210
|
rubyforge_project:
|
204
|
-
rubygems_version: 2.4.
|
211
|
+
rubygems_version: 2.4.8
|
205
212
|
signing_key:
|
206
213
|
specification_version: 4
|
207
214
|
summary: Rimuhosting provider for Vagrant.
|
208
215
|
test_files:
|
209
216
|
- spec/spec_helper.rb
|
217
|
+
- spec/vagrant-rimu/actions/billing_methods_spec.rb
|
210
218
|
- spec/vagrant-rimu/actions/connect_to_rimu_spec.rb
|
219
|
+
- spec/vagrant-rimu/actions/is_created_spec.rb
|
220
|
+
- spec/vagrant-rimu/actions/is_stopped_spec.rb
|
221
|
+
- spec/vagrant-rimu/actions/list_distributions_spec.rb
|
222
|
+
- spec/vagrant-rimu/actions/list_servers_spec.rb
|
211
223
|
- spec/vagrant-rimu/actions/message_already_created_spec.rb
|
212
224
|
- spec/vagrant-rimu/actions/message_already_off_spec.rb
|
213
225
|
- spec/vagrant-rimu/actions/message_not_created_spec.rb
|