knjrbfw 0.0.109 → 0.0.110
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/knjrbfw.gemspec +2 -2
- data/lib/knj/locales.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c894f6dac2d6899c0d42d2874968ed41d5878145
|
4
|
+
data.tar.gz: cbeeb680377f41ec8783cf6cf266532d86de000c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8173fec01b767f6e7865ee7fd7b6270471eee04803457d6547d24cd9bfad8b6b417c5397ef78185638dd06b90d4de99a4b57645a12d51bb48715aff663ae4f1c
|
7
|
+
data.tar.gz: 126e0ebe86a1c640a4c75d41ffaad9e6ba6585b75aa3c0c6e27d10cca5de585f73812395bf011b1cedaf74933568aaa762f3e071333abc2cadd93e7ac32a9c0c
|
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.110
|
data/knjrbfw.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "knjrbfw"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.110"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kasper Johansen"]
|
12
|
-
s.date = "2014-
|
12
|
+
s.date = "2014-05-23"
|
13
13
|
s.description = "Including stuff for HTTP, SSH and much more."
|
14
14
|
s.email = "k@spernj.org"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/knj/locales.rb
CHANGED
@@ -18,7 +18,10 @@ module Knj::Locales
|
|
18
18
|
locale_str = Knj::Locales::LANG_CONVERTIONS[locale_str] if Knj::Locales::LANG_CONVERTIONS.key?(locale_str)
|
19
19
|
|
20
20
|
match = locale_str.match(/^([a-z]{2})_([A-Z]{2})/)
|
21
|
-
|
21
|
+
if !match
|
22
|
+
match = locale_str.match(/^[a-z]{2}$/)
|
23
|
+
raise "Could not understand language: '#{locale_str}'." unless match
|
24
|
+
end
|
22
25
|
|
23
26
|
return {
|
24
27
|
"first" => match[1],
|
@@ -82,6 +85,8 @@ module Knj::Locales
|
|
82
85
|
|
83
86
|
if Thread.current[:locale]
|
84
87
|
return Thread.current[:locale]
|
88
|
+
elsif ::Kernel.const_defined?(:I18n) && !I18n.locale.to_s.strip.empty?
|
89
|
+
return I18n.locale
|
85
90
|
elsif ENV["LANGUAGE"]
|
86
91
|
return ENV["LANGUAGE"]
|
87
92
|
elsif ENV["LANG"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knjrbfw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.110
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kasper Johansen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: wref
|