fiveruns-dash-ruby 0.7.4 → 0.7.5
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.
- data/lib/fiveruns/dash/scm.rb +18 -17
- data/version.yml +1 -1
- metadata +2 -2
data/lib/fiveruns/dash/scm.rb
CHANGED
@@ -57,38 +57,39 @@ module Fiveruns::Dash
|
|
57
57
|
end
|
58
58
|
|
59
59
|
class GitSCM < SCM
|
60
|
-
|
60
|
+
|
61
61
|
def revision
|
62
|
-
|
62
|
+
head.id
|
63
63
|
end
|
64
|
-
|
64
|
+
|
65
65
|
def time
|
66
|
-
|
66
|
+
head.committed_date
|
67
67
|
end
|
68
|
-
|
68
|
+
|
69
69
|
def url
|
70
|
-
|
71
|
-
origin = repo.remotes.detect { |r| r.name == 'origin' }
|
72
|
-
origin.url if origin
|
73
|
-
end
|
70
|
+
repo.config.fetch('remote.origin.url', '')
|
74
71
|
end
|
75
|
-
|
72
|
+
|
76
73
|
#######
|
77
74
|
private
|
78
75
|
#######
|
79
|
-
|
80
|
-
def
|
81
|
-
@
|
76
|
+
|
77
|
+
def head
|
78
|
+
@head ||= begin
|
79
|
+
sha = repo.head.commit
|
80
|
+
repo.commits(sha)[0]
|
81
|
+
end
|
82
82
|
end
|
83
|
-
|
83
|
+
|
84
84
|
def repo
|
85
|
-
@repo ||=
|
85
|
+
@repo ||= Grit::Repo.new(@path)
|
86
86
|
end
|
87
87
|
|
88
88
|
def require_binding
|
89
|
-
require '
|
89
|
+
require 'grit'
|
90
|
+
Fiveruns::Dash.logger.info "GIT: #{revision} / #{time} / #{url}"
|
90
91
|
rescue LoadError
|
91
|
-
raise LoadError, "Dash deployment tracking for Git apps requires the '
|
92
|
+
raise LoadError, "Dash deployment tracking for Git apps requires the 'grit' gem"
|
92
93
|
end
|
93
94
|
|
94
95
|
end
|
data/version.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fiveruns-dash-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FiveRuns Development Team
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-02-
|
12
|
+
date: 2009-02-10 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|