stringex 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/stringex/localization/backend/i18n.rb +2 -1
- data/stringex.gemspec +3 -3
- data/test/unit/localization_test.rb +13 -0
- 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: f38aa370c45410b7dddca83f8415b394128fbef0
|
4
|
+
data.tar.gz: c31065a92e88609aab0d0177df0d55d00a3153e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 549f5d2ae387791d12242a70135f852c295a4bc30bf0d39a9abbd669569bd9d762a408b18bac9c069a813a984c26e943cc52984cc158ef723da875dc3cdf27f2
|
7
|
+
data.tar.gz: faa753229e05c6feddcf2d028d4678de8400e703d1ac5397193fff571f8f5648846cd94bad92cd82a8f1e03b66c99ad6b757261c9549540cb72c099f95aeda41
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.5.
|
1
|
+
2.5.2
|
@@ -59,7 +59,8 @@ module Stringex
|
|
59
59
|
def ensure_locales_enforced_or_not
|
60
60
|
return unless ::I18n.respond_to?(:enforce_available_locales)
|
61
61
|
# Allow users to have set this to false manually but default to true
|
62
|
-
|
62
|
+
return if ::I18n.enforce_available_locales != nil
|
63
|
+
::I18n.enforce_available_locales = ::I18n.available_locales != []
|
63
64
|
end
|
64
65
|
end
|
65
66
|
end
|
data/stringex.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: stringex 2.5.
|
5
|
+
# stub: stringex 2.5.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "stringex"
|
9
|
-
s.version = "2.5.
|
9
|
+
s.version = "2.5.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Russell Norris"]
|
14
|
-
s.date = "2014-04-
|
14
|
+
s.date = "2014-04-09"
|
15
15
|
s.description = "Some [hopefully] useful extensions to Ruby's String class. Stringex is made up of three libraries: ActsAsUrl [permalink solution with better character translation], Unidecoder [Unicode to ASCII transliteration], and StringExtensions [miscellaneous helper methods for the String class]."
|
16
16
|
s.email = "rsl@luckysneaks.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -143,4 +143,17 @@ class LocalizationTest < Test::Unit::TestCase
|
|
143
143
|
flunk "No I18n locales are available except :de and :en so test will not work"
|
144
144
|
end
|
145
145
|
end
|
146
|
+
|
147
|
+
def test_defaults_enforce_available_locales_to_true
|
148
|
+
Stringex::Localization.backend = :i18n
|
149
|
+
'Some String'.to_url
|
150
|
+
assert_equal true, I18n.enforce_available_locales
|
151
|
+
end
|
152
|
+
|
153
|
+
def test_respects_user_enforce_available_locales_setting
|
154
|
+
Stringex::Localization.backend = :i18n
|
155
|
+
I18n.enforce_available_locales = false
|
156
|
+
'Some String'.to_url
|
157
|
+
assert_equal false, I18n.enforce_available_locales
|
158
|
+
end
|
146
159
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stringex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Russell Norris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jeweler
|