ruby-trello 0.4.4.1 → 0.4.4.2

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.
data/lib/trello/board.rb CHANGED
@@ -42,9 +42,9 @@ module Trello
42
42
  @changed_attributes.clear
43
43
 
44
44
  Client.put("/boards/#{self.id}/", {
45
- :name => @name,
46
- :description => @description,
47
- :closed => @closed
45
+ :name => attributes[:name],
46
+ :description => attributes[:description],
47
+ :closed => attributes[:closed]
48
48
  }).json_into(self)
49
49
  end
50
50
 
@@ -46,11 +46,5 @@ describe BasicAuthPolicy do
46
46
  authorized_request.headers.should === request.headers
47
47
  end
48
48
 
49
- it "returns nil body if one is supplied" do
50
- uri = Addressable::URI.parse("https://xxx/")
51
- request = Request.new :get, uri, {}, "any body"
52
- BasicAuthPolicy.authorize(request).body.should be_nil
53
- end
54
-
55
49
  it "does what when a query parameter already exists called key or token?"
56
50
  end
data/spec/board_spec.rb CHANGED
@@ -178,6 +178,29 @@ module Trello
178
178
  it "saves OR updates depending on whether or not it has an id set"
179
179
  end
180
180
 
181
+ describe '#update!' do
182
+ include Helpers
183
+
184
+ let(:any_board_json) do
185
+ JSON.generate(boards_details.first)
186
+ end
187
+
188
+ it "puts basic attributes" do
189
+ board = Board.new 'id' => "board_id"
190
+
191
+ board.name = "new name"
192
+ board.description = "new description"
193
+ board.closed = true
194
+
195
+ Client.should_receive(:put).with("/boards/#{board.id}/", {
196
+ :name => "new name",
197
+ :description => "new description",
198
+ :closed => true
199
+ }).and_return any_board_json
200
+ board.update!
201
+ end
202
+ end
203
+
181
204
  describe "Repository" do
182
205
  include Helpers
183
206
 
data/spec/card_spec.rb CHANGED
@@ -237,19 +237,8 @@ module Trello
237
237
  @card.add_attachment(f)
238
238
 
239
239
  @card.errors.should be_empty
240
-
241
- end
242
-
243
- it "can add another attachment" do
244
- f = File.new('spec/list_spec.rb', 'r')
245
- card = Card.new(cards_details.first)
246
- before_count = card.attachments.count
247
- card.add_attachment(f)
248
- after_count = card.attachments.count
249
- after_count.should be > before_count
250
240
  end
251
241
 
252
-
253
242
  it "can list the existing attachments" do
254
243
  Client.stub(:get).with("/boards/abcdef123456789123456789").and_return JSON.generate(boards_details.first)
255
244
  Client.stub(:get).with("/cards/abcdef123456789123456789/attachments").and_return attachments_payload
@@ -48,7 +48,7 @@ describe OAuthPolicy do
48
48
 
49
49
  authorized_request = OAuthPolicy.authorize request
50
50
 
51
- authorized_request.headers["Authorization"].should =~ /oauth_signature="kLcSxrCTd4ATHcLmTp8q%2Foa%2BFMA%3D"/
51
+ authorized_request.headers["Authorization"].should =~ /oauth_signature="TVNk%2FCs03FHqutDUqn05%2FDkvVek%3D"/
52
52
  end
53
53
 
54
54
  it "adds correct signature for uri with parameters" do
@@ -62,7 +62,7 @@ describe OAuthPolicy do
62
62
 
63
63
  authorized_request = OAuthPolicy.authorize request
64
64
 
65
- authorized_request.headers["Authorization"].should =~ /oauth_signature="xm%2FJ1swxxPb6mnuR1Q1ucJMdGRk%3D"/
65
+ authorized_request.headers["Authorization"].should =~ /oauth_signature="DprU1bdbNdJQ40UhD4n7wRR9jts%3D"/
66
66
  end
67
67
 
68
68
  it "fails if consumer_credential is unset" do
@@ -84,7 +84,7 @@ describe OAuthPolicy do
84
84
 
85
85
  authorized_request = OAuthPolicy.authorize request
86
86
 
87
- authorized_request.headers["Authorization"].should =~ /oauth_signature="3JeZSzsLCYnGNdVALZMgbzQKN44%3D"/
87
+ authorized_request.headers["Authorization"].should =~ /oauth_signature="1Boj4fo6KiXA4xGD%2BKF5QOD36PI%3D"/
88
88
  end
89
89
 
90
90
  it "adds correct signature for https uri"
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
- hash: 125
4
+ hash: 123
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
9
  - 4
10
- - 1
11
- version: 0.4.4.1
10
+ - 2
11
+ version: 0.4.4.2
12
12
  platform: ruby
13
13
  authors:
14
14
  - Jeremy Tregunna