Permalink
Browse files

Bugfix for loading as gem in Spree.

  • Loading branch information...
1 parent b2160fb commit f480ee0c3cca2a46bae79267cea2ec7862fe5cbf @frisoft frisoft committed Feb 24, 2010
Showing with 13 additions and 11 deletions.
  1. +5 −4 http_accept_language.gemspec
  2. +7 −0 lib/http_accept_language.rb
  3. +1 −7 rails/init.rb
@@ -9,25 +9,26 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Iain Hecker"]
- s.date = %q{2010-01-05}
+ s.date = %q{2010-02-24}
s.description = %q{Find out which locale the user preferes by reading the languages they specified in their browser}
s.email = %q{iain@iain.nl}
s.extra_rdoc_files = [
"README.rdoc"
]
s.files = [
- "README.rdoc",
+ ".gitignore",
+ "README.rdoc",
"Rakefile",
"VERSION",
+ "http_accept_language.gemspec",
"lib/http_accept_language.rb",
"rails/init.rb",
- "tasks/http_accept_language_tasks.rake",
"test/http_accept_language_test.rb"
]
s.homepage = %q{http://github.com/iain/http_accept_language}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.3.5}
+ s.rubygems_version = %q{1.3.6}
s.summary = %q{Parse the HTTP Accept Language Header}
s.test_files = [
"test/http_accept_language_test.rb"
@@ -50,3 +50,10 @@ def compatible_language_from(array)
end
end
+if defined?(ActionController::Request)
+ ActionController::Request.send :include, HttpAcceptLanguage
+elsif defined?(ActionController::AbstractRequest)
+ ActionController::AbstractRequest.send :include, HttpAcceptLanguage
+else
+ ActionController::CgiRequest.send :include, HttpAcceptLanguage
+end
View
@@ -1,7 +1 @@
-if defined?(ActionController::Request)
- ActionController::Request.send :include, HttpAcceptLanguage
-elsif defined?(ActionController::AbstractRequest)
- ActionController::AbstractRequest.send :include, HttpAcceptLanguage
-else
- ActionController::CgiRequest.send :include, HttpAcceptLanguage
-end
+require "http_accept_language"

0 comments on commit f480ee0

Please sign in to comment.