File: fix-paths.patch

package info (click to toggle)
ruby-simplecov-html 0.13.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 868 kB
  • sloc: javascript: 6,193; ruby: 128; makefile: 15
file content (26 lines) | stat: -rw-r--r-- 1,049 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Fix paths to public and views
 public and views are installed in /usr/share/
 and library should use those paths to access them
Author: Praveen Arimbrathodiyil <praveen@debian.org>
Last-update: 2013-05-28

--- a/lib/simplecov-html.rb
+++ b/lib/simplecov-html.rb
@@ -27,7 +27,7 @@ module SimpleCov
         @branchable_result = SimpleCov.branch_coverage?
         @templates = {}
         @inline_assets = !ENV["SIMPLECOV_INLINE_ASSETS"].nil?
-        @public_assets_dir = File.join(File.dirname(__FILE__), "../public/")
+        @public_assets_dir = File.join('/usr/share/ruby-simplecov-html/public/')
       end
 
       def format(result)
@@ -69,7 +69,7 @@ module SimpleCov
 
       # Returns the an erb instance for the template of given name
       def template(name)
-        @templates[name] ||= ERB.new(File.read(File.join(File.dirname(__FILE__), "../views/", "#{name}.erb")))
+        @templates[name] ||= ERB.new(File.read(File.join('/usr/share/ruby-simplecov-html/views/', "#{name}.erb")))
       end
 
       def output_path