[DRE-commits] [ruby-rack-google-analytics] 09/11: adjust template paths

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Sun May 4 10:22:50 UTC 2014


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository ruby-rack-google-analytics.

commit 37acb5e5019e0aa69cece22e84871c7dcbc44e55
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Sun May 4 15:40:24 2014 +0530

    adjust template paths
---
 debian/patches/do_not_modify_load_path.patch | 16 ++++++++++------
 debian/patches/move_templates.patch          |  2 +-
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/debian/patches/do_not_modify_load_path.patch b/debian/patches/do_not_modify_load_path.patch
index 084a9a3..eb4cb25 100644
--- a/debian/patches/do_not_modify_load_path.patch
+++ b/debian/patches/do_not_modify_load_path.patch
@@ -5,13 +5,17 @@ Last-Update: 2013-09-25
 
 --- a/test/helper.rb
 +++ b/test/helper.rb
-@@ -6,9 +6,6 @@
- require File.expand_path('../../lib/rack/google-analytics', __FILE__)
- require File.expand_path('../../lib/tracking/event', __FILE__)
- 
+@@ -3,11 +3,8 @@
+ require 'shoulda'
+ require 'rack/test'
+ require 'active_support/core_ext/hash/slice'
+-require File.expand_path('../../lib/rack/google-analytics', __FILE__)
+-require File.expand_path('../../lib/tracking/event', __FILE__)
+-
 -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
 -$LOAD_PATH.unshift(File.dirname(__FILE__))
--
++require 'rack/google-analytics'
++require 'tracking/event'
+ 
  class Test::Unit::TestCase
    include Rack::Test::Methods
- 
diff --git a/debian/patches/move_templates.patch b/debian/patches/move_templates.patch
index 76718d0..59d9310 100644
--- a/debian/patches/move_templates.patch
+++ b/debian/patches/move_templates.patch
@@ -14,7 +14,7 @@ Last-Update: 2013-09-25
      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__)
++      @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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rack-google-analytics.git



More information about the Pkg-ruby-extras-commits mailing list