ruboty-trello 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/ruboty/trello.rb +6 -3
- data/lib/ruboty/trello/version.rb +1 -1
- data/ruboty-trello.gemspec +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d188de8900157f0163e8274dda0fcaddcd11139b
|
4
|
+
data.tar.gz: 9883b640145731c1313e6b68424f5c6b53ce5def
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c95b1a06bb5d19d6c194a0f3f1ba364245a5e6d2ad24949df2360b676b9b7c3254bc9192d74cb6a1a90f00b65221002b6597f92856a9cff5fb59246f464e7513
|
7
|
+
data.tar.gz: 2bcd6b26ee453d3541c62588d98f3fec48cbd522b250265dbd2bb72f6218d6b3d2d241e2fee15d882e30dccab501b4ea673cda62595032718f2c9b0f1f559e5a
|
data/README.md
CHANGED
data/lib/ruboty/trello.rb
CHANGED
@@ -8,7 +8,7 @@ end
|
|
8
8
|
module Ruboty
|
9
9
|
module Handlers
|
10
10
|
class Trello < Base
|
11
|
-
on /trello\s+b\s+(?<board_name
|
11
|
+
on /trello\s+b\s+(?<board_name>.*?)\s+l\s+(?<list_name>.*?)\s+(lb\s+(?<label_name>.*?)\s+)?c\s+(?<name>.*)\z/i, name: 'trello', description: 'Add card to Trello'
|
12
12
|
|
13
13
|
def trello(message)
|
14
14
|
me = ::Trello::Member.find('me')
|
@@ -25,16 +25,19 @@ module Ruboty
|
|
25
25
|
return
|
26
26
|
end
|
27
27
|
|
28
|
+
label = board.labels.find { |label| label.name == message[:label_name] }
|
29
|
+
label_id = label&.id
|
30
|
+
|
28
31
|
member_id = nil
|
29
32
|
if ENV['TRELLO_AUTO_ASSIGN'] && message.from_name
|
30
33
|
sender = message.from_name.downcase
|
31
34
|
member = board.members.find do |member|
|
32
35
|
member.username.downcase == sender || member.full_name.downcase.include?(sender)
|
33
36
|
end
|
34
|
-
member_id = member
|
37
|
+
member_id = member&.id
|
35
38
|
end
|
36
39
|
|
37
|
-
new_card = ::Trello::Card.create(name: message[:name], list_id: list.id, member_ids: member_id)
|
40
|
+
new_card = ::Trello::Card.create(name: message[:name], list_id: list.id, card_labels: label_id, member_ids: member_id)
|
38
41
|
if new_card.short_url
|
39
42
|
prefix = ENV['TRELLO_RESPONSE_PREFIX'] || 'Created'
|
40
43
|
message.reply "#{prefix} #{new_card.short_url}"
|
data/ruboty-trello.gemspec
CHANGED
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency 'ruboty'
|
22
22
|
spec.add_dependency 'ruby-trello'
|
23
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
24
|
-
spec.add_development_dependency 'rake', '~>
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.11'
|
24
|
+
spec.add_development_dependency 'rake', '~> 11.0'
|
25
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-trello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro Ihara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.11'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.11'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '11.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '11.0'
|
69
69
|
description: Ruboty plugin for adding a new card to Trello
|
70
70
|
email:
|
71
71
|
- ihara@bitjourney.com
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
105
|
+
rubygems_version: 2.5.1
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: Ruboty plugin for adding a new card to Trello
|