giteaucrat 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/lib/giteaucrat/repo.rb +17 -1
- data/lib/giteaucrat/version.rb +1 -1
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MWRhOGE3Y2I5MDQzMjFjNThhMDExOTZmNjAxMmI5MThmM2FmMjEyMjcxMDBh
|
10
|
-
NGIzYzM2MTc5MzNmOWQ3M2RkYmM5MWExNzlmZDczODljMGJkM2FkNTA3NWNl
|
11
|
-
YjkzYTVmOTFjMTgzNGVjYTg1MzI4MmJiYjE5MjMyOThkNjU2NjU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YmM2OTg4M2QxNjBlYzY2NzcwMWI2MjhmODAxNGU4YTE1NzY5MThkMDRmMWFi
|
14
|
-
ZTlmMTExNmI3ZWY0ZjNhOTBjMzk5NjhiZjMyNTIwOGRhNWU1NTYzYTlmMWZi
|
15
|
-
ZTk1ZGMwYTkxZTM5M2FmODIyMzhmMDE0ZTZiZGM5OTc5OTk0MWE=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 576669d8685ed74eb31ac2081ac4e3c8bd4f67d2
|
4
|
+
data.tar.gz: d54cc4d9539caff931fcb0c0702f8076fa47ee1e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 64058c19b1ff22d391317779fd363bf4e498eb5a641cb72219ca0bcd8e00ec50498ece45d63ad1cd1dbe4d6cf22bcd9f88875ef9b669baa1a1ff5a7ce2790763
|
7
|
+
data.tar.gz: 48c704f4a754f8521922b4acfa0c89ba594605a3f8e2604bd7039dde017c57ae096177458763b0add6d7bdeb549b75cb104fd6acae48606910e80bc4d1fd6060
|
data/lib/giteaucrat/repo.rb
CHANGED
@@ -22,7 +22,7 @@ module Giteaucrat
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def git_repo
|
25
|
-
@git_repo ||=
|
25
|
+
@git_repo ||= find_git_repo(path)
|
26
26
|
end
|
27
27
|
|
28
28
|
# @return [String]
|
@@ -128,5 +128,21 @@ module Giteaucrat
|
|
128
128
|
def include_encoding?
|
129
129
|
!!include_encoding
|
130
130
|
end
|
131
|
+
|
132
|
+
private
|
133
|
+
|
134
|
+
# Finds a Git repository in the +directory+ or its parent directories.
|
135
|
+
# @param directory [String] Directory to expect a git repository.
|
136
|
+
# @return [Grit::Repo] Found git repository.
|
137
|
+
def find_git_repo(directory)
|
138
|
+
if ::File.exist?(::File.join(directory, '.git')) || directory =~ /\.git$/
|
139
|
+
Grit::Repo.new(directory)
|
140
|
+
elsif directory == '/'
|
141
|
+
raise Grit::InvalidGitRepositoryError
|
142
|
+
else
|
143
|
+
find_git_repo(::File.expand_path(::File.join(directory, '..')))
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
131
147
|
end
|
132
148
|
end
|
data/lib/giteaucrat/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: giteaucrat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Semyonov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
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
|
@@ -56,14 +56,14 @@ dependencies:
|
|
56
56
|
name: rake
|
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: :development
|
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
|
description: Automatically update copyright messages using git
|
@@ -109,18 +109,19 @@ require_paths:
|
|
109
109
|
- lib
|
110
110
|
required_ruby_version: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- -
|
112
|
+
- - '>='
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- -
|
117
|
+
- - '>='
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
121
|
rubyforge_project:
|
122
|
-
rubygems_version: 2.
|
122
|
+
rubygems_version: 2.1.8
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: The Git bureaucrat
|
126
126
|
test_files: []
|
127
|
+
has_rdoc:
|