l10n 1.4.0 → 1.4.1

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: 2a9ff8476b428e4a166fd846f24e054e360684cfaddb5dc0d8f82fe5819975f2
4
- data.tar.gz: 1c403e8eafe80d8cb3db18e4cd5224168a645473e0b31c57f0dccf10dbf723fa
3
+ metadata.gz: 98edc4c6d3ba2537048f259a94513f30cc63d724ef47d2b58d485e8851e6b1a2
4
+ data.tar.gz: 9ce041fb0b01bfbfbf519614f9a04491bf83d72394094268cedbe7a3d64f1d7c
5
5
  SHA512:
6
- metadata.gz: 07ea754da688cd5ced4383e9ff506eee54f01e1be658394d5d807ebafcf43749c1e1cda7282a0138c680126c455eb8d86908f91da01adf6a3d098d9963f36b55
7
- data.tar.gz: c486c47c9ddd5b749cc07f8fa11b5dd444df537de4d82129c7b2bb3b72600c5af6f55936d06d109dc67408d4d47416ac5e2a7cf823c53fa1041cb176ccccfd43
6
+ metadata.gz: 4669d8e182957b4a8b38c8d4eb3fa10812942fe06f43bd2539e0aeff7b49851c26f45144f02fa507328ab1a048582935b47e4c9bd0b1c28fe7bb81ada423922d
7
+ data.tar.gz: 48132d2234210fd4f1007c1732ea59a663ff7fd3de0487ca666e0fa3557d80b7367d88f5258c4b44330b712af560f4c8638e788534be73c4b819cb3282489a6f
@@ -1,20 +1,16 @@
1
1
  module L10n
2
2
  module NumericalityValidatorExt
3
3
 
4
- protected
4
+ private
5
5
 
6
- def parse_raw_value_as_a_number(raw_value)
7
- return if raw_value =~ /\A0[xX]/
8
- if raw_value.is_a?(String)
9
- return unless raw_value =~ numeric_exp_for_current_locale
10
- raw_value = Numeric.delocalize(raw_value)
11
- end
12
- Kernel.Float(raw_value)
13
- rescue ArgumentError, TypeError
14
- nil
6
+ def parse_as_number(raw_value)
7
+ raw_value = Numeric.delocalize(raw_value) if is_localized_number?(raw_value)
8
+ super(raw_value)
9
+ end
10
+
11
+ def is_localized_number?(value)
12
+ numeric_exp_for_current_locale === value
15
13
  end
16
-
17
- private
18
14
 
19
15
  def numeric_exp_for_current_locale
20
16
  separator = I18n.t(:'number.format.separator')
@@ -24,4 +24,4 @@ module L10n
24
24
  end
25
25
  end
26
26
 
27
- ActionDispatch::Request.class_eval { include L10n::Request }
27
+ ActionDispatch::Request.class_eval { include L10n::Request }
@@ -1,3 +1,3 @@
1
1
  module L10n
2
- VERSION = '1.4.0'
2
+ VERSION = '1.4.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: l10n
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-16 00:00:00.000000000 Z
11
+ date: 2019-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -28,96 +28,96 @@ dependencies:
28
28
  name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '5.2'
34
31
  - - ">="
35
32
  - !ruby/object:Gem::Version
36
33
  version: 5.2.0
34
+ - - "~>"
35
+ - !ruby/object:Gem::Version
36
+ version: 5.2.3
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: '5.2'
44
41
  - - ">="
45
42
  - !ruby/object:Gem::Version
46
43
  version: 5.2.0
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: 5.2.3
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: activesupport
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '5.2'
54
51
  - - ">="
55
52
  - !ruby/object:Gem::Version
56
53
  version: 5.2.0
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: 5.2.3
57
57
  type: :runtime
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
62
- - !ruby/object:Gem::Version
63
- version: '5.2'
64
61
  - - ">="
65
62
  - !ruby/object:Gem::Version
66
63
  version: 5.2.0
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: 5.2.3
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: actionpack
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: '5.2'
74
71
  - - ">="
75
72
  - !ruby/object:Gem::Version
76
73
  version: 5.2.0
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: 5.2.3
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: '5.2'
84
81
  - - ">="
85
82
  - !ruby/object:Gem::Version
86
83
  version: 5.2.0
84
+ - - "~>"
85
+ - !ruby/object:Gem::Version
86
+ version: 5.2.3
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: railties
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - "~>"
92
- - !ruby/object:Gem::Version
93
- version: '5.2'
94
91
  - - ">="
95
92
  - !ruby/object:Gem::Version
96
93
  version: 5.2.0
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 5.2.3
97
97
  type: :runtime
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '5.2'
104
101
  - - ">="
105
102
  - !ruby/object:Gem::Version
106
103
  version: 5.2.0
104
+ - - "~>"
105
+ - !ruby/object:Gem::Version
106
+ version: 5.2.3
107
107
  - !ruby/object:Gem::Dependency
108
108
  name: sqlite3
109
109
  requirement: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - "~>"
111
+ - - ">="
112
112
  - !ruby/object:Gem::Version
113
- version: 1.3.10
113
+ version: '0'
114
114
  type: :development
115
115
  prerelease: false
116
116
  version_requirements: !ruby/object:Gem::Requirement
117
117
  requirements:
118
- - - "~>"
118
+ - - ">="
119
119
  - !ruby/object:Gem::Version
120
- version: 1.3.10
120
+ version: '0'
121
121
  - !ruby/object:Gem::Dependency
122
122
  name: byebug
123
123
  requirement: !ruby/object:Gem::Requirement
@@ -210,8 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  - !ruby/object:Gem::Version
211
211
  version: '0'
212
212
  requirements: []
213
- rubyforge_project:
214
- rubygems_version: 2.7.6
213
+ rubygems_version: 3.0.3
215
214
  signing_key:
216
215
  specification_version: 4
217
216
  summary: Make I18n roar again