pt-flow 1.1.1 → 2.0.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 768dff4a6a274534a3dfe9fb6af7d7bfc5c99feb
4
- data.tar.gz: ca496ea954994659d003b93c96e92a96753a7607
3
+ metadata.gz: 5d0165983118b411b69b77a207aaa6abbf12d70b
4
+ data.tar.gz: 9dd93cc2c89ab1f519d296d6b17681bc97371afb
5
5
  SHA512:
6
- metadata.gz: 97757922cf2bb03bce2e1727620b11fdc4e4bfcd76cdd90b93bad4410d424f28cd521bbd4f60d5662149a37a99c08372ffabd92c769c7f731c5e5c4c69a68fcc
7
- data.tar.gz: b822ef71c4033f5fdca6de7fc99c9f055b9e3303108435cd08d59c3601d47ff3c52e8dbb6ec32ddc47faca392633a5f7683a276272c4a4e450791c489c49cc13
6
+ metadata.gz: 3e49c820e03156f0d5b8e23ff04f83ce9cb92a478481b7fda7d0298d5d03577da8675bba27967c5e5b73c49d75c036d27d70e6b035087a27d48cadc04749832e
7
+ data.tar.gz: c81b57a79d36a7eb6a79f09cca3dd717b632c4c4c259074e15b84ba7fa023402d3a7436543e763fc7e90836e7364903f3283daa4eb88f6f7a8c9e7710638fbe9
data/README.md CHANGED
@@ -16,9 +16,12 @@ Set up webhook for Pivotal Tracker:
16
16
 
17
17
  ```bash
18
18
  $ git start
19
- # shows lists of tasks - choosing one starts/assigns the task on pt and
19
+ # shows lists of tasks (excluding icebox) - choosing one starts/assigns the task on pt and
20
20
  # automatically creates and checks out a new branch.
21
21
 
22
+ $ git start --include-icebox
23
+ # same as git start, including contents of icebox
24
+
22
25
  $ git finish
23
26
  # pushes branch, finishes task on pt, and creates a pull request
24
27
  # reviewer comments :+1: to approve on github
@@ -6,10 +6,12 @@ module PT::Flow
6
6
  end
7
7
 
8
8
  def start
9
- if @params[0]
9
+ if @params[0] && !@params[0].start_with?('--')
10
10
  task = create
11
11
  else
12
- table = TasksTable.new(@client.get_work(@project))
12
+ filter = 'unstarted,started'
13
+ filter += ',unscheduled' if @params.include?('--include-icebox')
14
+ table = TasksTable.new(@project.stories.all(:current_state => filter))
13
15
  title("Available tasks in #{project_to_s}")
14
16
  task = select("Please select a task to start working on", table)
15
17
  end
@@ -1,5 +1,5 @@
1
1
  module PT
2
2
  module Flow
3
- VERSION = '1.1.1'
3
+ VERSION = '2.0.0'
4
4
  end
5
5
  end
@@ -25,7 +25,7 @@ module PT::Flow
25
25
 
26
26
  UI.new('start')
27
27
 
28
- WebMock.should have_requested(:get, "#{endpoint}/projects/102622/stories?filter=current_state:unscheduled,unstarted,started")
28
+ WebMock.should have_requested(:get, "#{endpoint}/projects/102622/stories?filter=current_state:unstarted,started")
29
29
  WebMock.should have_requested(:put, "#{endpoint}/projects/102622/stories/4459994").with(body: /<estimate>3<\/estimate>/)
30
30
  WebMock.should have_requested(:put, "#{endpoint}/projects/102622/stories/4459994").with(body: /<owned_by>Jon Mischo<\/owned_by>/)
31
31
  WebMock.should have_requested(:put, "#{endpoint}/projects/102622/stories/4459994").with(body: /<current_state>started<\/current_state>/)
@@ -72,6 +72,17 @@ module PT::Flow
72
72
  WebMock.should have_requested(:put, "#{endpoint}/projects/102622/stories/4459994").with(body: /<current_state>started<\/current_state>/)
73
73
  end
74
74
  end
75
+
76
+ context 'given --include-icebox' do
77
+ it "it includes icebox stories" do
78
+ prompt.should_receive(:ask).with("Please select a task to start working on (1-14, 'q' to exit)".bold).and_return('2')
79
+ prompt.should_receive(:ask).with("How many points do you estimate for it? (0,1,2,3)".bold).and_return('3')
80
+
81
+ UI.new('start', ['--include-icebox'])
82
+
83
+ WebMock.should have_requested(:get, "#{endpoint}/projects/102622/stories?filter=current_state:unstarted,started,unscheduled")
84
+ end
85
+ end
75
86
  end
76
87
 
77
88
  describe '#finish' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pt-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Balvig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-11 00:00:00.000000000 Z
11
+ date: 2014-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pt