tolken 0.1.0 → 0.2.0

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: 4fba9918f15512180b1e6b5165de2db39b55f5e40d1f990aa940c3a5ebf3f4f3
4
- data.tar.gz: 438b87384e727fa84bfae004b6bfe2cf5835fd8ec13e05ef1ffac752271a896c
3
+ metadata.gz: b3982f597caf542d522bb931de37a824bfb4bfa7f07f79e018b49136e14dd8e3
4
+ data.tar.gz: 55ccc2f5ed3b4def93576e4433237ca3366d865d848b844ab4ce77bff4836b5a
5
5
  SHA512:
6
- metadata.gz: 4da7a01fd5f07fabc16ad2d59eb3a29dddd316cfd5b0e19ba6b3d1471ffd218074eca29e49f0fb1ee609640700b0e72b93e9b21cfdc2c39c19bde19fd49bcb24
7
- data.tar.gz: 583bb33c59af8dd984d86d3c3dd3adc790843003a746d65a3c93c0d25c699d365ece9cd9d7a988e7257d4fd0309613ffe8336a234436408c9220cc982787c9ea
6
+ metadata.gz: 61ba31f2e6211d202b888924f7d193ca2ca1ccd5b8a6cca7f988484aea10b05f0764e6380dfc7884d95d8768901111778d38982b6256149d7fafb4c69ee0766a
7
+ data.tar.gz: 074a77eaaee80949ab13957dcd22aa19ee7a415bb5d124e01b878ad2100bb311f037552d805bad25c5952513d4396733f4f75c0b77523622cc42f1b5abf7d7e0
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ *.gem
@@ -60,9 +60,6 @@ Performance/Count:
60
60
  Lint/Debugger:
61
61
  Enabled: true
62
62
 
63
- Lint/EndAlignment:
64
- EnforcedStyleAlignWith: variable
65
-
66
63
  Lint/AssignmentInCondition:
67
64
  Description: "bad: `if foo = bar` ok: `if (foo = bar)`"
68
65
  StyleGuide: "https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition"
@@ -76,20 +73,10 @@ Lint/UnusedMethodArgument:
76
73
  StyleGuide: "https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars"
77
74
  AllowUnusedKeywordArguments: false
78
75
 
79
- Lint/BlockAlignment:
80
- Enabled: true
81
-
82
76
  Lint/CircularArgumentReference:
83
77
  Description: "Don't refer to the keyword argument in the default value."
84
78
  Enabled: true
85
79
 
86
- Lint/ConditionPosition:
87
- StyleGuide: "https://github.com/bbatsov/ruby-style-guide#same-line-condition"
88
- Enabled: true
89
-
90
- Lint/DefEndAlignment:
91
- Enabled: true
92
-
93
80
  Lint/DeprecatedClassMethods:
94
81
  Enabled: true
95
82
 
@@ -163,10 +150,6 @@ Lint/UnderscorePrefixedVariableName:
163
150
  Description: "Do not use prefix `_` for a variable that is used."
164
151
  Enabled: true
165
152
 
166
- Lint/UnneededDisable:
167
- Description: "Checks for rubocop:disable comments that can be removed."
168
- Enabled: true
169
-
170
153
  Lint/UnreachableCode:
171
154
  Enabled: true
172
155
 
@@ -207,8 +190,6 @@ Metrics/ModuleLength:
207
190
 
208
191
  Metrics/MethodLength:
209
192
  Max: 25
210
- Exclude:
211
- - db/migrate/**/*.rb # mostly create table blocks
212
193
 
213
194
  Metrics/LineLength:
214
195
  Max: 125
@@ -222,11 +203,7 @@ Metrics/LineLength:
222
203
  Metrics/BlockLength:
223
204
  Enabled: true
224
205
  Exclude:
225
- - config/environments/*.rb
226
- - config/initializers/simple_form_bootstrap.rb
227
- - config/routes.rb
228
- - db/seeds.rb
229
- - bin/seed_daily_booking_mailer.rb
206
+ - tolken.gemspec
230
207
  - spec/**/*
231
208
 
232
209
  Metrics/PerceivedComplexity:
@@ -245,8 +222,6 @@ Metrics/AbcSize:
245
222
  Description: "A calculated magnitude based on number of assignments, branches, and conditions."
246
223
  Reference: "http://c2.com/cgi/wiki?AbcMetric"
247
224
  Max: 20
248
- Exclude:
249
- - db/migrate/**/*.rb # mostly create table blocks
250
225
 
251
226
  Metrics/ParameterLists:
252
227
  Description: "Avoid parameter lists longer than three or four parameters."
@@ -275,6 +250,19 @@ Naming/BinaryOperatorParameterName:
275
250
 
276
251
  # -- Layout
277
252
 
253
+ Layout/EndAlignment:
254
+ EnforcedStyleAlignWith: variable
255
+
256
+ Layout/BlockAlignment:
257
+ Enabled: true
258
+
259
+ Layout/ConditionPosition:
260
+ StyleGuide: "https://github.com/bbatsov/ruby-style-guide#same-line-condition"
261
+ Enabled: true
262
+
263
+ Layout/DefEndAlignment:
264
+ Enabled: true
265
+
278
266
  Layout/IndentArray:
279
267
  Enabled: false
280
268
  # Or the following isn't allowed
@@ -386,8 +374,6 @@ Layout/SpaceBeforeComma:
386
374
 
387
375
  Layout/LeadingCommentSpace:
388
376
  Enabled: true
389
- Exclude:
390
- - spec/teaspoon_env.rb
391
377
 
392
378
  # -- Style
393
379
 
@@ -570,7 +556,10 @@ Style/TernaryParentheses:
570
556
  Style/TrailingCommaInArguments:
571
557
  EnforcedStyleForMultiline: no_comma
572
558
 
573
- Style/TrailingCommaInLiteral:
559
+ Style/TrailingCommaInArrayLiteral:
560
+ EnforcedStyleForMultiline: no_comma
561
+
562
+ Style/TrailingCommaInHashLiteral:
574
563
  EnforcedStyleForMultiline: no_comma
575
564
 
576
565
  Style/WordArray:
@@ -581,7 +570,10 @@ Style/GuardClause:
581
570
  StyleGuide: "https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals"
582
571
  Enabled: false
583
572
 
584
- Style/MethodMissing:
573
+ Style/MethodMissingSuper:
574
+ Enabled: true
575
+
576
+ Style/MissingRespondToMissing:
585
577
  Enabled: true
586
578
 
587
579
  Style/SymbolProc:
@@ -598,8 +590,7 @@ Style/MixinUsage:
598
590
  Enabled: true
599
591
 
600
592
  Style/StderrPuts:
601
- Exclude:
602
- - bin/yarn
593
+ Enabled: true
603
594
 
604
595
  Style/BlockComments:
605
596
  Enabled: false # Just for big blocks, ok?
@@ -2,48 +2,48 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  tolken (0.1.0)
5
- rails (= 5.2.0.rc2)
5
+ rails (= 5.2.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actioncable (5.2.0.rc2)
11
- actionpack (= 5.2.0.rc2)
10
+ actioncable (5.2.1)
11
+ actionpack (= 5.2.1)
12
12
  nio4r (~> 2.0)
13
13
  websocket-driver (>= 0.6.1)
14
- actionmailer (5.2.0.rc2)
15
- actionpack (= 5.2.0.rc2)
16
- actionview (= 5.2.0.rc2)
17
- activejob (= 5.2.0.rc2)
14
+ actionmailer (5.2.1)
15
+ actionpack (= 5.2.1)
16
+ actionview (= 5.2.1)
17
+ activejob (= 5.2.1)
18
18
  mail (~> 2.5, >= 2.5.4)
19
19
  rails-dom-testing (~> 2.0)
20
- actionpack (5.2.0.rc2)
21
- actionview (= 5.2.0.rc2)
22
- activesupport (= 5.2.0.rc2)
20
+ actionpack (5.2.1)
21
+ actionview (= 5.2.1)
22
+ activesupport (= 5.2.1)
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.0.rc2)
28
- activesupport (= 5.2.0.rc2)
27
+ actionview (5.2.1)
28
+ activesupport (= 5.2.1)
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.0.rc2)
34
- activesupport (= 5.2.0.rc2)
33
+ activejob (5.2.1)
34
+ activesupport (= 5.2.1)
35
35
  globalid (>= 0.3.6)
