friendly_fk 1.0.19 → 1.0.21

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: 4f02bc472ee699ce3daaf2a1081075eac957eff10f9a5a5f262dbb561c163ed0
4
- data.tar.gz: 519bf45a6946435e909692b05387f54de41d0e12771ded70f44708bb90689e09
3
+ metadata.gz: 170c1bf81c9d8abd50e37c748d528c88d864cb38a08582babc69a25fc1a45f1c
4
+ data.tar.gz: a2eb2b516a7474fecf3fcee8cdde29f126e083ff5b03cb80a86cd4125cadcc28
5
5
  SHA512:
6
- metadata.gz: 879e69157b0f9bc0d3926c3cbfe9aceba36845c72ea3458d59cb09525c702dbf0a62750413dbe2d659d76752266274c6f952a0108a8e59eac70558abd40b070b
7
- data.tar.gz: '039f57e3fd6415887c2a9ad3d74f70078fde93ba04dcf727f0e28025bfe1a60394e3e66f7d15b33afbab93f191f93d584aaa2f2579a53a1159eebcbd87f0ad6c'
6
+ metadata.gz: b1869c88e58a36c23c73dacacd07609d116972d0ee0ec07677ea90b725fa272255eb677739f9af342b16089ee30d462ed38827c93332507baffbdcf3f1c06e7e
7
+ data.tar.gz: da74ac678ccfb33fefb1eb527bc18f045b87c96dc6fee5e3e1fbb97b63427f898bc80446246ca3ce8846343c32619bb64b7f3a595efbeb0ae32c7adfa0de24c3
@@ -0,0 +1,34 @@
1
+ name: RSpec on MySQL
2
+
3
+ on:
4
+ push: {}
5
+
6
+ jobs:
7
+ rspec:
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ ruby-version: ['2.7', '3.0', '3.1', '3.2']
12
+
13
+ env:
14
+ TEST_DATABASE_URL: mysql2://root:root@localhost:3306/friendly_fk_test
15
+ DB: mysql
16
+ RAILS_ENV: test
17
+
18
+ steps:
19
+ - run: |
20
+ sudo /etc/init.d/mysql start
21
+ mysql -e 'CREATE DATABASE friendly_fk_test;' -uroot -proot
22
+ mysql -e 'SHOW DATABASES;' -uroot -proot
23
+
24
+ - name: Checkout
25
+ uses: actions/checkout@v2
26
+
27
+ - name: Setup Ruby
28
+ uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{ matrix.ruby-version }}
31
+ bundler-cache: true
32
+
33
+ - name: Run RSpec
34
+ run: bundle exec rspec spec
@@ -0,0 +1,38 @@
1
+ name: RSpec on Postgres
2
+
3
+ on:
4
+ push: {}
5
+
6
+ jobs:
7
+ rspec:
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ ruby-version: ['2.7', '3.0', '3.1', '3.2']
12
+
13
+ env:
14
+ TEST_DATABASE_URL: postgres://test_user:test_user@localhost:5432/friendly_fk_test
15
+ RAILS_ENV: test
16
+
17
+ services:
18
+ database:
19
+ image: postgres:12-alpine
20
+ env:
21
+ POSTGRES_DB: friendly_fk_test
22
+ POSTGRES_USER: test_user
23
+ POSTGRES_PASSWORD: test_user
24
+ ports:
25
+ - 5432:5432
26
+
27
+ steps:
28
+ - name: Checkout
29
+ uses: actions/checkout@v2
30
+
31
+ - name: Setup Ruby
32
+ uses: ruby/setup-ruby@v1
33
+ with:
34
+ ruby-version: ${{ matrix.ruby-version }}
35
+ bundler-cache: true
36
+
37
+ - name: Run RSpec
38
+ run: bundle exec rspec spec
@@ -0,0 +1,23 @@
1
+ name: Rubocop
2
+
3
+ on:
4
+ push: {}
5
+
6
+ jobs:
7
+ rubocop:
8
+ runs-on: ubuntu-latest
9
+ strategy:
10
+ matrix:
11
+ ruby-version: ['2.7', '3.0', '3.1', '3.2']
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v2
15
+
16
+ - name: Setup Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby-version }}
20
+ bundler-cache: true
21
+
22
+ - name: Run rubocop
23
+ run: bundle exec rubocop
data/.rubocop.yml CHANGED
@@ -1,12 +1,13 @@
1
1
  # softened a bit with http://relaxed.ruby.style/rubocop.yml
