[DRE-commits] [ruby-rack-google-analytics] 01/04: move rack templates to /usr/share/ruby-rack-google-analytics (Closes: #719512)
Cédric Boutillier
boutil at alioth.debian.org
Wed Sep 25 22:13:45 UTC 2013
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-rack-google-analytics.
commit a70d98075c362b877f59908dbb1c462b4a697df3
Author: Cédric Boutillier <boutil at debian.org>
Date: Wed Sep 25 23:40:36 2013 +0200
move rack templates to /usr/share/ruby-rack-google-analytics (Closes: #719512)
---
debian/patches/move_templates.patch | 20 ++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 5 +++++
3 files changed, 26 insertions(+)
diff --git a/debian/patches/move_templates.patch b/debian/patches/move_templates.patch
new file mode 100644
index 0000000..5f585c9
--- /dev/null
+++ b/debian/patches/move_templates.patch
@@ -0,0 +1,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 at 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
+@@ -30,7 +30,7 @@
+
+ def inject(response)
+ file = @options[:async] ? 'async' : 'sync'
+- @template ||= ::ERB.new ::File.read ::File.expand_path("../templates/#{file}.erb",__FILE__)
++ @template ||= ::ERB.new ::File.read ::File.expand_path("../../../../../share/ruby-rack-google-analytics/templates/#{file}.erb",__FILE__)
+ if @options[:async]
+ response.gsub(%r{</head>}, @template.result(binding) + "</head>")
+ else
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..53f3213
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+move_templates.patch
diff --git a/debian/rules b/debian/rules
index d0716e6..b6355b7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,3 +16,8 @@
override_dh_installchangelogs:
dh_installchangelogs CHANGELOG.md
+
+override_dh_auto_install:
+ dh_install lib/rack/templates usr/share/ruby-rack-google-analytics
+ dh_auto_install
+ rm -rf debian/ruby-rack-google-analytics/usr/lib/ruby/vendor_ruby/rack/templates
--
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