pivotoolz 0.2.0 → 1.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
- SHA1:
3
- metadata.gz: 7f72efc65285d87ffae7064cec06b0ad482114a7
4
- data.tar.gz: b2a485f35a316a47f320123c67685bef40182c0f
2
+ SHA256:
3
+ metadata.gz: c9bbddb0c21ad076943ee1ce72ab6cafd41459aeaf552e6fd74d30bc6065f60b
4
+ data.tar.gz: e582a7305bed0b5ac27c28ad1810d10587c379fc674ce8b908ec9047246aae06
5
5
  SHA512:
6
- metadata.gz: 49d1f4aa7e15914ca3bb705dd767e80064acd91fd3f76610ea82b5636638f6ab89fc9094835c212360e27788618758e84db2784a2466c856292fd89f528412c5
7
- data.tar.gz: 14907bd1939a6b5bccc87e0ead36a39e781362e07edf8939091dc1d5df9f1e7d3cd1a2e29f389a2b1573c10482b92b232d11c0596ce301c92547a285709d2667
6
+ metadata.gz: 8bed0db6bf96b4e83026a8799e2647070649227548f7efab6b6d52fc9055d32d21517a9d5b0d07ff2e383414b03b57aa2982b8fa124016a692c7784e01c5c96c
7
+ data.tar.gz: 4a648482e7ef1b245d1b5b6a35af088c42bbbc306b81554d3ed76de60859853a7660527a0d32eb08e01ca64b619233067cdbec5c21558d83e743ca2416cb3724
data/README.md CHANGED
@@ -182,23 +182,18 @@ example:
182
182
  ### `pv-git-branch`
183
183
 
184
184
  Wouldn't it be nice to have all your Git branch names consistent with your dev team? Well now
185
- you can with `pv-git-branch`. Just pass `pv-git-branch` a Pivotal Story ID, and it will return
186
- branch name for you based on author name, the pivital story category, the pivotal story
187
- name and the pivotal story id. Be sure to set your `PIVOTAL_TRACKER_API_TOKEN` env variable is
188
- exported in your `.bashrc` file. If you want to explicitly set your initials as the author name,
185
+ you can with `pv-git-branch`. Just pass `pv-git-branch` a Pivotal Story ID as a string, and it will create a new
186
+ branch for you based on author name, the pivotal story category, the pivotal story
187
+ name and the pivotal story id.
188
+ Be sure to set your `PIVOTAL_TRACKER_API_TOKEN` env variable in your `.bashrc` file. If you want to explicitly set your initials as the author name,
189
189
  set your git config user initials like this: `git config --add user.initials af`. Otherwise it
190
190
  will take your `git config user.name` or `whoami` information.
191
191
 
192
192
  Example:
193
193
  ```bash
194
- pv-git-branch 111222333
195
- ```
196
- This would return something like: `af/features/building-someting-greate-111222333`
197
-
198
- So it can be used with git like this:
199
- ```bashr
200
- git checkout -b $(pv-git-branch 111222333)
194
+ pv-git-branch "#111222333"
201
195
  ```
196
+ This would create and checkout a new branch: `af/features/building-someting-great-111222333`
202
197
 
203
198
  ![usage](assets/pv-git-branch-demo.gif)
204
199
 
Binary file
@@ -14,11 +14,15 @@ class GitBranch
14
14
  description = set_description(story['name'])
15
15
  pivotal_id = story['id']
16
16
 
17
- "#{author}/#{category}/#{description}-#{pivotal_id}"
17
+ create_branch("#{author}/#{category}/#{description}-#{pivotal_id}")
18
18
  end
19
19
 
20
20
  private
21
21
 
22
+ def create_branch(branch_name)
23
+ `git checkout -b #{branch_name}`
24
+ end
25
+
22
26
  def get_pivotal_story(pivotal_id)
23
27
  unless ENV['PIVOTAL_TRACKER_API_TOKEN']
24
28
  puts "!: You need to set the 'PIVOTAL_TRACKER_API_TOKEN' environment variable"
@@ -63,6 +67,6 @@ class GitBranch
63
67
  end
64
68
 
65
69
  def self.usage_message
66
- "Usage : bin/git-branch-it [pivotal_story_id]"
70
+ "Usage : pv-git-branch '[pivotal_story_id]'"
67
71
  end
68
72
  end
@@ -1,3 +1,3 @@
1
1
  module Pivotoolz
2
- VERSION = "0.2.0"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivotoolz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sufyan Adam
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-12 00:00:00.000000000 Z
11
+ date: 2018-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.6.11
138
+ rubygems_version: 2.7.7
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: Tools to save you time when working with Pivotal Tracker stories