traco 5.2.0 → 5.3.3
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 +30 -0
- data/lib/traco/attributes.rb +6 -5
- data/lib/traco/version.rb +1 -1
- data/spec/traco_spec.rb +28 -2
- metadata +5 -19
- data/.gitignore +0 -7
- data/.rspec +0 -1
- data/.travis.yml +0 -24
- data/Appraisals +0 -26
- data/Gemfile +0 -8
- data/README.md +0 -178
- data/Rakefile +0 -6
- data/benchmarks/overhead.rb +0 -41
- data/gemfiles/rails_4.2.gemfile +0 -12
- data/gemfiles/rails_5.0.gemfile +0 -12
- data/gemfiles/rails_5.1.gemfile +0 -12
- data/gemfiles/rails_5.2.gemfile +0 -11
- data/gemfiles/rails_6.0.gemfile +0 -11
- data/gemfiles/rails_6.1.gemfile +0 -11
- data/traco.gemspec +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f574ca00b4a00cb29c1b6222d4b1afd7ce8e2a84561cd2eba142c3dc7ad9e3e5
|
4
|
+
data.tar.gz: ff1a6327086f994627df877d57b46a6c16389315e2183406f07ca6215b376aef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b54c9864d9d378f5fdbcf9ff8952413dfbee488effedccf5485cdcd3b3c34a12e0798a5d46a6b9e9a0e40dbabc5e089af14ccf4d6c83278d98bb23dd31e63e8
|
7
|
+
data.tar.gz: 4c281b250b2065bf0d62754be45cc4efa873b859f1d666b1bd6741420dda3d29d756d7155869ea347a47e7fb2bc0d73314b8fed0d9585f63b0ed15cc9048e58f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,35 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 5.3.3
|
4
|
+
|
5
|
+
* Force MFA for privileged Rubygems actions.
|
6
|
+
|
7
|
+
## 5.3.2
|
8
|
+
|
9
|
+
* This version is only to actually include this CHANGELOG in the gem, so you can see the below if you compare gem diffs 😅
|
10
|
+
|
11
|
+
## 5.3.1
|
12
|
+
|
13
|
+
* This version is only to clarify a backwards incompatibility if relying on undocumented behaviour:
|
14
|
+
|
15
|
+
Readers like `post.title` no longer accept (and ignore) arbitrary keyword arguments.
|
16
|
+
|
17
|
+
So if you would e.g. override a reader like this before:
|
18
|
+
|
19
|
+
def my_title(my_arg:)
|
20
|
+
super || "my fallback #{my_arg}"
|
21
|
+
end
|
22
|
+
|
23
|
+
You will instead need to do:
|
24
|
+
|
25
|
+
def my_title(my_arg:)
|
26
|
+
super() || "my fallback #{my_arg}"
|
27
|
+
end
|
28
|
+
|
29
|
+
## 5.3.0
|
30
|
+
|
31
|
+
* Feature: You can pass a desired locale to readers and query methods, e.g. `post.title(locale: :de)` to get the German-locale title, and `post.title?(locale: :de)` to check if one exists. This ignores fallback settings – use `I18n.with_locale(:de) { post.title }` if you want fallbacks.
|
32
|
+
|
3
33
|
## 5.2.0
|
4
34
|
|
5
35
|
* Feature: `locale_columns` without a passed column name returns all locale columns. Thanks to [manuelmeurer](https://github.com/manuelmeurer)!
|
data/lib/traco/attributes.rb
CHANGED
@@ -21,10 +21,11 @@ module Traco
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def define_reader(attribute)
|
24
|
+
default_fallback = @options.fetch(:fallback, LocaleFallbacks::DEFAULT_FALLBACK)
|
25
|
+
|
24
26
|
class_eval <<-EOM, __FILE__, __LINE__ + 1
|
25
|
-
def #{attribute}(
|
26
|
-
|
27
|
-
fallback = options.fetch(:fallback, default_fallback)
|
27
|
+
def #{attribute}(locale: nil, fallback: #{default_fallback.inspect})
|
28
|
+
return send(Traco.column(:#{attribute}, locale)) if locale
|
28
29
|
|
29
30
|
columns_to_try = self.class._locale_columns_for_attribute(:#{attribute}, fallback: fallback)
|
30
31
|
columns_to_try.each do |column|
|
@@ -48,8 +49,8 @@ module Traco
|
|
48
49
|
|
49
50
|
def define_query(attribute)
|
50
51
|
class_eval <<-EOM, __FILE__, __LINE__ + 1
|
51
|
-
def #{attribute}?
|
52
|
-
|
52
|
+
def #{attribute}?(locale: nil)
|
53
|
+
send(:#{attribute}, locale: locale).present?
|
53
54
|
end
|
54
55
|
EOM
|
55
56
|
end
|
data/lib/traco/version.rb
CHANGED
data/spec/traco_spec.rb
CHANGED
@@ -124,7 +124,7 @@ RSpec.describe Post, ".locale_columns" do
|
|
124
124
|
|
125
125
|
it "returns the columns of all translated attributes if no params are supplied" do
|
126
126
|
expect(Post.locale_columns).to eq [
|
127
|
-
:title_en, :title_pt_br, :title_de, :title_sv
|
127
|
+
:title_en, :title_pt_br, :title_de, :title_sv,
|
128
128
|
]
|
129
129
|
end
|
130
130
|
end
|
@@ -230,6 +230,19 @@ RSpec.describe Post, "#title" do
|
|
230
230
|
expect(post.title).to eq "Hej"
|
231
231
|
end
|
232
232
|
|
233
|
+
context "when given a 'locale' argument" do
|
234
|
+
it "gives the title in that locale, without fallback" do
|
235
|
+
post = Post.new(title_sv: "Hej", title_en: "Halloa")
|
236
|
+
I18n.default_locale = :en
|
237
|
+
I18n.locale = :en
|
238
|
+
|
239
|
+
expect(post.title(locale: :sv)).to eq "Hej"
|
240
|
+
|
241
|
+
post.title_sv = nil
|
242
|
+
expect(post.title(locale: :sv)).to eq nil
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
233
246
|
context "when the translation was defined with fallback: false" do
|
234
247
|
let(:post) {
|
235
248
|
Post.new(title_sv: "Hej", title_en: "Halloa")
|
@@ -310,7 +323,7 @@ RSpec.describe Post, "#title?" do
|
|
310
323
|
I18n.default_locale = :en
|
311
324
|
end
|
312
325
|
|
313
|
-
it "is true if the title is present" do
|
326
|
+
it "is true if the title is present, with fallback" do
|
314
327
|
post = Post.new(title_sv: "", title_en: " ", title_pt_br: nil)
|
315
328
|
expect(post.title?).to be false
|
316
329
|
|
@@ -318,6 +331,19 @@ RSpec.describe Post, "#title?" do
|
|
318
331
|
|
319
332
|
expect(post.title?).to be true
|
320
333
|
end
|
334
|
+
|
335
|
+
context "when given a 'locale' argument" do
|
336
|
+
it "is true if the title if present in that locale, with no fallback" do
|
337
|
+
post = Post.new(title_sv: "Hej", title_en: "Halloa")
|
338
|
+
I18n.default_locale = :en
|
339
|
+
I18n.locale = :en
|
340
|
+
|
341
|
+
expect(post.title?(locale: :sv)).to be true
|
342
|
+
|
343
|
+
post.title_sv = nil
|
344
|
+
expect(post.title?(locale: :sv)).to be false
|
345
|
+
end
|
346
|
+
end
|
321
347
|
end
|
322
348
|
|
323
349
|
RSpec.describe Post, ".human_attribute_name" 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.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrik Nyh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -87,22 +87,8 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
-
- ".gitignore"
|
91
|
-
- ".rspec"
|
92
|
-
- ".travis.yml"
|
93
|
-
- Appraisals
|
94
90
|
- CHANGELOG.md
|
95
|
-
- Gemfile
|
96
91
|
- LICENSE.txt
|
97
|
-
- README.md
|
98
|
-
- Rakefile
|
99
|
-
- benchmarks/overhead.rb
|
100
|
-
- gemfiles/rails_4.2.gemfile
|
101
|
-
- gemfiles/rails_5.0.gemfile
|
102
|
-
- gemfiles/rails_5.1.gemfile
|
103
|
-
- gemfiles/rails_5.2.gemfile
|
104
|
-
- gemfiles/rails_6.0.gemfile
|
105
|
-
- gemfiles/rails_6.1.gemfile
|
106
92
|
- lib/traco.rb
|
107
93
|
- lib/traco/attributes.rb
|
108
94
|
- lib/traco/class_methods.rb
|
@@ -115,11 +101,11 @@ files:
|
|
115
101
|
- spec/spec_helper.rb
|
116
102
|
- spec/spec_helper_models.rb
|
117
103
|
- spec/traco_spec.rb
|
118
|
-
- traco.gemspec
|
119
104
|
homepage: ''
|
120
105
|
licenses:
|
121
106
|
- MIT
|
122
|
-
metadata:
|
107
|
+
metadata:
|
108
|
+
rubygems_mfa_required: 'true'
|
123
109
|
post_install_message:
|
124
110
|
rdoc_options: []
|
125
111
|
require_paths:
|
@@ -135,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
121
|
- !ruby/object:Gem::Version
|
136
122
|
version: '0'
|
137
123
|
requirements: []
|
138
|
-
rubygems_version: 3.
|
124
|
+
rubygems_version: 3.2.31
|
139
125
|
signing_key:
|
140
126
|
specification_version: 4
|
141
127
|
summary: Translatable columns for Rails 4.2 or better, stored in the model table itself.
|
data/.gitignore
DELETED
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
-r spec_helper
|
data/.travis.yml
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
rvm:
|
4
|
-
- 2.6.3
|
5
|
-
- 2.5.5
|
6
|
-
- 2.4.6
|
7
|
-
- 2.3.8
|
8
|
-
gemfile:
|
9
|
-
- gemfiles/rails_4.2.gemfile
|
10
|
-
- gemfiles/rails_5.0.gemfile
|
11
|
-
- gemfiles/rails_5.1.gemfile
|
12
|
-
- gemfiles/rails_5.2.gemfile
|
13
|
-
- gemfiles/rails_6.0.gemfile
|
14
|
-
- gemfiles/rails_6.1.gemfile
|
15
|
-
matrix:
|
16
|
-
exclude:
|
17
|
-
- rvm: 2.3.8
|
18
|
-
gemfile: gemfiles/rails_6.0.gemfile
|
19
|
-
- rvm: 2.3.8
|
20
|
-
gemfile: gemfiles/rails_6.1.gemfile
|
21
|
-
- rvm: 2.4.6
|
22
|
-
gemfile: gemfiles/rails_6.0.gemfile
|
23
|
-
- rvm: 2.4.6
|
24
|
-
gemfile: gemfiles/rails_6.1.gemfile
|
data/Appraisals
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
appraise "rails-4.2" do
|
2
|
-
gem "activerecord", "~> 4.2.0"
|
3
|
-
gem "sqlite3", "~> 1.3.13"
|
4
|
-
end
|
5
|
-
|
6
|
-
appraise "rails-5.0" do
|
7
|
-
gem "activerecord", "~> 5.0.0"
|
8
|
-
gem "sqlite3", "~> 1.3.13"
|
9
|
-
end
|
10
|
-
|
11
|
-
appraise "rails-5.1" do
|
12
|
-
gem "activerecord", "~> 5.1.0"
|
13
|
-
gem "sqlite3", "~> 1.3.13"
|
14
|
-
end
|
15
|
-
|
16
|
-
appraise "rails-5.2" do
|
17
|
-
gem "activerecord", "~> 5.2.0"
|
18
|
-
end
|
19
|
-
|
20
|
-
appraise "rails-6.0" do
|
21
|
-
gem "activerecord", "~> 6.0.3.1"
|
22
|
-
end
|
23
|
-
|
24
|
-
appraise "rails-6.1" do
|
25
|
-
gem "activerecord", "~> 6.1.0"
|
26
|
-
end
|
data/Gemfile
DELETED
data/README.md
DELETED
@@ -1,178 +0,0 @@
|
|
1
|
-
# Traco
|
2
|
-
|
3
|
-
[](http://travis-ci.org/barsoom/traco)
|
4
|
-
|
5
|
-
Translatable attributes for Ruby on Rails 4.2+, stored in the model table itself.
|
6
|
-
|
7
|
-
Inspired by Iain Hecker's [translatable_columns](https://github.com/iain/translatable_columns/).
|
8
|
-
|
9
|
-
To store translations outside the model, see Sven Fuchs' [Globalize](https://github.com/globalize/globalize).
|
10
|
-
|
11
|
-
|
12
|
-
## Usage
|
13
|
-
|
14
|
-
Say you want `Post#title` and `Post#body` to support both English and Swedish values.
|
15
|
-
|
16
|
-
Write a migration to get database columns with locale suffixes, e.g. `title_sv` and `title_en`, like:
|
17
|
-
|
18
|
-
```ruby
|
19
|
-
class CreatePosts < ActiveRecord::Migration
|
20
|
-
def change
|
21
|
-
create_table :posts do |t|
|
22
|
-
t.string :title_sv, :title_en
|
23
|
-
t.text :body_sv, :body_en
|
24
|
-
|
25
|
-
t.timestamps
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
```
|
30
|
-
|
31
|
-
Don't create a database column named `title` without a suffix, since Traco will define a method with that name.
|
32
|
-
|
33
|
-
If you use a locale format like `pt-BR`, the column name would be `title_pt_br`.
|
34
|
-
|
35
|
-
Declare the attributes in the model:
|
36
|
-
|
37
|
-
```ruby
|
38
|
-
class Post < ActiveRecord::Base
|
39
|
-
translates :title, :body
|
40
|
-
end
|
41
|
-
```
|
42
|
-
|
43
|
-
You can still use your accessors like `title_sv` and `title_sv=` in forms, validations and other code, but you also get:
|
44
|
-
|
45
|
-
`#title`: Shows the title in the current locale. If blank, falls back to default locale. Otherwise nil.
|
46
|
-
|
47
|
-
`#title=`: Assigns the title to the column for the current locale, if present. Raises if the column doesn't exist.
|
48
|
-
|
49
|
-
`#title?`: Is the title present? Respects the Traco [fallback](#fallbacks) setting.
|
50
|
-
|
51
|
-
`.human_attribute_name(:title_sv)`: Extends this standard method to return "Title (Swedish)" if you have a translation key `i18n.languages.sv = "Swedish"` and "Title (SV)" otherwise. Rails uses this method to build validation error messages and form labels.
|
52
|
-
|
53
|
-
`.translatable_attributes`: Returns an array like `[:title, :body]`.
|
54
|
-
|
55
|
-
`.locale_columns(:title)`: Returns an array like `[:title_sv, :title_en]` sorted with current locale first, then default locale, and then alphabetically. Suitable for looping in forms:
|
56
|
-
|
57
|
-
```erb
|
58
|
-
<% Post.locale_columns(:title).each do |column| %>
|
59
|
-
<p>
|
60
|
-
<%= form.label column %>
|
61
|
-
<%= form.text_field column %>
|
62
|
-
</p>
|
63
|
-
<% end %>
|
64
|
-
```
|
65
|
-
|
66
|
-
Or perhaps for things like:
|
67
|
-
|
68
|
-
```ruby
|
69
|
-
attr_accessible *locale_columns(:title)
|
70
|
-
|
71
|
-
validates *locale_columns(:title), :uniqueness => true
|
72
|
-
```
|
73
|
-
|
74
|
-
You can also pass multiple attributes if you like:
|
75
|
-
|
76
|
-
```ruby
|
77
|
-
attr_accessible *locale_columns(:title, :body)
|
78
|
-
```
|
79
|
-
|
80
|
-
The return value will be sorted like `[:title_sv, :title_en, :body_sv, :body_en]`.
|
81
|
-
|
82
|
-
`.current_locale_column(:title)`: Returns `:title_sv` if `:sv` is the current locale. Suitable for some SQL queries, such as sorting.
|
83
|
-
|
84
|
-
`.locales_for_attribute(:title)`: Returns an array like `[:sv, :en]` sorted with current locale first, then default locale, and then alphabetically.
|
85
|
-
|
86
|
-
And the equivalent methods for `body`, of course.
|
87
|
-
|
88
|
-
Please note that your `translates :title, :body` declaration must be called before you call `locale_columns`. Otherwise you will get an error like "NoMethodError: undefined method `locale\_columns' for #\<Class:0x00000003f69188\>".
|
89
|
-
|
90
|
-
|
91
|
-
### Fallbacks
|
92
|
-
|
93
|
-
By default, Traco will fall back to the default locale if there is no translation in the current locale.
|
94
|
-
|
95
|
-
You can specify e.g. `translates :title, fallback: false` to never fall back and instead return `nil`.
|
96
|
-
|
97
|
-
You can specify e.g. `translates :title, fallback: :any` to fall back first to the default locale, then to any other locale.
|
98
|
-
|
99
|
-
You can specify e.g. `translates :title, fallback: [:sv]` to explicitly declare fallbacks as an array of any length.
|
100
|
-
|
101
|
-
You can specify e.g. `translates :title, fallback: :i18n` to use the fallbacks from `I18n.fallbacks`.
|
102
|
-
|
103
|
-
You can override the default fallback strategy with a parameter passed to the reader: `post.title(fallback: :any)`.
|
104
|
-
|
105
|
-
If you need to declare the default locale fallback, do `post.title(fallback: :default)`.
|
106
|
-
|
107
|
-
|
108
|
-
### Overriding methods
|
109
|
-
|
110
|
-
Methods are defined in an included module, so you can just override them and call Traco's implementation with `super`:
|
111
|
-
|
112
|
-
```ruby
|
113
|
-
class Post < ActiveRecord::Base
|
114
|
-
translates :title
|
115
|
-
|
116
|
-
def title
|
117
|
-
super.reverse
|
118
|
-
end
|
119
|
-
end
|
120
|
-
```
|
121
|
-
|
122
|
-
## Installation
|
123
|
-
|
124
|
-
Add this to your `Gemfile`:
|
125
|
-
|
126
|
-
```ruby
|
127
|
-
gem "traco"
|
128
|
-
```
|
129
|
-
|
130
|
-
Then run
|
131
|
-
|
132
|
-
bundle
|
133
|
-
|
134
|
-
to install it.
|
135
|
-
|
136
|
-
|
137
|
-
## Running the tests
|
138
|
-
|
139
|
-
bundle
|
140
|
-
rake
|
141
|
-
|
142
|
-
|
143
|
-
## Benchmark
|
144
|
-
|
145
|
-
ruby benchmarks/overhead.rb
|
146
|
-
|
147
|
-
|
148
|
-
<!-- Keeping this a hidden brain dump for now.
|
149
|
-
|
150
|
-
## TODO
|
151
|
-
|
152
|
-
We've intentionally kept this simple with no features we do not need.
|
153
|
-
We'd be happy to merge additional features that others contribute.
|
154
|
-
|
155
|
-
Possible improvements to make:
|
156
|
-
|
157
|
-
* Validation that checks that at least one translation for a column exists.
|
158
|
-
* Validation that checks that every translation for a column exists.
|
159
|
-
* Scopes like `translated`, `translated_to(locale)`.
|
160
|
-
* Support for region locales, like `en-US` and `en-GB`.
|
161
|
-
|
162
|
-
-->
|
163
|
-
|
164
|
-
## Contributors
|
165
|
-
|
166
|
-
* [Henrik Nyh](http://henrik.nyh.se)
|
167
|
-
* Andrii Malyshko
|
168
|
-
* Tobias Bohwalli
|
169
|
-
* Mario Alberto Chavez
|
170
|
-
* Philip Arndt
|
171
|
-
* [PikachuEXE](https://github.com/PikachuEXE)
|
172
|
-
* Fernando Morgenstern
|
173
|
-
* Tomáš Horáček
|
174
|
-
* Joakim Kolsjö
|
175
|
-
|
176
|
-
## License
|
177
|
-
|
178
|
-
[MIT](LICENSE.txt)
|
data/Rakefile
DELETED
data/benchmarks/overhead.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
# This benchmark tests how fast a Traco-wrapped attribute is
|
2
|
-
# compared to the plain Active Record attribute.
|
3
|
-
|
4
|
-
require "bundler/setup"
|
5
|
-
require "benchmark/ips"
|
6
|
-
require "active_record"
|
7
|
-
require "traco"
|
8
|
-
|
9
|
-
ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
|
10
|
-
|
11
|
-
I18n.enforce_available_locales = false
|
12
|
-
I18n.available_locales = [ :en, :de, :sv ]
|
13
|
-
I18n.default_locale = :en
|
14
|
-
I18n.locale = :sv
|
15
|
-
|
16
|
-
COLUMNS = %w(title body long_title seo_title)
|
17
|
-
|
18
|
-
silence_stream(STDOUT) do
|
19
|
-
ActiveRecord::Schema.define(version: 0) do
|
20
|
-
create_table :posts, force: true do |t|
|
21
|
-
I18n.available_locales.each do |locale|
|
22
|
-
COLUMNS.each do |column|
|
23
|
-
t.string "#{column}_#{locale}"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
class Post < ActiveRecord::Base
|
31
|
-
translates *COLUMNS
|
32
|
-
end
|
33
|
-
|
34
|
-
post = Post.new(title_en: "hello", title_sv: "Hej")
|
35
|
-
|
36
|
-
Benchmark.ips do |x|
|
37
|
-
x.report("activerecord") { post.title_sv }
|
38
|
-
x.report("traco") { post.title }
|
39
|
-
|
40
|
-
x.compare!
|
41
|
-
end
|
data/gemfiles/rails_4.2.gemfile
DELETED
data/gemfiles/rails_5.0.gemfile
DELETED
data/gemfiles/rails_5.1.gemfile
DELETED
data/gemfiles/rails_5.2.gemfile
DELETED
data/gemfiles/rails_6.0.gemfile
DELETED
data/gemfiles/rails_6.1.gemfile
DELETED
data/traco.gemspec
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "traco/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = "traco"
|
7
|
-
s.version = Traco::VERSION
|
8
|
-
s.authors = ["Henrik Nyh"]
|
9
|
-
s.email = ["henrik@barsoom.se"]
|
10
|
-
s.homepage = ""
|
11
|
-
s.summary = "Translatable columns for Rails 4.2 or better, stored in the model table itself."
|
12
|
-
s.license = "MIT"
|
13
|
-
|
14
|
-
s.files = `git ls-files`.split("\n")
|
15
|
-
s.test_files = `git ls-files -- spec/*`.split("\n")
|
16
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
-
s.require_paths = ["lib"]
|
18
|
-
|
19
|
-
s.required_ruby_version = ">= 2.3.0"
|
20
|
-
|
21
|
-
s.add_dependency "activerecord", ">= 4.2"
|
22
|
-
|
23
|
-
s.add_development_dependency "sqlite3"
|
24
|
-
|
25
|
-
s.add_development_dependency "rake"
|
26
|
-
s.add_development_dependency "rspec"
|
27
|
-
s.add_development_dependency "appraisal"
|
28
|
-
end
|