36
- activemodel (5.2.0.rc2)
37
- activesupport (= 5.2.0.rc2)
38
- activerecord (5.2.0.rc2)
39
- activemodel (= 5.2.0.rc2)
40
- activesupport (= 5.2.0.rc2)
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)
41
41
  arel (>= 9.0)
42
- activestorage (5.2.0.rc2)
43
- actionpack (= 5.2.0.rc2)
44
- activerecord (= 5.2.0.rc2)
42
+ activestorage (5.2.1)
43
+ actionpack (= 5.2.1)
44
+ activerecord (= 5.2.1)
45
45
  marcel (~> 0.3.1)
46
- activesupport (5.2.0.rc2)
46
+ activesupport (5.2.1)
47
47
  concurrent-ruby (~> 1.0, >= 1.0.2)
48
48
  i18n (>= 0.7, < 2)
49
49
  minitest (~> 5.1)
@@ -61,6 +61,7 @@ GEM
61
61
  activesupport (>= 4.2.0)
62
62
  i18n (1.1.0)
63
63
  concurrent-ruby (~> 1.0)
64
+ jaro_winkler (1.5.1)
64
65
  json (2.1.0)
65
66
  loofah (2.2.2)
66
67
  crass (~> 1.0.2)
@@ -88,32 +89,32 @@ GEM
88
89
  rack (2.0.5)
89
90
  rack-test (1.1.0)
90
91
  rack (>= 1.0, < 3)
91
- rails (5.2.0.rc2)
92
- actioncable (= 5.2.0.rc2)
93
- actionmailer (= 5.2.0.rc2)
94
- actionpack (= 5.2.0.rc2)
95
- actionview (= 5.2.0.rc2)
96
- activejob (= 5.2.0.rc2)
97
- activemodel (= 5.2.0.rc2)
98
- activerecord (= 5.2.0.rc2)
99
- activestorage (= 5.2.0.rc2)
100
- activesupport (= 5.2.0.rc2)
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)
101
102
  bundler (>= 1.3.0)
102
- railties (= 5.2.0.rc2)
103
+ railties (= 5.2.1)
103
104
  sprockets-rails (>= 2.0.0)
104
105
  rails-dom-testing (2.0.3)
105
106
  activesupport (>= 4.2.0)
106
107
  nokogiri (>= 1.6)
107
108
  rails-html-sanitizer (1.0.4)
108
109
  loofah (~> 2.2, >= 2.2.2)
109
- railties (5.2.0.rc2)
110
- actionpack (= 5.2.0.rc2)
111
- activesupport (= 5.2.0.rc2)
110
+ railties (5.2.1)
111
+ actionpack (= 5.2.1)
112
+ activesupport (= 5.2.1)
112
113
  method_source
113
114
  rake (>= 0.8.7)
114
- thor (>= 0.18.1, < 2.0)
115
+ thor (>= 0.19.0, < 2.0)
115
116
  rainbow (3.0.0)
116
- rake (10.5.0)
117
+ rake (12.3.1)
117
118
  rspec (3.8.0)
118
119
  rspec-core (~> 3.8.0)
119
120
  rspec-expectations (~> 3.8.0)
@@ -127,9 +128,10 @@ GEM
127
128
  diff-lcs (>= 1.2.0, < 2.0)
128
129
  rspec-support (~> 3.8.0)
129
130
  rspec-support (3.8.0)
130
- rubocop (0.52.1)
131
+ rubocop (0.58.2)
132
+ jaro_winkler (~> 1.5.1)
131
133
  parallel (~> 1.10)
132
- parser (>= 2.4.0.2, < 3.0)
134
+ parser (>= 2.5, != 2.5.1.1)
133
135
  powerpack (~> 0.1)
134
136
  rainbow (>= 2.2.2, < 4.0)
135
137
  ruby-progressbar (~> 1.7)
@@ -137,7 +139,9 @@ GEM
137
139
  rubocop-rspec (1.23.0)
138
140
  rubocop (>= 0.52.1)
139
141
  ruby-progressbar (1.10.0)
140
- simple_form (1.4.1)
142
+ simple_form (4.0.1)
143
+ actionpack (>= 5.0)
144
+ activemodel (>= 5.0)
141
145
  simplecov (0.16.1)
142
146
  docile (~> 1.1)
143
147
  json (>= 1.8, < 3)
@@ -166,16 +170,16 @@ PLATFORMS
166
170
 
167
171
  DEPENDENCIES
168
172
  bundler (~> 1.16)
169
- pg
170
- pry
171
- rake (~> 10.0)
173
+ pg (~> 1.0)
174
+ pry (~> 0.11)
175
+ rake (~> 12.3)
172
176
  rspec (~> 3.0)
173
- rubocop (= 0.52.1)
174
- rubocop-rspec
175
- simple_form
176
- simplecov
177
+ rubocop (= 0.58.2)
178
+ rubocop-rspec (~> 1.23)
179
+ simple_form (~> 4.0)
180
+ simplecov (~> 0.16)
177
181
  tolken!
178
- with_model
182
+ with_model (~> 2.0)
179
183
 
180
184
  BUNDLED WITH
181
185
  1.16.1
