git-story-workflow 0.2.1 → 0.2.2

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
  SHA256:
3
- metadata.gz: 43c968c9f9d5bbd21254536ec3a1b2ea2300a21f30d7bd16d41be8d575836130
4
- data.tar.gz: 91a94c2145b59e6c47bdc84e88fc953468ac88c26c6212f12804c3ee34e42ba3
3
+ metadata.gz: 507c3ff51d58aa65bdc01694cd7c47256129ed9ac869e5d6c079ffeda43e9f54
4
+ data.tar.gz: 85d388e11a0066c8dc22492a58c592b4627ed2ae7ae9e1844a50cc374fbec61c
5
5
  SHA512:
6
- metadata.gz: a3990f389072d4f4ede00b5235478f8e45ce274e9e430a27e1600f4c64caca348a02c7038fd5dd69abd2a239bd1174b5f02c9d371c668e68094d7a64f841ac3a
7
- data.tar.gz: c28cb6e35f7fdafe0d26b9e2bec5c13b653ec263ea7de0b5c68cbc2fb5bddae4c4cd99d18fc2f4455d9a8b231408c5649fc83634c116d10a25d638624d611c00
6
+ metadata.gz: 6932cb3aa7354bd43f07cffb0122a8d2355bf0966a5d83b926603026694f676461ced7abbd1b3dca20d51d354defb1d5c969a2f58eacbf8821c042c5f36721e4
7
+ data.tar.gz: 501e7377c47251257abe55cb06ead181d312d1fe07bc2a69d2c3138c93a4bedd25ed8882234f02aceed7672522c2425d0266301d7defd3a83075cc18fabefdc0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: git-story-workflow 0.2.1 ruby lib
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.1"
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]
@@ -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
@@ -1,6 +1,6 @@
1
1
  module Git::Story
2
2
  # Git::Story version
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-story-workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank