i18n-js 3.0.0.rc1 → 3.0.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- i18n-js (3.0.0.rc1)
4
+ i18n-js (3.0.0.rc2)
5
5
  i18n
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -288,12 +288,18 @@ And use 2 spaces, not tabs. And don't touch the versioning thing.
288
288
 
289
289
  You can run I18n tests using Node.js or your browser.
290
290
 
291
- To use Node.js, execute the following command from the lib's root directory:
291
+ To use Node.js, install the `jasmine-node` library:
292
292
 
293
- $ ./node_modules/.bin/jasmine-node spec/js
293
+ $ npm install jasmine-node -g
294
+
295
+ Then execute the following command from the lib's root directory:
296
+
297
+ $ jasmine-node spec/js
294
298
 
295
299
  To run using your browser, just open the `spec/js/specs.html` file.
296
300
 
301
+ You can run both Ruby and JavaScript specs with `rake spec`.
302
+
297
303
  ## License
298
304
 
299
305
  (The MIT License)
@@ -696,3 +696,4 @@ if (!Array.prototype.indexOf) {
696
696
  return -1;
697
697
  };
698
698
  }
699
+ ;
@@ -1,3 +1,3 @@
1
1
  //= require i18n
2
2
  //= require_self
3
- I18n.translations = <%= I18n::JS.filtered_translations.to_json %>;
3
+ ;I18n.translations = <%= I18n::JS.filtered_translations.to_json %>;
@@ -4,17 +4,15 @@ module I18n
4
4
  module JS
5
5
  class Engine < ::Rails::Engine
6
6
  initializer :after => "sprockets.environment" do
7
- path = File.expand_path("../../..", __FILE__)
8
- ::Rails.configuration.assets.paths.unshift(path) if JS.has_asset_pipeline?
9
- end
10
-
11
- ActiveSupport.on_load(:after_initialize, :yield => true) do
12
- next unless JS.has_asset_pipeline?
7
+ ActiveSupport.on_load(:after_initialize, :yield => true) do
8
+ next unless JS.has_asset_pipeline?
9
+ next unless Rails.configuration.assets.compile
13
10
 
14
- Rails.application.assets.register_preprocessor "application/javascript", :"i18n-js_dependencies" do |context, source|
15
- next source unless context.logical_path == "i18n/translations"
16
- ::I18n.load_path.each {|path| context.depend_on(path)}
17
- source
11
+ Rails.application.assets.register_preprocessor "application/javascript", :"i18n-js_dependencies" do |context, source|
12
+ next source unless context.logical_path == "i18n/translations"
13
+ ::I18n.load_path.each {|path| context.depend_on(path)}
14
+ source
15
+ end
18
16
  end
19
17
  end
20
18
  end
@@ -4,7 +4,7 @@ module I18n
4
4
  MAJOR = 3
5
5
  MINOR = 0
6
6
  PATCH = 0
7
- STRING = "#{MAJOR}.#{MINOR}.#{PATCH}.rc1"
7
+ STRING = "#{MAJOR}.#{MINOR}.#{PATCH}.rc2"
8
8
  end
9
9
  end
10
10
  end
@@ -1,4 +1,4 @@
1
- var I18n = require("../../lib/i18n")
1
+ var I18n = require("../../app/assets/javascripts/i18n")
2
2
  , Translations = require("./translations")
3
3
  ;
4
4
 
@@ -1,4 +1,4 @@
1
- var I18n = require("../../lib/i18n");
1
+ var I18n = require("../../app/assets/javascripts/i18n");
2
2
 
3
3
  describe("Current locale", function(){
4
4
  beforeEach(function(){
@@ -1,4 +1,4 @@
1
- var I18n = require("../../lib/i18n")
1
+ var I18n = require("../../app/assets/javascripts/i18n")
2
2
  , Translations = require("./translations")
3
3
  ;
4
4
 
@@ -1,4 +1,4 @@
1
- var I18n = require("../../lib/i18n");
1
+ var I18n = require("../../app/assets/javascripts/i18n");
2
2
 
3
3
  describe("Defaults", function(){
4
4
  beforeEach(function(){
@@ -1,4 +1,4 @@
1
- var I18n = require("../../lib/i18n")
1
+ var I18n = require("../../app/assets/javascripts/i18n")
2
2
  , Translations = require("./translations")
3
3
  ;
4
4
 
@@ -1,4 +1,4 @@
1
- var I18n = require("../../lib/i18n")
1
+ var I18n = require("../../app/assets/javascripts/i18n")
2
2
  , Translations = require("./translations")
3
3
  ;
4
4
 
@@ -1,4 +1,4 @@
1
- var I18n = require("../../lib/i18n")
1
+ var I18n = require("../../app/assets/javascripts/i18n")
2
2
  , Translations = require("./translations")
3
3
  ;
4
4
 
@@ -1,4 +1,4 @@
1
- var I18n = require("../../lib/i18n");
1
+ var I18n = require("../../app/assets/javascripts/i18n");
2
2
 
3
3
  describe("Placeholder", function(){
4
4
  beforeEach(function(){
@@ -1,4 +1,4 @@
1
- var I18n = require("../../lib/i18n")
1
+ var I18n = require("../../app/assets/javascripts/i18n")
2
2
  , Translations = require("./translations")
3
3
  ;
4
4
 
@@ -1,4 +1,4 @@
1
- var I18n = require("../../lib/i18n");
1
+ var I18n = require("../../app/assets/javascripts/i18n");
2
2
 
3
3
  describe("Prepare options", function(){
4
4
  beforeEach(function(){
@@ -1,4 +1,4 @@
1
- var I18n = require("../../lib/i18n")
1
+ var I18n = require("../../app/assets/javascripts/i18n")
2
2
  , Translations = require("./translations")
3
3
  ;
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-js
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.rc1
4
+ version: 3.0.0.rc2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -118,10 +118,10 @@ files:
118
118
  - Gemfile.lock
119
119
  - README.md
120
120
  - Rakefile
121
+ - app/assets/javascripts/i18n.js
121
122
  - app/assets/javascripts/i18n/translations.js.erb
122
123
  - i18n-js.gemspec
123
124
  - lib/i18n-js.rb
124
- - lib/i18n.js
125
125
  - lib/i18n/js.rb
126
126
  - lib/i18n/js/engine.rb
127
127
  - lib/i18n/js/middleware.rb
@@ -169,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
169
  version: '0'
170
170
  segments:
171
171
  - 0
172
- hash: 2924764751432745810
172
+ hash: 4215591536209238864
173
173
  required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  none: false
175
175
  requirements: