libdolt 0.11 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -40,7 +40,7 @@ GEM
40
40
  redcarpet (2.2.0)
41
41
  rugged (0.17.0.b6)
42
42
  tilt (1.3.3)
43
- tiltout (1.2.0)
43
+ tiltout (1.4.0)
44
44
  tilt (~> 1.3)
45
45
  tzinfo (0.3.35)
46
46
  when (0.1.0)
@@ -55,4 +55,4 @@ DEPENDENCIES
55
55
  minitest (~> 2.0)
56
56
  rake (~> 0.9)
57
57
  redcarpet (= 2.2.0)
58
- tiltout (~> 1.2)
58
+ tiltout (~> 1.4)
@@ -17,5 +17,5 @@
17
17
  #++
18
18
 
19
19
  module Dolt
20
- VERSION = "0.11"
20
+ VERSION = "0.12.0"
21
21
  end
@@ -42,7 +42,7 @@ module Dolt
42
42
 
43
43
  <<-HTML
44
44
  <td class="#{class_name}">
45
- <span class="gts-sha">#{annotation[:oid][0..7]}</span>
45
+ <span class="gts-commit-oid" data-gts-commit-oid="#{annotation[:oid]}">#{annotation[:oid][0..6]}</span>
46
46
  #{annotation[:committer][:time].strftime("%Y-%m-%d")}
47
47
  #{annotation[:committer][:name]}
48
48
  </td>
@@ -97,9 +97,9 @@ describe Dolt::View::Blame do
97
97
  it "includes the commit oid" do
98
98
  html = blame_annotation_cell({ :committer => @committer, :oid => @oid })
99
99
 
100
- assert_match /gts-sha/, html
101
- assert_match /1234567/, html
102
- refute_match /890/, html
100
+ assert_match /gts-commit-oid/, html
101
+ assert_match /data-gts-commit-oid="#{@oid}"/, html
102
+ assert_match />1234567</, html
103
103
  end
104
104
 
105
105
  it "includes the commit date" do
data/views/500.erb CHANGED
@@ -18,5 +18,10 @@
18
18
  #++
19
19
  %>
20
20
  <h1><%= @title = "An error occurred" %></h1>
21
- <h2><%= error.respond_to?(:message) ? error.message : error %></h2>
21
+ <h2><%= CGI::escapeElement(error.respond_to?(:message) ? error.message : error).gsub(/</, "&lt;") %></h2>
22
+ <% if error.respond_to?(:backtrace) && !error.backtrace.nil? %>
23
+ <ul>
24
+ <%= error.backtrace.map { |l| "<li>#{l}</li>" }.join("") %>
25
+ </ul>
26
+ <% end %>
22
27
  <p><a href="<%= tree_url(repository_slug, ref, "") %>">Go back</a></p>
data/views/commits.erb CHANGED
@@ -11,7 +11,7 @@
11
11
  <% commits.each do |commit| %>
12
12
  <div class="gts-commit">
13
13
  <p class="gts-log-message">
14
- <span class="gts-commit-oid"><%= commit_oid(commit[:oid]) %></span>:
14
+ <span class="gts-commit-oid" data-gts-commit-oid="<%= commit[:oid] %>"><%= commit_oid(commit[:oid]) %></span>:
15
15
  <%= commit[:summary] %>
16
16
  </p>
17
17
  <p>
@@ -16,4 +16,10 @@
16
16
  # You should have received a copy of the GNU Affero General Public License
17
17
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
  #++
19
+ %><%
20
+ tree.each do |entry|
21
+ entry[:history].each do |e|
22
+ e[:author][:name].force_encoding("utf-8")
23
+ end
24
+ end
19
25
  %><%= JSON.generate(tree) %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libdolt
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.11'
4
+ version: 0.12.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-06 00:00:00.000000000 Z
12
+ date: 2012-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine