i18n-debug 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +2 -3
- data/CHANGELOG.md +9 -0
- data/README.md +1 -4
- data/i18n-debug.gemspec +1 -1
- data/lib/i18n/debug/version.rb +1 -1
- data/lib/i18n/debug.rb +3 -1
- data/test/test_i18n_debug.rb +4 -0
- metadata +21 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 66e5026571047fdd6c3e5dfee0b8571845366a280df61f58bff56ec512a27641
|
4
|
+
data.tar.gz: 7a1bd1418dbb415728b75f3c03c2a849c2f36f4ad0fbfb2d5b021968583007f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 302db3d0a8271dd5cf85d883befd10256025680cc24a6b03fb683f9ee3f504c2ec3b606a0f04c9b6433eb33ce9993202eb65a087a6f3cc775dae457d182dcfe7
|
7
|
+
data.tar.gz: 10d0decc417a8867dfa2a2325d32a639d24a28e3c144d4c12b69ebfc66028634ac87d5f193a23dcc786786d9be11fa66d754d51b41257a52569b9f7f717cb800
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
# 1.2.0
|
4
|
+
|
5
|
+
- Don't change method visibility of `#lookup` (#8, @aleksandrs-ledovskis)
|
6
|
+
|
7
|
+
## 1.1.1
|
8
|
+
|
9
|
+
- Update i18n version
|
10
|
+
- Make Rails logger check more robust
|
11
|
+
|
3
12
|
## 1.1.0
|
4
13
|
|
5
14
|
- Use `Module#prepend` instead of aliasing methods.
|
data/README.md
CHANGED
@@ -36,7 +36,7 @@ Thus, place it inside the `development` group.
|
|
36
36
|
gem 'i18n-debug', group: :development
|
37
37
|
```
|
38
38
|
|
39
|
-
If you need support for ruby
|
39
|
+
If you need support for ruby <= 2.0, make sure to use version 1.0.0.
|
40
40
|
|
41
41
|
## Usage
|
42
42
|
|
@@ -66,9 +66,6 @@ end
|
|
66
66
|
|
67
67
|
## Additional Information
|
68
68
|
|
69
|
-
This gem was inspired by a similar gem called
|
70
|
-
[rails-i18n-debug](https://github.com/256dpi/rails-i18n-debug).
|
71
|
-
|
72
69
|
### Dependencies
|
73
70
|
|
74
71
|
- [i18n](https://github.com/svenfuchs/i18n)
|
data/i18n-debug.gemspec
CHANGED
@@ -15,5 +15,5 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.add_development_dependency 'bundler', '~> 1.7'
|
16
16
|
spec.add_development_dependency 'rake', '~> 10.0'
|
17
17
|
spec.add_development_dependency 'minitest', '~> 5.8'
|
18
|
-
spec.add_dependency 'i18n', '<
|
18
|
+
spec.add_dependency 'i18n', '< 2'
|
19
19
|
end
|
data/lib/i18n/debug/version.rb
CHANGED
data/lib/i18n/debug.rb
CHANGED
@@ -13,7 +13,7 @@ module I18n
|
|
13
13
|
|
14
14
|
def logger
|
15
15
|
@logger ||=
|
16
|
-
if defined?(::Rails)
|
16
|
+
if defined?(::Rails) and ::Rails.respond_to?(:logger)
|
17
17
|
::Rails.logger
|
18
18
|
else
|
19
19
|
require 'logger'
|
@@ -28,6 +28,8 @@ module I18n
|
|
28
28
|
end
|
29
29
|
|
30
30
|
module Hook
|
31
|
+
protected
|
32
|
+
|
31
33
|
def lookup(*args)
|
32
34
|
super.tap do |result|
|
33
35
|
options = args.last.is_a?(Hash) ? args.pop : {}
|
data/test/test_i18n_debug.rb
CHANGED
@@ -19,6 +19,10 @@ class TestI18nDebug < Minitest::Test
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
+
def test_does_not_alter_default_i18n_lookup_method_visibility
|
23
|
+
assert I18n.backend.class.protected_method_defined?(:lookup)
|
24
|
+
end
|
25
|
+
|
22
26
|
def test_logger_invoked
|
23
27
|
assert_output(/en\.foo\.bar => "baz"/) do
|
24
28
|
I18n.t('foo.bar')
|
metadata
CHANGED
@@ -1,72 +1,73 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-debug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philipe Fatio
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
14
15
|
requirement: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - "~>"
|
17
18
|
- !ruby/object:Gem::Version
|
18
19
|
version: '1.7'
|
19
|
-
name: bundler
|
20
|
-
prerelease: false
|
21
20
|
type: :development
|
21
|
+
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
28
29
|
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - "~>"
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '10.0'
|
33
|
-
name: rake
|
34
|
-
prerelease: false
|
35
34
|
type: :development
|
35
|
+
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
42
43
|
requirement: !ruby/object:Gem::Requirement
|
43
44
|
requirements:
|
44
45
|
- - "~>"
|
45
46
|
- !ruby/object:Gem::Version
|
46
47
|
version: '5.8'
|
47
|
-
name: minitest
|
48
|
-
prerelease: false
|
49
48
|
type: :development
|
49
|
+
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
+
name: i18n
|
56
57
|
requirement: !ruby/object:Gem::Requirement
|
57
58
|
requirements:
|
58
59
|
- - "<"
|
59
60
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
61
|
-
name: i18n
|
62
|
-
prerelease: false
|
61
|
+
version: '2'
|
63
62
|
type: :runtime
|
63
|
+
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "<"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
-
description: Ever wondered which translations are being looked up by Rails, a gem,
|
68
|
+
version: '2'
|
69
|
+
description: Ever wondered which translations are being looked up by Rails, a gem,
|
70
|
+
or simply your app? Wonder no more!
|
70
71
|
email: me@phili.pe
|
71
72
|
executables: []
|
72
73
|
extensions: []
|
@@ -87,7 +88,7 @@ homepage: https://github.com/fphilipe/i18n-debug
|
|
87
88
|
licenses:
|
88
89
|
- MIT
|
89
90
|
metadata: {}
|
90
|
-
post_install_message:
|
91
|
+
post_install_message:
|
91
92
|
rdoc_options: []
|
92
93
|
require_paths:
|
93
94
|
- lib
|
@@ -102,10 +103,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
103
|
- !ruby/object:Gem::Version
|
103
104
|
version: '0'
|
104
105
|
requirements: []
|
105
|
-
rubyforge_project:
|
106
|
-
rubygems_version: 2.
|
107
|
-
signing_key:
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.7.6
|
108
|
+
signing_key:
|
108
109
|
specification_version: 4
|
109
|
-
summary: Ever wondered which translations are being looked up by Rails, a gem, or
|
110
|
+
summary: Ever wondered which translations are being looked up by Rails, a gem, or
|
111
|
+
simply your app? Wonder no more!
|
110
112
|
test_files:
|
111
113
|
- test/test_i18n_debug.rb
|