ruboty-trello 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d188de8900157f0163e8274dda0fcaddcd11139b
4
- data.tar.gz: 9883b640145731c1313e6b68424f5c6b53ce5def
3
+ metadata.gz: 3c88a931ece5732cb306a80801b73311323991e6
4
+ data.tar.gz: c4600810a2b0b45f4d00336af82e222f332537c2
5
5
  SHA512:
6
- metadata.gz: c95b1a06bb5d19d6c194a0f3f1ba364245a5e6d2ad24949df2360b676b9b7c3254bc9192d74cb6a1a90f00b65221002b6597f92856a9cff5fb59246f464e7513
7
- data.tar.gz: 2bcd6b26ee453d3541c62588d98f3fec48cbd522b250265dbd2bb72f6218d6b3d2d241e2fee15d882e30dccab501b4ea673cda62595032718f2c9b0f1f559e5a
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
@@ -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/i, name: 'trello', description: 'Add card to Trello'
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
- new_card = ::Trello::Card.create(name: message[:name], list_id: list.id, card_labels: label_id, member_ids: member_id)
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}"
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module Trello
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
5
5
  end
@@ -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 = 'http://github.com/bitjourney/ruboty-trello'
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.5
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-06-17 00:00:00.000000000 Z
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: http://github.com/bitjourney/ruboty-trello
86
+ homepage: https://github.com/bitjourney/ruboty-trello
86
87
  licenses:
87
88
  - MIT
88
89
  metadata: {}