2
2
 
3
3
  require:
4
+ - rubocop-rake
4
5
  - rubocop-rspec
5
6
 
6
7
  inherit_from: .rubocop_todo.yml
7
8
 
8
9
  AllCops:
9
- TargetRubyVersion: 2.5
10
+ TargetRubyVersion: 2.6
10
11
  # Cop names are not d§splayed in offense messages by default. Change behavior
11
12
  # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
12
13
  # option.
data/Gemfile CHANGED
@@ -4,10 +4,15 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :development, :test do
7
+ gem 'bundler'
7
8
  gem 'fuubar'
9
+ gem 'rake'
8
10
  end
9
11
 
10
12
  group :test do
13
+ gem 'mysql2', require: false
14
+ gem 'pg', require: false
15
+ gem 'rspec', require: false
11
16
  gem 'rubocop', require: false
12
17
  gem 'rubocop-performance', require: false
13
18
  gem 'rubocop-rails', require: false
data/Gemfile.lock CHANGED
@@ -1,95 +1,97 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- friendly_fk (1.0.19)
4
+ friendly_fk (1.0.20)
5
5
  activerecord
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (6.1.4.1)
11
- activesupport (= 6.1.4.1)
12
- activerecord (6.1.4.1)
13
- activemodel (= 6.1.4.1)
14
- activesupport (= 6.1.4.1)
15
- activesupport (6.1.4.1)
10
+ activemodel (7.0.4.3)
11
+ activesupport (= 7.0.4.3)
12
+ activerecord (7.0.4.3)
13
+ activemodel (= 7.0.4.3)
14
+ activesupport (= 7.0.4.3)
15
+ activesupport (7.0.4.3)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 1.6, < 2)
18
18
  minitest (>= 5.1)
19
19
  tzinfo (~> 2.0)
20
- zeitwerk (~> 2.3)
21
20
  ast (2.4.2)
22
- concurrent-ruby (1.1.9)
23
- diff-lcs (1.4.4)
21
+ concurrent-ruby (1.2.2)
22
+ diff-lcs (1.5.0)
24
23
  docile (1.4.0)
25
24
  fuubar (2.5.1)
26
25
  rspec-core (~> 3.0)
27
26
  ruby-progressbar (~> 1.4)
28
- i18n (1.8.10)
27
+ i18n (1.12.0)
29
28
  concurrent-ruby (~> 1.0)
30
- minitest (5.14.4)
31
- mysql2 (0.5.3)
32
- parallel (1.20.1)
33
- parser (3.0.2.0)
29
+ json (2.6.3)
30
+ minitest (5.18.0)
31
+ mysql2 (0.5.5)
32
+ parallel (1.22.1)
33
+ parser (3.2.2.0)
34
34
  ast (~> 2.4.1)
35
- pg (1.2.3)
36
- rack (2.2.3)
37
- rainbow (3.0.0)
35
+ pg (1.4.6)
36
+ rack (3.0.7)
37
+ rainbow (3.1.1)
38
38
  rake (13.0.6)
39
- regexp_parser (2.1.1)
39
+ regexp_parser (2.7.0)
40
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)
41
+ rspec (3.12.0)
42
+ rspec-core (~> 3.12.0)
43
+ rspec-expectations (~> 3.12.0)
44
+ rspec-mocks (~> 3.12.0)
45
+ rspec-core (3.12.1)
46
+ rspec-support (~> 3.12.0)
47
+ rspec-expectations (3.12.2)
48
48
  diff-lcs (>= 1.2.0, < 2.0)
49
- rspec-support (~> 3.10.0)
50
- rspec-mocks (3.10.2)
49
+ rspec-support (~> 3.12.0)
50
+ rspec-mocks (3.12.5)
51
51
  diff-lcs (>= 1.2.0, < 2.0)
