trello_lead_time 0.1.7 → 0.1.9
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 +4 -4
- data/lib/trello_lead_time/board.rb +1 -1
- data/lib/trello_lead_time/card.rb +4 -0
- data/lib/trello_lead_time/version.rb +1 -1
- data/spec/fixtures/missing_lists.json +10 -0
- data/spec/lib/trello_lead_time/board_spec.rb +21 -1
- data/spec/lib/trello_lead_time/card_spec.rb +6 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 100178c3dcb0b5bd52f4a5a64bc683472c849662
|
4
|
+
data.tar.gz: 71b84e248556f0cfebae87f85e1aeb50d70bfc3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f967a9bd0757af27024af72bcf89a067082cab198d5bd93024739d09fad937b9fd756d16e1b4fce3091b4a21a4e64e2f0e900c0618f4f2961e89cc37fd9eccd
|
7
|
+
data.tar.gz: effe775e668e04744394dd076bc33dced219de0321e2b2a786b35a8e4d935c1fe001e0f9164f473bb6a31f795fc5697e1c2576a369b3fcd67947d7c3c690f3a1
|
@@ -11,6 +11,7 @@ describe TrelloLeadTime::Board do
|
|
11
11
|
let(:board_id) { "myboard_id" }
|
12
12
|
let(:board_name) { "Development Team" }
|
13
13
|
let(:list_with_done_cards) { "Done for 2014-03" }
|
14
|
+
let(:list_not_found_on_board) { "Not a real list" }
|
14
15
|
let(:list_id) { "mylist_id" }
|
15
16
|
let(:card_id) { "mycard_id" }
|
16
17
|
|
@@ -26,6 +27,10 @@ describe TrelloLeadTime::Board do
|
|
26
27
|
File.read(File.expand_path("../../../fixtures/lists.json", __FILE__))
|
27
28
|
}
|
28
29
|
|
30
|
+
let(:missing_lists_json) {
|
31
|
+
File.read(File.expand_path("../../../fixtures/missing_lists.json", __FILE__))
|
32
|
+
}
|
33
|
+
|
29
34
|
let(:cards_json) {
|
30
35
|
File.read(File.expand_path("../../../fixtures/cards.json", __FILE__))
|
31
36
|
}
|
@@ -63,7 +68,11 @@ describe TrelloLeadTime::Board do
|
|
63
68
|
it "should have some cards" do
|
64
69
|
stub_all_requests
|
65
70
|
expect(subject.cards(list_with_done_cards).length).to eq(4)
|
66
|
-
|
71
|
+
end
|
72
|
+
|
73
|
+
it "should default an empty list of cards when list is not found" do
|
74
|
+
stub_all_requests_missing_list
|
75
|
+
expect(subject.cards(list_not_found_on_board).length).to eq(0)
|
67
76
|
end
|
68
77
|
end
|
69
78
|
|
@@ -203,6 +212,11 @@ describe TrelloLeadTime::Board do
|
|
203
212
|
stub_card_requests
|
204
213
|
end
|
205
214
|
|
215
|
+
def stub_all_requests_missing_list
|
216
|
+
stub_board_requests
|
217
|
+
stub_missing_list_requests
|
218
|
+
end
|
219
|
+
|
206
220
|
def stub_board_requests
|
207
221
|
stub_request(:get, "https://api.trello.com/1/organizations/wellmatch?key=#{key}&token=#{token}").
|
208
222
|
with(headers).
|
@@ -223,6 +237,12 @@ describe TrelloLeadTime::Board do
|
|
223
237
|
to_return(stub_returns(cards_json))
|
224
238
|
end
|
225
239
|
|
240
|
+
def stub_missing_list_requests
|
241
|
+
stub_request(:get, "https://api.trello.com/1/boards/#{board_id}/lists?filter=all&key=#{key}&token=#{token}").
|
242
|
+
with(headers).
|
243
|
+
to_return(stub_returns(missing_lists_json))
|
244
|
+
end
|
245
|
+
|
226
246
|
def stub_card_requests
|
227
247
|
%w{1111 2222 3333 4444}.each do |card_id|
|
228
248
|
stub_request(:get, "https://api.trello.com/1/cards/#{card_id}/actions?filter=copyCard,moveCardToBoard,createCard,updateCard:idList,updateCard:closed&key=#{key}&token=#{token}").
|
@@ -37,6 +37,12 @@ describe TrelloLeadTime::Card do
|
|
37
37
|
to_return(:status => 200, :body => comments_json, :headers => {})
|
38
38
|
}
|
39
39
|
|
40
|
+
describe "#short_url" do
|
41
|
+
it "should have a url" do
|
42
|
+
expect(subject.short_url).to_not be_nil
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
40
46
|
describe ".done" do
|
41
47
|
it "should be a card" do
|
42
48
|
subject.should be_an_instance_of(TrelloLeadTime::Card)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trello_lead_time
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Baldwin
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- spec/fixtures/labels.4444.json
|
101
101
|
- spec/fixtures/labels.json
|
102
102
|
- spec/fixtures/lists.json
|
103
|
+
- spec/fixtures/missing_lists.json
|
103
104
|
- spec/fixtures/organization.json
|
104
105
|
- spec/lib/trello_lead_time/array_matcher_spec.rb
|
105
106
|
- spec/lib/trello_lead_time/board_spec.rb
|
@@ -156,6 +157,7 @@ test_files:
|
|
156
157
|
- spec/fixtures/labels.4444.json
|
157
158
|
- spec/fixtures/labels.json
|
158
159
|
- spec/fixtures/lists.json
|
160
|
+
- spec/fixtures/missing_lists.json
|
159
161
|
- spec/fixtures/organization.json
|
160
162
|
- spec/lib/trello_lead_time/array_matcher_spec.rb
|
161
163
|
- spec/lib/trello_lead_time/board_spec.rb
|