dolt 0.24.0 → 0.25.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -2
- data/dolt.gemspec +1 -1
- data/lib/dolt/sinatra/actions.rb +13 -3
- metadata +2 -2
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dolt (0.
|
4
|
+
dolt (0.25.0)
|
5
5
|
json (~> 1.5)
|
6
6
|
libdolt (~> 0.23)
|
7
7
|
sinatra (~> 1.0)
|
@@ -20,7 +20,7 @@ GEM
|
|
20
20
|
github-markup (0.7.5)
|
21
21
|
htmlentities (4.3.1)
|
22
22
|
json (1.8.0)
|
23
|
-
libdolt (0.
|
23
|
+
libdolt (0.24.0)
|
24
24
|
htmlentities (~> 4.3)
|
25
25
|
json (~> 1.7)
|
26
26
|
makeup (~> 0.2)
|
data/dolt.gemspec
CHANGED
data/lib/dolt/sinatra/actions.rb
CHANGED
@@ -28,9 +28,12 @@ module Dolt
|
|
28
28
|
body ""
|
29
29
|
end
|
30
30
|
|
31
|
-
def render_error(error, repo, ref)
|
31
|
+
def render_error(error, repo, ref, data = {})
|
32
32
|
if error.class.to_s == "Rugged::ReferenceError" && ref == "HEAD"
|
33
|
-
return body(renderer.render("empty", {
|
33
|
+
return body(renderer.render("empty", {
|
34
|
+
:repository => repo,
|
35
|
+
:ref => ref
|
36
|
+
}.merge(data)))
|
34
37
|
end
|
35
38
|
template = error.class.to_s == "Rugged::IndexerError" ? :"404" : :"500"
|
36
39
|
add_headers(response)
|
@@ -38,7 +41,7 @@ module Dolt
|
|
38
41
|
:error => error,
|
39
42
|
:repository_slug => repo,
|
40
43
|
:ref => ref
|
41
|
-
}))
|
44
|
+
}.merge(data)))
|
42
45
|
rescue Exception => err
|
43
46
|
err_backtrace = err.backtrace.map { |s| "<li>#{s}</li>" }
|
44
47
|
error_backtrace = error.backtrace.map { |s| "<li>#{s}</li>" }
|
@@ -49,6 +52,13 @@ module Dolt
|
|
49
52
|
Dolt encountered an exception, and additionally
|
50
53
|
triggered another exception trying to render the error.
|
51
54
|
</p>
|
55
|
+
<p>Tried to render the #{template} template with the following data:</p>
|
56
|
+
<dl>
|
57
|
+
<dt>Repository</dt>
|
58
|
+
<dd>#{repo}</dd>
|
59
|
+
<dt>Ref</dt>
|
60
|
+
<dd>#{ref}</dd>
|
61
|
+
</dl>
|
52
62
|
<h2>Error: #{err.class} #{err.message}</h2>
|
53
63
|
<ul>#{err_backtrace.join()}</ul>
|
54
64
|
<h2>Original error: #{error.class} #{error.message}</h2>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dolt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.25.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: 2013-07-
|
12
|
+
date: 2013-07-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: libdolt
|