File: move_templates.patch

package info (click to toggle)
ruby-rack-google-analytics 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 164 kB
  • ctags: 48
  • sloc: ruby: 287; makefile: 8
file content (20 lines) | stat: -rw-r--r-- 872 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: move templates to /usr/share/ruby-rack-google-analytics
 .erb files are not Ruby files, and their presence in
 /usr/lib/ruby/vendor/rack/templates may create conflicts
 with other packages.
Author: Cédric Boutillier <boutil@debian.org>
Debian-Bug: http://bugs.debian.org/719512
Forwarded: not-needed
Last-Update: 2013-09-25

--- a/lib/rack/google-analytics.rb
+++ b/lib/rack/google-analytics.rb
@@ -47,7 +47,7 @@
 
     def inject(response)
       @tracker_options = { cookieDomain: @options[:domain] }.select{|k,v| v }.to_json
-      @template ||= ::ERB.new ::File.read ::File.expand_path("../templates/async.erb",__FILE__)
+      @template ||= ::ERB.new ::File.read ::File.expand_path("../../../../../../usr/share/ruby-rack-google-analytics/templates/async.erb",__FILE__)
 
       response.gsub(%r{</head>}, @template.result(binding) + "</head>")
     end