mini_i18n 0.2.1 → 0.3.0

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: '000169ef3c88eb9c8cce9d11fb9e8e9b9ab4e130'
4
- data.tar.gz: ad3489e02cb2dc04a08e6393fb29796adb5e0389
3
+ metadata.gz: 20636bf9386b74aa7c786890b22b4a185914531e
4
+ data.tar.gz: 4115ce5559244a91b342ef733e4a7101b4ccfd99
5
5
  SHA512:
6
- metadata.gz: 65cdf838822743ba1671eb3f02a1792494f0e0c29bdf3d93d41b0deaa04d9d1cace1d743b822782db6d2a5864ee6f2093e0bb688c1691d7cddf3a1a10f966995
7
- data.tar.gz: 5cdc0a94042a1768ea0c0c9b917d9ecb550988c8cb1bcc9081389ed289a8fd66ce4cd4256bed77c56db61c9cc5146ed3dfaf987edd22d1aedbb111e3c9218226
6
+ metadata.gz: 4e65114f78f650be2226de898c20fa9185403ea5b20b78c366a318b1bd4d679a4aecbed01584993f67ea60c2ba9c22db827108c1702ced3ff21769563e862ee1
7
+ data.tar.gz: 53aea95dcf486f55ad2f21cfefc64bbfb9162fbb449b638e456895d6a198132086089d5090e2917b8d1aa71282d688df588ca76b277e504ac56e36e38bff962f
@@ -1,3 +1,3 @@
1
1
  module MiniI18n
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
data/lib/mini_i18n.rb CHANGED
@@ -26,7 +26,7 @@ module MiniI18n
26
26
  end
27
27
 
28
28
  def available_locales=(new_locales)
29
- @@available_locales = new_locales.map(&:to_s)
29
+ @@available_locales = Array(new_locales).map(&:to_s)
30
30
  end
31
31
 
32
32
  def translations
@@ -6,6 +6,7 @@ RSpec.describe MiniI18n do
6
6
  before(:each) do
7
7
  MiniI18n.locale = :en
8
8
  MiniI18n.fallbacks = false
9
+ MiniI18n.available_locales = [:en, :es, :fr]
9
10
  end
10
11
 
11
12
  describe 'load_translations' do
@@ -24,6 +25,14 @@ RSpec.describe MiniI18n do
24
25
  end
25
26
  end
26
27
 
28
+ describe 'available_locales=' do
29
+ it 'wraps into an array of strings' do
30
+ MiniI18n.available_locales = :en
31
+
32
+ expect(MiniI18n.available_locales).to eq ["en"]
33
+ end
34
+ end
35
+
27
36
  describe 'locale' do
28
37
  it 'allows to change locale globally' do
29
38
  MiniI18n.locale = :en
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - markets