derelict 0.0.1 → 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 +5 -13
- data/.cane +2 -0
- data/.coveralls.yml +1 -0
- data/.travis.yml +13 -0
- data/README.md +55 -9
- data/Rakefile +21 -0
- data/derelict.gemspec +25 -1
- data/lib/derelict/connection/invalid.rb +14 -0
- data/lib/derelict/connection/not_found.rb +13 -0
- data/lib/derelict/connection.rb +84 -0
- data/lib/derelict/exception/optional_reason.rb +32 -0
- data/lib/derelict/exception.rb +3 -2
- data/lib/derelict/instance/command_failed.rb +28 -0
- data/lib/derelict/instance/invalid.rb +11 -11
- data/lib/derelict/instance/missing_binary.rb +13 -0
- data/lib/derelict/instance/non_directory.rb +10 -8
- data/lib/derelict/instance/not_found.rb +10 -8
- data/lib/derelict/instance.rb +105 -33
- data/lib/derelict/parser/status/invalid_format.rb +16 -0
- data/lib/derelict/parser/status.rb +89 -0
- data/lib/derelict/parser/version/invalid_format.rb +16 -0
- data/lib/derelict/parser/version.rb +28 -0
- data/lib/derelict/parser.rb +25 -0
- data/lib/derelict/utils/logger/array_outputter.rb +43 -0
- data/lib/derelict/utils/logger/invalid_type.rb +15 -0
- data/lib/derelict/utils/logger/raw_formatter.rb +12 -0
- data/lib/derelict/utils/logger.rb +51 -0
- data/lib/derelict/utils.rb +11 -0
- data/lib/derelict/version.rb +2 -2
- data/lib/derelict/virtual_machine/invalid.rb +14 -0
- data/lib/derelict/virtual_machine/not_found.rb +18 -0
- data/lib/derelict/virtual_machine.rb +154 -0
- data/lib/derelict.rb +61 -14
- data/spec/coverage_helper.rb +16 -0
- data/spec/derelict/connection/invalid_spec.rb +16 -0
- data/spec/derelict/connection/not_found_spec.rb +13 -0
- data/spec/derelict/connection_spec.rb +107 -0
- data/spec/derelict/exception/optional_reason_spec.rb +41 -0
- data/spec/derelict/exception_spec.rb +11 -0
- data/spec/derelict/instance/command_failed_spec.rb +40 -0
- data/spec/derelict/instance/invalid_spec.rb +16 -0
- data/spec/derelict/instance/missing_binary_spec.rb +13 -0
- data/spec/derelict/instance/non_directory_spec.rb +13 -0
- data/spec/derelict/instance/not_found_spec.rb +13 -0
- data/spec/derelict/instance_spec.rb +226 -0
- data/spec/derelict/parser/status/invalid_format_spec.rb +16 -0
- data/spec/derelict/parser/status_spec.rb +214 -0
- data/spec/derelict/parser/version/invalid_format_spec.rb +16 -0
- data/spec/derelict/parser/version_spec.rb +31 -0
- data/spec/derelict/parser_spec.rb +24 -0
- data/spec/derelict/utils/logger/array_outputter_spec.rb +40 -0
- data/spec/derelict/utils/logger/invalid_type_spec.rb +13 -0
- data/spec/derelict/utils/logger/raw_formatter_spec.rb +17 -0
- data/spec/derelict/utils/logger_spec.rb +35 -0
- data/spec/derelict/virtual_machine/invalid_spec.rb +16 -0
- data/spec/derelict/virtual_machine/not_found_spec.rb +34 -0
- data/spec/derelict/virtual_machine_spec.rb +295 -0
- data/spec/derelict_spec.rb +50 -0
- data/spec/spec_helper.rb +28 -3
- data/spec/support/log_context.rb +36 -0
- metadata +175 -22
- data/lib/derelict/instance/already_active.rb +0 -9
- data/spec/system_spec.spec +0 -10
@@ -0,0 +1,295 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Derelict::VirtualMachine do
|
4
|
+
let(:connection) { double("connection", :description => "test") }
|
5
|
+
let(:name) { double("name", :inspect => "testvm") }
|
6
|
+
|
7
|
+
let(:vm) { Derelict::VirtualMachine.new connection, name }
|
8
|
+
subject { vm }
|
9
|
+
|
10
|
+
describe "#initialize" do
|
11
|
+
it "should succeed" do
|
12
|
+
expect { subject }.to_not raise_error
|
13
|
+
end
|
14
|
+
|
15
|
+
include_context "logged messages"
|
16
|
+
let(:expected_logs) {[
|
17
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
18
|
+
]}
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "#validate!" do
|
22
|
+
before { expect(vm).to receive(:exists?).and_return(exists?) }
|
23
|
+
subject { vm.validate! }
|
24
|
+
|
25
|
+
context "when exists? is false" do
|
26
|
+
let(:exists?) { false }
|
27
|
+
it "should raise NotFound" do
|
28
|
+
expect { subject }.to raise_error Derelict::VirtualMachine::NotFound
|
29
|
+
end
|
30
|
+
|
31
|
+
include_context "logged messages"
|
32
|
+
let(:expected_logs) {[
|
33
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
34
|
+
"DEBUG virtualmachine: Starting validation for Derelict::VirtualMachine 'testvm' from test\n",
|
35
|
+
]}
|
36
|
+
end
|
37
|
+
|
38
|
+
context "when exists? is true" do
|
39
|
+
let(:exists?) { true }
|
40
|
+
it "shouldn't raise any errors" do
|
41
|
+
expect { subject }.to_not raise_error
|
42
|
+
end
|
43
|
+
|
44
|
+
it "should be chainable" do
|
45
|
+
expect(subject).to be subject
|
46
|
+
end
|
47
|
+
|
48
|
+
include_context "logged messages"
|
49
|
+
let(:expected_logs) {[
|
50
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
51
|
+
"DEBUG virtualmachine: Starting validation for Derelict::VirtualMachine 'testvm' from test\n",
|
52
|
+
" INFO virtualmachine: Successfully validated Derelict::VirtualMachine 'testvm' from test\n",
|
53
|
+
]}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
describe "#exists?" do
|
58
|
+
let(:status) { double("status", :exists? => exists?) }
|
59
|
+
let(:exists?) { double("exists") }
|
60
|
+
|
61
|
+
before { expect(vm).to receive(:status).and_return(status) }
|
62
|
+
subject { vm.exists? }
|
63
|
+
|
64
|
+
it "should delegate to the status parser" do
|
65
|
+
expect(subject).to be exists?
|
66
|
+
end
|
67
|
+
|
68
|
+
include_context "logged messages"
|
69
|
+
let(:expected_logs) {[
|
70
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
71
|
+
]}
|
72
|
+
end
|
73
|
+
|
74
|
+
describe "#state" do
|
75
|
+
let(:status) { double("status", :state => state) }
|
76
|
+
let(:state) { double("state") }
|
77
|
+
|
78
|
+
before { expect(vm).to receive(:status).and_return(status) }
|
79
|
+
subject { vm.state }
|
80
|
+
|
81
|
+
it "should delegate to the status parser" do
|
82
|
+
expect(subject).to be state
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
describe "#running?" do
|
87
|
+
before { expect(vm).to receive(:state).and_return(state) }
|
88
|
+
subject { vm.running? }
|
89
|
+
|
90
|
+
context "when state is :running" do
|
91
|
+
let(:state) { :running }
|
92
|
+
it { should be true }
|
93
|
+
end
|
94
|
+
|
95
|
+
context "when state is :foo" do
|
96
|
+
let(:state) { :foo }
|
97
|
+
it { should be false }
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
describe "#up!" do
|
102
|
+
let(:options) { Hash.new }
|
103
|
+
let(:result) { double("result") }
|
104
|
+
subject { vm.up! options }
|
105
|
+
|
106
|
+
before do
|
107
|
+
expect(connection).to receive(:execute!).with(:up, name).and_yield("foo").and_return result
|
108
|
+
end
|
109
|
+
|
110
|
+
context "with external logging disabled" do
|
111
|
+
include_context "logged messages"
|
112
|
+
let(:expected_logs) {[
|
113
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
114
|
+
" INFO virtualmachine: Bringing up Derelict::VirtualMachine 'testvm' from test\n",
|
115
|
+
]}
|
116
|
+
end
|
117
|
+
|
118
|
+
context "with external logging enabled" do
|
119
|
+
let(:options) { {:log => true} }
|
120
|
+
|
121
|
+
include_context "logged messages"
|
122
|
+
let(:expected_logs) {[
|
123
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
124
|
+
" INFO virtualmachine: Bringing up Derelict::VirtualMachine 'testvm' from test\n",
|
125
|
+
" INFO external: foo\n",
|
126
|
+
]}
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
describe "#halt!" do
|
131
|
+
let(:options) { Hash.new }
|
132
|
+
let(:result) { double("result") }
|
133
|
+
subject { vm.halt! options }
|
134
|
+
|
135
|
+
before do
|
136
|
+
expect(connection).to receive(:execute!).with(:halt, name).and_yield("foo").and_return result
|
137
|
+
end
|
138
|
+
|
139
|
+
context "with external logging disabled" do
|
140
|
+
include_context "logged messages"
|
141
|
+
let(:expected_logs) {[
|
142
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
143
|
+
" INFO virtualmachine: Halting Derelict::VirtualMachine 'testvm' from test\n",
|
144
|
+
]}
|
145
|
+
end
|
146
|
+
|
147
|
+
context "with external logging enabled" do
|
148
|
+
let(:options) { {:log => true} }
|
149
|
+
|
150
|
+
include_context "logged messages"
|
151
|
+
let(:expected_logs) {[
|
152
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
153
|
+
" INFO virtualmachine: Halting Derelict::VirtualMachine 'testvm' from test\n",
|
154
|
+
" INFO external: foo\n",
|
155
|
+
]}
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
describe "#destroy!" do
|
160
|
+
let(:options) { Hash.new }
|
161
|
+
let(:result) { double("result") }
|
162
|
+
subject { vm.destroy! options }
|
163
|
+
|
164
|
+
before do
|
165
|
+
expect(connection).to receive(:execute!).with(:destroy, name, '--force').and_yield("foo").and_return result
|
166
|
+
end
|
167
|
+
|
168
|
+
context "with external logging disabled" do
|
169
|
+
include_context "logged messages"
|
170
|
+
let(:expected_logs) {[
|
171
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
172
|
+
" INFO virtualmachine: Destroying Derelict::VirtualMachine 'testvm' from test\n",
|
173
|
+
]}
|
174
|
+
end
|
175
|
+
|
176
|
+
context "with external logging enabled" do
|
177
|
+
let(:options) { {:log => true} }
|
178
|
+
|
179
|
+
include_context "logged messages"
|
180
|
+
let(:expected_logs) {[
|
181
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
182
|
+
" INFO virtualmachine: Destroying Derelict::VirtualMachine 'testvm' from test\n",
|
183
|
+
" INFO external: foo\n",
|
184
|
+
]}
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
describe "#reload!" do
|
189
|
+
let(:options) { Hash.new }
|
190
|
+
let(:result) { double("result") }
|
191
|
+
subject { vm.reload! options }
|
192
|
+
|
193
|
+
before do
|
194
|
+
expect(connection).to receive(:execute!).with(:reload, name).and_yield("foo").and_return result
|
195
|
+
end
|
196
|
+
|
197
|
+
context "with external logging disabled" do
|
198
|
+
include_context "logged messages"
|
199
|
+
let(:expected_logs) {[
|
200
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
201
|
+
" INFO virtualmachine: Reloading Derelict::VirtualMachine 'testvm' from test\n",
|
202
|
+
]}
|
203
|
+
end
|
204
|
+
|
205
|
+
context "with external logging enabled" do
|
206
|
+
let(:options) { {:log => true} }
|
207
|
+
|
208
|
+
include_context "logged messages"
|
209
|
+
let(:expected_logs) {[
|
210
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
211
|
+
" INFO virtualmachine: Reloading Derelict::VirtualMachine 'testvm' from test\n",
|
212
|
+
" INFO external: foo\n",
|
213
|
+
]}
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
describe "#suspend!" do
|
218
|
+
let(:options) { Hash.new }
|
219
|
+
let(:result) { double("result") }
|
220
|
+
subject { vm.suspend! options }
|
221
|
+
|
222
|
+
before do
|
223
|
+
expect(connection).to receive(:execute!).with(:suspend, name).and_yield("foo").and_return result
|
224
|
+
end
|
225
|
+
|
226
|
+
context "with external logging disabled" do
|
227
|
+
include_context "logged messages"
|
228
|
+
let(:expected_logs) {[
|
229
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
230
|
+
" INFO virtualmachine: Suspending Derelict::VirtualMachine 'testvm' from test\n",
|
231
|
+
]}
|
232
|
+
end
|
233
|
+
|
234
|
+
context "with external logging enabled" do
|
235
|
+
let(:options) { {:log => true} }
|
236
|
+
|
237
|
+
include_context "logged messages"
|
238
|
+
let(:expected_logs) {[
|
239
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
240
|
+
" INFO virtualmachine: Suspending Derelict::VirtualMachine 'testvm' from test\n",
|
241
|
+
" INFO external: foo\n",
|
242
|
+
]}
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
describe "#resume!" do
|
247
|
+
let(:options) { Hash.new }
|
248
|
+
let(:result) { double("result") }
|
249
|
+
subject { vm.resume! options }
|
250
|
+
|
251
|
+
before do
|
252
|
+
expect(connection).to receive(:execute!).with(:resume, name).and_yield("foo").and_return result
|
253
|
+
end
|
254
|
+
|
255
|
+
context "with external logging disabled" do
|
256
|
+
include_context "logged messages"
|
257
|
+
let(:expected_logs) {[
|
258
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
259
|
+
" INFO virtualmachine: Resuming Derelict::VirtualMachine 'testvm' from test\n",
|
260
|
+
]}
|
261
|
+
end
|
262
|
+
|
263
|
+
context "with external logging enabled" do
|
264
|
+
let(:options) { {:log => true} }
|
265
|
+
|
266
|
+
include_context "logged messages"
|
267
|
+
let(:expected_logs) {[
|
268
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
269
|
+
" INFO virtualmachine: Resuming Derelict::VirtualMachine 'testvm' from test\n",
|
270
|
+
" INFO external: foo\n",
|
271
|
+
]}
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
describe "#status" do
|
276
|
+
let(:result) { double("result", :stdout => stdout) }
|
277
|
+
let(:stdout) { double("stdout") }
|
278
|
+
subject { vm.status }
|
279
|
+
|
280
|
+
before do
|
281
|
+
expect(connection).to receive(:execute!).with(:status).and_return(result)
|
282
|
+
expect(Derelict::Parser::Status).to receive(:new).with(stdout).and_return(:return_value)
|
283
|
+
end
|
284
|
+
|
285
|
+
it "should parse status data from the connection" do
|
286
|
+
expect(subject).to be :return_value
|
287
|
+
end
|
288
|
+
|
289
|
+
include_context "logged messages"
|
290
|
+
let(:expected_logs) {[
|
291
|
+
"DEBUG virtualmachine: Successfully initialized Derelict::VirtualMachine 'testvm' from test\n",
|
292
|
+
" INFO virtualmachine: Retrieving Vagrant status for Derelict::VirtualMachine 'testvm' from test\n",
|
293
|
+
]}
|
294
|
+
end
|
295
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Derelict do
|
4
|
+
describe "#instance" do
|
5
|
+
let(:instance) { double("instance") }
|
6
|
+
before {
|
7
|
+
expect(Derelict::Instance).to receive(:new).and_return(instance)
|
8
|
+
expect(instance).to receive(:validate!).and_return(instance)
|
9
|
+
}
|
10
|
+
|
11
|
+
subject { Derelict.instance }
|
12
|
+
it { should be instance }
|
13
|
+
|
14
|
+
include_context "logged messages"
|
15
|
+
let(:expected_logs) {[
|
16
|
+
" INFO derelict: Creating and validating new instance for '/Applications/Vagrant'\n"
|
17
|
+
]}
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "#debug!" do
|
21
|
+
let(:enabled) { double("enabled") }
|
22
|
+
let(:level) { double("level") }
|
23
|
+
let(:logger) { Derelict.logger }
|
24
|
+
let(:stderr) { Log4r::Outputter.stderr }
|
25
|
+
|
26
|
+
subject { Derelict.debug! :enabled => enabled, :level => level }
|
27
|
+
|
28
|
+
context "when enabling debug mode" do
|
29
|
+
before do
|
30
|
+
expect(logger).to receive(:level=).with(level).and_return(nil)
|
31
|
+
expect(logger).to receive(:outputters).and_return(Array.new)
|
32
|
+
expect(logger).to receive(:add).with(stderr).and_return(logger)
|
33
|
+
end
|
34
|
+
|
35
|
+
let(:enabled) { true }
|
36
|
+
it { should be Derelict }
|
37
|
+
end
|
38
|
+
|
39
|
+
context "when disabling debug mode" do
|
40
|
+
before do
|
41
|
+
expect(logger).to receive(:level=).with(Log4r::OFF).and_return(nil)
|
42
|
+
expect(logger).to receive(:remove).with("stderr").and_return(logger)
|
43
|
+
end
|
44
|
+
|
45
|
+
let(:real_level) { Log4r::OFF }
|
46
|
+
let(:enabled) { false }
|
47
|
+
it { should be Derelict }
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,32 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "coverage_helper"
|
2
|
+
require "derelict"
|
3
|
+
require File.join(File.dirname(__FILE__), "support", "log_context")
|
3
4
|
|
5
|
+
derelict_logger = Derelict.logger
|
6
|
+
external_logger = Derelict.logger :type => :external
|
7
|
+
array_outputter = Derelict::Utils::Logger::ArrayOutputter.new "rspec"
|
4
8
|
|
5
9
|
RSpec.configure do |config|
|
6
|
-
|
10
|
+
config.before :each do
|
11
|
+
# Start each spec with an empty ArrayOutputter
|
12
|
+
array_outputter.flush
|
13
|
+
|
14
|
+
# Remove any outputters set on other loggers
|
15
|
+
Log4r::Logger.each {|fullname, logger| logger.outputters = [] }
|
16
|
+
|
17
|
+
# Add the ArrayOutputter to the base Derelict logger
|
18
|
+
derelict_logger.outputters = [array_outputter]
|
19
|
+
external_logger.outputters = [array_outputter]
|
20
|
+
end
|
21
|
+
|
22
|
+
# Forbid .should syntax
|
23
|
+
config.expect_with :rspec do |c|
|
24
|
+
c.syntax = :expect
|
25
|
+
end
|
26
|
+
|
27
|
+
# Run specs in random order to surface order dependencies. If you find an
|
28
|
+
# order dependency and want to debug it, you can fix the order by providing
|
29
|
+
# the seed, which is printed after each run.
|
30
|
+
# --seed 1234
|
31
|
+
config.order = "random"
|
7
32
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
# Provides set-up and examples to assert logged messages
|
4
|
+
#
|
5
|
+
# Usage:
|
6
|
+
#
|
7
|
+
# * Ensure that the "subject" from the parent context will perform
|
8
|
+
# the action which is expected to produce the log messages
|
9
|
+
# * Provide a "let(:expected_logs)" block, defining which logs are
|
10
|
+
# expected to result from the action performed in the "before"
|
11
|
+
# block (otherwise, it defaults to expecting no log messages)
|
12
|
+
shared_context "logged messages" do
|
13
|
+
let(:outputter) { Log4r::Outputter["rspec"] }
|
14
|
+
let(:messages) { outputter.messages }
|
15
|
+
|
16
|
+
# Override this let block when including this shared context
|
17
|
+
let(:expected_logs) { [] }
|
18
|
+
|
19
|
+
# Add an additional context for readability in the output
|
20
|
+
describe "logged messages" do
|
21
|
+
before do
|
22
|
+
begin
|
23
|
+
subject
|
24
|
+
rescue Exception
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should be an Array" do
|
29
|
+
expect(messages).to be_an Array
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should contain the expected log messages" do
|
33
|
+
expect(messages).to eq expected_logs
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: derelict
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Feehan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: log4r
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: memoist
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
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: shell-executer
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
13
55
|
- !ruby/object:Gem::Dependency
|
14
56
|
name: bundler
|
15
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -24,66 +66,152 @@ dependencies:
|
|
24
66
|
- - ~>
|
25
67
|
- !ruby/object:Gem::Version
|
26
68
|
version: '1.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: coveralls
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
27
83
|
- !ruby/object:Gem::Dependency
|
28
84
|
name: rake
|
29
85
|
requirement: !ruby/object:Gem::Requirement
|
30
86
|
requirements:
|
31
|
-
- -
|
87
|
+
- - '>='
|
32
88
|
- !ruby/object:Gem::Version
|
33
89
|
version: '0'
|
34
90
|
type: :development
|
35
91
|
prerelease: false
|
36
92
|
version_requirements: !ruby/object:Gem::Requirement
|
37
93
|
requirements:
|
38
|
-
- -
|
94
|
+
- - '>='
|
39
95
|
- !ruby/object:Gem::Version
|
40
96
|
version: '0'
|
41
97
|
- !ruby/object:Gem::Dependency
|
42
98
|
name: rspec
|
43
99
|
requirement: !ruby/object:Gem::Requirement
|
44
100
|
requirements:
|
45
|
-
- -
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: its
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
46
130
|
- !ruby/object:Gem::Version
|
47
131
|
version: '0'
|
48
132
|
type: :development
|
49
133
|
prerelease: false
|
50
134
|
version_requirements: !ruby/object:Gem::Requirement
|
51
135
|
requirements:
|
52
|
-
- -
|
136
|
+
- - '>='
|
53
137
|
- !ruby/object:Gem::Version
|
54
138
|
version: '0'
|
55
|
-
description:
|
56
|
-
via the Installer package on Mac OS X
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
to invoke the Vagrant binary, which requires forking a new process and parsing its
|
64
|
-
output using string manipulation.'
|
139
|
+
description: '["Provides a Ruby API to control Vagrant where Vagrant is installed
|
140
|
+
via the Installer package on Mac OS X.\n\nVagrant was historically available as
|
141
|
+
a gem, naturally providing a Ruby API to control Vagrant in other Ruby libraries
|
142
|
+
and applications. However, since version 1.1.0, Vagrant is distributed exclusively
|
143
|
+
using an Installer package. To control Vagrant when it''s installed this way, other
|
144
|
+
Ruby libraries and applications typically need to invoke the Vagrant binary, which
|
145
|
+
requires forking a new process and parsing its output using string manipulation.",
|
146
|
+
"Ruby API for Vagrant installed via Installer package on Mac OS X."]'
|
65
147
|
email:
|
66
148
|
- git@bradfeehan.com
|
67
149
|
executables: []
|
68
150
|
extensions: []
|
69
151
|
extra_rdoc_files: []
|
70
152
|
files:
|
153
|
+
- .cane
|
154
|
+
- .coveralls.yml
|
71
155
|
- .gitignore
|
156
|
+
- .travis.yml
|
72
157
|
- Gemfile
|
73
158
|
- LICENSE.txt
|
74
159
|
- README.md
|
75
160
|
- Rakefile
|
76
161
|
- derelict.gemspec
|
77
162
|
- lib/derelict.rb
|
163
|
+
- lib/derelict/connection.rb
|
164
|
+
- lib/derelict/connection/invalid.rb
|
165
|
+
- lib/derelict/connection/not_found.rb
|
78
166
|
- lib/derelict/exception.rb
|
167
|
+
- lib/derelict/exception/optional_reason.rb
|
79
168
|
- lib/derelict/instance.rb
|
80
|
-
- lib/derelict/instance/
|
169
|
+
- lib/derelict/instance/command_failed.rb
|
81
170
|
- lib/derelict/instance/invalid.rb
|
171
|
+
- lib/derelict/instance/missing_binary.rb
|
82
172
|
- lib/derelict/instance/non_directory.rb
|
83
173
|
- lib/derelict/instance/not_found.rb
|
174
|
+
- lib/derelict/parser.rb
|
175
|
+
- lib/derelict/parser/status.rb
|
176
|
+
- lib/derelict/parser/status/invalid_format.rb
|
177
|
+
- lib/derelict/parser/version.rb
|
178
|
+
- lib/derelict/parser/version/invalid_format.rb
|
179
|
+
- lib/derelict/utils.rb
|
180
|
+
- lib/derelict/utils/logger.rb
|
181
|
+
- lib/derelict/utils/logger/array_outputter.rb
|
182
|
+
- lib/derelict/utils/logger/invalid_type.rb
|
183
|
+
- lib/derelict/utils/logger/raw_formatter.rb
|
84
184
|
- lib/derelict/version.rb
|
185
|
+
- lib/derelict/virtual_machine.rb
|
186
|
+
- lib/derelict/virtual_machine/invalid.rb
|
187
|
+
- lib/derelict/virtual_machine/not_found.rb
|
188
|
+
- spec/coverage_helper.rb
|
189
|
+
- spec/derelict/connection/invalid_spec.rb
|
190
|
+
- spec/derelict/connection/not_found_spec.rb
|
191
|
+
- spec/derelict/connection_spec.rb
|
192
|
+
- spec/derelict/exception/optional_reason_spec.rb
|
193
|
+
- spec/derelict/exception_spec.rb
|
194
|
+
- spec/derelict/instance/command_failed_spec.rb
|
195
|
+
- spec/derelict/instance/invalid_spec.rb
|
196
|
+
- spec/derelict/instance/missing_binary_spec.rb
|
197
|
+
- spec/derelict/instance/non_directory_spec.rb
|
198
|
+
- spec/derelict/instance/not_found_spec.rb
|
199
|
+
- spec/derelict/instance_spec.rb
|
200
|
+
- spec/derelict/parser/status/invalid_format_spec.rb
|
201
|
+
- spec/derelict/parser/status_spec.rb
|
202
|
+
- spec/derelict/parser/version/invalid_format_spec.rb
|
203
|
+
- spec/derelict/parser/version_spec.rb
|
204
|
+
- spec/derelict/parser_spec.rb
|
205
|
+
- spec/derelict/utils/logger/array_outputter_spec.rb
|
206
|
+
- spec/derelict/utils/logger/invalid_type_spec.rb
|
207
|
+
- spec/derelict/utils/logger/raw_formatter_spec.rb
|
208
|
+
- spec/derelict/utils/logger_spec.rb
|
209
|
+
- spec/derelict/virtual_machine/invalid_spec.rb
|
210
|
+
- spec/derelict/virtual_machine/not_found_spec.rb
|
211
|
+
- spec/derelict/virtual_machine_spec.rb
|
212
|
+
- spec/derelict_spec.rb
|
85
213
|
- spec/spec_helper.rb
|
86
|
-
- spec/
|
214
|
+
- spec/support/log_context.rb
|
87
215
|
homepage: https://github.com/bradfeehan/derelict
|
88
216
|
licenses:
|
89
217
|
- MIT
|
@@ -94,20 +222,45 @@ require_paths:
|
|
94
222
|
- lib
|
95
223
|
required_ruby_version: !ruby/object:Gem::Requirement
|
96
224
|
requirements:
|
97
|
-
- -
|
225
|
+
- - '>='
|
98
226
|
- !ruby/object:Gem::Version
|
99
227
|
version: '0'
|
100
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
229
|
requirements:
|
102
|
-
- -
|
230
|
+
- - '>='
|
103
231
|
- !ruby/object:Gem::Version
|
104
232
|
version: '0'
|
105
233
|
requirements: []
|
106
234
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
235
|
+
rubygems_version: 2.0.3
|
108
236
|
signing_key:
|
109
237
|
specification_version: 4
|
110
238
|
summary: Ruby API for Vagrant installed via Installer package on Mac OS X.
|
111
239
|
test_files:
|
240
|
+
- spec/coverage_helper.rb
|
241
|
+
- spec/derelict/connection/invalid_spec.rb
|
242
|
+
- spec/derelict/connection/not_found_spec.rb
|
243
|
+
- spec/derelict/connection_spec.rb
|
244
|
+
- spec/derelict/exception/optional_reason_spec.rb
|
245
|
+
- spec/derelict/exception_spec.rb
|
246
|
+
- spec/derelict/instance/command_failed_spec.rb
|
247
|
+
- spec/derelict/instance/invalid_spec.rb
|
248
|
+
- spec/derelict/instance/missing_binary_spec.rb
|
249
|
+
- spec/derelict/instance/non_directory_spec.rb
|
250
|
+
- spec/derelict/instance/not_found_spec.rb
|
251
|
+
- spec/derelict/instance_spec.rb
|
252
|
+
- spec/derelict/parser/status/invalid_format_spec.rb
|
253
|
+
- spec/derelict/parser/status_spec.rb
|
254
|
+
- spec/derelict/parser/version/invalid_format_spec.rb
|
255
|
+
- spec/derelict/parser/version_spec.rb
|
256
|
+
- spec/derelict/parser_spec.rb
|
257
|
+
- spec/derelict/utils/logger/array_outputter_spec.rb
|
258
|
+
- spec/derelict/utils/logger/invalid_type_spec.rb
|
259
|
+
- spec/derelict/utils/logger/raw_formatter_spec.rb
|
260
|
+
- spec/derelict/utils/logger_spec.rb
|
261
|
+
- spec/derelict/virtual_machine/invalid_spec.rb
|
262
|
+
- spec/derelict/virtual_machine/not_found_spec.rb
|
263
|
+
- spec/derelict/virtual_machine_spec.rb
|
264
|
+
- spec/derelict_spec.rb
|
112
265
|
- spec/spec_helper.rb
|
113
|
-
- spec/
|
266
|
+
- spec/support/log_context.rb
|