ruboty-trello 0.1.5 → 0.1.6
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 +12 -1
- data/lib/ruboty/trello.rb +4 -2
- data/lib/ruboty/trello/version.rb +1 -1
- data/ruboty-trello.gemspec +2 -2
- 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: 3c88a931ece5732cb306a80801b73311323991e6
|
4
|
+
data.tar.gz: c4600810a2b0b45f4d00336af82e222f332537c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b97b0f5cc71c26534d46977ea3602c03f0e2013bbe4da469db80c4fe806c316d16cceb680f2af494ea2d35c1605f9729212c3263a15331fe07df95fe8161e2ae
|
7
|
+
data.tar.gz: e8c6d86200c8c34ba06024621b0a2b5600520b985f5ebca3ff39ce43955e25fe9794cdd66bc43b4ff4c40a9e09970a766a12c7feff8b7c6ff9000f4aecc094f8
|
data/README.md
CHANGED
@@ -21,9 +21,20 @@ Or install it yourself as:
|
|
21
21
|
## Usage
|
22
22
|
|
23
23
|
```
|
24
|
-
@ruboty trello b <board_name> l <list_name> (lb <label_name>) c <card_name>
|
24
|
+
@ruboty trello b <board_name> l <list_name> (lb <label_name>) (dd <due_date>) c <card_name>
|
25
25
|
```
|
26
26
|
|
27
|
+
e.g.
|
28
|
+
|
29
|
+
|
30
|
+
```
|
31
|
+
@ruboty trello b development l icebox c something
|
32
|
+
@ruboty trello b development l icebox dd 2016-01-01 c something
|
33
|
+
@ruboty trello b development l icebox dd 2016-01-01 01:02 c something
|
34
|
+
@ruboty trello b development l icebox lb feature dd 2016-01-01 01:02 c something
|
35
|
+
```
|
36
|
+
|
37
|
+
|
27
38
|
## ENV
|
28
39
|
|
29
40
|
### required
|
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>.*?)\s+l\s+(?<list_name>.*?)\s+(lb\s+(?<label_name>.*?)\s+)?c\s+(?<name>.*)\z
|
11
|
+
on /trello\s+b\s+(?<board_name>.*?)\s+l\s+(?<list_name>.*?)\s+(lb\s+(?<label_name>.*?)\s+)?(dd\s+(?<due_date>.*?)\s+)?c\s+(?<name>.*)\z/, name: 'trello', description: 'Add card to Trello'
|
12
12
|
|
13
13
|
def trello(message)
|
14
14
|
me = ::Trello::Member.find('me')
|
@@ -37,7 +37,9 @@ module Ruboty
|
|
37
37
|
member_id = member&.id
|
38
38
|
end
|
39
39
|
|
40
|
-
|
40
|
+
iso8601_time = Time.parse(message[:due_date]).iso8601 rescue nil
|
41
|
+
|
42
|
+
new_card = ::Trello::Card.create(name: message[:name], list_id: list.id, card_labels: label_id, member_ids: member_id, due: iso8601_time)
|
41
43
|
if new_card.short_url
|
42
44
|
prefix = ENV['TRELLO_RESPONSE_PREFIX'] || 'Created'
|
43
45
|
message.reply "#{prefix} #{new_card.short_url}"
|
data/ruboty-trello.gemspec
CHANGED
@@ -5,12 +5,12 @@ require 'ruboty/trello/version'
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'ruboty-trello'
|
7
7
|
spec.version = Ruboty::Trello::VERSION
|
8
|
-
spec.authors = ['Masahiro Ihara']
|
8
|
+
spec.authors = ['Masahiro Ihara', 'Takaya Deguchi']
|
9
9
|
spec.email = ['ihara@bitjourney.com', 'dex1t@degoo.org']
|
10
10
|
|
11
11
|
spec.summary = %q{Ruboty plugin for adding a new card to Trello}
|
12
12
|
spec.description = %q{Ruboty plugin for adding a new card to Trello}
|
13
|
-
spec.homepage = '
|
13
|
+
spec.homepage = 'https://github.com/bitjourney/ruboty-trello'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro Ihara
|
8
|
+
- Takaya Deguchi
|
8
9
|
autorequire:
|
9
10
|
bindir: exe
|
10
11
|
cert_chain: []
|
11
|
-
date: 2016-
|
12
|
+
date: 2016-11-28 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: ruboty
|
@@ -82,7 +83,7 @@ files:
|
|
82
83
|
- lib/ruboty/trello.rb
|
83
84
|
- lib/ruboty/trello/version.rb
|
84
85
|
- ruboty-trello.gemspec
|
85
|
-
homepage:
|
86
|
+
homepage: https://github.com/bitjourney/ruboty-trello
|
86
87
|
licenses:
|
87
88
|
- MIT
|
88
89
|
metadata: {}
|