github-trello-cl 0.1.0 → 0.1.1

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: 8a56f67ba2029ffa78fa25827e72ddb6d3e85052
4
- data.tar.gz: 6e5987510f3bd05ca64e1f2517c605e3d8a8fcc3
3
+ metadata.gz: 3d8c3748affea4f9c281643cc092098208ce9533
4
+ data.tar.gz: 471b00a6f2755d8a98a53b237f3dbed89aa95859
5
5
  SHA512:
6
- metadata.gz: 79a3faa5ecdc6f4e91f8ec906e29d99f719928e2743496b87e546868bdb4c2ffa82f8e659d470bb43853fd6bf425e680a3d30ffa13d41ed1b5fc7e774eb44f4e
7
- data.tar.gz: 50d7f7ada173a8f88583cad47e67396e9ce4cc18e563f44ebb87bb315795faf02e605bae4756be7c28922970576c3469c49d3ae2cbf330ee151d9e656ed81203
6
+ metadata.gz: 6e98ae8053c27fbf46c39fae697b62e7f19af65043517d43cbb3802f5cc52f9e78b3a2e926819809a5516cbc17d881ad7d56c549746673029acf51189c28308a
7
+ data.tar.gz: 2879f574dcf772741bc738e224d61b4c0dd4470c779365fb466d75ad1e31270b1e3be3e730d5f58fbad9b7d01c546dbb563271e1060c033d16b9b7a1f9c49bb0
data/.gitignore CHANGED
@@ -32,3 +32,5 @@ build/
32
32
 
33
33
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
34
  .rvmrc
35
+
36
+ .trelloconfig
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github-trello-cl (0.0.3)
4
+ github-trello-cl (0.1.1)
5
5
  commander (~> 4.3.0)
6
6
  httparty (~> 0.13.3)
7
7
  launchy (~> 2.4.3)
data/lib/trello.rb CHANGED
@@ -153,7 +153,8 @@ module Trello
153
153
  command :start do |c|
154
154
  c.syntax = 'trello start 123 <branch>'
155
155
  c.description = "Marks the specified card as 'in development' on Trello and associates the specified branch with the card."
156
- c.option '--no-branch', 'Starts the card without creating a new branch.'
156
+ c.option '--hotfix', 'Starts the card as a hotfix branch instead of a feature branch.'
157
+ c.option '--no-branch', 'Starts the card without creating a new branch.'
157
158
  c.action do |args, options|
158
159
  card_number, branch = args
159
160
 
@@ -161,13 +162,22 @@ module Trello
161
162
 
162
163
  user = config['user']
163
164
 
164
- unless branch || options['no-branch']
165
- abort 'You need a branch name. To start this card without a branch, set the --no-branch flag (-n).'
166
- end
165
+ unless options['no-branch']
166
+ unless branch
167
+ abort 'You need a branch name. To start this card without a branch, set the --no-branch flag (-n).'
168
+ end
169
+
170
+ branch_prefix = options.hotfix ? 'hotfix' : 'feature'
171
+ prefixed_branch = "#{branch_prefix}/#{branch}"
167
172
 
168
- response = Api::Integration.make_call(:post, "cards/#{card_number}/start", {user: user, branch: branch})
173
+ unless system "git flow #{branch_prefix} start #{branch}"
174
+ abort "Failed to create branch locally - exiting."
175
+ end
176
+ end
169
177
 
170
- say response.parsed_response
178
+ response = Api::Integration.make_call(:post, "cards/#{card_number}/start", {user: user, branch: (options['no-branch'] ? nil : prefixed_branch)})
179
+ if response.success?
180
+ say "Started card #{card_number} with branch #{prefixed_branch}."
171
181
  end
172
182
  end
173
183
 
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.1.0'
5
+ s.version = '0.1.1'
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Pletcher