52
- rspec-support (~> 3.10.0)
53
- rspec-support (3.10.2)
54
- rubocop (1.20.0)
52
+ rspec-support (~> 3.12.0)
53
+ rspec-support (3.12.0)
54
+ rubocop (1.48.1)
55
+ json (~> 2.3)
55
56
  parallel (~> 1.10)
56
- parser (>= 3.0.0.0)
57
+ parser (>= 3.2.0.0)
57
58
  rainbow (>= 2.2.2, < 4.0)
58
59
  regexp_parser (>= 1.8, < 3.0)
59
- rexml
60
- rubocop-ast (>= 1.9.1, < 2.0)
60
+ rexml (>= 3.2.5, < 4.0)
61
+ rubocop-ast (>= 1.26.0, < 2.0)
61
62
  ruby-progressbar (~> 1.7)
62
- unicode-display_width (>= 1.4.0, < 3.0)
63
- rubocop-ast (1.11.0)
64
- parser (>= 3.0.1.1)
65
- rubocop-performance (1.11.5)
63
+ unicode-display_width (>= 2.4.0, < 3.0)
64
+ rubocop-ast (1.28.0)
65
+ parser (>= 3.2.1.0)
66
+ rubocop-capybara (2.17.1)
67
+ rubocop (~> 1.41)
68
+ rubocop-performance (1.16.0)
66
69
  rubocop (>= 1.7.0, < 2.0)
67
70
  rubocop-ast (>= 0.4.0)
68
- rubocop-rails (2.11.3)
71
+ rubocop-rails (2.18.0)
69
72
  activesupport (>= 4.2.0)
70
73
  rack (>= 1.1)
71
- rubocop (>= 1.7.0, < 2.0)
74
+ rubocop (>= 1.33.0, < 2.0)
72
75
  rubocop-rake (0.6.0)
73
76
  rubocop (~> 1.0)
74
- rubocop-rspec (2.4.0)
75
- rubocop (~> 1.0)
76
- rubocop-ast (>= 1.1.0)
77
- ruby-progressbar (1.11.0)
78
- simplecov (0.21.2)
77
+ rubocop-rspec (2.19.0)
78
+ rubocop (~> 1.33)
79
+ rubocop-capybara (~> 2.17)
80
+ ruby-progressbar (1.13.0)
81
+ simplecov (0.22.0)
79
82
  docile (~> 1.1)
80
83
  simplecov-html (~> 0.11)
81
84
  simplecov_json_formatter (~> 0.1)
82
85
  simplecov-html (0.12.3)
83
- simplecov-rcov (0.2.3)
86
+ simplecov-rcov (0.3.1)
84
87
  simplecov (>= 0.4.1)
85
- simplecov_json_formatter (0.1.3)
86
- tzinfo (2.0.4)
88
+ simplecov_json_formatter (0.1.4)
89
+ tzinfo (2.0.6)
87
90
  concurrent-ruby (~> 1.0)
88
- unicode-display_width (2.0.0)
89
- zeitwerk (2.4.2)
91
+ unicode-display_width (2.4.2)
90
92
 
91
93
  PLATFORMS
92
- ruby
94
+ x86_64-linux
93
95
 
94
96
  DEPENDENCIES
95
97
  bundler
@@ -108,4 +110,4 @@ DEPENDENCIES
108
110
  simplecov-rcov
109
111
 
110
112
  BUNDLED WITH
