github-trello-cl 0.1.8 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/trello.rb +12 -7
- data/lib/trello/api/trello.rb +1 -1
- data/lib/trello/helpers.rb +5 -1
- data/trello.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55d9bd30c4232b973f9b7895779a372d445f83f0
|
4
|
+
data.tar.gz: 17ffdfaa2a60fc3c573d6638370e3ad629f8fcf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a55c7e6991280e3fb76b628918f3dee7c99b979373d3b38a13e26f69ead6c6c766538ec76990721e8f99ac86b63ce7980893cf0de5920a53383022b665803dd
|
7
|
+
data.tar.gz: d9f3599b766d0a8c25e829cfc1fca4241011dfe054367038b66c8d61b477c2ad8642b0cfb5919e4c1a5c31e88231eb308a4df6028908c128868da1c979113309
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
github-trello-cl (0.1.
|
4
|
+
github-trello-cl (0.1.8)
|
5
5
|
commander (~> 4.3.0)
|
6
6
|
httparty (~> 0.13.3)
|
7
7
|
launchy (~> 2.4.3)
|
@@ -20,7 +20,7 @@ GEM
|
|
20
20
|
httparty (0.13.5)
|
21
21
|
json (~> 1.8)
|
22
22
|
multi_xml (>= 0.5.2)
|
23
|
-
json (1.8.
|
23
|
+
json (1.8.3)
|
24
24
|
launchy (2.4.3)
|
25
25
|
addressable (~> 2.3)
|
26
26
|
multi_xml (0.5.5)
|
data/lib/trello.rb
CHANGED
@@ -85,16 +85,21 @@ module Trello
|
|
85
85
|
c.syntax = 'trello config --<field> value'
|
86
86
|
c.description = 'Configure options for the integration'
|
87
87
|
c.option '--user USERNAME', 'Configures the user\'s Trello username (required)'
|
88
|
+
c.option '--board BOARD', 'Configures which Trello board to automate. This is the board\'s alphanumeric ID (e.g. sqT6xkP7), NOT its name. (required)'
|
88
89
|
c.option '--key APIKEY', 'Configures the user\'s API key for access to the API backend'
|
89
90
|
c.option '--url PATH', 'Configures the path to this trello CL\'s API backend'
|
90
91
|
c.option '--repo REPO', 'Configures the Github repo with which your branches are associated. This should include the organization, e.g. Organization/cool-repo'
|
91
92
|
c.action do |args, options|
|
92
|
-
unless [options.user, options.url, options.key, options.repo].all?(&:nil?)
|
93
|
+
unless [options.user, options.board, options.url, options.key, options.repo].all?(&:nil?)
|
93
94
|
if options.user
|
94
95
|
response = Api::Trello.make_call(:get, "members/#{options.user}", {fields: :none})
|
95
96
|
config.user = response['id']
|
96
97
|
end
|
97
98
|
|
99
|
+
if options.board
|
100
|
+
config.board = options.board
|
101
|
+
end
|
102
|
+
|
98
103
|
if options.url
|
99
104
|
config.url = format_api_url(options.url)
|
100
105
|
end
|
@@ -122,11 +127,11 @@ module Trello
|
|
122
127
|
end
|
123
128
|
|
124
129
|
command :tasks do |c|
|
125
|
-
c.syntax = 'trello tasks
|
126
|
-
c.description = 'Shows tasks assigned to the configured user.
|
127
|
-
c.option '--all', 'Shows all tasks
|
130
|
+
c.syntax = 'trello tasks'
|
131
|
+
c.description = 'Shows tasks assigned to the configured user.'
|
132
|
+
c.option '--all', 'Shows all tasks, regardless of assignee'
|
128
133
|
c.action do |args, options|
|
129
|
-
|
134
|
+
board_check
|
130
135
|
|
131
136
|
unless options.all
|
132
137
|
user_check
|
@@ -134,7 +139,7 @@ module Trello
|
|
134
139
|
|
135
140
|
user = options.all ? nil : config['user']
|
136
141
|
|
137
|
-
response = Api::Integration.make_call(:get, "cards
|
142
|
+
response = Api::Integration.make_call(:get, "cards", {board: config['board'], user: user})
|
138
143
|
|
139
144
|
all_cards = response.map{|list| list['cards']}.flatten
|
140
145
|
|
@@ -188,7 +193,7 @@ module Trello
|
|
188
193
|
end
|
189
194
|
end
|
190
195
|
|
191
|
-
response = Api::Integration.make_call(:post, "cards/#{card_number}/start", {user: user, branch: (require_branch ? branch : '<no branch>'), repo: config['repo']})
|
196
|
+
response = Api::Integration.make_call(:post, "cards/#{card_number}/start", {user: user, branch: (require_branch ? branch : '<no branch>'), repo: config['repo'], board: config['board']})
|
192
197
|
if response.success?
|
193
198
|
say "Started card #{card_number} with branch #{branch}."
|
194
199
|
end
|
data/lib/trello/api/trello.rb
CHANGED
data/lib/trello/helpers.rb
CHANGED
@@ -19,6 +19,10 @@ module Trello
|
|
19
19
|
param_check('user', "No user defined! Specify a user with trello config --user <username>.")
|
20
20
|
end
|
21
21
|
|
22
|
+
def board_check
|
23
|
+
param_check('board', "No board selected! Specify a board with trello config --board <board_id>.")
|
24
|
+
end
|
25
|
+
|
22
26
|
def prompt_for_list_from_options(prompt_message)
|
23
27
|
var = nil
|
24
28
|
options = yield
|
@@ -61,4 +65,4 @@ module Trello
|
|
61
65
|
File.open(filename, 'w') {|f| f.write JSON.pretty_generate(hash)}
|
62
66
|
end
|
63
67
|
end
|
64
|
-
end
|
68
|
+
end
|
data/trello.gemspec
CHANGED
@@ -2,7 +2,7 @@ $LOAD_PATH << File.expand_path('../lib', __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'github-trello-cl'
|
5
|
-
s.version = '0.
|
5
|
+
s.version = '1.0.0'
|
6
6
|
s.date = '2015-02-23'
|
7
7
|
s.summary = "Interface with trello"
|
8
8
|
s.description = "A tool to allow people using Trello as a workflow to interface with it via command line access to an API"
|