i18n-assets 0.0.6 → 0.0.7

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: 00157c3e777370b46da22829e00102ae84f7ae0f
4
- data.tar.gz: efcc67fba24d6533ebed8fbee1ac48c9ac6bd9a3
3
+ metadata.gz: 40a0e0eee1655ed5f0782e8748e9edd811216d46
4
+ data.tar.gz: 39097a30b62f35ca4ad9bffeaaaafaf1defda4e9
5
5
  SHA512:
6
- metadata.gz: dc76ba76f244f06eecb838705091774cb318625265c274954d181e06a79f37a33d5a2534c7581b9d5ed53e32d9769f90f3fb47fc9ebcfcccb6c1834fea4c313a
7
- data.tar.gz: 8280626f61eebb626e3cd68baf2c2e3cd57154ae6d0eaa3a98897a5ae9148232aa055f2d5b44821abd469f6a35fbf0d94b17ab8a41d03b390f613643c03183a4
6
+ metadata.gz: 22d0a3d717d4311c37142ceb61d76dbffa618d7f6fcc49362ffcfa88bebd982d630911c7fc57d569b7d37f49fc7298ba1a7b71a10ee0e3159f3e070e47122fd0
7
+ data.tar.gz: 4c4f67d5f546b02ae116343d41a09f881fc20d624849d0ae07cb97515e0bdec3c437f47c860269e01a9e06d8d14f8530f521efd8d1c62213e1a16e3825bc6c91
data/Gemfile.lock CHANGED
@@ -1,16 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- i18n-assets (0.0.6)
4
+ i18n-assets (0.0.7)
5
5
  actionpack (~> 3.2.18)
6
6
  sprockets (~> 2.2.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (3.2.21)
12
- activemodel (= 3.2.21)
13
- activesupport (= 3.2.21)
11
+ actionpack (3.2.22.1)
12
+ activemodel (= 3.2.22.1)
13
+ activesupport (= 3.2.22.1)
14
14
  builder (~> 3.0.0)
15
15
  erubis (~> 2.7.0)
16
16
  journey (~> 1.0.4)
@@ -18,10 +18,10 @@ GEM
18
18
  rack-cache (~> 1.2)
19
19
  rack-test (~> 0.6.1)
20
20
  sprockets (~> 2.2.1)
21
- activemodel (3.2.21)
22
- activesupport (= 3.2.21)
21
+ activemodel (3.2.22.1)
22
+ activesupport (= 3.2.22.1)
23
23
  builder (~> 3.0.0)
24
- activesupport (3.2.21)
24
+ activesupport (3.2.22.1)
25
25
  i18n (~> 0.6, >= 0.6.4)
26
26
  multi_json (~> 1.0)
27
27
  builder (3.0.4)
@@ -29,9 +29,9 @@ GEM
29
29
  hike (1.2.3)
30
30
  i18n (0.7.0)
31
31
  journey (1.0.4)
32
- multi_json (1.11.0)
33
- rack (1.4.5)
34
- rack-cache (1.2)
32
+ multi_json (1.11.2)
33
+ rack (1.4.7)
34
+ rack-cache (1.5.1)
35
35
  rack (>= 0.4)
36
36
  rack-test (0.6.3)
37
37
  rack (>= 1.0)
@@ -52,4 +52,4 @@ DEPENDENCIES
52
52
  rake
53
53
 
54
54
  BUNDLED WITH
55
- 1.10.5
55
+ 1.10.6
data/README.md CHANGED
@@ -28,6 +28,8 @@ If you need to prevent `.js.erb` or `.css.erb` files from caching, you can add `
28
28
 
29
29
  By default, `i18n-assets` localizes all js and css files. That might make your deploys turtle slow. In order to explicitly configure the files you want to localize, simply add `config.assets.localize = %w( *.js application.css )` to your environment configuration file.
30
30
 
31
+ In case you want to precompile a subset of locales instead all `I18n.available_locales` ones, you can add `config.assets.locales = %w[ en lv ru ]` to your environment configuration file.
32
+
31
33
  ## Example
32
34
 
33
35
  You can check an example usage here: https://github.com/maximgladkov/localized_assets_precompilation_example_app
@@ -50,7 +50,7 @@ unless defined?(Sprockets::LOCALIZABLE_ASSETS_REGEX)
50
50
  end
51
51
 
52
52
  if Sprockets.localizable?(logical_path)
53
- I18n.available_locales.each do |locale|
53
+ (Rails.configuration.assets.locales || I18n.available_locales).each do |locale|
54
54
  I18n.locale = locale
55
55
  process.call
56
56
  end
@@ -109,7 +109,7 @@ unless defined?(Sprockets::LOCALIZABLE_ASSETS_REGEX)
109
109
 
110
110
  def extract_locale(path)
111
111
  locale = path[/^\/([a-z\-_]+?)\//, 1]
112
- if I18n.available_locales.map(&:to_s).include? locale
112
+ if (Rails.configuration.assets.locales || I18n.available_locales).map(&:to_s).include? locale
113
113
  locale
114
114
  else
115
115
  nil
@@ -1,5 +1,5 @@
1
1
  module I18n
2
2
  module Assets
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxim Gladkov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-18 00:00:00.000000000 Z
11
+ date: 2016-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.2.2
107
+ rubygems_version: 2.4.8
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Rails assets localization made easy