gitcycle 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -142,13 +142,7 @@ Todo
142
142
  * If gitc reset happens on branch with Github issue, close the existing issue
143
143
  * Add comment on lighthouse with issue URL
144
144
  * Instead of detecting CONFLICT, use error status $? != 0
145
- * Label issues with ticket milestone?
146
- * gitc LH-ticket should not created a redis record right away, what happens if someone control-c
147
- * gitc -h or gitc help
145
+ * Label issues with ticket milestone
148
146
  * gitc qa pass # since we're changing this to pass all the tickets, we need to loop through all the merged issues and update the lighthouse state to pending-qa
149
- * gitc pull doesnt work in rc: https://gist.github.com/7e508977fbb762d186a6
150
- * Tag issue with milestone
151
- * There's still a Tagging Issue I tried to fix parseLabel http://d.pr/8eOS , Pass should remove Pending *, but remove the Branch Name
152
- * gitc discuss should tag issue with 'Discuss'
153
- * gitc ready - possibly do syntax checks
154
- * gitc commands should not track branches, so that they have to use the gitc push vs using git push
147
+ * There's still a Tagging Issue I tried to fix parseLabel http://d.pr/8eOS , Pass should remove Pending, but remove the Branch Name
148
+ * gitc ready - possibly do syntax checks
@@ -62,10 +62,10 @@ Scenario: Feature branch
62
62
  """
63
63
  And redis entries valid
64
64
 
65
- Scenario: Reset feature branch
65
+ Scenario: Redo feature branch
66
66
  Given a fresh set of repositories
67
67
  When I cd to the user repo
68
- And I execute gitcycle reset with the Lighthouse ticket URL
68
+ And I execute gitcycle redo with the Lighthouse ticket URL
69
69
  And I enter "y"
70
70
  And I enter "y"
71
71
  Then gitcycle runs
@@ -206,16 +206,16 @@ Scenario: QA issue
206
206
  And output includes
207
207
  """
208
208
  Retrieving branch information from gitcycle.
209
- Deleting old QA branch 'qa_config.user_master'.
209
+ Deleting old QA branch 'qa_master_config.user'.
210
210
  Adding remote repo 'config.owner/config.repo'.
211
211
  Fetching remote 'config.owner'.
212
- Checking out remote branch 'qa_config.user_master' from 'config.owner/config.repo/master'.
212
+ Checking out remote branch 'qa_master_config.user' from 'config.owner/config.repo/master'.
213
213
  Fetching remote 'origin'.
214
- Pushing 'origin/qa_config.user_master'.
214
+ Pushing 'origin/qa_master_config.user'.
215
215
  Adding remote repo 'config.user/config.repo'.
216
216
  Fetching remote 'config.user'.
217
217
  Merging remote branch 'ticket.id' from 'config.user/config.repo'.
218
- Pushing branch 'qa_config.user_master'.
218
+ Pushing branch 'qa_master_config.user'.
219
219
  Type 'gitc qa pass' to approve all issues in this branch.
220
220
  Type 'gitc qa fail' to reject all issues in this branch.
221
221
  """
@@ -227,6 +227,6 @@ Scenario: QA issue list
227
227
  Then gitcycle runs
228
228
  And output includes
229
229
  """
230
- qa_config.user_master
230
+ qa_master_config.user
231
231
  issue #issue.id\tconfig.user/ticket.id
232
232
  """
@@ -143,8 +143,8 @@ When /^I execute gitcycle with the Lighthouse ticket URL$/ do
143
143
  $execute << $ticket.url
144
144
  end
145
145
 
146
- When /^I execute gitcycle reset with the Lighthouse ticket URL$/ do
147
- $execute << "reset #{$ticket.url}"
146
+ When /^I execute gitcycle redo with the Lighthouse ticket URL$/ do
147
+ $execute << "redo #{$ticket.url}"
148
148
  end
149
149
 
150
150
  When /^I cd to the (.*) repo$/ do |user|
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.2.4'
9
+ s.version = '0.2.5'
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
@@ -626,8 +626,24 @@ class Gitcycle
626
626
  end
627
627
  params.chop! # trailing &
628
628
 
629
- json = open("#{API}/#{path}.json?#{params}").read
630
- Yajl::Parser.parse(json)
629
+ begin
630
+ json = open("#{API}/#{path}.json?#{params}").read
631
+ rescue Exception
632
+ puts "\nCould not connect to Gitcycle.".red
633
+ puts "\nPlease verify your Internet connection and try again later.\n".yellow
634
+ exit
635
+ end
636
+
637
+ error = json.match(/Gitcycle error reference code (\d+)/)[1]
638
+
639
+ if error
640
+ puts "\nSomething went wrong :(".red
641
+ puts "\nEmail error code #{error} to wwelsh@bleacherreport.com.".yellow
642
+ puts "\nInclude a gist of your terminal output if possible.\n".yellow
643
+ exit
644
+ else
645
+ Yajl::Parser.parse(json)
646
+ end
631
647
  end
632
648
 
633
649
  def load_config
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: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 4
10
- version: 0.2.4
9
+ - 5
10
+ version: 0.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Winton Welsh
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-02-03 00:00:00 -08:00
18
+ date: 2012-02-04 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency