qb 0.1.61 → 0.1.62
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qb/version.rb +1 -1
- data/library/path_facts +15 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc698a19f08e02f09cc94319dd84194796fa2f02
|
4
|
+
data.tar.gz: b12408278e8de95b4c43476beb1bf61b5ea59034
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 777fdb945902e6ba86735f99b0edcd9313b12eb08c4a88cd97bbb5eb864c2954c2d3027ebf244cad7b47557d2988bff7ec703710dcb9e5961dac91d7d20ea5ac
|
7
|
+
data.tar.gz: 30111c626a7c9b0aed7bf3ce8deac8d6d881d1a7329a774ebc571b8423e52edfff15ea99b7598f68cb2df7030d66c87c3e0b2e70bd4da56bbfd1c7f4d57b2579
|
data/lib/qb/version.rb
CHANGED
data/library/path_facts
CHANGED
@@ -123,17 +123,23 @@ class PathFacts < QB::AnsibleModule
|
|
123
123
|
# If the path is a Git repo (has a .git file in it's root) add useful
|
124
124
|
# Git facts.
|
125
125
|
def add_git_facts
|
126
|
-
|
126
|
+
# see if we're in a git repo. first, we need a directory that exists
|
127
|
+
dir = @path.expand_path.ascend.find {|p| p.directory? }
|
127
128
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
129
|
+
Dir.chdir(dir) do
|
130
|
+
root_result = Cmds.new "git rev-parse --show-toplevel"
|
131
|
+
|
132
|
+
unless root_result.ok?
|
133
|
+
@result.in_git_repo = false
|
134
|
+
@result.is_git_root = false
|
135
|
+
return
|
136
|
+
end
|
137
|
+
|
138
|
+
@result.in_git_repo = true
|
139
|
+
|
136
140
|
git = @result.git = Result.new
|
141
|
+
git.root = Pathname.new root_result.out.chomp
|
142
|
+
@result.is_git_root = @path == git.root
|
137
143
|
|
138
144
|
user = git.user = Result.new
|
139
145
|
|
@@ -144,11 +150,6 @@ class PathFacts < QB::AnsibleModule
|
|
144
150
|
end
|
145
151
|
}
|
146
152
|
|
147
|
-
git.root = begin
|
148
|
-
Cmds.chomp! "git rev-parse --show-toplevel"
|
149
|
-
rescue
|
150
|
-
end
|
151
|
-
|
152
153
|
git.origin = begin
|
153
154
|
Cmds.chomp! "git remote get-url origin"
|
154
155
|
rescue
|
@@ -181,7 +182,6 @@ class PathFacts < QB::AnsibleModule
|
|
181
182
|
end
|
182
183
|
|
183
184
|
end
|
184
|
-
|
185
185
|
end
|
186
186
|
end
|
187
187
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.62
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nrser
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|