ruby-trello 2.1.0 → 2.2.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 +4 -4
- data/README.md +3 -2
- data/lib/trello/basic_data.rb +4 -4
- data/lib/trello/board.rb +2 -1
- data/lib/trello/card.rb +3 -4
- data/lib/trello/custom_field.rb +2 -1
- data/lib/trello/custom_field_item.rb +2 -1
- data/lib/trello/label.rb +5 -4
- data/lib/trello/member.rb +2 -1
- data/spec/card_spec.rb +1 -1
- metadata +23 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05525435b0e8308a1adc45db693f314a91a17bb9f565efd8a87048b0dee6a4c6
|
4
|
+
data.tar.gz: 96229c421c262dba867848a91b23149bce1f947bb4ef7b4df36d8cf5d1693f3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc91f9504c4666af90366c3b9cf18f49e50fd7afee11a9a1f9ff1bbbf70da7ab786ec1a56ffcaa3ff8f608012d439f7d9ee8fd5050a2f7ad609bc5a8941d8b09
|
7
|
+
data.tar.gz: c9034334cc3d962272dad40e9beb781108ee729d2f86137faab7695bd9da00bd94789ecf2c41fcb33e83ddc3151a9f33d449bc52cffd215360958ed33402b511
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# Ruby Trello API
|
2
2
|
|
3
3
|
[](http://waffle.io/jeremytregunna/ruby-trello)
|
4
|
-
[](http://travis-ci.org/jeremytregunna/ruby-trello)
|
4
|
+
[](http://travis-ci.org/jeremytregunna/ruby-trello)
|
5
|
+
[](https://hakiri.io/github/jeremytregunna/ruby-trello/master)
|
5
6
|
[](https://codeclimate.com/github/jeremytregunna/ruby-trello)
|
6
7
|
|
7
8
|
This library implements the [Trello](http://www.trello.com/) [API](https://developers.trello.com/).
|
@@ -29,7 +30,7 @@ Use version 1.4.x or earlier for Ruby 2.0.0 support.
|
|
29
30
|
|
30
31
|
#### Basic authorization:
|
31
32
|
|
32
|
-
1. Get your API public key from Trello via the irb console:
|
33
|
+
1. Get your API public key from Trello via [trello.com/app-key/](https://trello.com/app-key/) or the irb console as follows:
|
33
34
|
|
34
35
|
```
|
35
36
|
$ gem install ruby-trello
|
data/lib/trello/basic_data.rb
CHANGED
@@ -49,16 +49,16 @@ module Trello
|
|
49
49
|
# Defines the attribute getter and setters.
|
50
50
|
class_eval do
|
51
51
|
define_method :attributes do
|
52
|
-
@
|
52
|
+
@__attributes ||= names.reduce({}) { |hash, k| hash.merge(k.to_sym => nil) }
|
53
53
|
end
|
54
54
|
|
55
55
|
names.each do |key|
|
56
|
-
define_method(:"#{key}") { @
|
56
|
+
define_method(:"#{key}") { @__attributes[key] }
|
57
57
|
|
58
58
|
unless options[:readonly].include?(key.to_sym)
|
59
59
|
define_method :"#{key}=" do |val|
|
60
|
-
send(:"#{key}_will_change!") unless val == @
|
61
|
-
@
|
60
|
+
send(:"#{key}_will_change!") unless val == @__attributes[key]
|
61
|
+
@__attributes[key] = val
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
data/lib/trello/board.rb
CHANGED
@@ -72,7 +72,8 @@ module Trello
|
|
72
72
|
fail "Cannot save new instance." unless self.id
|
73
73
|
|
74
74
|
@previously_changed = changes
|
75
|
-
@changed_attributes.clear
|
75
|
+
@changed_attributes.try(:clear)
|
76
|
+
changes_applied if respond_to?(:changes_applied)
|
76
77
|
|
77
78
|
fields = {
|
78
79
|
name: attributes[:name],
|
data/lib/trello/card.rb
CHANGED
@@ -225,9 +225,7 @@ module Trello
|
|
225
225
|
#
|
226
226
|
# @return [Array<Trello::Member>]
|
227
227
|
def members
|
228
|
-
members =
|
229
|
-
Member.from_response client.get("/members/#{member_id}")
|
230
|
-
end
|
228
|
+
members = Member.from_response client.get("/cards/#{self.id}/members")
|
231
229
|
MultiAssociation.new(self, members).proxy
|
232
230
|
end
|
233
231
|
|
@@ -279,7 +277,8 @@ module Trello
|
|
279
277
|
@previously_changed = changes
|
280
278
|
# extract only new values to build payload
|
281
279
|
payload = Hash[changes.map { |key, values| [SYMBOL_TO_STRING[key.to_sym].to_sym, values[1]] }]
|
282
|
-
@changed_attributes.clear
|
280
|
+
@changed_attributes.try(:clear)
|
281
|
+
changes_applied if respond_to?(:changes_applied)
|
283
282
|
|
284
283
|
client.put("/cards/#{id}", payload)
|
285
284
|
end
|
data/lib/trello/custom_field.rb
CHANGED
@@ -88,7 +88,8 @@ module Trello
|
|
88
88
|
@previously_changed = changes
|
89
89
|
# extract only new values to build payload
|
90
90
|
payload = Hash[changes.map { |key, values| [SYMBOL_TO_STRING[key.to_sym].to_sym, values[1]] }]
|
91
|
-
@changed_attributes.clear
|
91
|
+
@changed_attributes.try(:clear)
|
92
|
+
changes_applied if respond_to?(:changes_applied)
|
92
93
|
|
93
94
|
client.put("/customFields/#{id}", payload)
|
94
95
|
end
|
@@ -33,7 +33,8 @@ module Trello
|
|
33
33
|
@previously_changed = changes
|
34
34
|
# extract only new values to build payload
|
35
35
|
payload = Hash[changes.map { |key, values| [key.to_sym, values[1]] }]
|
36
|
-
@changed_attributes.clear
|
36
|
+
@changed_attributes.try(:clear)
|
37
|
+
changes_applied if respond_to?(:changes_applied)
|
37
38
|
|
38
39
|
client.put("/card/#{model_id}/customField/#{custom_field_id}/item", payload)
|
39
40
|
end
|
data/lib/trello/label.rb
CHANGED
@@ -46,7 +46,7 @@ module Trello
|
|
46
46
|
define_attribute_methods [:color]
|
47
47
|
|
48
48
|
def color
|
49
|
-
@
|
49
|
+
@__attributes[:color]
|
50
50
|
end
|
51
51
|
|
52
52
|
def color= colour
|
@@ -55,8 +55,8 @@ module Trello
|
|
55
55
|
return Trello.logger.warn "The label colour '#{colour}' does not exist."
|
56
56
|
end
|
57
57
|
|
58
|
-
self.send(:"color_will_change!") unless colour == @
|
59
|
-
@
|
58
|
+
self.send(:"color_will_change!") unless colour == @__attributes[:color]
|
59
|
+
@__attributes[:color] = colour
|
60
60
|
end
|
61
61
|
|
62
62
|
# Update the fields of a label.
|
@@ -95,7 +95,8 @@ module Trello
|
|
95
95
|
@previously_changed = changes
|
96
96
|
# extract only new values to build payload
|
97
97
|
payload = Hash[changes.map { |key, values| [SYMBOL_TO_STRING[key.to_sym].to_sym, values[1]] }]
|
98
|
-
@changed_attributes.clear
|
98
|
+
@changed_attributes.try(:clear)
|
99
|
+
changes_applied if respond_to?(:changes_applied)
|
99
100
|
|
100
101
|
client.put("/labels/#{id}", payload)
|
101
102
|
end
|
data/lib/trello/member.rb
CHANGED
data/spec/card_spec.rb
CHANGED
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: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Tregunna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -174,39 +174,38 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
- !ruby/object:Gem::Version
|
175
175
|
version: '0'
|
176
176
|
requirements: []
|
177
|
-
|
178
|
-
rubygems_version: 2.7.7
|
177
|
+
rubygems_version: 3.0.6
|
179
178
|
signing_key:
|
180
179
|
specification_version: 4
|
181
180
|
summary: A wrapper around the trello.com API.
|
182
181
|
test_files:
|
183
|
-
- spec/
|
184
|
-
- spec/
|
185
|
-
- spec/spec_helper.rb
|
182
|
+
- spec/json_utils_spec.rb
|
183
|
+
- spec/item_spec.rb
|
186
184
|
- spec/integration/how_to_use_boards_spec.rb
|
187
185
|
- spec/integration/how_to_authorize_spec.rb
|
188
186
|
- spec/integration/integration_test.rb
|
189
|
-
- spec/
|
190
|
-
- spec/card_spec.rb
|
191
|
-
- spec/hash_spec.rb
|
192
|
-
- spec/trello_spec.rb
|
187
|
+
- spec/string_spec.rb
|
193
188
|
- spec/board_spec.rb
|
194
|
-
- spec/
|
189
|
+
- spec/action_spec.rb
|
190
|
+
- spec/association_spec.rb
|
191
|
+
- spec/notification_spec.rb
|
192
|
+
- spec/trello_spec.rb
|
193
|
+
- spec/hash_spec.rb
|
194
|
+
- spec/webhook_spec.rb
|
195
|
+
- spec/label_spec.rb
|
195
196
|
- spec/custom_field_option_spec.rb
|
196
|
-
- spec/
|
197
|
+
- spec/custom_field_item_spec.rb
|
198
|
+
- spec/card_spec.rb
|
199
|
+
- spec/token_spec.rb
|
200
|
+
- spec/custom_field_spec.rb
|
201
|
+
- spec/organization_spec.rb
|
197
202
|
- spec/configuration_spec.rb
|
198
|
-
- spec/
|
203
|
+
- spec/array_spec.rb
|
199
204
|
- spec/checklist_spec.rb
|
200
|
-
- spec/list_spec.rb
|
201
|
-
- spec/webhook_spec.rb
|
202
|
-
- spec/organization_spec.rb
|
203
|
-
- spec/custom_field_item_spec.rb
|
204
205
|
- spec/basic_auth_policy_spec.rb
|
205
|
-
- spec/
|
206
|
-
- spec/
|
207
|
-
- spec/
|
206
|
+
- spec/oauth_policy_spec.rb
|
207
|
+
- spec/spec_helper.rb
|
208
|
+
- spec/member_spec.rb
|
208
209
|
- spec/basic_data_spec.rb
|
209
|
-
- spec/
|
210
|
+
- spec/list_spec.rb
|
210
211
|
- spec/client_spec.rb
|
211
|
-
- spec/item_spec.rb
|
212
|
-
- spec/label_spec.rb
|