github-trello-cl 0.1.4 → 0.1.5

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/trello.rb +11 -6
  4. data/trello.gemspec +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3595893cd5170484e996fbddac79fed64e4eb715
4
- data.tar.gz: b1a21bd789038a477207838a4048ff7210245eba
3
+ metadata.gz: dbe4ebd4580cffcf4a1a8d5b00b531faf1d6d08b
4
+ data.tar.gz: 6121208f023c821cff6a5171c047075152c452a6
5
5
  SHA512:
6
- metadata.gz: 7b25b28c3a4b9c798a73d39aaf00563f73142689c2c1117fc51c90314d243606217282fd5bfe7c81c2ae0fac5f0d20eb5123e9442a83c05817c671e033a86b49
7
- data.tar.gz: d1319df588934aa9c5bd7471c0d39689a3655f65d9717bbc57b03cb78256d552c2fd3038cf40bcc98aba78b6f7e031367f86c0a53422246c04cedcf68ffd568d
6
+ metadata.gz: 4e563f93740a128086268cfcf5b88b8c9ace7736c17c7ddc06a0126e67539bfc3d9f3f8307ccbd7e48b0b5bfd45fcb2e161c63a9644ee34d9da57c6dc9371398
7
+ data.tar.gz: d8899452ef7a721c5f445ea72d85348c1e76dd968e49326b14f7203f2904d8a71d8c90eef00012bec4318d9412aae9094539e6482aed5eed9a1b810a9ee083d6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github-trello-cl (0.1.3)
4
+ github-trello-cl (0.1.5)
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 '--hotfix', 'Starts the card as a hotfix branch instead of a feature branch.'
156
+ c.option '--hotfix', 'Starts the card as a hotfix through git-flow.'
157
+ c.option '--feature', 'Starts the card as a feature through git-flow.'
157
158
  c.option '--no-branch', 'Starts the card without creating a new branch.'
158
159
  c.action do |args, options|
159
160
  card_number, branch = args
@@ -167,15 +168,19 @@ module Trello
167
168
  abort 'You need a branch name. To start this card without a branch, set the --no-branch flag (-n).'
168
169
  end
169
170
 
170
- branch_prefix = options.hotfix ? 'hotfix' : 'feature'
171
- prefixed_branch = "#{branch_prefix}/#{branch}"
171
+ if [options.hotfix, options.feature].any?
172
+ branch = branch.sub(/(feature|hotfix)\//, '') # remove any feature/hotfix prefixes they mistakenly added
173
+ branch_prefix = options.hotfix ? 'hotfix' : 'feature'
172
174
 
173
- unless system "git flow #{branch_prefix} start #{branch}"
174
- abort "Failed to create branch locally - exiting."
175
+ unless system "git flow #{branch_prefix} start #{branch}"
176
+ abort "Failed to create branch locally - exiting."
177
+ end
178
+
179
+ branch = "#{branch_prefix}/#{branch}"
175
180
  end
176
181
  end
177
182
 
178
- response = Api::Integration.make_call(:post, "cards/#{card_number}/start", {user: user, branch: (options['no-branch'] ? nil : prefixed_branch)})
183
+ response = Api::Integration.make_call(:post, "cards/#{card_number}/start", {user: user, branch: (options['no-branch'] ? nil : branch)})
179
184
  if response.success?
180
185
  say "Started card #{card_number} with branch #{prefixed_branch}."
181
186
  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.1.4'
5
+ s.version = '0.1.5'
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.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Pletcher
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  requirements: []
140
140
  rubyforge_project:
141
- rubygems_version: 2.4.6
141
+ rubygems_version: 2.2.2
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: Interface with trello