Package: ruby-rack-google-analytics / 1.2.0-2.1

move_templates.patch Patch series | download
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