gitcycle 0.2.22 → 0.2.23

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,6 +30,14 @@ Before do |scenario|
30
30
  $input = []
31
31
  $remotes = nil
32
32
  $ticket = nil
33
+
34
+ File.open("#{BASE}/features/fixtures/gitcycle.yml", 'w') do |f|
35
+ yaml = {
36
+ "#{config['user']}/#{config['repo']}" => [ config['user'], config['token_dev'] ],
37
+ "#{config['owner']}/#{config['repo']}" => [ config['user'], config['token_qa'] ],
38
+ }
39
+ f.write(YAML.dump(yaml))
40
+ end
33
41
  end
34
42
 
35
43
  def branches(options={})
@@ -332,9 +340,11 @@ Then /^redis entries valid$/ do
332
340
  }
333
341
  should['collab'] = '1' if collab
334
342
  if @scenario_title.include?("(Discuss)") && @scenario_title.include?("something committed")
335
- should['labels'] = 'Branch - master'
343
+ should['labels'] = "Branch - master"
336
344
  should['issue_url'] = $github_url
345
+ should['state'] = 'open'
337
346
  end
347
+
338
348
  branch.should == should
339
349
  end
340
350
 
@@ -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.22'
9
+ s.version = '0.2.23'
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.authors = [ 'Winton Welsh' ]
12
12
  s.email = [ 'mail@wintoni.us' ]
@@ -135,36 +135,50 @@ class Gitcycle
135
135
  else
136
136
  remote, branch = args[0].split('/')
137
137
  remote, branch = nil, remote if branch.nil?
138
+ collab = branch && remote
138
139
 
139
140
  unless branches(:match => branch)
140
- collab = branch && remote
141
+ og_remote = nil
141
142
 
142
- unless collab
143
- puts "\nRetrieving repo information from gitcycle.\n".green
144
- repo = get('repo')
145
- remote = repo['owner']
146
- end
143
+ puts "\nRetrieving repo information from gitcycle.\n".green
144
+ repo = get('repo')
145
+ remote = repo['owner'] unless collab
147
146
 
