git-story-workflow 0.2.1 → 0.2.2
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 +4 -4
- data/VERSION +1 -1
- data/git-story-workflow.gemspec +2 -2
- data/lib/git/story/app.rb +12 -0
- data/lib/git/story/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 507c3ff51d58aa65bdc01694cd7c47256129ed9ac869e5d6c079ffeda43e9f54
|
4
|
+
data.tar.gz: 85d388e11a0066c8dc22492a58c592b4627ed2ae7ae9e1844a50cc374fbec61c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6932cb3aa7354bd43f07cffb0122a8d2355bf0966a5d83b926603026694f676461ced7abbd1b3dca20d51d354defb1d5c969a2f58eacbf8821c042c5f36721e4
|
7
|
+
data.tar.gz: 501e7377c47251257abe55cb06ead181d312d1fe07bc2a69d2c3138c93a4bedd25ed8882234f02aceed7672522c2425d0266301d7defd3a83075cc18fabefdc0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/git-story-workflow.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: git-story-workflow 0.2.
|
2
|
+
# stub: git-story-workflow 0.2.2 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "git-story-workflow".freeze
|
6
|
-
s.version = "0.2.
|
6
|
+
s.version = "0.2.2"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
data/lib/git/story/app.rb
CHANGED
@@ -146,6 +146,7 @@ class Git::Story::App
|
|
146
146
|
Branch: #{current_branch_checked?&.color('#ff5f00')}
|
147
147
|
Pivotal: #{story.url}
|
148
148
|
Labels: #{story.labels.map(&:name) * ?,}
|
149
|
+
Github: #{github_url(current_branch_checked?)}
|
149
150
|
end
|
150
151
|
end
|
151
152
|
rescue => e
|
@@ -360,4 +361,15 @@ class Git::Story::App
|
|
360
361
|
"#{time.iso8601} #{day}"
|
361
362
|
end
|
362
363
|
end
|
364
|
+
|
365
|
+
def remote_url(name = 'origin')
|
366
|
+
capture("git remote -v").lines.grep(/^#{name}/).first&.split(/\s+/).full?(:[], 1)
|
367
|
+
end
|
368
|
+
|
369
|
+
def github_url(branch)
|
370
|
+
branch.full? or return
|
371
|
+
url = remote_url('github') || remote_url or return
|
372
|
+
url = url.sub('git@github.com:', 'https://github.com/')
|
373
|
+
url = url.sub(/(\.git)\z/, "/tree/#{branch}")
|
374
|
+
end
|
363
375
|
end
|
data/lib/git/story/version.rb
CHANGED