rack-i18n_locale_switcher 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/lib/rack/i18n_locale_switcher.rb +1 -1
- data/rack-i18n_locale_switcher.gemspec +1 -1
- metadata +1 -1
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('rack-i18n_locale_switcher', '0.2.
|
5
|
+
Echoe.new('rack-i18n_locale_switcher', '0.2.2') do |p|
|
6
6
|
|
7
7
|
p.description = "Detects the current locale from url, domain, parameter, session or accept header."
|
8
8
|
p.url = "http://github.com/christoph-buente/rack-i18n_locale_switcher"
|
@@ -35,4 +35,4 @@ RSpec::Core::RakeTask.new(:rcov) do |spec|
|
|
35
35
|
spec.rcov = true
|
36
36
|
end
|
37
37
|
|
38
|
-
task default
|
38
|
+
task :default => :spec
|
@@ -20,7 +20,7 @@ module Rack
|
|
20
20
|
private
|
21
21
|
|
22
22
|
def is_available?(locale)
|
23
|
-
locale ? I18n.available_locales.include?(locale.to_sym)
|
23
|
+
(locale.nil? ||locale == '') ? false : I18n.available_locales.include?(locale.to_sym)
|
24
24
|
end
|
25
25
|
|
26
26
|
def extract_locale_from_params(request)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rack-i18n_locale_switcher"
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Christoph B\u{fc}nte, Andreas Korth"]
|