tolken 0.3.2 → 0.3.3

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: c6abb1a2304ac1c95305c13e313f24e2fe0de21bc77efa81f1b5ea94183f9172
4
- data.tar.gz: d59721d8326291cb0bd58687c7aaa8ed3c8a962397abe0ed8a28f9a976b32747
3
+ metadata.gz: 6ca9edbff55fb33b4a3b7b24651617ce21e325a5685767b40b6b8af5ebfa4495
4
+ data.tar.gz: 99ffc7fbc1bf05d487eeb49990235d0696862a92ab32f95905e4a50d1c996264
5
5
  SHA512:
6
- metadata.gz: fc5f626a008b3ca7185836bc50c5dd61c7a265e3fa51743b9fd37f8f22ffecd4c2c09c8d7028ce0554ca5937b41ecade85d0e0d1fb0315e652bd062b9682afe7
7
- data.tar.gz: 4e308fb87ca627aae2c5e30466bd235ee00b7b38275ba4df1b4cdda390cb98378625e1c48e61163c507e5da56b1a8c807a8a03e37d1b3660101e89922eb9c011
6
+ metadata.gz: e30f91924e847b5d3114634e9e07df5217c7c7f56229eff5af876f40adee3fc67aa7e61a5531765d48deb8b5739e7d3af1efba58b2faacd5cf57a319d53706ba
7
+ data.tar.gz: c1600601b400471050855948cb8a9fa8864647eba56bc66b633fbf41d98d9dc851a6710226865f74a3bdd6e7769858b0cd9fd5960b67010c0c9af4bb81a8e716
@@ -3,7 +3,7 @@
3
3
  require: rubocop-rspec
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 2.5
6
+ TargetRubyVersion: 2.6
7
7
  Exclude:
8
8
  - Rakefile
9
9
  - .rubocop.yml
@@ -1,7 +1,7 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.5.0
4
+ - 2.6.0
5
5
  env:
6
6
  global:
7
7
  - CC_TEST_REPORTER_ID=38cf6fe42113efd6306798c2189499f6ff9da87a92dd548e8339a1bd98d2a7e6
@@ -7,43 +7,43 @@ PATH
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actioncable (5.2.1)
11
- actionpack (= 5.2.1)
10
+ actioncable (5.2.3)
11
+ actionpack (= 5.2.3)
12
12
  nio4r (~> 2.0)
13
13
  websocket-driver (>= 0.6.1)
14
- actionmailer (5.2.1)
15
- actionpack (= 5.2.1)
16
- actionview (= 5.2.1)
17
- activejob (= 5.2.1)
14
+ actionmailer (5.2.3)
15
+ actionpack (= 5.2.3)
16
+ actionview (= 5.2.3)
17
+ activejob (= 5.2.3)
18
18
  mail (~> 2.5, >= 2.5.4)
19
19
  rails-dom-testing (~> 2.0)
20
- actionpack (5.2.1)
21
- actionview (= 5.2.1)
22
- activesupport (= 5.2.1)
20
+ actionpack (5.2.3)
21
+ actionview (= 5.2.3)
22
+ activesupport (= 5.2.3)
23
23
  rack (~> 2.0)
24
24
  rack-test (>= 0.6.3)
25
25
  rails-dom-testing (~> 2.0)
26
26
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
- actionview (5.2.1)
28
- activesupport (= 5.2.1)
27
+ actionview (5.2.3)
28
+ activesupport (= 5.2.3)
29
29
  builder (~> 3.1)
30
30
  erubi (~> 1.4)
31
31
  rails-dom-testing (~> 2.0)
32
32
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
33
- activejob (5.2.1)
34
- activesupport (= 5.2.1)
33
+ activejob (5.2.3)
34
+ activesupport (= 5.2.3)
35
35
  globalid (>= 0.3.6)
36
- activemodel (5.2.1)
37
- activesupport (= 5.2.1)
38
- activerecord (5.2.1)
39
- activemodel (= 5.2.1)
40
- activesupport (= 5.2.1)
36
+ activemodel (5.2.3)
37
+ activesupport (= 5.2.3)
38
+ activerecord (5.2.3)
39
+ activemodel (= 5.2.3)
40
+ activesupport (= 5.2.3)
41
41
  arel (>= 9.0)
42
- activestorage (5.2.1)
43
- actionpack (= 5.2.1)
44
- activerecord (= 5.2.1)
42
+ activestorage (5.2.3)
43
+ actionpack (= 5.2.3)
44
+ activerecord (= 5.2.3)
45
45
  marcel (~> 0.3.1)
46
- activesupport (5.2.1)
46
+ activesupport (5.2.3)
47
47
  concurrent-ruby (~> 1.0, >= 1.0.2)
48
48
  i18n (>= 0.7, < 2)
49
49
  minitest (~> 5.1)
@@ -52,97 +52,95 @@ GEM
52
52
  ast (2.4.0)
53
53
  builder (3.2.3)
54
54
  coderay (1.1.2)
55
- concurrent-ruby (1.0.5)
55
+ concurrent-ruby (1.1.5)
56
56
  crass (1.0.4)
57
57
  diff-lcs (1.3)
58
- docile (1.3.1)
59
- erubi (1.7.1)
60
- globalid (0.4.1)
58
+ docile (1.3.2)
59
+ erubi (1.8.0)
60
+ globalid (0.4.2)
61
61
  activesupport (>= 4.2.0)
62
- i18n (1.1.0)
62
+ i18n (1.6.0)
63
63
  concurrent-ruby (~> 1.0)
64
- jaro_winkler (1.5.1)
65
- json (2.1.0)
66
- loofah (2.2.2)
64
+ jaro_winkler (1.5.2)
65
+ json (2.2.0)
66
+ loofah (2.2.3)
67
67
  crass (~> 1.0.2)
68
68
  nokogiri (>= 1.5.9)
69
- mail (2.7.0)
69
+ mail (2.7.1)
70
70
  mini_mime (>= 0.1.1)
71
- marcel (0.3.2)
71
+ marcel (0.3.3)
72
72
  mimemagic (~> 0.3.2)
73
- method_source (0.9.0)
74
- mimemagic (0.3.2)
75
- mini_mime (1.0.0)
76
- mini_portile2 (2.3.0)
73
+ method_source (0.9.2)
74
+ mimemagic (0.3.3)
75
+ mini_mime (1.0.1)
76
+ mini_portile2 (2.4.0)
77
77
  minitest (5.11.3)
78
78
  nio4r (2.3.1)
79
- nokogiri (1.8.4)
80
- mini_portile2 (~> 2.3.0)
81
- parallel (1.12.1)
82
- parser (2.5.1.2)
79
+ nokogiri (1.10.4)
80
+ mini_portile2 (~> 2.4.0)
81
+ parallel (1.17.0)
82
+ parser (2.6.3.0)
83
83
  ast (~> 2.4.0)
84
- pg (1.0.0)
85
- powerpack (0.1.2)
86
- pry (0.11.3)
84
+ pg (1.1.4)
85
+ pry (0.12.2)
87
86
  coderay (~> 1.1.0)
88
87
  method_source (~> 0.9.0)
89
- rack (2.0.5)
88
+ rack (2.0.6)
90
89
  rack-test (1.1.0)
91
90
  rack (>= 1.0, < 3)
92
- rails (5.2.1)
93
- actioncable (= 5.2.1)
94
- actionmailer (= 5.2.1)
95
- actionpack (= 5.2.1)
96
- actionview (= 5.2.1)
97
- activejob (= 5.2.1)
98
- activemodel (= 5.2.1)
99
- activerecord (= 5.2.1)
100
- activestorage (= 5.2.1)
101
- activesupport (= 5.2.1)
91
+ rails (5.2.3)
92
+ actioncable (= 5.2.3)
93
+ actionmailer (= 5.2.3)
94
+ actionpack (= 5.2.3)
95
+ actionview (= 5.2.3)
96
+ activejob (= 5.2.3)
97
+ activemodel (= 5.2.3)
98
+ activerecord (= 5.2.3)
99
+ activestorage (= 5.2.3)
100
+ activesupport (= 5.2.3)
102
101
  bundler (>= 1.3.0)
103
- railties (= 5.2.1)
102
+ railties (= 5.2.3)
104
103
  sprockets-rails (>= 2.0.0)
105
104
  rails-dom-testing (2.0.3)
106
105
  activesupport (>= 4.2.0)
107
106
  nokogiri (>= 1.6)
108
107
  rails-html-sanitizer (1.0.4)
109
108
  loofah (~> 2.2, >= 2.2.2)
110
- railties (5.2.1)
111
- actionpack (= 5.2.1)
112
- activesupport (= 5.2.1)
109
+ railties (5.2.3)
110
+ actionpack (= 5.2.3)
111
+ activesupport (= 5.2.3)
113
112
  method_source
114
113
  rake (>= 0.8.7)
115
114
  thor (>= 0.19.0, < 2.0)
116
115
  rainbow (3.0.0)
117
- rake (12.3.1)
116
+ rake (12.3.3)
118
117
  rspec (3.8.0)
119
118
  rspec-core (~> 3.8.0)
120
119
  rspec-expectations (~> 3.8.0)
121
120
  rspec-mocks (~> 3.8.0)
122
121
  rspec-core (3.8.0)
123
122
  rspec-support (~> 3.8.0)
124
- rspec-expectations (3.8.1)
123
+ rspec-expectations (3.8.2)
125
124
  diff-lcs (>= 1.2.0, < 2.0)
126
125
  rspec-support (~> 3.8.0)
127
126
  rspec-mocks (3.8.0)
128
127
  diff-lcs (>= 1.2.0, < 2.0)
129
128
  rspec-support (~> 3.8.0)
130
129
  rspec-support (3.8.0)
131
- rubocop (0.58.2)
130
+ rubocop (0.68.1)
132
131
  jaro_winkler (~> 1.5.1)
133
132
  parallel (~> 1.10)
134
133
  parser (>= 2.5, != 2.5.1.1)
135
- powerpack (~> 0.1)
136
134
  rainbow (>= 2.2.2, < 4.0)
137
135
  ruby-progressbar (~> 1.7)
138
- unicode-display_width (~> 1.0, >= 1.0.1)
139
- rubocop-rspec (1.23.0)
140
- rubocop (>= 0.52.1)
136
+ unicode-display_width (>= 1.4.0, < 1.6)
137
+ rubocop-rspec (1.32.0)
138
+ rubocop (>= 0.60.0)
141
139
  ruby-progressbar (1.10.0)
142
- simple_form (4.0.1)
140
+ simple_form (4.1.0)
143
141
  actionpack (>= 5.0)
144
142
  activemodel (>= 5.0)
145
- simplecov (0.16.1)
143
+ simplecov (0.17.0)
146
144
  docile (~> 1.1)
147
145
  json (>= 1.8, < 3)
148
146
  simplecov-html (~> 0.10.0)
@@ -154,32 +152,32 @@ GEM
154
152
  actionpack (>= 4.0)
155
153
  activesupport (>= 4.0)
156
154
  sprockets (>= 3.0.0)
157
- thor (0.20.0)
155
+ thor (0.20.3)
158
156
  thread_safe (0.3.6)
159
157
  tzinfo (1.2.5)
160
158
  thread_safe (~> 0.1)
161
- unicode-display_width (1.4.0)
159
+ unicode-display_width (1.5.0)
162
160
  websocket-driver (0.7.0)
163
161
  websocket-extensions (>= 0.1.0)
164
162
  websocket-extensions (0.1.3)
165
- with_model (2.0.0)
166
- activerecord (>= 4.2)
163
+ with_model (2.1.2)
164
+ activerecord (>= 4.2, < 6.0)
167
165
 
168
166
  PLATFORMS
169
167
  ruby
170
168
 
171
169
  DEPENDENCIES
172
- bundler (~> 1.16)
173
- pg (~> 1.0)
174
- pry (~> 0.11)
175
- rake (~> 12.3)
176
- rspec (~> 3.0)
177
- rubocop (= 0.58.2)
178
- rubocop-rspec (~> 1.23)
179
- simple_form (~> 4.0)
180
- simplecov (~> 0.16)
170
+ bundler
171
+ pg
172
+ pry
173
+ rake
174
+ rspec
175
+ rubocop (= 0.68.1)
176
+ rubocop-rspec
177
+ simple_form
178
+ simplecov
181
179
  tolken!
182
- with_model (~> 2.0)
180
+ with_model
183
181
 
184
182
  BUNDLED WITH
185
- 1.16.1
183
+ 1.17.2
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018 Nicklas Ramhöj
3
+ Copyright (c) 2018-2019 Nicklas Ramhöj
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -164,5 +164,13 @@ To create a pull request follow these steps:
164
164
  $ git rebase master
165
165
  $ git push
166
166
 
167
+ ## Alternative solutions
168
+
169
+ * [Traco](https://github.com/barsoom/traco) - use multiple columns in the same model (Barsoom)
170
+ * [Mobility](https://github.com/shioyama/mobility) - pluggable translation framework supporting many strategies, including translatable columns, translation tables and hstore/jsonb (Chris Salzberg)
171
+ * [hstore_translate](https://github.com/cfabianski/hstore_translate) - use PostgreSQL's hstore datatype to store translations, instead of separate translation tables (Cédric Fabianski)
172
+ * [json_translate](https://github.com/cfabianski/json_translate) - use PostgreSQL's json/jsonb datatype to store translations, instead of separate translation tables (Cédric Fabianski)
173
+ * [Trasto](https://github.com/yabawock/trasto) - store translations directly in the model in a Postgres Hstore column
174
+
167
175
  ## License
168
176
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,8 @@
1
+ # https://docs.codeclimate.com/docs/advanced-configuration
2
+
3
+ ---
4
+ version: "2"
5
+ plugins:
6
+ rubocop:
7
+ enabled: true
8
+ channel: rubocop-0-62
@@ -25,6 +25,7 @@ module Tolken
25
25
  self[field_name].fetch(locale.to_s)
26
26
  rescue IndexError
27
27
  raise ArgumentError, "Invalid locale #{locale}" unless I18n.available_locales.include?(locale.to_sym)
28
+
28
29
  nil
29
30
  end
30
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tolken
4
- VERSION = "0.3.2"
4
+ VERSION = "0.3.3"
5
5
  end
@@ -26,14 +26,14 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_dependency "rails", "~> 5.2"
28
28
 
29
- spec.add_development_dependency "bundler", "~> 1.16"
30
- spec.add_development_dependency "pg", "~> 1.0"
31
- spec.add_development_dependency "pry", "~>0.11"
32
- spec.add_development_dependency "rake", "~> 12.3"
33
- spec.add_development_dependency "rspec", "~> 3.0"
34
- spec.add_development_dependency "rubocop", "= 0.58.2"
35
- spec.add_development_dependency "rubocop-rspec", "~> 1.23"
36
- spec.add_development_dependency "simple_form", "~> 4.0"
37
- spec.add_development_dependency "simplecov", "~> 0.16"
38
- spec.add_development_dependency "with_model", "~> 2.0"
29
+ spec.add_development_dependency "bundler"
30
+ spec.add_development_dependency "pg"
31
+ spec.add_development_dependency "pry"
32
+ spec.add_development_dependency "rake"
33
+ spec.add_development_dependency "rspec"
34
+ spec.add_development_dependency "rubocop", "= 0.68.1"
35
+ spec.add_development_dependency "rubocop-rspec"
36
+ spec.add_development_dependency "simple_form"
37
+ spec.add_development_dependency "simplecov"
38
+ spec.add_development_dependency "with_model"
39
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tolken
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicklas Ramhöj
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-08-10 00:00:00.000000000 Z
12
+ date: 2019-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -29,142 +29,142 @@ dependencies:
29
29
  name: bundler
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: '1.16'
34
+ version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: '1.16'
41
+ version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: pg
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '1.0'
48
+ version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '1.0'
55
+ version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: pry
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: '0.11'
62
+ version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: '0.11'
69
+ version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rake
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - "~>"
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: '12.3'
76
+ version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - "~>"
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: '12.3'
83
+ version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: rspec
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - "~>"
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
- version: '3.0'
90
+ version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - "~>"
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
- version: '3.0'
97
+ version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: rubocop
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - '='
103
103
  - !ruby/object:Gem::Version
104
- version: 0.58.2
104
+ version: 0.68.1
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - '='
110
110
  - !ruby/object:Gem::Version
111
- version: 0.58.2
111
+ version: 0.68.1
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: rubocop-rspec
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - "~>"
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
- version: '1.23'
118
+ version: '0'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - "~>"
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
- version: '1.23'
125
+ version: '0'
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: simple_form
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - "~>"
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
- version: '4.0'
132
+ version: '0'
133
133
  type: :development
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - "~>"
137
+ - - ">="
138
138
  - !ruby/object:Gem::Version
139
- version: '4.0'
139
+ version: '0'
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: simplecov
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - "~>"
144
+ - - ">="
145
145
  - !ruby/object:Gem::Version
146
- version: '0.16'
146
+ version: '0'
147
147
  type: :development
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - "~>"
151
+ - - ">="
152
152
  - !ruby/object:Gem::Version
153
- version: '0.16'
153
+ version: '0'
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: with_model
156
156
  requirement: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - "~>"
158
+ - - ">="
159
159
  - !ruby/object:Gem::Version
160
- version: '2.0'
160
+ version: '0'
161
161
  type: :development
162
162
  prerelease: false
163
163
  version_requirements: !ruby/object:Gem::Requirement
164
164
  requirements:
165
- - - "~>"
165
+ - - ">="
166
166
  - !ruby/object:Gem::Version
167
- version: '2.0'
167
+ version: '0'
168
168
  description: "\n Tolken's API is more verbose than most similar gems. The idea
169
169
  is that you should be aware of when you're dealing with\n translatable fields
170
170
  and what language you're interested in in any given moment. In tolken a translatable
@@ -187,6 +187,7 @@ files:
187
187
  - Rakefile
188
188
  - bin/console
189
189
  - bin/setup
190
+ - codeclimate.yml
190
191
  - lib/tolken.rb
191
192
  - lib/tolken/hash_serializer.rb
192
193
  - lib/tolken/simple_form.rb
@@ -212,8 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
213
  - !ruby/object:Gem::Version
213
214
  version: '0'
214
215
  requirements: []
215
- rubyforge_project:
216
- rubygems_version: 2.7.3
216
+ rubygems_version: 3.0.3
217
217
  signing_key:
218
218
  specification_version: 4
219
219
  summary: Straightforward Rails database translations using psql jsonb