friendly_fk 1.0.13 → 1.0.18
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/.rubocop.yml +6 -40
- data/.travis.yml +5 -5
- data/Gemfile +3 -0
- data/Gemfile.lock +72 -56
- data/README.md +4 -0
- data/friendly_fk.gemspec +1 -1
- data/lib/friendly_fk/version.rb +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bc0d9a04ccfa5de2f378a9153753d2d20018e15a143b63fca337bc61e8fb8aa7
|
|
4
|
+
data.tar.gz: 69d61fecfd41a3f43889bf1aaf55cbe31b577df0fae70548d001042b29ebf3e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e5d60f852862115072598a290412c58dd44a5d7648e72b7c2ed2941e2cfa0aebc96420c7dd4386db86e368030ad494237c5f202b154cbab11935c33e56f5685
|
|
7
|
+
data.tar.gz: d4051b183bc2c89ee2f0fd7f5a7cd7286d117477c29693098544ddda7ec997b341c1336266fcee64a7a13937101bdbab3c5cc871394586befd06ed8d65fb6871
|
data/.rubocop.yml
CHANGED
|
@@ -6,7 +6,7 @@ require:
|
|
|
6
6
|
inherit_from: .rubocop_todo.yml
|
|
7
7
|
|
|
8
8
|
AllCops:
|
|
9
|
-
TargetRubyVersion: 2.
|
|
9
|
+
TargetRubyVersion: 2.5
|
|
10
10
|
# Cop names are not d§splayed in offense messages by default. Change behavior
|
|
11
11
|
# by overriding DisplayCopNames, or by giving the -D/--display-cop-names
|
|
12
12
|
# option.
|
|
@@ -16,14 +16,12 @@ AllCops:
|
|
|
16
16
|
# -S/--display-style-guide option.
|
|
17
17
|
DisplayStyleGuide: false
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
Bundler/OrderedGems:
|
|
21
|
-
TreatCommentsAsGroupSeparators: true
|
|
22
|
-
|
|
23
|
-
Gemspec/OrderedDependencies:
|
|
24
|
-
Enabled: true
|
|
19
|
+
NewCops: enable
|
|
25
20
|
|
|
26
21
|
# Layout ######################################################################
|
|
22
|
+
Layout/LineLength:
|
|
23
|
+
Max: 120
|
|
24
|
+
|
|
27
25
|
# Checks that the closing brace in an array literal is either on the same line
|
|
28
26
|
# as the last array element, or a new line.
|
|
29
27
|
Layout/MultilineArrayBraceLayout:
|
|
@@ -112,7 +110,7 @@ Style/StringMethods:
|
|
|
112
110
|
Enabled: true
|
|
113
111
|
|
|
114
112
|
# Checks for %q/%Q when single quotes or double quotes would do.
|
|
115
|
-
Style/
|
|
113
|
+
Style/RedundantPercentQ:
|
|
116
114
|
Enabled: false
|
|
117
115
|
|
|
118
116
|
# Metrics #####################################################################
|
|
@@ -142,10 +140,6 @@ Metrics/CyclomaticComplexity:
|
|
|
142
140
|
Enabled: true
|
|
143
141
|
Max: 17
|
|
144
142
|
|
|
145
|
-
# Limit lines to 80 characters.
|
|
146
|
-
Metrics/LineLength:
|
|
147
|
-
Max: 120
|
|
148
|
-
|
|
149
143
|
# Avoid methods longer than 10 lines of code.
|
|
150
144
|
Metrics/MethodLength:
|
|
151
145
|
Max: 50
|
|
@@ -176,34 +170,6 @@ Lint/AmbiguousRegexpLiteral:
|
|
|
176
170
|
Lint/ShadowingOuterLocalVariable:
|
|
177
171
|
Enabled: false
|
|
178
172
|
|
|
179
|
-
# Performance #################################################################
|
|
180
|
-
|
|
181
|
-
# This cop identifies places where `Hash#merge!` can be replaced by
|
|
182
|
-
# `Hash#[]=`.
|
|
183
|
-
Performance/RedundantMerge:
|
|
184
|
-
Enabled: true
|
|
185
|
-
MaxKeyValuePairs: 1
|
|
186
|
-
|
|
187
|
-
# Rails #######################################################################
|
|
188
|
-
|
|
189
|
-
# Enables Rails cops.
|
|
190
|
-
Rails:
|
|
191
|
-
Enabled: true
|
|
192
|
-
|
|
193
|
-
# Enforces consistent use of action filter methods.
|
|
194
|
-
Rails/ActionFilter:
|
|
195
|
-
Enabled: true
|
|
196
|
-
EnforcedStyle: action
|
|
197
|
-
|
|
198
|
-
# Prefer has_many :through to has_and_belongs_to_many.
|
|
199
|
-
Rails/HasAndBelongsToMany:
|
|
200
|
-
Enabled: false
|
|
201
|
-
|
|
202
|
-
# This cop checks that environments called with Rails.env predicates exist.
|
|
203
|
-
Rails/UnknownEnv:
|
|
204
|
-
Enabled: true
|
|
205
|
-
Environments: development, test, production, stage
|
|
206
|
-
|
|
207
173
|
# RSpec #######################################################################
|
|
208
174
|
|
|
209
175
|
# Checks for long example.
|
data/.travis.yml
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
sudo: false
|
|
2
1
|
language: ruby
|
|
3
2
|
rvm:
|
|
4
|
-
- 2.
|
|
5
|
-
- 2.
|
|
6
|
-
- 2.
|
|
3
|
+
- 2.5.9
|
|
4
|
+
- 2.6.7
|
|
5
|
+
- 2.7.3
|
|
6
|
+
- 3.0.1
|
|
7
7
|
|
|
8
8
|
services:
|
|
9
9
|
- mysql
|
|
@@ -18,7 +18,7 @@ before_script:
|
|
|
18
18
|
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'CREATE DATABASE friendly_fk_test;' -U postgres; fi"
|
|
19
19
|
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS friendly_fk_test; CREATE DATABASE IF NOT EXISTS friendly_fk_test;'; fi"
|
|
20
20
|
|
|
21
|
-
before_install: gem install bundler -v 1.
|
|
21
|
+
before_install: gem install bundler -v 1.17.2
|
|
22
22
|
script:
|
|
23
23
|
- bundle exec rspec spec
|
|
24
24
|
- bundle exec rubocop
|
data/Gemfile
CHANGED
|
@@ -9,6 +9,9 @@ end
|
|
|
9
9
|
|
|
10
10
|
group :test do
|
|
11
11
|
gem 'rubocop', require: false
|
|
12
|
+
gem 'rubocop-performance', require: false
|
|
13
|
+
gem 'rubocop-rails', require: false
|
|
14
|
+
gem 'rubocop-rake', require: false
|
|
12
15
|
gem 'rubocop-rspec', require: false
|
|
13
16
|
gem 'simplecov', require: false
|
|
14
17
|
gem 'simplecov-rcov', require: false
|
data/Gemfile.lock
CHANGED
|
@@ -1,79 +1,92 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
friendly_fk (1.0.
|
|
4
|
+
friendly_fk (1.0.18)
|
|
5
5
|
activerecord
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activemodel (
|
|
11
|
-
activesupport (=
|
|
12
|
-
activerecord (
|
|
13
|
-
activemodel (=
|
|
14
|
-
activesupport (=
|
|
15
|
-
|
|
16
|
-
activesupport (5.2.1)
|
|
10
|
+
activemodel (6.1.3.2)
|
|
11
|
+
activesupport (= 6.1.3.2)
|
|
12
|
+
activerecord (6.1.3.2)
|
|
13
|
+
activemodel (= 6.1.3.2)
|
|
14
|
+
activesupport (= 6.1.3.2)
|
|
15
|
+
activesupport (6.1.3.2)
|
|
17
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
18
|
-
i18n (>=
|
|
19
|
-
minitest (
|
|
20
|
-
tzinfo (~>
|
|
21
|
-
|
|
22
|
-
ast (2.4.
|
|
23
|
-
concurrent-ruby (1.1.
|
|
24
|
-
diff-lcs (1.
|
|
25
|
-
docile (1.
|
|
26
|
-
fuubar (2.
|
|
17
|
+
i18n (>= 1.6, < 2)
|
|
18
|
+
minitest (>= 5.1)
|
|
19
|
+
tzinfo (~> 2.0)
|
|
20
|
+
zeitwerk (~> 2.3)
|
|
21
|
+
ast (2.4.2)
|
|
22
|
+
concurrent-ruby (1.1.8)
|
|
23
|
+
diff-lcs (1.4.4)
|
|
24
|
+
docile (1.4.0)
|
|
25
|
+
fuubar (2.5.1)
|
|
27
26
|
rspec-core (~> 3.0)
|
|
28
27
|
ruby-progressbar (~> 1.4)
|
|
29
|
-
i18n (1.
|
|
28
|
+
i18n (1.8.10)
|
|
30
29
|
concurrent-ruby (~> 1.0)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
pg (1.1.3)
|
|
39
|
-
powerpack (0.1.2)
|
|
30
|
+
minitest (5.14.4)
|
|
31
|
+
mysql2 (0.5.3)
|
|
32
|
+
parallel (1.20.1)
|
|
33
|
+
parser (3.0.1.1)
|
|
34
|
+
ast (~> 2.4.1)
|
|
35
|
+
pg (1.2.3)
|
|
36
|
+
rack (2.2.3)
|
|
40
37
|
rainbow (3.0.0)
|
|
41
|
-
rake (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
rspec-
|
|
46
|
-
|
|
47
|
-
rspec-
|
|
48
|
-
rspec-
|
|
38
|
+
rake (13.0.3)
|
|
39
|
+
regexp_parser (2.1.1)
|
|
40
|
+
rexml (3.2.5)
|
|
41
|
+
rspec (3.10.0)
|
|
42
|
+
rspec-core (~> 3.10.0)
|
|
43
|
+
rspec-expectations (~> 3.10.0)
|
|
44
|
+
rspec-mocks (~> 3.10.0)
|
|
45
|
+
rspec-core (3.10.1)
|
|
46
|
+
rspec-support (~> 3.10.0)
|
|
47
|
+
rspec-expectations (3.10.1)
|
|
49
48
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
50
|
-
rspec-support (~> 3.
|
|
51
|
-
rspec-mocks (3.
|
|
49
|
+
rspec-support (~> 3.10.0)
|
|
50
|
+
rspec-mocks (3.10.2)
|
|
52
51
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
53
|
-
rspec-support (~> 3.
|
|
54
|
-
rspec-support (3.
|
|
55
|
-
rubocop (
|
|
56
|
-
jaro_winkler (~> 1.5.1)
|
|
52
|
+
rspec-support (~> 3.10.0)
|
|
53
|
+
rspec-support (3.10.2)
|
|
54
|
+
rubocop (1.15.0)
|
|
57
55
|
parallel (~> 1.10)
|
|
58
|
-
parser (>=
|
|
59
|
-
powerpack (~> 0.1)
|
|
56
|
+
parser (>= 3.0.0.0)
|
|
60
57
|
rainbow (>= 2.2.2, < 4.0)
|
|
58
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
59
|
+
rexml
|
|
60
|
+
rubocop-ast (>= 1.5.0, < 2.0)
|
|
61
61
|
ruby-progressbar (~> 1.7)
|
|
62
|
-
unicode-display_width (
|
|
63
|
-
rubocop-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
|
63
|
+
rubocop-ast (1.5.0)
|
|
64
|
+
parser (>= 3.0.1.1)
|
|
65
|
+
rubocop-performance (1.11.3)
|
|
66
|
+
rubocop (>= 1.7.0, < 2.0)
|
|
67
|
+
rubocop-ast (>= 0.4.0)
|
|
68
|
+
rubocop-rails (2.10.1)
|
|
69
|
+
activesupport (>= 4.2.0)
|
|
70
|
+
rack (>= 1.1)
|
|
71
|
+
rubocop (>= 1.7.0, < 2.0)
|
|
72
|
+
rubocop-rake (0.5.1)
|
|
73
|
+
rubocop
|
|
74
|
+
rubocop-rspec (2.3.0)
|
|
75
|
+
rubocop (~> 1.0)
|
|
76
|
+
rubocop-ast (>= 1.1.0)
|
|
77
|
+
ruby-progressbar (1.11.0)
|
|
78
|
+
simplecov (0.21.2)
|
|
67
79
|
docile (~> 1.1)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
simplecov-html (0.
|
|
80
|
+
simplecov-html (~> 0.11)
|
|
81
|
+
simplecov_json_formatter (~> 0.1)
|
|
82
|
+
simplecov-html (0.12.3)
|
|
71
83
|
simplecov-rcov (0.2.3)
|
|
72
84
|
simplecov (>= 0.4.1)
|
|
73
|
-
|
|
74
|
-
tzinfo (
|
|
75
|
-
|
|
76
|
-
unicode-display_width (
|
|
85
|
+
simplecov_json_formatter (0.1.3)
|
|
86
|
+
tzinfo (2.0.4)
|
|
87
|
+
concurrent-ruby (~> 1.0)
|
|
88
|
+
unicode-display_width (2.0.0)
|
|
89
|
+
zeitwerk (2.4.2)
|
|
77
90
|
|
|
78
91
|
PLATFORMS
|
|
79
92
|
ruby
|
|
@@ -87,9 +100,12 @@ DEPENDENCIES
|
|
|
87
100
|
rake
|
|
88
101
|
rspec
|
|
89
102
|
rubocop
|
|
103
|
+
rubocop-performance
|
|
104
|
+
rubocop-rails
|
|
105
|
+
rubocop-rake
|
|
90
106
|
rubocop-rspec
|
|
91
107
|
simplecov
|
|
92
108
|
simplecov-rcov
|
|
93
109
|
|
|
94
110
|
BUNDLED WITH
|
|
95
|
-
1.17.
|
|
111
|
+
1.17.2
|
data/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
[](https://badge.fury.io/rb/friendly_fk)
|
|
2
|
+
[](https://travis-ci.org/marinazzio/friendly_fk)
|
|
3
|
+
[](https://codeclimate.com/github/marinazzio/friendly_fk/maintainability)
|
|
4
|
+
|
|
1
5
|
# FriendlyFk
|
|
2
6
|
|
|
3
7
|
Uses child and parent table names to give FK name by default. It doesn't use hash tail, so use it carefully, 'cause it may generate non-unique names.
|
data/friendly_fk.gemspec
CHANGED
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
'source_code_uri' => 'https://github.com/marinazzio/friendly_fk'
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
spec.required_ruby_version = '>= 2.
|
|
22
|
+
spec.required_ruby_version = '>= 2.5.9'
|
|
23
23
|
|
|
24
24
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
25
25
|
|
data/lib/friendly_fk/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: friendly_fk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.18
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Denis Kiselyov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-05-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -133,15 +133,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
133
133
|
requirements:
|
|
134
134
|
- - ">="
|
|
135
135
|
- !ruby/object:Gem::Version
|
|
136
|
-
version: 2.
|
|
136
|
+
version: 2.5.9
|
|
137
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
requirements:
|
|
139
139
|
- - ">="
|
|
140
140
|
- !ruby/object:Gem::Version
|
|
141
141
|
version: '0'
|
|
142
142
|
requirements: []
|
|
143
|
-
|
|
144
|
-
rubygems_version: 2.7.6
|
|
143
|
+
rubygems_version: 3.0.3
|
|
145
144
|
signing_key:
|
|
146
145
|
specification_version: 4
|
|
147
146
|
summary: Creates foreign keys with friendly names
|