barkeep 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/barkeep.rb +24 -9
- data/lib/barkeep/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bc22ae0334bd062994f2f3ba6f35a7f827fe434
|
4
|
+
data.tar.gz: a44a8ee5ba696dfff887227e8e9540c577352eec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b695eeb570ab938298fdca879914e9701615e2eb8e5444a5d9a7ed70ff37b41e38dfea8d3ba5d235fb2153a90d0382bcbd7c177d0d0ba2f999c569242e2ee8e
|
7
|
+
data.tar.gz: 5caf5c8cd0cef36f1630f4419372f725cc7d760c3eae118ee2da8a70494800cb0a4ea0e22c561eb9c124a8a9559a35e38a57630ce9c3802fe4094c513df85c8b
|
data/CHANGELOG.md
CHANGED
data/lib/barkeep.rb
CHANGED
@@ -11,7 +11,7 @@ module Barkeep
|
|
11
11
|
end
|
12
12
|
|
13
13
|
class Barkeeper
|
14
|
-
|
14
|
+
|
15
15
|
attr_accessor :renderer
|
16
16
|
|
17
17
|
def config
|
@@ -33,7 +33,7 @@ class Barkeeper
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def render_toolbar
|
36
|
-
return unless load?
|
36
|
+
return unless load?
|
37
37
|
|
38
38
|
%(
|
39
39
|
<dl id="barkeep">
|
@@ -43,7 +43,7 @@ class Barkeeper
|
|
43
43
|
if renderer.respond_to?(:render_to_string)
|
44
44
|
renderer.send(:render_to_string, {:partial => $2})
|
45
45
|
else
|
46
|
-
renderer.send(:render, {:partial => $2})
|
46
|
+
renderer.send(:render, {:partial => $2})
|
47
47
|
end
|
48
48
|
else
|
49
49
|
send(name)
|
@@ -62,20 +62,31 @@ class Barkeeper
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def branch_info
|
65
|
-
|
65
|
+
if grit_info.repository?
|
66
|
+
%(<dt>Branch:</dt><dd><a href="#{branch_link_attributes[:href]}">#{grit_info[:branch]}</a></dd>)
|
67
|
+
end
|
66
68
|
end
|
67
69
|
|
68
70
|
def commit_sha_info
|
69
|
-
|
71
|
+
if grit_info.repository?
|
72
|
+
%(<dt>Commit:</dt><dd><a href="#{commit_link_attributes[:href]}" title="#{commit_link_attributes[:title]}">#{(grit_info[:commit] || "").slice(0,8)}</a></dd>)
|
73
|
+
elsif File.exist?(Rails.root.join('REVISION'))
|
74
|
+
commit = Rails.root.join('REVISION').read.strip
|
75
|
+
%(<dt>Commit:</dt><dd><a href="#{commit_link(commit)}">#{commit.slice(0,8)}</a></dd>)
|
76
|
+
end
|
70
77
|
end
|
71
78
|
|
72
79
|
def commit_author_info
|
73
|
-
|
80
|
+
if grit_info.repository?
|
81
|
+
%(<dt>Who:</dt><dd>#{grit_info[:last_author]}</dd>)
|
82
|
+
end
|
74
83
|
end
|
75
84
|
|
76
85
|
def commit_date_info
|
77
|
-
|
78
|
-
|
86
|
+
if grit_info.repository?
|
87
|
+
short_date = (grit_info[:date].respond_to?(:strftime) ? grit_info[:date].strftime("%d %B, %H:%M") : short_date.to_s)
|
88
|
+
%(<dt>When:</dt><dd title="#{grit_info[:date].to_s}">#{short_date}</dd>)
|
89
|
+
end
|
79
90
|
end
|
80
91
|
|
81
92
|
def rpm_request_info
|
@@ -99,9 +110,13 @@ class Barkeeper
|
|
99
110
|
}
|
100
111
|
end
|
101
112
|
|
113
|
+
def commit_link(commit_hash)
|
114
|
+
"#{github_url}/commit/#{commit_hash}"
|
115
|
+
end
|
116
|
+
|
102
117
|
def commit_link_attributes
|
103
118
|
{
|
104
|
-
:href =>
|
119
|
+
:href => commit_link(grit_info[:commit]),
|
105
120
|
:title => "committed #{grit_info[:date]} by #{grit_info[:last_author]}"
|
106
121
|
}
|
107
122
|
end
|
data/lib/barkeep/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barkeep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PatientsLikeMe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
111
|
+
rubygems_version: 2.4.5.1
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: an extensible developer's status bar to track your current deployed commit
|
@@ -116,4 +116,3 @@ summary: an extensible developer's status bar to track your current deployed com
|
|
116
116
|
test_files:
|
117
117
|
- test/helper.rb
|
118
118
|
- test/test_barkeep.rb
|
119
|
-
has_rdoc:
|