ruby-trello 1.0.2 → 1.0.3
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/README.md +1 -1
- data/lib/trello/action.rb +2 -2
- data/lib/trello/basic_data.rb +2 -2
- data/lib/trello/board.rb +2 -2
- data/lib/trello/card.rb +2 -2
- data/lib/trello/checklist.rb +2 -2
- data/lib/trello/client.rb +2 -2
- data/lib/trello/list.rb +2 -2
- data/lib/trello/member.rb +2 -2
- data/lib/trello/notification.rb +2 -2
- data/lib/trello/organization.rb +2 -2
- data/lib/trello/token.rb +2 -2
- data/spec/action_spec.rb +3 -3
- data/spec/board_spec.rb +3 -3
- data/spec/card_spec.rb +6 -6
- data/spec/checklist_spec.rb +3 -3
- data/spec/list_spec.rb +3 -3
- data/spec/member_spec.rb +2 -2
- data/spec/notification_spec.rb +3 -3
- data/spec/organization_spec.rb +2 -2
- data/spec/token_spec.rb +5 -5
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09926829a9c5e626cd0ab3796ab1a57af77c294a
|
4
|
+
data.tar.gz: 9694ed068bacd16f153e35384a5f6641378cb6e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5802afb500a67024cc96f203a239c39ef1844102d3278e7398a7c6142edea202fbe74f6965932ac7efd9e3b12dd9906e5ef614218567ec060cf487888753f4b8
|
7
|
+
data.tar.gz: 7f6208ed5447fa1ae89e4a5d43dab717c8b986e2548c5577407e89b4d5ac5e63b2e8248cecf1606dde8eec2f3a102145dd5c5fa8548e596d19cbd8f6ae244aac
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ Full Disclosure: This library is mostly complete, if you do find anything missin
|
|
18
18
|
to, please [let us know](https://trello.com/card/spot-a-bug-report-it/4f092b2ee23cb6fe6d1aaabd/17).
|
19
19
|
|
20
20
|
While this library still does function on ruby 1.8 as of version 1.0.2 with activemodel < 4.0, this notice services to
|
21
|
-
illustrate that future versions may include ruby 1.9+ specific features.
|
21
|
+
illustrate that future versions may include ruby 1.9.3+ specific features.
|
22
22
|
|
23
23
|
## Configuration
|
24
24
|
|
data/lib/trello/action.rb
CHANGED
data/lib/trello/basic_data.rb
CHANGED
data/lib/trello/board.rb
CHANGED
data/lib/trello/card.rb
CHANGED
data/lib/trello/checklist.rb
CHANGED
data/lib/trello/client.rb
CHANGED
@@ -39,8 +39,8 @@ module Trello
|
|
39
39
|
# client.find(:board, "board1234")
|
40
40
|
# client.find(:member, "user1234")
|
41
41
|
#
|
42
|
-
def find(path, id)
|
43
|
-
response = get("/#{path.to_s.pluralize}/#{id}")
|
42
|
+
def find(path, id, params = {})
|
43
|
+
response = get("/#{path.to_s.pluralize}/#{id}", params)
|
44
44
|
trello_class = class_from_path(path)
|
45
45
|
trello_class.parse response do |data|
|
46
46
|
data.client = self
|
data/lib/trello/list.rb
CHANGED
data/lib/trello/member.rb
CHANGED
@@ -12,8 +12,8 @@ module Trello
|
|
12
12
|
# Finds a user
|
13
13
|
#
|
14
14
|
# The argument may be specified as either an _id_ or a _username_.
|
15
|
-
def find(id_or_username)
|
16
|
-
client.find(:member, id_or_username)
|
15
|
+
def find(id_or_username, params = {})
|
16
|
+
client.find(:member, id_or_username, params)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
data/lib/trello/notification.rb
CHANGED
data/lib/trello/organization.rb
CHANGED
data/lib/trello/token.rb
CHANGED
data/spec/action_spec.rb
CHANGED
@@ -8,7 +8,7 @@ module Trello
|
|
8
8
|
let(:client) { Client.new }
|
9
9
|
|
10
10
|
before(:each) do
|
11
|
-
client.stub(:get).with("/actions/4ee2482134a81a757a08af47").
|
11
|
+
client.stub(:get).with("/actions/4ee2482134a81a757a08af47", {}).
|
12
12
|
and_return JSON.generate(actions_details.first)
|
13
13
|
end
|
14
14
|
|
@@ -16,7 +16,7 @@ module Trello
|
|
16
16
|
let(:client) { Trello.client }
|
17
17
|
|
18
18
|
it "delegates to Trello.client#find" do
|
19
|
-
client.should_receive(:find).with(:action, '4ee2482134a81a757a08af47')
|
19
|
+
client.should_receive(:find).with(:action, '4ee2482134a81a757a08af47', {})
|
20
20
|
Action.find('4ee2482134a81a757a08af47')
|
21
21
|
end
|
22
22
|
|
@@ -74,7 +74,7 @@ module Trello
|
|
74
74
|
|
75
75
|
context "member creator" do
|
76
76
|
it "knows its member creator" do
|
77
|
-
client.stub(:get).with("/members/abcdef123456789123456789").and_return user_payload
|
77
|
+
client.stub(:get).with("/members/abcdef123456789123456789", {}).and_return user_payload
|
78
78
|
|
79
79
|
action.member_creator.should_not be_nil
|
80
80
|
end
|
data/spec/board_spec.rb
CHANGED
@@ -8,7 +8,7 @@ module Trello
|
|
8
8
|
let(:client) { Client.new }
|
9
9
|
|
10
10
|
before(:each) do
|
11
|
-
client.stub(:get).with("/boards/abcdef123456789123456789").
|
11
|
+
client.stub(:get).with("/boards/abcdef123456789123456789", {}).
|
12
12
|
and_return JSON.generate(boards_details.first)
|
13
13
|
end
|
14
14
|
|
@@ -16,7 +16,7 @@ module Trello
|
|
16
16
|
let(:client) { Trello.client }
|
17
17
|
|
18
18
|
it "delegates to client#find" do
|
19
|
-
client.should_receive(:find).with(:board, 'abcdef123456789123456789')
|
19
|
+
client.should_receive(:find).with(:board, 'abcdef123456789123456789', {})
|
20
20
|
Board.find('abcdef123456789123456789')
|
21
21
|
end
|
22
22
|
|
@@ -114,7 +114,7 @@ module Trello
|
|
114
114
|
|
115
115
|
context "organization" do
|
116
116
|
it "belongs to an organization" do
|
117
|
-
client.stub(:get).with("/organizations/abcdef123456789123456789").
|
117
|
+
client.stub(:get).with("/organizations/abcdef123456789123456789", {}).
|
118
118
|
and_return JSON.generate(orgs_details.first)
|
119
119
|
|
120
120
|
board.organization.should_not be_nil
|
data/spec/card_spec.rb
CHANGED
@@ -8,7 +8,7 @@ module Trello
|
|
8
8
|
let(:client) { Client.new }
|
9
9
|
|
10
10
|
before(:each) do
|
11
|
-
client.stub(:get).with("/cards/abcdef123456789123456789").
|
11
|
+
client.stub(:get).with("/cards/abcdef123456789123456789", {}).
|
12
12
|
and_return JSON.generate(cards_details.first)
|
13
13
|
end
|
14
14
|
|
@@ -16,7 +16,7 @@ module Trello
|
|
16
16
|
let(:client) { Trello.client }
|
17
17
|
|
18
18
|
it "delegates to Trello.client#find" do
|
19
|
-
client.should_receive(:find).with(:card, 'abcdef123456789123456789')
|
19
|
+
client.should_receive(:find).with(:card, 'abcdef123456789123456789', {})
|
20
20
|
Card.find('abcdef123456789123456789')
|
21
21
|
end
|
22
22
|
|
@@ -127,7 +127,7 @@ module Trello
|
|
127
127
|
|
128
128
|
context "boards" do
|
129
129
|
it "has a board" do
|
130
|
-
client.stub(:get).with("/boards/abcdef123456789123456789").and_return JSON.generate(boards_details.first)
|
130
|
+
client.stub(:get).with("/boards/abcdef123456789123456789", {}).and_return JSON.generate(boards_details.first)
|
131
131
|
card.board.should_not be_nil
|
132
132
|
end
|
133
133
|
end
|
@@ -141,7 +141,7 @@ module Trello
|
|
141
141
|
|
142
142
|
context "list" do
|
143
143
|
it 'has a list' do
|
144
|
-
client.stub(:get).with("/lists/abcdef123456789123456789").and_return JSON.generate(lists_details.first)
|
144
|
+
client.stub(:get).with("/lists/abcdef123456789123456789", {}).and_return JSON.generate(lists_details.first)
|
145
145
|
card.list.should_not be_nil
|
146
146
|
end
|
147
147
|
|
@@ -183,7 +183,7 @@ module Trello
|
|
183
183
|
|
184
184
|
context "members" do
|
185
185
|
it "has a list of members" do
|
186
|
-
client.stub(:get).with("/boards/abcdef123456789123456789").and_return JSON.generate(boards_details.first)
|
186
|
+
client.stub(:get).with("/boards/abcdef123456789123456789", {}).and_return JSON.generate(boards_details.first)
|
187
187
|
client.stub(:get).with("/members/abcdef123456789123456789").and_return user_payload
|
188
188
|
|
189
189
|
card.board.should_not be_nil
|
@@ -273,7 +273,7 @@ module Trello
|
|
273
273
|
end
|
274
274
|
|
275
275
|
it "can list the existing attachments with correct fields" do
|
276
|
-
client.stub(:get).with("/boards/abcdef123456789123456789").and_return JSON.generate(boards_details.first)
|
276
|
+
client.stub(:get).with("/boards/abcdef123456789123456789", {}).and_return JSON.generate(boards_details.first)
|
277
277
|
client.stub(:get).with("/cards/abcdef123456789123456789/attachments").and_return attachments_payload
|
278
278
|
|
279
279
|
card.board.should_not be_nil
|
data/spec/checklist_spec.rb
CHANGED
@@ -8,7 +8,7 @@ module Trello
|
|
8
8
|
let(:client) { Client.new }
|
9
9
|
|
10
10
|
before(:each) do
|
11
|
-
client.stub(:get).with("/checklists/abcdef123456789123456789").
|
11
|
+
client.stub(:get).with("/checklists/abcdef123456789123456789", {}).
|
12
12
|
and_return JSON.generate(checklists_details.first)
|
13
13
|
end
|
14
14
|
|
@@ -16,7 +16,7 @@ module Trello
|
|
16
16
|
let(:client) { Trello.client }
|
17
17
|
|
18
18
|
it "delegates to Trello.client#find" do
|
19
|
-
client.should_receive(:find).with(:checklist, 'abcdef123456789123456789')
|
19
|
+
client.should_receive(:find).with(:checklist, 'abcdef123456789123456789', {})
|
20
20
|
Checklist.find('abcdef123456789123456789')
|
21
21
|
end
|
22
22
|
|
@@ -107,7 +107,7 @@ module Trello
|
|
107
107
|
|
108
108
|
context "list" do
|
109
109
|
it 'has a list' do
|
110
|
-
client.stub(:get).with("/lists/abcdef123456789123456789").and_return JSON.generate(lists_details.first)
|
110
|
+
client.stub(:get).with("/lists/abcdef123456789123456789", {}).and_return JSON.generate(lists_details.first)
|
111
111
|
checklist.list.should_not be_nil
|
112
112
|
end
|
113
113
|
end
|
data/spec/list_spec.rb
CHANGED
@@ -8,15 +8,15 @@ module Trello
|
|
8
8
|
let(:client) { Client.new }
|
9
9
|
|
10
10
|
before(:each) do
|
11
|
-
client.stub(:get).with("/lists/abcdef123456789123456789").and_return JSON.generate(lists_details.first)
|
12
|
-
client.stub(:get).with("/boards/abcdef123456789123456789").and_return JSON.generate(boards_details.first)
|
11
|
+
client.stub(:get).with("/lists/abcdef123456789123456789", {}).and_return JSON.generate(lists_details.first)
|
12
|
+
client.stub(:get).with("/boards/abcdef123456789123456789", {}).and_return JSON.generate(boards_details.first)
|
13
13
|
end
|
14
14
|
|
15
15
|
context "finding" do
|
16
16
|
let(:client) { Trello.client }
|
17
17
|
|
18
18
|
it "delegates to client#find" do
|
19
|
-
client.should_receive(:find).with(:list, 'abcdef123456789123456789')
|
19
|
+
client.should_receive(:find).with(:list, 'abcdef123456789123456789', {})
|
20
20
|
List.find('abcdef123456789123456789')
|
21
21
|
end
|
22
22
|
|
data/spec/member_spec.rb
CHANGED
@@ -10,14 +10,14 @@ module Trello
|
|
10
10
|
let(:client) { Client.new }
|
11
11
|
|
12
12
|
before(:each) do
|
13
|
-
client.stub(:get).with("/members/abcdef123456789012345678").and_return user_payload
|
13
|
+
client.stub(:get).with("/members/abcdef123456789012345678", {}).and_return user_payload
|
14
14
|
end
|
15
15
|
|
16
16
|
context "finding" do
|
17
17
|
let(:client) { Trello.client }
|
18
18
|
|
19
19
|
it "delegates to Trello.client#find" do
|
20
|
-
client.should_receive(:find).with(:member, 'abcdef123456789012345678')
|
20
|
+
client.should_receive(:find).with(:member, 'abcdef123456789012345678', {})
|
21
21
|
Member.find('abcdef123456789012345678')
|
22
22
|
end
|
23
23
|
|
data/spec/notification_spec.rb
CHANGED
@@ -9,7 +9,7 @@ module Trello
|
|
9
9
|
let(:client) { Client.new }
|
10
10
|
|
11
11
|
before(:each) do
|
12
|
-
client.stub(:get).with("/members/abcdef123456789012345678").and_return user_payload
|
12
|
+
client.stub(:get).with("/members/abcdef123456789012345678", {}).and_return user_payload
|
13
13
|
client.stub(:get).with("/members/abcdef123456789012345678/notifications", {}).and_return "[" << notification_payload << "]"
|
14
14
|
end
|
15
15
|
|
@@ -17,7 +17,7 @@ module Trello
|
|
17
17
|
let(:client) { Trello.client }
|
18
18
|
|
19
19
|
it "can find a specific notification" do
|
20
|
-
client.stub(:get).with("/notifications/#{notification_details['id']}").and_return notification_payload
|
20
|
+
client.stub(:get).with("/notifications/#{notification_details['id']}", {}).and_return notification_payload
|
21
21
|
Notification.find(notification_details['id']).should == notification
|
22
22
|
end
|
23
23
|
end
|
@@ -50,7 +50,7 @@ module Trello
|
|
50
50
|
end
|
51
51
|
|
52
52
|
it "can retrieve the member creator" do
|
53
|
-
client.stub(:get).with("/members/#{user_details['id']}").and_return user_payload
|
53
|
+
client.stub(:get).with("/members/#{user_details['id']}", {}).and_return user_payload
|
54
54
|
notification.member_creator.id.should == user_details['id']
|
55
55
|
end
|
56
56
|
end
|
data/spec/organization_spec.rb
CHANGED
@@ -9,7 +9,7 @@ module Trello
|
|
9
9
|
let(:client) { Client.new }
|
10
10
|
|
11
11
|
before(:each) do
|
12
|
-
client.stub(:get).with("/organizations/4ee7e59ae582acdec8000291").
|
12
|
+
client.stub(:get).with("/organizations/4ee7e59ae582acdec8000291", {}).
|
13
13
|
and_return organization_payload
|
14
14
|
end
|
15
15
|
|
@@ -17,7 +17,7 @@ module Trello
|
|
17
17
|
let(:client) { Trello.client }
|
18
18
|
|
19
19
|
it "delegates to Trello.client#find" do
|
20
|
-
client.should_receive(:find).with(:organization, '4ee7e59ae582acdec8000291')
|
20
|
+
client.should_receive(:find).with(:organization, '4ee7e59ae582acdec8000291', {})
|
21
21
|
Organization.find('4ee7e59ae582acdec8000291')
|
22
22
|
end
|
23
23
|
|
data/spec/token_spec.rb
CHANGED
@@ -8,14 +8,14 @@ module Trello
|
|
8
8
|
let(:client) { Client.new }
|
9
9
|
|
10
10
|
before(:each) do
|
11
|
-
client.stub(:get).with("/tokens/1234").and_return token_payload
|
11
|
+
client.stub(:get).with("/tokens/1234", {}).and_return token_payload
|
12
12
|
end
|
13
13
|
|
14
14
|
context "finding" do
|
15
15
|
let(:client) { Trello.client }
|
16
16
|
|
17
17
|
it "delegates to Trello.client#find" do
|
18
|
-
client.should_receive(:find).with(:token, '1234')
|
18
|
+
client.should_receive(:find).with(:token, '1234', {})
|
19
19
|
Token.find('1234')
|
20
20
|
end
|
21
21
|
|
@@ -40,9 +40,9 @@ module Trello
|
|
40
40
|
|
41
41
|
context "members" do
|
42
42
|
it "retrieves the member who authorized the token" do
|
43
|
-
client.stub(:get).with("/members/abcdef123456789123456789").and_return user_payload
|
44
|
-
Trello.client.stub(:get).with("/members/abcdef123456789123456789").and_return user_payload
|
45
|
-
client.stub(:get).with("/tokens/1234").and_return token_payload
|
43
|
+
client.stub(:get).with("/members/abcdef123456789123456789", {}).and_return user_payload
|
44
|
+
Trello.client.stub(:get).with("/members/abcdef123456789123456789", {}).and_return user_payload
|
45
|
+
client.stub(:get).with("/tokens/1234", {}).and_return token_payload
|
46
46
|
token.member.should == Member.find("abcdef123456789123456789")
|
47
47
|
end
|
48
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-trello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Tregunna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -135,7 +135,8 @@ files:
|
|
135
135
|
- spec/token_spec.rb
|
136
136
|
- spec/trello_spec.rb
|
137
137
|
homepage: https://github.com/jeremytregunna/ruby-trello
|
138
|
-
licenses:
|
138
|
+
licenses:
|
139
|
+
- MIT
|
139
140
|
metadata: {}
|
140
141
|
post_install_message:
|
141
142
|
rdoc_options:
|