friendly_fk 1.0.16 → 1.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +49 -0
- data/.travis.yml +5 -5
- data/Gemfile +3 -0
- data/Gemfile.lock +66 -51
- data/README.md +4 -0
- data/friendly_fk.gemspec +1 -1
- data/lib/friendly_fk/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 838ab539f6e99512decf261bcd46680d54c45bdd7a37cf5616f3a2fbc9c2d092
|
4
|
+
data.tar.gz: 273bae285deea572053a65e9cb96afa8bdc86298da2c657f7495953ac6d64201
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97048e8accbc4dc83050cd0a04d0ac4d37ea8222cb38999c3f5f246f55c5953ae0642a2671870bd8a3925f93c3b067f5a3a336acbbfde2caf189c8550e37df00
|
7
|
+
data.tar.gz: 26a03c2a7d0b13d4624c2282cf3141dcea95a77baa625fc4db3cfa65933df40d20907fde0029eb838a1b71f3865474148f81e520aa8dd660b0e24cbbfa465f24
|
data/.rubocop.yml
CHANGED
@@ -16,6 +16,8 @@ AllCops:
|
|
16
16
|
# -S/--display-style-guide option.
|
17
17
|
DisplayStyleGuide: false
|
18
18
|
|
19
|
+
NewCops: enable
|
20
|
+
|
19
21
|
# Gems in consecutive lines should be alphabetically sorted
|
20
22
|
Bundler/OrderedGems:
|
21
23
|
TreatCommentsAsGroupSeparators: true
|
@@ -77,6 +79,53 @@ Naming/VariableNumber:
|
|
77
79
|
Enabled: false
|
78
80
|
|
79
81
|
|
82
|
+
# Style #######################################################################
|
83
|
+
# Use alias_method instead of alias.
|
84
|
+
Style/Alias:
|
85
|
+
EnforcedStyle: prefer_alias_method
|
86
|
+
Enabled: true
|
87
|
+
|
88
|
+
Style/AsciiComments:
|
89
|
+
Enabled: false
|
90
|
+
StyleGuide: http://relaxed.ruby.style/#styleasciicomments
|
91
|
+
|
92
|
+
# This cop checks that comment annotation keywords are written according
|
93
|
+
# to guidelines.
|
94
|
+
Style/CommentAnnotation:
|
95
|
+
Enabled: false
|
96
|
+
|
97
|
+
# Document classes and non-namespace modules.
|
98
|
+
Style/Documentation:
|
99
|
+
Enabled: false
|
100
|
+
|
101
|
+
# Checks if there is a magic comment to enforce string literals
|
102
|
+
Style/FrozenStringLiteralComment:
|
103
|
+
Enabled: false
|
104
|
+
|
105
|
+
Style/RegexpLiteral:
|
106
|
+
EnforcedStyle: mixed
|
107
|
+
Enabled: false
|
108
|
+
|
109
|
+
# Checks for proper usage of fail and raise.
|
110
|
+
Style/SignalException:
|
111
|
+
EnforcedStyle: only_raise
|
112
|
+
Enabled: true
|
113
|
+
|
114
|
+
# Check for the usage of parentheses around stabby lambda arguments.
|
115
|
+
Style/StabbyLambdaParentheses:
|
116
|
+
EnforcedStyle: require_parentheses
|
117
|
+
Enabled: true
|
118
|
+
|
119
|
+
# Checks if configured preferred methods are used over non-preferred.
|
120
|
+
Style/StringMethods:
|
121
|
+
PreferredMethods:
|
122
|
+
intern: to_sym
|
123
|
+
Enabled: true
|
124
|
+
|
125
|
+
# Checks for %q/%Q when single quotes or double quotes would do.
|
126
|
+
Style/RedundantPercentQ:
|
127
|
+
Enabled: false
|
128
|
+
|
80
129
|
# Metrics #####################################################################
|
81
130
|
|
82
131
|
# A calculated magnitude based on number of assignments,
|
data/.travis.yml
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
sudo: false
|
2
1
|
language: ruby
|
3
2
|
rvm:
|
4
|
-
- 2.5.
|
5
|
-
- 2.6.
|
6
|
-
- 2.7.
|
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,80 +1,92 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
friendly_fk (1.0.
|
4
|
+
friendly_fk (1.0.17)
|
5
5
|
activerecord
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (6.
|
11
|
-
activesupport (= 6.
|
12
|
-
activerecord (6.
|
13
|
-
activemodel (= 6.
|
14
|
-
activesupport (= 6.
|
15
|
-
activesupport (6.
|
10
|
+
activemodel (6.1.3.1)
|
11
|
+
activesupport (= 6.1.3.1)
|
12
|
+
activerecord (6.1.3.1)
|
13
|
+
activemodel (= 6.1.3.1)
|
14
|
+
activesupport (= 6.1.3.1)
|
15
|
+
activesupport (6.1.3.1)
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
|
-
i18n (>=
|
18
|
-
minitest (
|
19
|
-
tzinfo (~>
|
20
|
-
zeitwerk (~> 2.
|
21
|
-
ast (2.4.
|
22
|
-
concurrent-ruby (1.1.
|
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
23
|
diff-lcs (1.4.4)
|
24
|
-
docile (1.3.
|
25
|
-
fuubar (2.5.
|
24
|
+
docile (1.3.5)
|
25
|
+
fuubar (2.5.1)
|
26
26
|
rspec-core (~> 3.0)
|
27
27
|
ruby-progressbar (~> 1.4)
|
28
|
-
i18n (1.8.
|
28
|
+
i18n (1.8.10)
|
29
29
|
concurrent-ruby (~> 1.0)
|
30
|
-
minitest (5.14.
|
30
|
+
minitest (5.14.4)
|
31
31
|
mysql2 (0.5.3)
|
32
|
-
parallel (1.
|
33
|
-
parser (
|
32
|
+
parallel (1.20.1)
|
33
|
+
parser (3.0.1.0)
|
34
34
|
ast (~> 2.4.1)
|
35
35
|
pg (1.2.3)
|
36
|
+
rack (2.2.3)
|
36
37
|
rainbow (3.0.0)
|
37
|
-
rake (13.0.
|
38
|
-
regexp_parser (1.
|
39
|
-
rexml (3.2.
|
40
|
-
rspec (3.
|
41
|
-
rspec-core (~> 3.
|
42
|
-
rspec-expectations (~> 3.
|
43
|
-
rspec-mocks (~> 3.
|
44
|
-
rspec-core (3.
|
45
|
-
rspec-support (~> 3.
|
46
|
-
rspec-expectations (3.
|
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)
|
47
48
|
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
-
rspec-support (~> 3.
|
49
|
-
rspec-mocks (3.
|
49
|
+
rspec-support (~> 3.10.0)
|
50
|
+
rspec-mocks (3.10.2)
|
50
51
|
diff-lcs (>= 1.2.0, < 2.0)
|
51
|
-
rspec-support (~> 3.
|
52
|
-
rspec-support (3.
|
53
|
-
rubocop (
|
52
|
+
rspec-support (~> 3.10.0)
|
53
|
+
rspec-support (3.10.2)
|
54
|
+
rubocop (1.12.1)
|
54
55
|
parallel (~> 1.10)
|
55
|
-
parser (>=
|
56
|
+
parser (>= 3.0.0.0)
|
56
57
|
rainbow (>= 2.2.2, < 4.0)
|
57
|
-
regexp_parser (>= 1.
|
58
|
+
regexp_parser (>= 1.8, < 3.0)
|
58
59
|
rexml
|
59
|
-
rubocop-ast (>=
|
60
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
60
61
|
ruby-progressbar (~> 1.7)
|
61
|
-
unicode-display_width (>= 1.4.0, <
|
62
|
-
rubocop-ast (
|
63
|
-
parser (>= 2.7.
|
64
|
-
rubocop-
|
65
|
-
rubocop (>= 0.
|
66
|
-
|
67
|
-
|
62
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
63
|
+
rubocop-ast (1.4.1)
|
64
|
+
parser (>= 2.7.1.5)
|
65
|
+
rubocop-performance (1.10.2)
|
66
|
+
rubocop (>= 0.90.0, < 2.0)
|
67
|
+
rubocop-ast (>= 0.4.0)
|
68
|
+
rubocop-rails (2.9.1)
|
69
|
+
activesupport (>= 4.2.0)
|
70
|
+
rack (>= 1.1)
|
71
|
+
rubocop (>= 0.90.0, < 2.0)
|
72
|
+
rubocop-rake (0.5.1)
|
73
|
+
rubocop
|
74
|
+
rubocop-rspec (2.2.0)
|
75
|
+
rubocop (~> 1.0)
|
76
|
+
rubocop-ast (>= 1.1.0)
|
77
|
+
ruby-progressbar (1.11.0)
|
78
|
+
simplecov (0.21.2)
|
68
79
|
docile (~> 1.1)
|
69
80
|
simplecov-html (~> 0.11)
|
70
|
-
|
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 (
|
77
|
-
zeitwerk (2.4.
|
85
|
+
simplecov_json_formatter (0.1.2)
|
86
|
+
tzinfo (2.0.4)
|
87
|
+
concurrent-ruby (~> 1.0)
|
88
|
+
unicode-display_width (2.0.0)
|
89
|
+
zeitwerk (2.4.2)
|
78
90
|
|
79
91
|
PLATFORMS
|
80
92
|
ruby
|
@@ -88,9 +100,12 @@ DEPENDENCIES
|
|
88
100
|
rake
|
89
101
|
rspec
|
90
102
|
rubocop
|
103
|
+
rubocop-performance
|
104
|
+
rubocop-rails
|
105
|
+
rubocop-rake
|
91
106
|
rubocop-rspec
|
92
107
|
simplecov
|
93
108
|
simplecov-rcov
|
94
109
|
|
95
110
|
BUNDLED WITH
|
96
|
-
1.17.
|
111
|
+
1.17.2
|
data/README.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/friendly_fk.svg)](https://badge.fury.io/rb/friendly_fk)
|
2
|
+
[![Build Status](https://travis-ci.org/marinazzio/friendly_fk.svg?branch=master)](https://travis-ci.org/marinazzio/friendly_fk)
|
3
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/73f1cc07c4bce785ee76/maintainability)](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.5.
|
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.17
|
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-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -133,7 +133,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
133
133
|
requirements:
|
134
134
|
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: 2.5.
|
136
|
+
version: 2.5.9
|
137
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
139
139
|
- - ">="
|