148
- add_remote_and_fetch(
147
+ output = add_remote_and_fetch(
149
148
  :owner => remote,
150
149
  :repo => @git_repo
151
150
  )
151
+
152
+ if output.include?('ERROR')
153
+ og_remote = remote
154
+ remote = repo["owner"]
155
+
156
+ add_remote_and_fetch(
157
+ :owner => remote,
158
+ :repo => @git_repo
159
+ )
160
+ end
152
161
 
153
162
  puts "Creating branch '#{branch}' from '#{remote}/#{branch}'.\n".green
154
- run("git branch --no-track #{branch} #{remote}/#{branch}")
155
-
156
- if collab
157
- puts "Sending branch information to gitcycle.".green
158
- get('branch',
159
- 'branch[home]' => remote,
160
- 'branch[name]' => branch,
161
- 'branch[source]' => branch,
162
- 'branch[collab]' => 1,
163
- 'create' => 1
164
- )
163
+ output = run("git branch --no-track #{branch} #{remote}/#{branch}")
164
+
165
+ if output.include?("fatal")
166
+ puts "Could not find branch #{"'#{og_remote}/#{branch}' or " if og_remote}'#{remote}/#{branch}'.\n".red
167
+ exit
165
168
  end
166
169
  end
167
170
 
171
+ if collab
172
+ puts "Sending branch information to gitcycle.".green
173
+ get('branch',
174
+ 'branch[home]' => remote,
175
+ 'branch[name]' => branch,
176
+ 'branch[source]' => branch,
177
+ 'branch[collab]' => 1,
178
+ 'create' => 1
179
+ )
180
+ end
181
+
168
182
  puts "Checking out '#{branch}'.\n".green
169
183
  run("git checkout -q #{branch}")
170
184
  end
@@ -841,7 +855,7 @@ class Gitcycle
841
855
  if ENV['RUN'] == '0'
842
856
  puts cmd
843
857
  else
844
- `#{cmd}`
858
+ `#{cmd} 2>&1`
845
859
  end
846
860
  end
847
861
 
metadata CHANGED
@@ -1,149 +1,152 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gitcycle
3
- version: !ruby/object:Gem::Version
4
- hash: 59
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.23
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 2
9
- - 22
10
- version: 0.2.22
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Winton Welsh
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-08-09 00:00:00 -07:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-10-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: cucumber
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
33
22
  type: :development
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: lighthouse
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: lighthouse
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
47
38
  type: :development
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: redis
51
39
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: redis
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
61
54
  type: :development
62
- version_requirements: *id003
63
- - !ruby/object:Gem::Dependency
64
- name: rspec
65
55
  prerelease: false
66
- requirement: &id004 !ruby/object:Gem::Requirement
67
- none: false
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- hash: 3
72
- segments:
73
- - 0
74
- version: "0"
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
75
70
  type: :development
76
- version_requirements: *id004
77
- - !ruby/object:Gem::Dependency
78
- name: simplecov
79
71
  prerelease: false
80
- requirement: &id005 !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- hash: 3
86
- segments:
87
- - 0
88
- version: "0"
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: simplecov
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
89
86
  type: :development
90
- version_requirements: *id005
91
- - !ruby/object:Gem::Dependency
92
- name: yajl-ruby
93
87
  prerelease: false
94
- requirement: &id006 !ruby/object:Gem::Requirement
95
- none: false
96
- requirements:
97
- - - ">="
98
- - !ruby/object:Gem::Version
99
- hash: 3
100
- segments:
101
- - 0
102
- version: "0"
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: yajl-ruby
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
103
102
  type: :development
104
- version_requirements: *id006
105
- - !ruby/object:Gem::Dependency
106
- name: launchy
107
103
  prerelease: false
108
- requirement: &id007 !ruby/object:Gem::Requirement
109
- none: false
110
- requirements:
111
- - - "="
112
- - !ruby/object:Gem::Version
113
- hash: 5
114
- segments:
115
- - 2
116
- - 0
117
- - 5
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: launchy
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - '='
116
+ - !ruby/object:Gem::Version
118
117
  version: 2.0.5
119
118
  type: :runtime
120
- version_requirements: *id007
121
- - !ruby/object:Gem::Dependency
122
- name: yajl-ruby
123
119
  prerelease: false
124
- requirement: &id008 !ruby/object:Gem::Requirement
125
- none: false
126
- requirements:
127
- - - "="
128
- - !ruby/object:Gem::Version
129
- hash: 19
130
- segments:
131
- - 1
132
- - 1
133
- - 0
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - '='
124
+ - !ruby/object:Gem::Version
125
+ version: 2.0.5
126
+ - !ruby/object:Gem::Dependency
127
+ name: yajl-ruby
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - '='
132
+ - !ruby/object:Gem::Version
134
133
  version: 1.1.0
135
134
  type: :runtime
136
- version_requirements: *id008
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - '='
140
+ - !ruby/object:Gem::Version
141
+ version: 1.1.0
137
142
  description: Tame your development cycle.
138
- email:
143
+ email:
139
144
  - mail@wintoni.us
140
- executables:
145
+ executables:
141
146
  - gitc
142
147
  extensions: []
143
-
144
148
  extra_rdoc_files: []
145
-
146
- files:
149
+ files:
147
150
  - .gitignore
148
151
  - Gemfile
149
152
  - LICENSE
@@ -166,41 +169,31 @@ files:
166
169
  - gitcycle.gemspec
167
170
  - lib/ext/string.rb
168
171
  - lib/gitcycle.rb
169
- has_rdoc: true
170
172
  homepage: https://github.com/winton/gitcycle
171
173
  licenses: []
172
-
173
174
  post_install_message:
174
175
  rdoc_options: []
175
-
176
- require_paths:
176
+ require_paths:
177
177
  - lib
178
- required_ruby_version: !ruby/object:Gem::Requirement
178
+ required_ruby_version: !ruby/object:Gem::Requirement
179
179
  none: false
180
- requirements:
181
- - - ">="
182
- - !ruby/object:Gem::Version
183
- hash: 3
184
- segments:
185
- - 0
186
- version: "0"
187
- required_rubygems_version: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ! '>='
182
+ - !ruby/object:Gem::Version
183
+ version: '0'
184
+ required_rubygems_version: !ruby/object:Gem::Requirement
188
185
  none: false
189
- requirements:
190
- - - ">="
191
- - !ruby/object:Gem::Version
192
- hash: 3
193
- segments:
194
- - 0
195
- version: "0"
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
196
190
  requirements: []
197
-
198
191
  rubyforge_project:
199
- rubygems_version: 1.5.0
192
+ rubygems_version: 1.8.24
200
193
  signing_key:
201
194
  specification_version: 3
202
195
  summary: Tame your development cycle
203
- test_files:
196
+ test_files:
204
197
  - features/branch.feature
205
198
  - features/checkout.feature
206
199
  - features/config/config.example.yml