i18n-js-assets 1.2.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -0
  3. data/lib/i18n-js-assets.rb +6 -15
  4. data/lib/i18n-js-assets/entry.rb +9 -1
  5. data/lib/i18n-js-assets/processor.rb +1 -1
  6. data/lib/i18n-js-assets/railtie.rb +26 -5
  7. data/lib/i18n-js-assets/version.rb +1 -1
  8. data/lib/i18n-js-assets/versioning.rb +27 -0
  9. data/spec/app/assets/config/manifest.js +3 -0
  10. data/spec/log/production.log +2 -0
  11. data/spec/log/test.log +261 -0
  12. data/spec/public/assets/application-d6fa28795ec5c7b3b893737abd6ca2cf.js.gz +0 -0
  13. data/spec/public/assets/application.js.gz +0 -0
  14. data/spec/public/assets/translations/precompilable-en-39935f3d64ebd30557b853eb3f26cc83.js.gz +0 -0
  15. data/spec/public/assets/translations/precompilable-en.js.gz +0 -0
  16. data/spec/public/assets/translations/precompilable-es-3ec410e0a5e1c63b2bec7a9202561344.js.gz +0 -0
  17. data/spec/public/assets/translations/precompilable-es.js.gz +0 -0
  18. data/spec/spec_helper.rb +2 -2
  19. data/spec/tmp/cache/assets/{C99/670/sprockets%2F34360fbc1b00a3726a2f1e754f602933 → C7E/4A0/sprockets%2F92acc8cc8471c420b7792611b2675912} +0 -0
  20. data/spec/tmp/cache/assets/{E4D/BA0/sprockets%2F4dceeb805bbe758d6afe013abed00b2f → CAD/860/sprockets%2Fa85a44d6641c409d31d7502b6992c17d} +0 -0
  21. data/spec/tmp/cache/assets/{CE5/730/sprockets%2Fd1d2c71a27273f43986d9516f38efa03 → D09/910/sprockets%2Fec4e05546bf2217191d17fc347bb8f22} +0 -0
  22. data/spec/tmp/cache/assets/{DD8/0F0/sprockets%2Fe9be4cf75e49859d6c0da88ccd0b2b40 → D39/D70/sprockets%2F7181ba68a415fc0b1979d25b72cd3d5b} +0 -0
  23. data/spec/tmp/cache/assets/{CB5/DB0/sprockets%2Fd64c97274ea3601d94778c56ad41e520 → DC4/F40/sprockets%2Ffbe076c1b419c7511d6f21abbc88f2db} +0 -0
  24. data/spec/tmp/cache/assets/{D6B/F10/sprockets%2F5cdcab5910af5f9b7c9f2c4b73182530 → DF8/170/sprockets%2F42bee52fb5fcf2bf595cbdec329a2215} +0 -0
  25. metadata +11 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4acef1ca3f75f795c357f4852fb30762a77efea1
4
- data.tar.gz: c18a3155d18f961a280b43bc8de05f0dce05d687
3
+ metadata.gz: 75bcb84e4910f5ce4a265e36faff7e7ab2c8fe6d
4
+ data.tar.gz: 4a2c1d11a649c11c5266cbd18ab2182721cf57b3
5
5
  SHA512:
6
- metadata.gz: 6d35807f2b64191e458168b231e0634ca1a4dca844547909b7af9a385ec98810f3763916c8cbcdb146561670f26aab27e4ca73230b061bcee3d3e1367953267a
7
- data.tar.gz: 698606135f413aa8cb75918e20dde375b90a5585f84419848081cfc7a2869172c63afbd6da2d0b865679d91979ee454002f7d50c559a76ca559e9c5b3e99ce79
6
+ metadata.gz: 71f35e8dd89a240550ed2c7c0a581ccaf440f293ba4dc27b3c92aa799aa085739469bdec85a6255aa5075bcaf7c50d96ba9a3f45a7bc1dc493a0292c543b410e
7
+ data.tar.gz: 2efb3270eb0d3838eddead2dbdbee9198ed10cdcbcbef8fe34676f9c7d18767962840daed60ed17cc75826c48d547f35c8f3dd7b921ad626625e187b7786f11e
data/Gemfile CHANGED
@@ -2,6 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
+ if ENV['SPROCKETS_VERSION'].to_f == 4
6
+ gem 'sprockets', '4.0.0.beta2'
7
+ end
8
+
5
9
  group :development, :test do
