derelict 0.5.2.travis.144 → 0.5.2.travis.146

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWFjNjA1NGFiOThjMGUyNjZlMjY4ODMxNTFkYzFlOWI5NzI0OTM1Yg==
4
+ MGY2NGFkNWNjMTBlMTUxOTUyMTE0NDhjYTE2NTEyOGVmZWNmZjE5OA==
5
5
  data.tar.gz: !binary |-
6
- MzRiM2RmMzI3YmRiNjU3NjRiOTE0ZmViM2UwYmQxYzU4NzIxM2Q2Nw==
6
+ NjI0NGE4Nzk1NzJiMGQ5ZTAyNzYzYTczY2JmMTE0OTNmNDFmMjUwMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MGQ2NDEwNWI1Nzc1MDhmZGY4OGEyMDJmOWQ1OTk2ZWQ0ZWYyNWQwNWEyMjMz
10
- NGQ2MjRmNTI1YjkwMGVmMTdiNDUyOTQxZThkNzcxOTIxZGFiNGUxMDRiNGZm
11
- NjVlMmYxNmY5NDRkODI2Mzk3YjJmYzE1NTQ3ODYxNTllMzNjNzg=
9
+ NzI4N2I5ZTdiYTYyOTUyYmZmNmEyYjM5YTljNmMwYjg4YmJhNGUwMTBlZmY5
10
+ OWNhYjEwZWIyMWU2OTg2MmQ3YmQxN2YyZmEyNTYwNzA0YjgwMjJiZGU1NzJh
11
+ MDE3NjgxNGU1Y2M1ZWZlNWE3NWQzY2I5Y2M0MDlmMzZjNDViNGQ=
12
12
  data.tar.gz: !binary |-
13
- ZjI5YTNkZmVlZDFjYTM4NDA2MTI1ZjI4YmY1OWM2Y2EwMWQxYzliMDBiOGM1
14
- NDBhNWYzOTgyOTVkZDc2NjI1YjE5NjczOTM1NGZjYjc3NDkzYWQxNTI1NTk1
15
- MTk0NDc3YzQzYTViYWY4ZjcyMTFhYmEwODg5MWIwZGFiOGQ2MmE=
13
+ M2I4MWEyZDliODExNmJkYjY4NDc5NjE3N2Y4NGQ5MDE2NjVkZTBmODU5Nzc5
14
+ M2I3MjlmOTZmMjQyYWQyOWQwMzkxNzk5YzgzOTMzMjQ3OTQ2ODk0OGQ0MzRm
15
+ NWYyYjI2NjIzNmQ3MDBlZDdmMDllY2ZkMzc3MmRjZWVmNTYwNWQ=
@@ -54,6 +54,7 @@ module Derelict
54
54
  END
55
55
 
56
56
  command = [:box, "add", box_name, source]
57
+ command << "--force" if options[:force]
57
58
 
58
59
  log_block = options[:log] ? shell_log_block : nil
59
60
  instance.execute!(*command, &log_block).tap do
@@ -68,30 +68,42 @@ describe Derelict::Box::Manager do
68
68
  let(:box_name) { double("box_name", :to_s => "test box") }
69
69
  let(:source) { double("source", :to_s => "test source") }
70
70
  let(:result) { double("result") }
71
- subject { manager.add box_name, source, :log => log }
71
+ let(:options) { {:log => log} }
72
+ subject { manager.add box_name, source, options }
72
73
 
73
- before do
74
- expect(instance).to receive(:execute!).with(:box, "add", box_name, source).and_yield("test", nil).and_return(result)
75
- end
74
+ context "with force disabled" do
75
+ before do
76
+ expect(instance).to receive(:execute!).with(:box, "add", box_name, source).and_yield("test", nil).and_return(result)
77
+ end
76
78
 
77
- it { should be result }
79
+ it { should be result }
78
80
 
79
- context "with logging enabled" do
80
- include_context "logged messages"
81
- let(:expected_logs) {[
82
- "DEBUG manager: Successfully initialized Derelict::Box::Manager for test instance\n",
83
- " INFO manager: Adding box 'test box' from 'test source' using Derelict::Box::Manager for test instance\n",
84
- " INFO external: test\n",
85
- ]}
81
+ context "with logging enabled" do
82
+ include_context "logged messages"
83
+ let(:expected_logs) {[
84
+ "DEBUG manager: Successfully initialized Derelict::Box::Manager for test instance\n",
85
+ " INFO manager: Adding box 'test box' from 'test source' using Derelict::Box::Manager for test instance\n",
86
+ " INFO external: test\n",
87
+ ]}
88
+ end
89
+
90
+ context "with logging disabled" do
91
+ let(:log) { false }
92
+ include_context "logged messages"
93
+ let(:expected_logs) {[
94
+ "DEBUG manager: Successfully initialized Derelict::Box::Manager for test instance\n",
95
+ " INFO manager: Adding box 'test box' from 'test source' using Derelict::Box::Manager for test instance\n",
96
+ ]}
97
+ end
86
98
  end
87
99
 
88
- context "with logging disabled" do
89
- let(:log) { false }
90
- include_context "logged messages"
91
- let(:expected_logs) {[
92
- "DEBUG manager: Successfully initialized Derelict::Box::Manager for test instance\n",
93
- " INFO manager: Adding box 'test box' from 'test source' using Derelict::Box::Manager for test instance\n",
94
- ]}
100
+ context "with force enabled" do
101
+ before do
102
+ expect(instance).to receive(:execute!).with(:box, "add", box_name, source, "--force").and_return(result)
103
+ end
104
+
105
+ let(:options) { {:force => true} }
106
+ it { should be result }
95
107
  end
96
108
  end
97
109
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: derelict
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2.travis.144
4
+ version: 0.5.2.travis.146
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Feehan