gitcycle 0.1.19 → 0.1.20

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -116,12 +116,10 @@ Todo
116
116
  ----
117
117
 
118
118
  * On pass or fail, send email to Github email
119
- * Change QA branch name to qa_login_branch
120
119
  * Note you can use gitc with a string
121
120
  * gitc qa pass, should not set ticket to pending-approval if its already resolved
122
121
  * If gitc reset happens on branch with Github issue, close the existing issue
123
122
  * Add comment on lighthouse with issue URL
124
123
  * Instead of detecting CONFLICT, use error status $? != 0
125
124
  * Label issues with ticket milestone?
126
- * gitc LH-ticket should not created a redis record right away, what happens if someone control-c
127
- * gitc -h or gitc help
125
+ * gitc LH-ticket should not created a redis record right away, what happens if someone control-c
@@ -8,7 +8,7 @@ Scenario: No command given
8
8
  Scenario: Non-existent command
9
9
  When I execute gitcycle with "blah blah"
10
10
  Then gitcycle runs
11
- And output includes "Command 'blah' not found"
11
+ And output includes "Command not recognized."
12
12
 
13
13
  Scenario: Setup
14
14
  When I execute gitcycle setup
@@ -227,6 +227,6 @@ Scenario: QA issue list
227
227
  Then gitcycle runs
228
228
  And output includes
229
229
  """
230
- qa_master
230
+ qa_config.user_master
231
231
  issue #issue.id\tconfig.user/ticket.id
232
232
  """
data/gitcycle.gemspec CHANGED
@@ -6,7 +6,7 @@ $:.unshift lib unless $:.include?(lib)
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "gitcycle"
9
- s.version = '0.1.19'
9
+ s.version = '0.1.20'
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.authors = [ 'Winton Welsh' ]
12
12
  s.email = [ 'mail@wintoni.us' ]
data/lib/gitcycle.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'rubygems'
2
+
1
3
  require 'fileutils'
2
4
  require 'open-uri'
3
5
  require 'uri'
@@ -158,7 +160,7 @@ class Gitcycle
158
160
  if issues.empty?
159
161
  puts "\n"
160
162
  get('qa_branch').each do |branches|
161
- puts "qa_#{branches['source']}".green
163
+ puts "qa_#{branches['user']}_#{branches['source']}".green
162
164
  branches['branches'].each do |branch|
163
165
  puts " #{"issue ##{branch['issue']}".yellow}\t#{branch['user']}/#{branch['branch']}"
164
166
  end
@@ -234,7 +236,7 @@ class Gitcycle
234
236
  run("git add . && git add . -u && git commit -a -F .git/MERGE_MSG")
235
237
 
236
238
  puts "Pushing merge resolution of #{conflict['branch']} (issue ##{conflict['issue']}).\n".green
237
- run("git push origin qa_#{qa_branch['source']}")
239
+ run("git push origin qa_#{qa_branch['user']}_#{qa_branch['source']}")
238
240
 
239
241
  puts "\nDe-conflicting on gitcycle.\n".green
240
242
  get('qa_branch',
@@ -330,12 +332,14 @@ class Gitcycle
330
332
  command = args.shift
331
333
  if command.nil?
332
334
  puts "\nNo command specified\n".red
335
+ elsif command[0..0] == '-'
336
+ command_not_recognized
333
337
  elsif self.respond_to?(command)
334
338
  send(command, *args)
335
339
  elsif args.empty?
336
340
  create_branch(command)
337
341
  else
338
- puts "\nCommand '#{command}' not found.\n".red
342
+ command_not_recognized
339
343
  end
340
344
  end
341
345
 
@@ -431,6 +435,13 @@ class Gitcycle
431
435
  run("git push origin #{target}")
432
436
  end
433
437
 
438
+ def command_not_recognized
439
+ readme = "https://github.com/winton/gitcycle/blob/master/README.md"
440
+ puts "\nCommand not recognized.".red
441
+ puts "\nOpening #{readme}\n".green
442
+ Launchy.open(readme)
443
+ end
444
+
434
445
  def create_pull_request
435
446
  puts "\nRetrieving branch information from gitcycle.\n".green
436
447
 
@@ -464,7 +475,7 @@ class Gitcycle
464
475
  end
465
476
 
466
477
  source = qa_branch['source']
467
- name = "qa_#{source}"
478
+ name = "qa_#{qa_branch['user']}_#{source}"
468
479
 
469
480
  unless qa_branch['branches'].empty?
470
481
  unless options[:preserve]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitcycle
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 51
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 19
10
- version: 0.1.19
9
+ - 20
10
+ version: 0.1.20
11
11
  platform: ruby
12
12
  authors:
13
13
  - Winton Welsh