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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d06f3b8fb5858475c706b0e96d0ea84aaaee46b3
4
- data.tar.gz: cb0362507a02efffa70730b48f54d22359a1b08b
3
+ metadata.gz: c894f6dac2d6899c0d42d2874968ed41d5878145
4
+ data.tar.gz: cbeeb680377f41ec8783cf6cf266532d86de000c
5
5
  SHA512:
6
- metadata.gz: 917af3f60ef434040379f871279a53914242397bb03b124d185e4638a6f96cbe01e9fb9031d8ca00947d95c4d0067f9d55022bcf51cfff36f5fd2589b7bdcf7a
7
- data.tar.gz: 971453c478c195c3d79876293050aed6c1883d26b12b0061a74650e60c760e61e6d5b17cf4897f947d4ec44dab0172a6867115713caebbec81faa4b30dde9697
6
+ metadata.gz: 8173fec01b767f6e7865ee7fd7b6270471eee04803457d6547d24cd9bfad8b6b417c5397ef78185638dd06b90d4de99a4b57645a12d51bb48715aff663ae4f1c
7
+ data.tar.gz: 126e0ebe86a1c640a4c75d41ffaad9e6ba6585b75aa3c0c6e27d10cca5de585f73812395bf011b1cedaf74933568aaa762f3e071333abc2cadd93e7ac32a9c0c
data/Gemfile.lock CHANGED
@@ -51,7 +51,7 @@ GEM
51
51
  http2
52
52
  string-strtr
53
53
  rack (1.5.2)
54
- rake (10.2.2)
54
+ rake (10.3.2)
55
55
  rdoc (4.1.1)
56
56
  json (~> 1.4)
57
57
  rmagick (2.13.2)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.109
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.109"
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-04-13"
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
- raise "Could not understand language: '#{locale_str}'." if !match
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.109
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-04-13 00:00:00.000000000 Z
11
+ date: 2014-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: wref