pivo_flow 0.5 → 0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de5ccffe41c5da1308530d353e02f4c1b632e5d8
4
- data.tar.gz: 92b4cf76006efebe3559048a45d959111648ecc6
3
+ metadata.gz: 36f283e1fb39abb5610d8613155c49afcab0869b
4
+ data.tar.gz: a32f069c47a63963c4ff519af31f0c9b66759797
5
5
  SHA512:
6
- metadata.gz: 29cee9f22ced5aec0c41275c73d27d559bf0d9ca3387c1315cb904652fefe6a67771733d6c3aeec47632e01a5c9aeefa99b8f554ab4768b18aef6cb1907c15fb
7
- data.tar.gz: e085ab0fb14a94fbe3117786702b3c4a1db08567d03695d20d66172fa18716d87a20a75ec05671a38d55eca455d1bba69c819ee437927966e497580a37e85f96
6
+ metadata.gz: 8ea5361801e016ed10d3a792815d8c2da8180ee7e8f05138067c50bd520d741bbd646fe51cedcbd46779f6e2b85d67053e5f80175504b9ff9878a95ab7273be1
7
+ data.tar.gz: b0ce2e07bd66b60c140fb8a9e99b2436ebec8219ecfd47a7edb1ec96838e417ef5f0a71f75754e751aa02706e8de596ba0a995c77342bfbb8746a5551b384bd7
data/README.md CHANGED
@@ -62,8 +62,15 @@ Show current STORY_ID from temp file
62
62
  This gem installs a `pepare-commit-msg` hook by adding a reference to `pf-prepare-commit-msg` file. In short: you shouldn't be worried about your own `prepare-commit-msg` hook, the one added by `pivo_flow` will be added in the last line of original hook file.
63
63
 
64
64
  ## Roadmap
65
+ ### 0.6 Current release
65
66
 
66
- ### 0.4 Current release
67
+ * create local branch of the current ticket using its id and name with 'pf branch'
68
+
69
+ ### 0.5
70
+
71
+ * set ticket id without connecting to pivotal with 'pf set NUMBER'
72
+
73
+ ### 0.4
67
74
 
68
75
  * colorized output
69
76
  * **TODO** story statistics
data/lib/pivo_flow/cli.rb CHANGED
@@ -66,6 +66,15 @@ module PivoFlow
66
66
  end
67
67
  end
68
68
 
69
+ def branch
70
+ unless current_story_id
71
+ puts no_story_found_message
72
+ return 1
73
+ end
74
+
75
+ pivotal_object.create_branch(current_story_id)
76
+ end
77
+
69
78
  def current
70
79
  puts current_story_id || no_story_found_message
71
80
  end
@@ -111,6 +120,7 @@ module PivoFlow
111
120
  opt_parser = OptionParser.new do |opts|
112
121
  opts.banner = "\nPivoFlow ver. #{PivoFlow::VERSION}\nUsage: pf <COMMAND> [OPTIONS]\n"
113
122
  opts.separator "Commands"
123
+ opts.separator " branch create git branch locally based on current set ticket using 'info' command"
114
124
  opts.separator " clear clear STORY_ID from temp file"
115
125
  opts.separator " current show STORY_ID from temp file"
116
126
  opts.separator " deliver show finished stories and mark selected as delivered in Pivotal Tracker"
@@ -152,7 +162,7 @@ module PivoFlow
152
162
  self.send(args[0].to_sym, args[1])
153
163
  when "help"
154
164
  puts opt_parser
155
- when "clear", "current", "deliver", "info", "reconfig", "stories"
165
+ when "clear", "current", "deliver", "info", "reconfig", "stories", "branch"
156
166
  self.send(args[0].to_sym)
157
167
  when nil
158
168
  no_method_error
@@ -226,6 +226,19 @@ module PivoFlow
226
226
  end
227
227
  end
228
228
 
229
+ def create_branch story_id
230
+ story = find_story(story_id)
231
+ if story.nil?
232
+ puts "Sorry, this story is not found (#{story_id})"
233
+ return
234
+ end
235
+
236
+ ticket_name = story.name.tr('^A-Za-z0-9 ', '').tr(' ', '-')
237
+ branch_name = [story.id, ticket_name].join("-")
238
+
239
+ git_create_branch(branch_name)
240
+ end
241
+
229
242
  def start_story story_id
230
243
  update_story(story_id, :started)
231
244
  end
@@ -259,5 +272,8 @@ module PivoFlow
259
272
  end
260
273
  end
261
274
 
275
+ def git_create_branch(name)
276
+ system("git checkout -b #{name}")
277
+ end
262
278
  end
263
279
  end
@@ -1,3 +1,3 @@
1
1
  module PivoFlow
2
- VERSION = '0.5'
2
+ VERSION = '0.6'
3
3
  end
metadata CHANGED
@@ -1,139 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivo_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
4
+ version: '0.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Nowak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-12 00:00:00.000000000 Z
11
+ date: 2015-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pivotal-tracker
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: grit
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: highline
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: colorize
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: coveralls
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: vcr
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: fakeweb
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  description: Automated querying for pivotal stories, adding story id to commit message,
@@ -146,9 +146,9 @@ executables:
146
146
  extensions: []
147
147
  extra_rdoc_files: []
148
148
  files:
149
- - .gitignore
150
- - .rspec
151
- - .travis.yml
149
+ - ".gitignore"
150
+ - ".rspec"
151
+ - ".travis.yml"
152
152
  - Gemfile
153
153
  - LICENSE
154
154
  - README.md
@@ -178,17 +178,17 @@ require_paths:
178
178
  - lib
179
179
  required_ruby_version: !ruby/object:Gem::Requirement
180
180
  requirements:
181
- - - '>='
181
+ - - ">="
182
182
  - !ruby/object:Gem::Version
183
183
  version: '0'
184
184
  required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  requirements:
186
- - - '>='
186
+ - - ">="
187
187
  - !ruby/object:Gem::Version
188
188
  version: '0'
189
189
  requirements: []
190
190
  rubyforge_project:
191
- rubygems_version: 2.1.11
191
+ rubygems_version: 2.2.2
192
192
  signing_key:
193
193
  specification_version: 4
194
194
  summary: Simple pivotal tracker integration for day to day work with git