111
- 1.17.3
113
+ 2.3.7
data/README.md CHANGED
@@ -1,5 +1,4 @@
1
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
2
  [![Maintainability](https://api.codeclimate.com/v1/badges/73f1cc07c4bce785ee76/maintainability)](https://codeclimate.com/github/marinazzio/friendly_fk/maintainability)
4
3
 
5
4
  # FriendlyFk
data/friendly_fk.gemspec CHANGED
@@ -16,10 +16,11 @@ Gem::Specification.new do |spec|
16
16
  'bug_tracker_uri' => 'https://github.com/marinazzio/friendly_fk/issues',
17
17
  'documentation_uri' => 'https://github.com/marinazzio/friendly_fk/blob/master/README.md',
18
18
  'homepage_uri' => 'https://github.com/marinazzio/friendly_fk',
19
- 'source_code_uri' => 'https://github.com/marinazzio/friendly_fk'
19
+ 'source_code_uri' => 'https://github.com/marinazzio/friendly_fk',
20
+ 'rubygems_mfa_required' => 'true'
20
21
  }
21
22
 
22
- spec.required_ruby_version = '>= 2.5.9'
23
+ spec.required_ruby_version = '>= 2.6.0'
23
24
 
24
25
  spec.metadata['allowed_push_host'] = 'https://rubygems.org'
25
26
 
@@ -32,10 +33,4 @@ Gem::Specification.new do |spec|
32
33
  spec.require_paths = ['lib']
33
34
 
34
35
  spec.add_dependency 'activerecord'
35
-
36
- spec.add_development_dependency 'bundler'
37
- spec.add_development_dependency 'mysql2'
38
- spec.add_development_dependency 'pg'
39
- spec.add_development_dependency 'rake'
40
- spec.add_development_dependency 'rspec'
41
36
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module FriendlyFk
2
- VERSION = '1.0.19'.freeze
4
+ VERSION = '1.0.21'
3
5
  end
data/lib/friendly_fk.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'friendly_fk/version'
2
4
 
3
5
  module ActiveRecord
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.19
4
+ version: 1.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Kiselyov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-27 00:00:00.000000000 Z
11
+ date: 2023-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -24,76 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: mysql2
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: pg
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rake
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: rspec
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
27
  description: Uses parent and child table names to create FK with neat ids
98
28
  email:
99
29
  - denis.kiselyov@gmail.com
@@ -101,11 +31,13 @@ executables: []
101
31
  extensions: []
102
32
  extra_rdoc_files: []
103
33
  files:
34
+ - ".github/workflows/rspec-mysql.yml"
35
+ - ".github/workflows/rspec-pg.yml"
36
+ - ".github/workflows/rubocop.yml"
104
37
  - ".gitignore"
105
38
  - ".rspec"
106
39
  - ".rubocop.yml"
107
40
  - ".rubocop_todo.yml"
108
- - ".travis.yml"
109
41
  - Gemfile
110
42
  - Gemfile.lock
111
43
  - LICENSE
@@ -124,6 +56,7 @@ metadata:
124
56
  documentation_uri: https://github.com/marinazzio/friendly_fk/blob/master/README.md
125
57
  homepage_uri: https://github.com/marinazzio/friendly_fk
126
58
  source_code_uri: https://github.com/marinazzio/friendly_fk
59
+ rubygems_mfa_required: 'true'
127
60
  allowed_push_host: https://rubygems.org
128
61
  post_install_message:
129
62
  rdoc_options: []
@@ -133,14 +66,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
133
66
  requirements:
134
67
  - - ">="
135
68
  - !ruby/object:Gem::Version
136
- version: 2.5.9
69
+ version: 2.6.0
137
70
  required_rubygems_version: !ruby/object:Gem::Requirement
138
71
  requirements:
139
72
  - - ">="
140
73
  - !ruby/object:Gem::Version
141
74
  version: '0'
142
75
  requirements: []
143
- rubygems_version: 3.1.4
76
+ rubygems_version: 3.3.7
144
77
  signing_key:
145
78
  specification_version: 4
146
79
  summary: Creates foreign keys with friendly names
data/.travis.yml DELETED
@@ -1,24 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.5.9
4
- - 2.6.7
5
- - 2.7.3
6
- - 3.0.1
7
-
8
- services:
9
- - mysql
10
- - postgresql
11
-
12
- env:
13
- - DB=mysql
14
- - DB=postgres
15
-
16
- before_script:
17
- - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS friendly_fk_test;' -U postgres; fi"
18
- - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'CREATE DATABASE friendly_fk_test;' -U postgres; fi"
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
-
21
- before_install: gem install bundler -v 1.17.2
22
- script:
23
- - bundle exec rspec spec
24
- - bundle exec rubocop