traco 5.1.0 → 5.2.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/traco/class_methods.rb +2 -0
- data/lib/traco/version.rb +1 -1
- data/spec/traco_spec.rb +8 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 978a4848f6b31ac00301a8e43b89b7937a446a261031c699c3edc6cd8207d7f8
|
4
|
+
data.tar.gz: 53b5f78c80d4e5bc9a8f16aadba823e2dd258dfec8e754650c63b8e12c5ac318
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a30e150540760c82a82ed68553c298dcade15f9695fbc7af1afb7f2c443e4804233c536c2f1652c7fb3338626bfa610df339f35ea00679b43e14742647fdcc8c
|
7
|
+
data.tar.gz: 49a329d6a6b2cc7c2a6d68a21f5f9e2a2dd76327f162f8a1115c04c254ef6aaf3b287b2790e6d96b0f811873f5c46555e8d2c74143fb9bcaf678a51dc66863a4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 5.2.0
|
4
|
+
|
5
|
+
* Feature: `locale_columns` without a passed column name returns all locale columns. Thanks to [manuelmeurer](https://github.com/manuelmeurer)!
|
6
|
+
|
3
7
|
## 5.1.0
|
4
8
|
|
5
9
|
* Feature: Add `fallback: :i18n` to use the fallbacks from `I18n.fallbacks`. Thanks to [sunny](https://github.com/sunny)!
|
data/lib/traco/class_methods.rb
CHANGED
data/lib/traco/version.rb
CHANGED
data/spec/traco_spec.rb
CHANGED
@@ -113,14 +113,20 @@ RSpec.describe Post, ".locale_columns" do
|
|
113
113
|
expect(Post.locale_columns(:title)).not_to include(:title_ru)
|
114
114
|
end
|
115
115
|
|
116
|
-
it "supports multiple attributes" do
|
117
|
-
|
116
|
+
it "supports multiple attributes" do
|
117
|
+
Post.translates :body
|
118
118
|
|
119
119
|
expect(Post.locale_columns(:body, :title)).to eq [
|
120
120
|
:body_en, :body_pt_br, :body_de, :body_sv,
|
121
121
|
:title_en, :title_pt_br, :title_de, :title_sv,
|
122
122
|
]
|
123
123
|
end
|
124
|
+
|
125
|
+
it "returns the columns of all translated attributes if no params are supplied" do
|
126
|
+
expect(Post.locale_columns).to eq [
|
127
|
+
:title_en, :title_pt_br, :title_de, :title_sv
|
128
|
+
]
|
129
|
+
end
|
124
130
|
end
|
125
131
|
|
126
132
|
RSpec.describe Post, ".current_locale_column" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrik Nyh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|