ruboty-trello 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -1
- data/Rakefile +1 -6
- data/lib/ruboty/trello.rb +14 -1
- data/lib/ruboty/trello/version.rb +1 -1
- data/ruboty-trello.gemspec +1 -1
- metadata +3 -5
- data/.travis.yml +0 -4
- data/bin/console +0 -14
- data/bin/setup +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 652f9a3da0e0ee7c6ed0dd4341c24312e37a4264
|
4
|
+
data.tar.gz: d5c7d478edd07c41069f33b3a9d8eb660f7c1a43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10ae0f180f16643a2716d2caab1073df20ae6dc854e03c5168fce0cc0cc38e886cbf6339db6a8b0d906d68ba1d7aefc553ae8be3a94a52b376b9a952e55e2769
|
7
|
+
data.tar.gz: 69ce985c3ec9b3d6c55fef153920fe160339ca3913ec346c3aa21d5f9fae66f9b14d36c9d0ccb7fcfb47aeb84797ce2d79c707e3de353890b405d05ff462dea3
|
data/README.md
CHANGED
@@ -26,13 +26,22 @@ Or install it yourself as:
|
|
26
26
|
|
27
27
|
## ENV
|
28
28
|
|
29
|
+
### required
|
30
|
+
|
29
31
|
```
|
30
32
|
TRELLO_DEVELOPER_PUBLIC_KEY - Developer API Key
|
31
|
-
TRELLO_MEMBER_TOKEN - Member Token
|
33
|
+
TRELLO_MEMBER_TOKEN - Member Token (require read&write scope)
|
32
34
|
```
|
33
35
|
|
34
36
|
see https://github.com/jeremytregunna/ruby-trello#configuration to get these keys
|
35
37
|
|
38
|
+
### optional
|
39
|
+
|
40
|
+
```
|
41
|
+
TRELLO_AUTO_ASSIGN - If set to '1', assigns sender with created card
|
42
|
+
TRELLO_RESPONSE_PREFIX - Specify response message (default is 'Created')
|
43
|
+
```
|
44
|
+
|
36
45
|
## Contributing
|
37
46
|
|
38
47
|
1. Fork it ( https://github.com/bitjourney/ruboty-trello/fork )
|
data/Rakefile
CHANGED
data/lib/ruboty/trello.rb
CHANGED
@@ -25,7 +25,20 @@ module Ruboty
|
|
25
25
|
return
|
26
26
|
end
|
27
27
|
|
28
|
-
|
28
|
+
member_id = nil
|
29
|
+
if ENV['TRELLO_AUTO_ASSIGN'] && message.from_name
|
30
|
+
sender = message.from_name.downcase
|
31
|
+
member = board.members.find do |member|
|
32
|
+
member.username.downcase == sender || member.full_name.downcase.include?(sender)
|
33
|
+
end
|
34
|
+
member_id = member.try(:id)
|
35
|
+
end
|
36
|
+
|
37
|
+
new_card = ::Trello::Card.create(name: message[:name], list_id: list.id, member_ids: member_id)
|
38
|
+
if new_card.short_url
|
39
|
+
prefix = ENV['TRELLO_RESPONSE_PREFIX'] || 'Created'
|
40
|
+
message.reply "#{prefix} #{new_card.short_url}"
|
41
|
+
end
|
29
42
|
end
|
30
43
|
end
|
31
44
|
end
|
data/ruboty-trello.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = 'ruboty-trello'
|
7
7
|
spec.version = Ruboty::Trello::VERSION
|
8
8
|
spec.authors = ['Masahiro Ihara']
|
9
|
-
spec.email = ['ihara@bitjourney.com']
|
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}
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro Ihara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|
@@ -69,18 +69,16 @@ dependencies:
|
|
69
69
|
description: Ruboty plugin for adding a new card to Trello
|
70
70
|
email:
|
71
71
|
- ihara@bitjourney.com
|
72
|
+
- dex1t@degoo.org
|
72
73
|
executables: []
|
73
74
|
extensions: []
|
74
75
|
extra_rdoc_files: []
|
75
76
|
files:
|
76
77
|
- ".gitignore"
|
77
78
|
- ".rspec"
|
78
|
-
- ".travis.yml"
|
79
79
|
- Gemfile
|
80
80
|
- README.md
|
81
81
|
- Rakefile
|
82
|
-
- bin/console
|
83
|
-
- bin/setup
|
84
82
|
- lib/ruboty/trello.rb
|
85
83
|
- lib/ruboty/trello/version.rb
|
86
84
|
- ruboty-trello.gemspec
|
data/.travis.yml
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "ruboty/trello"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|