6
10
  gem 'pry-nav'
7
11
  gem 'rake'
@@ -1,23 +1,14 @@
1
1
  # encoding: UTF-8
2
2
 
3
- require 'generated-assets'
4
- require 'i18n-js-assets/railtie'
5
- require 'fileutils'
6
- require 'tmpdir'
7
-
8
3
  module I18nJsAssets
9
4
  autoload :Entry, 'i18n-js-assets/entry'
10
5
  autoload :I18nJsFile, 'i18n-js-assets/i18njs_file'
11
6
  autoload :Manifest, 'i18n-js-assets/manifest'
12
7
  autoload :Processor, 'i18n-js-assets/processor'
13
-
14
- class << self
15
- def asset_dir
16
- @asset_dir ||= begin
17
- dir = File.join(Dir.tmpdir, SecureRandom.hex)
18
- FileUtils.mkdir_p(dir)
19
- dir
20
- end
21
- end
22
- end
8
+ autoload :Versioning, 'i18n-js-assets/versioning'
23
9
  end
10
+
11
+ require 'generated-assets'
12
+ require 'i18n-js-assets/railtie'
13
+ require 'fileutils'
14
+ require 'tmpdir'
@@ -4,6 +4,8 @@ require 'fileutils'
4
4
 
5
5
  module I18nJsAssets
6
6
  class Entry
7
+ include Versioning
8
+
7
9
  attr_reader :app, :source_path, :target_path, :options
8
10
 
9
11
  def initialize(app, source_path, target_path, options)
@@ -40,7 +42,13 @@ module I18nJsAssets
40
42
  end
41
43
 
42
44
  def absolute_source_path
43
- app.assets.resolve(source_path)
45
+ path = app.assets.resolve(source_path)
46
+
47
+ if sprockets4? && path.is_a?(Array)
48
+ URI.parse(path.first).path
49
+ else
50
+ path
51
+ end
44
52
  end
45
53
 
46
54
  def locales
@@ -38,7 +38,7 @@ module I18nJsAssets
38
38
  end
39
39
 
40
40
  def construct_javascript_for_locale(locale, translations)
