pt-flow 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -12,13 +12,7 @@ Set up webhook for Pivotal Tracker:
12
12
 
13
13
  https://github.com/#{repo}/admin/hooks
14
14
 
15
- ## Usage
16
-
17
- - flow start
18
- - flow finish
19
- - flow review
20
-
21
- ### Committer
15
+ ### Usage
22
16
 
23
17
  ```bash
24
18
  $ flow start
@@ -26,17 +20,11 @@ $ flow start
26
20
 
27
21
  $ flow finish
28
22
  # pushes branch, finishes task on pt, and opens github new pull request page.
29
- ```
30
23
 
31
- ### Reviewer
24
+ # reviewer comments :+1: to approve on github
32
25
 
33
- ```bash
34
- $ flow review
35
- # selecting a pull request opens github page, comment :+1: to approve
36
- ```
37
-
38
- ### Committer
26
+ # committer presses merge button on github which delivers task on pivotal tracker
39
27
 
40
- ```bash
41
- # pressing merge button on github delivers task on pivotal tracker
28
+ $ flow cleanup
29
+ # cleans up local/remote story branches already merged with current release branch
42
30
  ```
data/lib/pt-flow.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require "pt"
2
2
  require "pt-flow/version"
3
3
  require "pt-flow/branch"
4
- require "pt-flow/pull_requests_table"
5
4
  require "pt-flow/repo"
6
5
  require "pt-flow/tasks_table"
7
6
  require "pt-flow/ui"
data/lib/pt-flow/repo.rb CHANGED
@@ -1,11 +1,5 @@
1
1
  module PT::Flow
2
2
  class Repo
3
- require "github_api"
4
- CONFIG_PATH = ENV['HUB_CONFIG'] || ENV['HOME'] + '/.config/hub'
5
-
6
- def pull_requests
7
- client.pull_requests.all(user, name)
8
- end
9
3
 
10
4
  def user
11
5
  path.split('/').first
@@ -21,13 +15,5 @@ module PT::Flow
21
15
  @path ||= `git config --get remote.origin.url`.strip.match(/:(\S+\/\S+)\.git/)[1]
22
16
  end
23
17
 
24
- def client
25
- @client ||= Github.new(oauth_token: oauth_token)
26
- end
27
-
28
- def oauth_token
29
- @oauth_token ||= YAML.load(File.read(CONFIG_PATH)).values.flatten.first['oauth_token']
30
- end
31
-
32
18
  end
33
19
  end
data/lib/pt-flow/ui.rb CHANGED
@@ -21,7 +21,7 @@ module PT::Flow
21
21
  end
22
22
 
23
23
  def finish
24
- run("git push origin #{branch}")
24
+ run("git push origin #{branch} -u")
25
25
  task = PivotalTracker::Story.find(branch.task_id, @project.id)
26
26
  title = task.name.gsub('"',"'") + " [Delivers ##{task.id}]"
27
27
 
@@ -42,14 +42,6 @@ module PT::Flow
42
42
  end
43
43
  end
44
44
 
45
- def review
46
- table = PullRequestsTable.new(repo.pull_requests)
47
- pull_request = select("Please select a pull request to review", table)
48
- run("open #{pull_request.html_url}/files")
49
- rescue Github::Error::Unauthorized => e
50
- error("Error from github: #{e.message}")
51
- end
52
-
53
45
  def cleanup
54
46
  title("Cleaning merged story branches for [#{branch.target}]")
55
47
 
@@ -77,8 +69,6 @@ module PT::Flow
77
69
  title("Command line usage")
78
70
  puts("flow start # start working on a story")
79
71
  puts("flow finish # finish a story and create a pull request")
80
- puts("flow review # review a pull request")
81
- #puts("flow deliver # merge current branch and clean up")
82
72
  puts("flow cleanup # deleted merged local/remote branches and prune origin")
83
73
  end
84
74
 
@@ -1,5 +1,5 @@
1
1
  module PT
2
2
  module Flow
3
- VERSION = "0.6.3"
3
+ VERSION = "0.6.4"
4
4
  end
5
5
  end
data/pt-flow.gemspec CHANGED
@@ -17,7 +17,6 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_dependency 'pt'
19
19
  gem.add_dependency 'hub'
20
- gem.add_dependency 'github_api'
21
20
  gem.add_dependency 'active_support'
22
21
  gem.add_dependency 'i18n'
23
22
 
@@ -78,7 +78,7 @@ describe PT::Flow::UI do
78
78
  end
79
79
 
80
80
  it "pushes the current branch to origin, flags the story as finished, and opens a github pull request" do
81
- PT::Flow::UI.any_instance.should_receive(:run).with('git push origin new_feature.as-a-user-i-should.4459994')
81
+ PT::Flow::UI.any_instance.should_receive(:run).with('git push origin new_feature.as-a-user-i-should.4459994 -u')
82
82
  PT::Flow::UI.any_instance.should_receive(:run).with("hub pull-request -b new_feature -h cookpad:new_feature.as-a-user-i-should.4459994 \"As a user I should see an Unestimated Feature with a fairly long name [Delivers #4459994]\"")
83
83
  PT::Flow::UI.new %w{ finish }
84
84
  current_branch.should == 'new_feature.as-a-user-i-should.4459994'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pt-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-01 00:00:00.000000000 Z
12
+ date: 2012-11-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pt
@@ -43,22 +43,6 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
- - !ruby/object:Gem::Dependency
47
- name: github_api
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
46
  - !ruby/object:Gem::Dependency
63
47
  name: active_support
64
48
  requirement: !ruby/object:Gem::Requirement
@@ -173,7 +157,6 @@ files:
173
157
  - bin/flow
174
158
  - lib/pt-flow.rb
175
159
  - lib/pt-flow/branch.rb
176
- - lib/pt-flow/pull_requests_table.rb
177
160
  - lib/pt-flow/repo.rb
178
161
  - lib/pt-flow/tasks_table.rb
179
162
  - lib/pt-flow/ui.rb
@@ -205,7 +188,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
205
188
  version: '0'
206
189
  segments:
207
190
  - 0
208
- hash: 4273464848554735973
191
+ hash: 1743957255277720657
209
192
  required_rubygems_version: !ruby/object:Gem::Requirement
210
193
  none: false
211
194
  requirements:
@@ -214,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
197
  version: '0'
215
198
  segments:
216
199
  - 0
217
- hash: 4273464848554735973
200
+ hash: 1743957255277720657
218
201
  requirements: []
219
202
  rubyforge_project:
220
203
  rubygems_version: 1.8.23
@@ -1,7 +0,0 @@
1
- module PT::Flow
2
- class PullRequestsTable < PT::DataTable
3
- def self.fields
4
- [:title]
5
- end
6
- end
7
- end