i18n-js 3.0.5 → 3.0.6

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
  SHA256:
3
- metadata.gz: 812175c2e2ea145d2e820cc915f04687d4e9e5a74734d9980643d321a5d0a607
4
- data.tar.gz: 3c8767ddd862812fa013e2e80bcd7593cbe1b4570440234d3e7c7e5c08c3ff32
3
+ metadata.gz: 8876b958725c3fb0670a31a6ff1c2b25d697db8d2842acb142c86ca8df46fbe0
4
+ data.tar.gz: 7ba32802400ef2e9ab4a9d07afd2b7eadba47f60e087bdf6de441f29204f183e
5
5
  SHA512:
6
- metadata.gz: 42795f8550f63e6a1497ee8650912ba6d395baf76be2c83289b5f97f42a4644881843d3c748c5f79525fdf16b424a1e653f47dbcb43c487dc60024a35c6b4ffd
7
- data.tar.gz: 9ed860a6d453b5901f7b472a12b7182f464eaad536897e281b9c816df360e85e3d46c8c0e4e1e9ef3d40dfae68dfdeb0e888ac95551876150231f35f91a89997
6
+ metadata.gz: d90c6639b712a323d5471cbfdb0bec2ebdffd50f3f78cb2ca30d2d59c3b4cf03592af83f8d6471837e05ab1aa20526a73b440ac1587b42dcd826d322bb2c8e1f
7
+ data.tar.gz: 0cddfd47ca93dafcdd02ce304011c9388bc8d7e075a957a9b24a98edcb7a60202efad1266080c3d9721925d274441d4ae372f5be8b9f8be23d3e0237a4b53212
@@ -29,3 +29,6 @@ matrix:
29
29
  fast_finish: true
30
30
  allow_failures:
31
31
  - rvm: ruby-head
32
+ notifications:
33
+ webhooks: https://www.travisbuddy.com/
34
+ on_success: never
@@ -18,6 +18,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
18
18
  - Nothing
19
19
 
20
20
 
21
+ ## [3.0.6] - 2018-05-30
22
+
23
+ ### Fixed
24
+
25
+ - [Ruby] Make JS `i18n/filtered` depends on i18n-js config too
26
+ (PR: https://github.com/fnando/i18n-js/pull/497)
27
+
28
+
21
29
  ## [3.0.5] - 2018-02-26
22
30
 
23
31
  ### Changed
@@ -286,7 +294,8 @@ And today is not April Fools' Day
286
294
 
287
295
 
288
296
 
289
- [Unreleased]: https://github.com/fnando/i18n-js/compare/v3.0.5...HEAD
297
+ [Unreleased]: https://github.com/fnando/i18n-js/compare/v3.0.6...HEAD
298
+ [3.0.6]: https://github.com/fnando/i18n-js/compare/v3.0.5...v3.0.6
290
299
  [3.0.5]: https://github.com/fnando/i18n-js/compare/v3.0.4...v3.0.5
291
300
  [3.0.4]: https://github.com/fnando/i18n-js/compare/v3.0.3...v3.0.4
292
301
  [3.0.3]: https://github.com/fnando/i18n-js/compare/v3.0.2...v3.0.3
@@ -89,7 +89,7 @@ module I18n
89
89
  end
90
90
 
91
91
  def self.translation_segments
92
- if config? && config[:translations]
92
+ if config_file_exists? && config[:translations]
93
93
  configured_segments
94
94
  else
95
95
  [Segment.new("#{DEFAULT_EXPORT_DIR_PATH}/translations.js", translations)]
@@ -99,7 +99,7 @@ module I18n
99
99
  # Load configuration file for partial exporting and
100
100
  # custom output directory
101
101
  def self.config
102
- if config?
102
+ if config_file_exists?
103
103
  erb_result_from_yaml_file = ERB.new(File.read(config_file_path)).result
104
104
  Private::HashWithSymbolKeys.new(
105
105
  (::YAML.load(erb_result_from_yaml_file) || {})
@@ -109,8 +109,9 @@ module I18n
109
109
  end.freeze
110
110
  end
111
111
 
112
+ # @api private
112
113
  # Check if configuration file exist
113
- def self.config?
114
+ def self.config_file_exists?
114
115
  File.file? config_file_path
115
116
  end
116
117
 
@@ -60,6 +60,13 @@ module I18n
60
60
  def self.run(filename, source, context)
61
61
  if context.logical_path == "i18n/filtered"
62
62
  ::I18n.load_path.each { |path| context.depend_on(File.expand_path(path)) }
63
+
64
+ # Absolute path is required or
65
+ # Sprockets assumes it's a logical path
66
+ #
67
+ # Also it's fine to depend on an absent file
68
+ # Sprocket will ignore paths of absent files
69
+ context.depend_on(File.expand_path(I18n::JS.config_file_path))
63
70
  end
64
71
 
65
72
  source
@@ -2,6 +2,6 @@
2
2
 
3
3
  module I18n
4
4
  module JS
5
- VERSION = "3.0.5"
5
+ VERSION = "3.0.6"
6
6
  end
7
7
  end
@@ -398,7 +398,7 @@ EOS
398
398
  end
399
399
 
400
400
  it "sets empty hash as configuration when no file is found" do
401
- I18n::JS.config?.should eql(false)
401
+ I18n::JS.config_file_exists?.should eql(false)
402
402
  I18n::JS.config.should eql({})
403
403
  end
404
404
 
@@ -8,7 +8,7 @@ module Helpers
8
8
  def set_config(path)
9
9
  config_file_path = File.dirname(__FILE__) + "/fixtures/#{path}"
10
10
  allow(I18n::JS).to receive_messages(
11
- :config? => true,
11
+ :config_file_exists? => true,
12
12
  :config_file_path => config_file_path,
13
13
  )
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-js
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-26 00:00:00.000000000 Z
11
+ date: 2018-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  version: '0'
200
200
  requirements: []
201
201
  rubyforge_project:
202
- rubygems_version: 2.7.5
202
+ rubygems_version: 2.7.7
203
203
  signing_key:
204
204
  specification_version: 4
205
205
  summary: It's a small library to provide the Rails I18n translations on the Javascript.