i18n_alchemy 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/i18n_alchemy/version.rb +1 -1
- data/test/action_view_test.rb +4 -17
- data/test/test_helper.rb +4 -13
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bc55c34e9ada128b790fe90e4917c2d1ed5a79b8ed1277d272b19ba2b7ddfaf
|
4
|
+
data.tar.gz: 94fadf745b6a0a50e4649c14489f2d5087d36b5ef9fb11daf158d437e86bebb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0501ef9fedb09177f5dfcab536e5ab5cc9c838a92a6ee9ecfe5057774e2bbbc7b580381fea093aba04998d0b397fcc4d45a1cecb75fbe7c5ec7172c578004e26
|
7
|
+
data.tar.gz: f769303bd86f0e9c82145f8a0386baff7438ad8eca5b4d00c5a509734d7053b3c7375cc817976e07040f999e382ce7052901421af90d6e0c5fc7a84cb989fadc
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## v0.5.0 - 2022-01-15
|
2
|
+
|
3
|
+
* Drop support for Ruby < 2.5
|
4
|
+
* Drop support for Rails < 5.2
|
5
|
+
* Rails 7 support (no changes required) ([@JonathanFerreira](https://github.com/JonathanFerreira))
|
6
|
+
* Ruby 3.1 support (no changes required)
|
7
|
+
* Move CI to GitHub Actions
|
8
|
+
|
1
9
|
## v0.4.0 - 2020-03-30
|
2
10
|
|
3
11
|
* Ruby 3.0 support
|
data/README.md
CHANGED
@@ -151,7 +151,7 @@ And then just configure the attribute you want to use with this new parser:
|
|
151
151
|
```ruby
|
152
152
|
class Product < ActiveRecord::Base
|
153
153
|
include I18n::Alchemy
|
154
|
-
|
154
|
+
localize :released_month, :using => MyCustomDateParser
|
155
155
|
end
|
156
156
|
```
|
157
157
|
|
data/lib/i18n_alchemy/version.rb
CHANGED
data/test/action_view_test.rb
CHANGED
@@ -45,22 +45,9 @@ class ActionViewTest < I18n::Alchemy::TestCase
|
|
45
45
|
# Since we do not want to rely on Rails dom-assertions (neither from the
|
46
46
|
# framework nor from the extracted gem), we build our own :).
|
47
47
|
def assert_same_text_input(attribute, value)
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
def text_input_sorted_attributes(attribute_name, value)
|
55
|
-
size = rails4? ? ' ' : ' size="30" '
|
56
|
-
%Q[<input id="product_#{attribute_name}" name="product[#{attribute_name}]"#{size}type="text" value="#{value}" />]
|
57
|
-
end
|
58
|
-
|
59
|
-
def text_input_unsorted_attributes(attribute_name, value)
|
60
|
-
%Q[<input type="text" value="#{value}" name="product[#{attribute_name}]" id="product_#{attribute_name}" />]
|
61
|
-
end
|
62
|
-
|
63
|
-
def rails4?
|
64
|
-
ActionPack::VERSION::STRING.start_with? "4"
|
48
|
+
assert_equal(
|
49
|
+
%Q[<input type="text" value="#{value}" name="product[#{attribute}]" id="product_#{attribute}" />],
|
50
|
+
@template.text_field(:product, attribute, object: @localized)
|
51
|
+
)
|
65
52
|
end
|
66
53
|
end
|
data/test/test_helper.rb
CHANGED
@@ -2,18 +2,9 @@ require "rubygems"
|
|
2
2
|
require "bundler/setup"
|
3
3
|
Bundler.require :test
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
require 'minitest/unit'
|
9
|
-
Minitest.autorun
|
10
|
-
MiniTestCase = Minitest::Test
|
11
|
-
rescue LoadError
|
12
|
-
# Rails 4.0
|
13
|
-
require 'minitest/unit'
|
14
|
-
MiniTest::Unit.autorun
|
15
|
-
MiniTestCase = MiniTest::Unit::TestCase
|
16
|
-
end
|
5
|
+
require 'minitest'
|
6
|
+
require 'minitest/unit'
|
7
|
+
Minitest.autorun
|
17
8
|
|
18
9
|
require "i18n_alchemy"
|
19
10
|
require "action_view"
|
@@ -31,7 +22,7 @@ Dir["test/custom_parsers/*.rb"].each { |file| require File.expand_path(file) }
|
|
31
22
|
Dir["test/models/*.rb"].each { |file| require File.expand_path(file) }
|
32
23
|
|
33
24
|
module I18n::Alchemy
|
34
|
-
class TestCase <
|
25
|
+
class TestCase < Minitest::Test
|
35
26
|
end
|
36
27
|
|
37
28
|
class ProxyTestCase < TestCase
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n_alchemy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Antonio da Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 4.0.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '8.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 4.0.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '8.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: i18n
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
version: 4.0.0
|
54
54
|
- - "<"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
56
|
+
version: '8.0'
|
57
57
|
type: :development
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -63,7 +63,7 @@ dependencies:
|
|
63
63
|
version: 4.0.0
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '
|
66
|
+
version: '8.0'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: activerecord
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,7 +73,7 @@ dependencies:
|
|
73
73
|
version: 4.0.0
|
74
74
|
- - "<"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '8.0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -83,7 +83,7 @@ dependencies:
|
|
83
83
|
version: 4.0.0
|
84
84
|
- - "<"
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version: '
|
86
|
+
version: '8.0'
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: minitest
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,7 +150,8 @@ files:
|
|
150
150
|
- test/models_test.rb
|
151
151
|
- test/test_helper.rb
|
152
152
|
homepage: ''
|
153
|
-
licenses:
|
153
|
+
licenses:
|
154
|
+
- MIT
|
154
155
|
metadata: {}
|
155
156
|
post_install_message:
|
156
157
|
rdoc_options: []
|
@@ -160,14 +161,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
161
|
requirements:
|
161
162
|
- - ">="
|
162
163
|
- !ruby/object:Gem::Version
|
163
|
-
version:
|
164
|
+
version: 2.5.0
|
164
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
166
|
requirements:
|
166
167
|
- - ">="
|
167
168
|
- !ruby/object:Gem::Version
|
168
169
|
version: '0'
|
169
170
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
171
|
+
rubygems_version: 3.3.3
|
171
172
|
signing_key:
|
172
173
|
specification_version: 4
|
173
174
|
summary: I18n date/number parsing/localization
|