friendly_fk 1.0.16 → 1.0.17

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99404ee582646c13fcefb6771c11068a915fd767d70b481b71df44ccc422f1c9
4
- data.tar.gz: 2d725f8d8845509f50d51a9f2ac51dcac5b42b1cc1c49ab2a33c7dc4026ef967
3
+ metadata.gz: 838ab539f6e99512decf261bcd46680d54c45bdd7a37cf5616f3a2fbc9c2d092
4
+ data.tar.gz: 273bae285deea572053a65e9cb96afa8bdc86298da2c657f7495953ac6d64201
5
5
  SHA512:
6
- metadata.gz: 53c17aa1844ccd85b63f9c5dce6ba3837ffde6244b4a7bc08b1c7acb10b16040d019a30ef2bed0c14df231d21f76a2e689f12d99c36f709b7c85bd56e5605cd7
7
- data.tar.gz: 284bba181be3aeca9f018ed36e0c53157cb4c971fc945a70d7ba9bd9e56d71560c0579cf70ae523a770a7d7f896b0a3ffe454ecc4dabd7843c5171be78bd9090
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.8
5
- - 2.6.6
6
- - 2.7.1
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.16.6
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.15)
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.0.3.2)
11
- activesupport (= 6.0.3.2)
12
- activerecord (6.0.3.2)
13
- activemodel (= 6.0.3.2)
14
- activesupport (= 6.0.3.2)
15
- activesupport (6.0.3.2)
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 (>= 0.7, < 2)
18
- minitest (~> 5.1)
19
- tzinfo (~> 1.1)
20
- zeitwerk (~> 2.2, >= 2.2.2)
21
- ast (2.4.1)
22
- concurrent-ruby (1.1.6)
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.2)
25
- fuubar (2.5.0)
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.5)
28
+ i18n (1.8.10)
29
29
  concurrent-ruby (~> 1.0)
30
- minitest (5.14.1)
30
+ minitest (5.14.4)
31
31
  mysql2 (0.5.3)
32
- parallel (1.19.2)
33
- parser (2.7.1.4)
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.1)
38
- regexp_parser (1.7.1)
39
- rexml (3.2.4)
40
- rspec (3.9.0)
41
- rspec-core (~> 3.9.0)
42
- rspec-expectations (~> 3.9.0)
43
- rspec-mocks (~> 3.9.0)
44
- rspec-core (3.9.2)
45
- rspec-support (~> 3.9.3)
46
- rspec-expectations (3.9.2)
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.9.0)
49
- rspec-mocks (3.9.1)
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.9.0)
52
- rspec-support (3.9.3)
53
- rubocop (0.88.0)
52
+ rspec-support (~> 3.10.0)
53
+ rspec-support (3.10.2)
54
+ rubocop (1.12.1)
54
55
  parallel (~> 1.10)
55
- parser (>= 2.7.1.1)
56
+ parser (>= 3.0.0.0)
56
57
  rainbow (>= 2.2.2, < 4.0)
57
- regexp_parser (>= 1.7)
58
+ regexp_parser (>= 1.8, < 3.0)
58
59
  rexml
59
- rubocop-ast (>= 0.1.0, < 1.0)
60
+ rubocop-ast (>= 1.2.0, < 2.0)
60
61
  ruby-progressbar (~> 1.7)
61
- unicode-display_width (>= 1.4.0, < 2.0)
62
- rubocop-ast (0.2.0)
63
- parser (>= 2.7.0.1)
64
- rubocop-rspec (1.42.0)
65
- rubocop (>= 0.87.0)
66
- ruby-progressbar (1.10.1)
67
- simplecov (0.18.5)
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
- simplecov-html (0.12.2)
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
- thread_safe (0.3.6)
74
- tzinfo (1.2.7)
75
- thread_safe (~> 0.1)
76
- unicode-display_width (1.7.0)
77
- zeitwerk (2.4.0)
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.3
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.8'
22
+ spec.required_ruby_version = '>= 2.5.9'
23
23
 
24
24
  spec.metadata['allowed_push_host'] = 'https://rubygems.org'
25
25
 
@@ -1,3 +1,3 @@
1
1
  module FriendlyFk
2
- VERSION = '1.0.16'.freeze
2
+ VERSION = '1.0.17'.freeze
3
3
  end
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.16
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: 2020-07-28 00:00:00.000000000 Z
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.8
136
+ version: 2.5.9
137
137
  required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  requirements:
139
139
  - - ">="