libdolt 0.33.3 → 0.33.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,5 +17,5 @@
17
17
  #++
18
18
 
19
19
  module Dolt
20
- VERSION = "0.33.3"
20
+ VERSION = "0.33.4"
21
21
  end
@@ -20,7 +20,7 @@ module Dolt
20
20
  module View
21
21
  module MultiRepository
22
22
  def repo_url(repository, url)
23
- "/#{repository}#{url}"
23
+ URI.encode("/#{repository}#{url}".force_encoding('ascii-8bit'))
24
24
  end
25
25
 
26
26
  def refs_url(repository)
@@ -20,7 +20,7 @@ module Dolt
20
20
  module View
21
21
  module SingleRepository
22
22
  def repo_url(repository, url)
23
- url
23
+ URI.encode(url.force_encoding('ascii-8bit'))
24
24
  end
25
25
 
26
26
  def refs_url(repository)
@@ -29,7 +29,7 @@ module Dolt
29
29
  return render_markup(path, content) if supported_markup_format?(path)
30
30
  rescue StandardError => err
31
31
  $stderr.puts("Failed rendering markup in #{path}, render syntax highlighted insted")
32
- $stderr.puts("Original error was: #{err.name}")
32
+ $stderr.puts("Original error was: #{err}")
33
33
  $stderr.puts(err.backtrace)
34
34
  end
35
35
 
@@ -24,7 +24,7 @@ describe Dolt::View::MultiRepository do
24
24
 
25
25
  describe "#repo_url" do
26
26
  it "returns url prefixed with repository" do
27
- assert_equal "/gitorious/some/url", repo_url("gitorious", "/some/url")
27
+ assert_equal "/gitorious/some/%C3%F5/url", repo_url("gitorious", "/some/\xC3\xF5/url")
28
28
  end
29
29
 
30
30
  it "returns url prefixed with repository name containing slashes" do
@@ -24,7 +24,7 @@ describe Dolt::View::SingleRepository do
24
24
 
25
25
  describe "#repo_url" do
26
26
  it "returns url unmodified" do
27
- assert_equal "/some/url", repo_url("gitorious", "/some/url")
27
+ assert_equal "/some/url%C3%F5", repo_url("gitorious", "/some/url\xC3\xF5")
28
28
  end
29
29
  end
30
30
  end
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.33.3
4
+ version: 0.33.4
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-09-17 00:00:00.000000000 Z
12
+ date: 2013-09-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rugged