gitcycle 0.2.31 → 0.2.32

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.
Files changed (3) hide show
  1. data/gitcycle.gemspec +1 -1
  2. data/lib/gitcycle.rb +14 -2
  3. metadata +3 -3
data/gitcycle.gemspec CHANGED
@@ -6,7 +6,7 @@ $:.unshift lib unless $:.include?(lib)
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "gitcycle"
9
- s.version = '0.2.31'
9
+ s.version = '0.2.32'
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.authors = [ 'Winton Welsh' ]
12
12
  s.email = [ 'mail@wintoni.us' ]
data/lib/gitcycle.rb CHANGED
@@ -800,9 +800,21 @@ class Gitcycle
800
800
  end
801
801
  end
802
802
 
803
+ def git_config_path(path)
804
+ config = "#{path}/.git/config"
805
+ if File.exists?(config)
806
+ return config
807
+ elsif path == '/'
808
+ return nil
809
+ else
810
+ path = File.expand_path(path + '/..')
811
+ git_config_path(path)
812
+ end
813
+ end
814
+
803
815
  def load_git
804
- path = "#{Dir.pwd}/.git/config"
805
- if File.exists?(path)
816
+ path = git_config_path(Dir.pwd)
817
+ if path
806
818
  @git_url = File.read(path).match(/\[remote "origin"\][^\[]*url = ([^\n]+)/m)[1]
807
819
  @git_repo = @git_url.match(/\/(.+)\./)[1]
808
820
  @git_login = @git_url.match(/:(.+)\//)[1]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitcycle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.31
4
+ version: 0.2.32
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-14 00:00:00.000000000 Z
12
+ date: 2013-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  version: '0'
190
190
  requirements: []
191
191
  rubyforge_project:
192
- rubygems_version: 1.8.24
192
+ rubygems_version: 1.8.25
193
193
  signing_key:
194
194
  specification_version: 3
195
195
  summary: Tame your development cycle