openstudio_measure_tester 0.1.1 → 0.1.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 115113315811da74ef6a2d39bf2ed2f617d091c4
|
4
|
+
data.tar.gz: d0b4058a1a1751da72781357e0325f3a0acf53d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64bffbc0f06b6e17c9616c2eeeb7daf4bc010962637eb7f50c527d48964048a78266f9c25858f0797026032f5618280086503aff85e91c216e7138630601b285
|
7
|
+
data.tar.gz: 32b3638d6c38aab842e68c4dda5d2d0e44f53661a9238a1db7b8ed11405a498b973ec3f02c7548aba66368d2d989f664a06ac97ae6ee87f4babbec5d35ea5f1d
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
+
# Version 0.1.2
|
2
|
+
|
3
|
+
* Do not crash when the current measure is not in a Git repository
|
4
|
+
|
1
5
|
# Version 0.1.1
|
2
6
|
|
3
7
|
* Check for the existence of the LICENSE.md file in the root of the measures
|
4
8
|
|
5
|
-
|
6
9
|
# Version 0.1
|
7
10
|
|
8
11
|
* Initial release of the OpenStudio Tester Gem.
|
@@ -39,15 +39,21 @@ module OpenStudioMeasureTester
|
|
39
39
|
@results = {}
|
40
40
|
|
41
41
|
# get the repository info
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
42
|
+
repo_name = 'unknown'
|
43
|
+
current_branch = 'unknown'
|
44
|
+
sha = 'unknown'
|
45
|
+
begin
|
46
|
+
g = Git.open(Dir.pwd)
|
47
|
+
config = g.config
|
48
|
+
repo_name = config['remote.origin.url'] ? config['remote.origin.url'].split('/').last.chomp('.git') : nil
|
49
|
+
current_branch = g.branch.name ? g.branch.name : nil
|
50
|
+
logs = g.log
|
51
|
+
sha = nil
|
52
|
+
if !logs.empty?
|
53
|
+
sha = logs.first.sha
|
54
|
+
end
|
55
|
+
rescue StandardError => error
|
56
|
+
puts "Could not find .git for measure(s), will not be able to report git information"
|
51
57
|
end
|
52
58
|
|
53
59
|
# check if the results data already exist, and if so, then load the file now to keep the results
|