41
- %(I18n.translations["#{locale}"] = #{translations.to_json};\n)
41
+ %{I18n.translations["#{locale}"] = I18n.extend((I18n.translations["#{locale}"] || {}), #{translations.to_json});\n}
42
42
  end
43
43
 
44
44
  def i18n_js
@@ -1,7 +1,11 @@
1
1
  # encoding: UTF-8
2
2
 
3
+ require 'i18n-js-assets'
4
+
3
5
  module I18nJsAssets
4
6
  class Railtie < ::Rails::Railtie
7
+ include Versioning
8
+
5
9
  config.before_configuration do |app|
6
10
  app.config.assets.localized = I18nJsAssets::Manifest.new(app)
7
11
  end
@@ -12,7 +16,7 @@ module I18nJsAssets
12
16
  end
13
17
  end
14
18
 
15
- # this is for rails 3
19
+ # this is for certain versions of rails 3 and rails 4
16
20
  config.after_initialize do |app|
17
21
  begin
18
22
  app.assets.register_engine('.i18njs', I18nJsAssets::Processor)
@@ -20,10 +24,27 @@ module I18nJsAssets
20
24
  end
21
25
  end
22
26
 
23
- # this is for rails 4
24
- initializer :i18n_js_assets, after: 'sprockets.environment' do |app|
25
- if app.assets
26
- app.assets.register_engine('.i18njs', I18nJsAssets::Processor)
27
+ # this is for rails 3/4, sprockets < 4
28
+ if !sprockets4?
29
+ initializer :i18n_js_assets, after: 'sprockets.environment' do |app|
30
+ if app.assets
31
+ app.assets.register_engine('.i18njs', I18nJsAssets::Processor)
32
+ end
33
+ end
34
+ end
35
+
36
+ # this is for rails 4, sprockets 4
37
+ #
38
+ # (in this case the 'sprockets.environment' hook won't fire)
39
+ if sprockets4?
40
+ config.assets.configure do |env|
41
+ i18n_processor_adapter = proc do |params|
42
+ processor = I18nJsAssets::Processor.new { params[:data] }
43
+ { data: processor.render }
44
+ end
45
+
46
+ env.register_mime_type 'text/i18njs', extensions: ['.i18njs', '.js.i18njs']
47
+ env.register_transformer 'text/i18njs', 'application/javascript', i18n_processor_adapter
27
48
  end
28
49
  end
29
50
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module I18nJsAssets
4
- VERSION = '1.2.2'
4
+ VERSION = '1.3.0'
5
5
  end
@@ -0,0 +1,27 @@
1
+ # encoding: UTF-8
2
+
3
+ require 'sprockets/version'
4
+
5
+ module I18nJsAssets
6
+ module Versioning
7
+ def rails3?
8
+ defined?(Rails) &&
9
+ Rails::VERSION::STRING.to_f >= 3 &&
10
+ Rails::VERSION::STRING.to_f < 4
11
+ end
12
+
13
+ def rails4?
14
+ defined?(Rails) &&
15
+ Rails::VERSION::STRING.to_f >= 4 &&
16
+ Rails::VERSION::STRING.to_f < 5
17
+ end
18
+
19
+ def sprockets4?
20
+ defined?(Sprockets) &&
21
+ Sprockets::VERSION.to_f >= 4 &&
22
+ Sprockets::VERSION.to_f < 5
23
+ end
24
+ end
25
+
26
+ Versioning.extend(Versioning)
27
+ end
@@ -0,0 +1,3 @@
1
+ // Sprockets 4 expects this file to exist
2
+ //
3
+ //= link_to application.js
@@ -0,0 +1,2 @@
1
+ Compiled translations/includable.js (20ms) (pid 37976)
2
+ Compiled application.js (23ms) (pid 37976)
@@ -183,3 +183,264 @@ Compiled application.js (14ms) (pid 71404)
183
183
  Compiled translations/language_specific.js (0ms) (pid 71404)
184
184
  Compiled translations/precompilable-en.js (0ms) (pid 71404)
185
185
  Compiled translations/precompilable-es.js (0ms) (pid 71404)
186
+ Compiled translations/includable.js (9ms) (pid 38443)
187
+ Compiled application.js (12ms) (pid 38443)
188
+ Compiled translations/precompilable-en.js (0ms) (pid 38443)
189
+ Compiled translations/precompilable-es.js (0ms) (pid 38443)
190
+ Compiled translations/precompilable-en.js (9ms) (pid 38805)
191
+ Compiled translations/precompilable-es.js (0ms) (pid 38805)
192
+ Updating mtimes for current assets...
193
+ Compiled translations/includable.js (13ms) (pid 39154)
194
+ Compiled application.js (15ms) (pid 39154)
195
+ Compiled translations/precompilable-en.js (0ms) (pid 39154)
196
+ Compiled translations/precompilable-es.js (0ms) (pid 39154)
197
+ Processed digest assets in 52ms
198
+ Stripped digests, copied to application.js, and created gzipped asset
199
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
200
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
201
+ Generated non-digest assets in 2ms
202
+ Updating mtimes for current assets...
203
+ Compiled translations/includable.js (12ms) (pid 39855)
204
+ Compiled application.js (14ms) (pid 39855)
205
+ Compiled translations/precompilable-en.js (0ms) (pid 39855)
206
+ Compiled translations/precompilable-es.js (0ms) (pid 39855)
207
+ Processed digest assets in 54ms
208
+ Stripped digests, copied to application.js, and created gzipped asset
209
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
210
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
211
+ Generated non-digest assets in 3ms
212
+ Updating mtimes for current assets...
213
+ Not compiling application.js, sources digest has not changed (84b3021)
214
+ Not compiling translations/precompilable-en.js, sources digest has not changed (68f9575)
215
+ Not compiling translations/precompilable-es.js, sources digest has not changed (fa2fbe5)
216
+ Processed digest assets in 25ms
217
+ Stripped digests, copied to application.js, and created gzipped asset
218
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
219
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
220
+ Generated non-digest assets in 2ms
221
+ Updating mtimes for current assets...
222
+ Not compiling application.js, sources digest has not changed (84b3021)
223
+ Not compiling translations/precompilable-en.js, sources digest has not changed (68f9575)
224
+ Not compiling translations/precompilable-es.js, sources digest has not changed (fa2fbe5)
225
+ Processed digest assets in 24ms
226
+ Stripped digests, copied to application.js, and created gzipped asset
227
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
228
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
229
+ Generated non-digest assets in 3ms
230
+ Updating mtimes for current assets...
231
+ Not compiling application.js, sources digest has not changed (84b3021)
232
+ Not compiling translations/precompilable-en.js, sources digest has not changed (68f9575)
233
+ Not compiling translations/precompilable-es.js, sources digest has not changed (fa2fbe5)
234
+ Processed digest assets in 24ms
235
+ Stripped digests, copied to application.js, and created gzipped asset
236
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
237
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
238
+ Generated non-digest assets in 3ms
239
+ Updating mtimes for current assets...
240
+ Updating mtimes for current assets...
241
+ Not compiling application.js, sources digest has not changed (84b3021)
242
+ Not compiling translations/precompilable-en.js, sources digest has not changed (68f9575)
243
+ Not compiling translations/precompilable-es.js, sources digest has not changed (fa2fbe5)
244
+ Processed digest assets in 24ms
245
+ Stripped digests, copied to application.js, and created gzipped asset
246
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
247
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
248
+ Generated non-digest assets in 5ms
249
+ Updating mtimes for current assets...
250
+ Not compiling application.js, sources digest has not changed (84b3021)
251
+ Updating mtimes for current assets...
252
+ Not compiling application.js, sources digest has not changed (84b3021)
253
+ Compiled translations/precompilable.js (14ms) (pid 45619)
254
+ Updating mtimes for current assets...
255
+ Compiled translations/includable.js (11ms) (pid 46418)
256
+ Compiled application.js (13ms) (pid 46418)
257
+ Compiled translations/precompilable-en.js (0ms) (pid 46418)
258
+ Compiled translations/precompilable-es.js (0ms) (pid 46418)
259
+ Processed digest assets in 54ms
260
+ Stripped digests, copied to application.js, and created gzipped asset
261
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
262
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
263
+ Generated non-digest assets in 3ms
264
+ Compiled translations/precompilable.js (9ms) (pid 46773)
265
+ Updating mtimes for current assets...
266
+ Compiled translations/includable.js (0ms) (pid 46773)
267
+ Compiled application.js (3ms) (pid 46773)
268
+ Compiled translations/precompilable-en.js (0ms) (pid 46773)
269
+ Compiled translations/precompilable-es.js (0ms) (pid 46773)
270
+ Processed digest assets in 57ms
271
+ Stripped digests, copied to application.js, and created gzipped asset
272
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
273
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
274
+ Generated non-digest assets in 4ms
275
+ Compiled translations/precompilable.js (9ms) (pid 47128)
276
+ Updating mtimes for current assets...
277
+ Not compiling application.js, sources digest has not changed (84b3021)
278
+ Not compiling translations/precompilable-en.js, sources digest has not changed (68f9575)
279
+ Not compiling translations/precompilable-es.js, sources digest has not changed (fa2fbe5)
280
+ Processed digest assets in 23ms
281
+ Stripped digests, copied to application.js, and created gzipped asset
282
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
283
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
284
+ Generated non-digest assets in 3ms
285
+ Compiled translations/precompilable.js (113ms) (pid 47499)
286
+ Updating mtimes for current assets...
287
+ Not compiling application.js, sources digest has not changed (84b3021)
288
+ Not compiling translations/precompilable-en.js, sources digest has not changed (68f9575)
289
+ Not compiling translations/precompilable-es.js, sources digest has not changed (fa2fbe5)
290
+ Processed digest assets in 22ms
291
+ Stripped digests, copied to application.js, and created gzipped asset
292
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
293
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
294
+ Generated non-digest assets in 3ms
295
+ Compiled translations/precompilable.js (9ms) (pid 47859)
296
+ Updating mtimes for current assets...
297
+ Not compiling application.js, sources digest has not changed (84b3021)
298
+ Not compiling translations/precompilable-en.js, sources digest has not changed (68f9575)
299
+ Not compiling translations/precompilable-es.js, sources digest has not changed (fa2fbe5)
300
+ Processed digest assets in 24ms
301
+ Stripped digests, copied to application.js, and created gzipped asset
302
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
303
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
304
+ Generated non-digest assets in 3ms
305
+ Compiled translations/precompilable.js (9ms) (pid 48605)
306
+ Updating mtimes for current assets...
307
+ Not compiling application.js, sources digest has not changed (84b3021)
308
+ Not compiling translations/precompilable-en.js, sources digest has not changed (68f9575)
309
+ Not compiling translations/precompilable-es.js, sources digest has not changed (fa2fbe5)
310
+ Processed digest assets in 25ms
311
+ Stripped digests, copied to application.js, and created gzipped asset
312
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
313
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
314
+ Generated non-digest assets in 4ms
315
+ Compiled translations/precompilable.js (9ms) (pid 48949)
316
+ Updating mtimes for current assets...
317
+ Not compiling application.js, sources digest has not changed (84b3021)
318
+ Not compiling translations/precompilable-en.js, sources digest has not changed (68f9575)
319
+ Not compiling translations/precompilable-es.js, sources digest has not changed (fa2fbe5)
320
+ Processed digest assets in 27ms
321
+ Stripped digests, copied to application.js, and created gzipped asset
322
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
323
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
324
+ Generated non-digest assets in 3ms
325
+ Updating mtimes for current assets...
326
+ Not compiling application.js, sources digest has not changed (84b3021)
327
+ Not compiling translations/precompilable-en.js, sources digest has not changed (68f9575)
328
+ Not compiling translations/precompilable-es.js, sources digest has not changed (fa2fbe5)
329
+ Processed digest assets in 24ms
330
+ Stripped digests, copied to application.js, and created gzipped asset
331
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
332
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
333
+ Generated non-digest assets in 4ms
334
+ Compiled translations/precompilable-en.js (11ms) (pid 52672)
335
+ Compiled translations/precompilable-en.js (11ms) (pid 53068)
336
+ Compiled translations/precompilable-en.js (9ms) (pid 53447)
337
+ Compiled translations/precompilable-en.js (9ms) (pid 54125)
338
+ Compiled translations/precompilable.js (0ms) (pid 54125)
339
+ Compiled translations/precompilable-en.js (9ms) (pid 57519)
340
+ Compiled translations/precompilable-es.js (0ms) (pid 57519)
341
+ Compiled translations/includable.js (0ms) (pid 57519)
342
+ Compiled application.js (2ms) (pid 57519)
343
+ Processed digest assets in 26ms
344
+ Stripped digests, copied to application.js, and created gzipped asset
345
+ Generated non-digest assets in 1ms
346
+ Compiled translations/precompilable-en.js (9ms) (pid 57907)
347
+ Compiled translations/precompilable.js (0ms) (pid 57907)
348
+ Compiled translations/precompilable-es.js (0ms) (pid 57907)
349
+ Compiled translations/includable.js (0ms) (pid 57907)
350
+ Compiled application.js (2ms) (pid 57907)
351
+ Processed digest assets in 26ms
352
+ Stripped digests, copied to application.js, and created gzipped asset
353
+ Generated non-digest assets in 1ms
354
+ Compiled translations/precompilable-en.js (9ms) (pid 58283)
355
+ Compiled translations/precompilable.js (0ms) (pid 58283)
356
+ Compiled translations/precompilable-es.js (0ms) (pid 58283)
357
+ Not compiling application.js, sources digest has not changed (3dbf59e)
358
+ Processed digest assets in 17ms
359
+ Stripped digests, copied to application.js, and created gzipped asset
360
+ Generated non-digest assets in 1ms
361
+ Compiled translations/precompilable-en.js (9ms) (pid 58681)
362
+ Compiled translations/precompilable.js (0ms) (pid 58681)
363
+ Compiled translations/precompilable-es.js (0ms) (pid 58681)
364
+ Not compiling application.js, sources digest has not changed (3dbf59e)
365
+ Processed digest assets in 17ms
366
+ Stripped digests, copied to application.js, and created gzipped asset
367
+ Generated non-digest assets in 1ms
368
+ Compiled translations/includable.js (10ms) (pid 59074)
369
+ Compiled application.js (12ms) (pid 59074)
370
+ Compiled translations/precompilable-en.js (0ms) (pid 59074)
371
+ Compiled translations/precompilable-es.js (0ms) (pid 59074)
372
+ Processed digest assets in 48ms
373
+ Stripped digests, copied to application.js, and created gzipped asset
374
+ Stripped digests, copied to translations/precompilable-en.js, and created gzipped asset
375
+ Stripped digests, copied to translations/precompilable-es.js, and created gzipped asset
376
+ Generated non-digest assets in 4ms
377
+ Compiled translations/includable.js (14ms) (pid 2227)
378
+ Compiled application.js (17ms) (pid 2227)
379
+ Compiled translations/precompilable-en.js (0ms) (pid 2227)
380
+ Compiled translations/precompilable-es.js (0ms) (pid 2227)
381
+ Compiled translations/includable.js (8ms) (pid 2512)
382
+ Compiled application.js (11ms) (pid 2512)
383
+ Compiled translations/precompilable-en.js (0ms) (pid 2512)
384
+ Compiled translations/precompilable-es.js (0ms) (pid 2512)
385
+ Compiled translations/includable.js (7ms) (pid 3163)
386
+ Compiled application.js (10ms) (pid 3163)
387
+ Compiled translations/precompilable-en.js (0ms) (pid 3163)
388
+ Compiled translations/precompilable-es.js (0ms) (pid 3163)
389
+ Compiled translations/includable.js (7ms) (pid 3662)
390
+ Compiled application.js (10ms) (pid 3662)
391
+ Compiled translations/precompilable-en.js (0ms) (pid 3662)
392
+ Compiled translations/precompilable-es.js (0ms) (pid 3662)
393
+ Compiled translations/includable.js (8ms) (pid 4225)
394
+ Compiled application.js (11ms) (pid 4225)
395
+ Compiled translations/precompilable-en.js (0ms) (pid 4225)
396
+ Compiled translations/precompilable-es.js (0ms) (pid 4225)
397
+ Compiled translations/includable.js (7ms) (pid 4723)
398
+ Compiled application.js (10ms) (pid 4723)
399
+ Compiled translations/language_specific.js (0ms) (pid 4723)
400
+ Compiled translations/precompilable-en.js (0ms) (pid 4723)
401
+ Compiled translations/precompilable-es.js (0ms) (pid 4723)
402
+ Compiled translations/includable.js (10ms) (pid 4728)
403
+ Compiled application.js (13ms) (pid 4728)
404
+ Compiled translations/language_specific.js (0ms) (pid 4728)
405
+ Compiled translations/precompilable-en.js (0ms) (pid 4728)
406
+ Compiled translations/precompilable-es.js (0ms) (pid 4728)
407
+ Compiled translations/includable.js (7ms) (pid 5039)
408
+ Compiled application.js (10ms) (pid 5039)
409
+ Compiled translations/language_specific.js (1ms) (pid 5039)
410
+ Compiled translations/precompilable-en.js (0ms) (pid 5039)
411
+ Compiled translations/precompilable-es.js (0ms) (pid 5039)
412
+ Compiled translations/includable.js (8ms) (pid 5044)
413
+ Compiled application.js (11ms) (pid 5044)
414
+ Compiled translations/language_specific.js (0ms) (pid 5044)
415
+ Compiled translations/precompilable-en.js (0ms) (pid 5044)
416
+ Compiled translations/precompilable-es.js (0ms) (pid 5044)
417
+ Compiled translations/includable.js (7ms) (pid 5441)
418
+ Compiled application.js (10ms) (pid 5441)
419
+ Compiled translations/language_specific.js (0ms) (pid 5441)
420
+ Compiled translations/precompilable-en.js (0ms) (pid 5441)
421
+ Compiled translations/precompilable-es.js (0ms) (pid 5441)
422
+ Compiled translations/includable.js (8ms) (pid 5446)
423
+ Compiled application.js (11ms) (pid 5446)
424
+ Compiled translations/language_specific.js (0ms) (pid 5446)
425
+ Compiled translations/precompilable-en.js (0ms) (pid 5446)
426
+ Compiled translations/precompilable-es.js (0ms) (pid 5446)
427
+ Compiled translations/includable.js (8ms) (pid 5754)
428
+ Compiled application.js (10ms) (pid 5754)
429
+ Compiled translations/language_specific.js (0ms) (pid 5754)
430
+ Compiled translations/precompilable-en.js (0ms) (pid 5754)
431
+ Compiled translations/precompilable-es.js (0ms) (pid 5754)
432
+ Compiled translations/includable.js (8ms) (pid 5759)
433
+ Compiled application.js (10ms) (pid 5759)
434
+ Compiled translations/language_specific.js (0ms) (pid 5759)
435
+ Compiled translations/precompilable-en.js (0ms) (pid 5759)
436
+ Compiled translations/precompilable-es.js (0ms) (pid 5759)
437
+ Compiled translations/includable.js (12ms) (pid 7698)
438
+ Compiled application.js (15ms) (pid 7698)
439
+ Compiled translations/language_specific.js (0ms) (pid 7698)
440
+ Compiled translations/precompilable-en.js (0ms) (pid 7698)
441
+ Compiled translations/precompilable-es.js (0ms) (pid 7698)
442
+ Compiled translations/includable.js (9ms) (pid 7703)
443
+ Compiled application.js (12ms) (pid 7703)
444
+ Compiled translations/language_specific.js (0ms) (pid 7703)
445
+ Compiled translations/precompilable-en.js (1ms) (pid 7703)
446
+ Compiled translations/precompilable-es.js (0ms) (pid 7703)
@@ -22,11 +22,11 @@ module LetDeclarations
22
22
  extend RSpec::SharedContext
23
23
 
24
24
  let(:en_source) do
25
- %Q(I18n.translations["en"] = {"my_app":{"teapot":"I'm a little teapot"}};)
25
+ %Q(I18n.translations["en"] = I18n.extend((I18n.translations["en"] || {}), {"my_app":{"teapot":"I'm a little teapot"}});)
26
26
  end
27
27
 
28
28
  let(:es_source) do
29
- %Q(I18n.translations["es"] = {"my_app":{"teapot":"Soy una tetera pequeña"}};)
29
+ %Q(I18n.translations["es"] = I18n.extend((I18n.translations["es"] || {}), {"my_app":{"teapot":"Soy una tetera pequeña"}});)
30
30
  end
31
31
 
32
32
  let(:assets_config) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-js-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-03 00:00:00.000000000 Z
11
+ date: 2016-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -119,6 +119,8 @@ files:
119
119
  - lib/i18n-js-assets/processor.rb
120
120
  - lib/i18n-js-assets/railtie.rb
121
121
  - lib/i18n-js-assets/version.rb
122
+ - lib/i18n-js-assets/versioning.rb
123
+ - spec/app/assets/config/manifest.js
122
124
  - spec/app/assets/javascripts/application.js
123
125
  - spec/app/assets/javascripts/translations/includable.js.i18njs
124
126
  - spec/app/assets/javascripts/translations/language_specific.js.i18njs
@@ -131,6 +133,7 @@ files:
131
133
  - spec/i18njs_file_spec.rb
132
134
  - spec/inline_spec.rb
133
135
  - spec/log/development.log
136
+ - spec/log/production.log
134
137
  - spec/log/test.log
135
138
  - spec/manifest_spec.rb
136
139
  - spec/precomp_spec.rb
@@ -148,12 +151,12 @@ files:
148
151
  - spec/public/assets/translations/precompilable-es.js
149
152
  - spec/public/assets/translations/precompilable-es.js.gz
150
153
  - spec/spec_helper.rb
151
- - spec/tmp/cache/assets/C99/670/sprockets%2F34360fbc1b00a3726a2f1e754f602933
152
- - spec/tmp/cache/assets/CB5/DB0/sprockets%2Fd64c97274ea3601d94778c56ad41e520
153
- - spec/tmp/cache/assets/CE5/730/sprockets%2Fd1d2c71a27273f43986d9516f38efa03
154
- - spec/tmp/cache/assets/D6B/F10/sprockets%2F5cdcab5910af5f9b7c9f2c4b73182530
155
- - spec/tmp/cache/assets/DD8/0F0/sprockets%2Fe9be4cf75e49859d6c0da88ccd0b2b40
156
- - spec/tmp/cache/assets/E4D/BA0/sprockets%2F4dceeb805bbe758d6afe013abed00b2f
154
+ - spec/tmp/cache/assets/C7E/4A0/sprockets%2F92acc8cc8471c420b7792611b2675912
155
+ - spec/tmp/cache/assets/CAD/860/sprockets%2Fa85a44d6641c409d31d7502b6992c17d
156
+ - spec/tmp/cache/assets/D09/910/sprockets%2Fec4e05546bf2217191d17fc347bb8f22
157
+ - spec/tmp/cache/assets/D39/D70/sprockets%2F7181ba68a415fc0b1979d25b72cd3d5b
158
+ - spec/tmp/cache/assets/DC4/F40/sprockets%2Ffbe076c1b419c7511d6f21abbc88f2db
159
+ - spec/tmp/cache/assets/DF8/170/sprockets%2F42bee52fb5fcf2bf595cbdec329a2215
157
160
  homepage: http://github.com/camertron
158
161
  licenses: []
159
162
  metadata: {}