data/README.md CHANGED
@@ -8,6 +8,7 @@ In Tolken a translatable field is just a Ruby hash which makes it easy to reason
8
8
  [![Build Status](https://travis-ci.org/varvet/tolken.svg?branch=master)](https://travis-ci.org/varvet/tolken)
9
9
  [![Maintainability](https://api.codeclimate.com/v1/badges/72c772179a8baa586f7f/maintainability)](https://codeclimate.com/github/varvet/tolken/maintainability)
10
10
  [![Test Coverage](https://api.codeclimate.com/v1/badges/72c772179a8baa586f7f/test_coverage)](https://codeclimate.com/github/varvet/tolken/test_coverage)
11
+ [![semver stability](https://api.dependabot.com/badges/compatibility_score?dependency-name=tolken&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=tolken&package-manager=bundler&version-scheme=semver)
11
12
 
12
13
  ## Installation
13
14
  Add this line to your application's Gemfile:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tolken
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -1,7 +1,6 @@
1
-
2
1
  # frozen_string_literal: true
3
2
 
4
- lib = File.expand_path("../lib", __FILE__)
3
+ lib = File.expand_path("lib", __dir__)
5
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
5
  require "tolken/version"
7
6
 
@@ -13,9 +12,11 @@ Gem::Specification.new do |spec|
13
12
 
14
13
  spec.summary = "A down-to-earth database translation Gem for Rails using psql jsonb"
15
14
  spec.description = """
16
- #{spec.summary}. Designed to be less magic than most other translation projects.
17
- Tolken's API is more verbose than most similar gems. The philosophy is that you should be aware of when you're dealing with translatable fields and what language you're interested in in any given moment. This comes from experience working with gems such as [Globalize](https://github.com/globalize/globalize), while it might fit some projects we've found that the magic that starts out as a convenience quickly becomes a liability.
18
- In Tolken a translatable field is just a Ruby hash which makes it easy to reason about. See *Usage* for details.
15
+ #{spec.summary}.
16
+ Designed to be less magic than most other translation projects. You should be aware of when you're dealing with
17
+ translatable fields and what language you're interested in at any given moment. This comes from experience working with
18
+ gems such as Globalize, while it might fit some projects we've found that the magic that starts out as a convenience
19
+ quickly becomes a liability. In Tolken a translatable field is just a Ruby hash which makes it easy to reason about.
19
20
  """
20
21
  spec.homepage = "https://github.com/varvet/tolken"
21
22
  spec.license = "MIT"
@@ -25,16 +26,16 @@ Gem::Specification.new do |spec|
25
26
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
27
  spec.require_paths = ["lib"]
27
28
 
28
- spec.add_dependency "rails", "5.2.0.rc2"
29
+ spec.add_dependency "rails", "= 5.2.1"
29
30
 
30
31
  spec.add_development_dependency "bundler", "~> 1.16"
31
32
  spec.add_development_dependency "pg", "~> 1.0"
32
33
  spec.add_development_dependency "pry", "~>0.11"
33
- spec.add_development_dependency "rake", "~> 10.0"
34
+ spec.add_development_dependency "rake", "~> 12.3"
34
35
  spec.add_development_dependency "rspec", "~> 3.0"
35
- spec.add_development_dependency "rubocop", "0.52.1"
36
+ spec.add_development_dependency "rubocop", "= 0.58.2"
36
37
  spec.add_development_dependency "rubocop-rspec", "~> 1.23"
37
- spec.add_development_dependency "simple_form", "~> 1.4"
38
- spec.add_development_dependency "with_model", "~> 2.0"
38
+ spec.add_development_dependency "simple_form", "~> 4.0"
39
39
  spec.add_development_dependency "simplecov", "~> 0.16"
40
+ spec.add_development_dependency "with_model", "~> 2.0"
40
41
  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.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicklas Ramhöj, Julia Fridberg
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 5.2.0.rc2
19
+ version: 5.2.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 5.2.0.rc2
26
+ version: 5.2.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '12.3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '10.0'
82
+ version: '12.3'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 0.52.1
103
+ version: 0.58.2
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 0.52.1
110
+ version: 0.58.2
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rubocop-rspec
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -128,50 +128,49 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '1.4'
131
+ version: '4.0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '1.4'
138
+ version: '4.0'
139
139
  - !ruby/object:Gem::Dependency
140
- name: with_model
140
+ name: simplecov
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '2.0'
145
+ version: '0.16'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '2.0'
152
+ version: '0.16'
153
153
  - !ruby/object:Gem::Dependency
154
- name: simplecov
154
+ name: with_model
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0.16'
159
+ version: '2.0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0.16'
166
+ version: '2.0'
167
167
  description: "\n A down-to-earth database translation Gem for Rails using psql
168
- jsonb. Designed to be less magic than most other translation projects.\n Tolken's
169
- API is more verbose than most similar gems. The philosophy is that you should be
170
- aware of when you're dealing with translatable fields and what language you're interested
171
- in in any given moment. This comes from experience working with gems such as [Globalize](https://github.com/globalize/globalize),
172
- while it might fit some projects we've found that the magic that starts out as a
173
- convenience quickly becomes a liability.\n In Tolken a translatable field is
174
- just a Ruby hash which makes it easy to reason about. See *Usage* for details.\n
168
+ jsonb.\n Designed to be less magic than most other translation projects. You
169
+ should be aware of when you're dealing with\n translatable fields and what language
170
+ you're interested in at any given moment. This comes from experience working with\n
171
+ \ gems such as Globalize, while it might fit some projects we've found that the
172
+ magic that starts out as a convenience\n quickly becomes a liability. In Tolken
173
+ a translatable field is just a Ruby hash which makes it easy to reason about.\n
175
174
  \ "
176
175
  email:
177
176
  - nicklas.ramhoj@varvet.com, julia.fridberg@varvet.com