github-trello-cl 0.1.8 → 1.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc4d2e0ac694320e221d0defbe96098c0a30be7d
4
- data.tar.gz: 37d1f1d684875c71204f0d77a8496ad87a70cef6
3
+ metadata.gz: 55d9bd30c4232b973f9b7895779a372d445f83f0
4
+ data.tar.gz: 17ffdfaa2a60fc3c573d6638370e3ad629f8fcf7
5
5
  SHA512:
6
- metadata.gz: a814cb2785c5abe0859a62c55813aad935df2ece85ce5ce1d54c1b167153afe5fa0e08c0954306da06f80488da4f27feab7737b7c90e51a3f981109fe1df9098
7
- data.tar.gz: 160209700701bb306888ee1259886e2eaace3dd43cf2e5c6643106ce3ac42f1eb13d360f5c65cf391c1e6f9bb973718ccbcd62af47478e581dc2dcbb3e64264a
6
+ metadata.gz: 0a55c7e6991280e3fb76b628918f3dee7c99b979373d3b38a13e26f69ead6c6c766538ec76990721e8f99ac86b63ce7980893cf0de5920a53383022b665803dd
7
+ data.tar.gz: d9f3599b766d0a8c25e829cfc1fca4241011dfe054367038b66c8d61b477c2ad8642b0cfb5919e4c1a5c31e88231eb308a4df6028908c128868da1c979113309
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github-trello-cl (0.1.7)
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.2)
23
+ json (1.8.3)
24
24
  launchy (2.4.3)
25
25
  addressable (~> 2.3)
26
26
  multi_xml (0.5.5)
@@ -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 [status]'
126
- c.description = 'Shows tasks assigned to the configured user. If status is provided, shows tasks with the given status. Available statuses are pending, in_development, in_review, and approved.'
127
- c.option '--all', 'Shows all tasks with the provided status, regardless of assignee'
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
- status = args[0] || 'pending'
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/#{status}", {})
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
@@ -7,4 +7,4 @@ module Trello
7
7
  end
8
8
  end
9
9
  end
10
- end
10
+ end
@@ -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
@@ -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.1.8'
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-trello-cl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Pletcher