friendly_fk 1.0.20 → 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: 64bfd86b74842b7da67dde6bcd7f0e51cf8cf1bfaaf60012d277d29e82a12891
4
- data.tar.gz: 452f186cf3b0f435dffabf4e117da82d6fd04bc15657d3876d4872374e151f46
3
+ metadata.gz: 170c1bf81c9d8abd50e37c748d528c88d864cb38a08582babc69a25fc1a45f1c
4
+ data.tar.gz: a2eb2b516a7474fecf3fcee8cdde29f126e083ff5b03cb80a86cd4125cadcc28
5
5
  SHA512:
6
- metadata.gz: 134c5aca94866116894251c40cb95229aa90677aed89ff9dc656b39659ca6a1d03508638ceba9deb87e72547182ed2c2213161e8267b47a4343dcee63ed550b5
7
- data.tar.gz: 857bf0ad1147508aea1d2b7664fe07db110f9fa2f60cdbc2d763c8dff8f6e20a0e83b29ff36d883bca3bc14bd5bbf737c3649b6536957dd32c510c8a606d198a
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,6 +1,7 @@
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
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,79 +1,84 @@
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 (7.0.3)
11
- activesupport (= 7.0.3)
12
- activerecord (7.0.3)
13
- activemodel (= 7.0.3)
14
- activesupport (= 7.0.3)
15
- activesupport (7.0.3)
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
20
  ast (2.4.2)
21
- concurrent-ruby (1.1.10)
21
+ concurrent-ruby (1.2.2)
22
22
  diff-lcs (1.5.0)
23
23
  docile (1.4.0)
24
24
  fuubar (2.5.1)
25
25
  rspec-core (~> 3.0)
26
26
  ruby-progressbar (~> 1.4)
27
- i18n (1.10.0)
27
+ i18n (1.12.0)
28
28
  concurrent-ruby (~> 1.0)
29
- minitest (5.16.1)
30
- mysql2 (0.5.4)
29
+ json (2.6.3)
30
+ minitest (5.18.0)
31
+ mysql2 (0.5.5)
31
32
  parallel (1.22.1)
32
- parser (3.1.2.0)
33
+ parser (3.2.2.0)
33
34
  ast (~> 2.4.1)
34
- pg (1.4.0)
35
- rack (2.2.3.1)
35
+ pg (1.4.6)
36
+ rack (3.0.7)
36
37
  rainbow (3.1.1)
37
38
  rake (13.0.6)
38
- regexp_parser (2.5.0)
39
+ regexp_parser (2.7.0)
39
40
  rexml (3.2.5)
40
- rspec (3.11.0)
41
- rspec-core (~> 3.11.0)
42
- rspec-expectations (~> 3.11.0)
43
- rspec-mocks (~> 3.11.0)
44
- rspec-core (3.11.0)
45
- rspec-support (~> 3.11.0)
46
- rspec-expectations (3.11.0)
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)
47
48
  diff-lcs (>= 1.2.0, < 2.0)
48
- rspec-support (~> 3.11.0)
49
- rspec-mocks (3.11.1)
49
+ rspec-support (~> 3.12.0)
50
+ rspec-mocks (3.12.5)
50
51
  diff-lcs (>= 1.2.0, < 2.0)
51
- rspec-support (~> 3.11.0)
52
- rspec-support (3.11.0)
53
- rubocop (1.30.1)
52
+ rspec-support (~> 3.12.0)
53
+ rspec-support (3.12.0)
54
+ rubocop (1.48.1)
55
+ json (~> 2.3)
54
56
  parallel (~> 1.10)
55
- parser (>= 3.1.0.0)
57
+ parser (>= 3.2.0.0)
56
58
  rainbow (>= 2.2.2, < 4.0)
57
59
  regexp_parser (>= 1.8, < 3.0)
58
60
  rexml (>= 3.2.5, < 4.0)
59
- rubocop-ast (>= 1.18.0, < 2.0)
61
+ rubocop-ast (>= 1.26.0, < 2.0)
60
62
  ruby-progressbar (~> 1.7)
61
- unicode-display_width (>= 1.4.0, < 3.0)
62
- rubocop-ast (1.18.0)
63
- parser (>= 3.1.1.0)
64
- rubocop-performance (1.14.2)
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)
65
69
  rubocop (>= 1.7.0, < 2.0)
66
70
  rubocop-ast (>= 0.4.0)
67
- rubocop-rails (2.15.0)
71
+ rubocop-rails (2.18.0)
68
72
  activesupport (>= 4.2.0)
69
73
  rack (>= 1.1)
70
- rubocop (>= 1.7.0, < 2.0)
74
+ rubocop (>= 1.33.0, < 2.0)
71
75
  rubocop-rake (0.6.0)
72
76
  rubocop (~> 1.0)
73
- rubocop-rspec (2.11.1)
74
- rubocop (~> 1.19)
75
- ruby-progressbar (1.11.0)
76
- 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)
77
82
  docile (~> 1.1)
78
83
  simplecov-html (~> 0.11)
79
84
  simplecov_json_formatter (~> 0.1)
@@ -81,12 +86,12 @@ GEM
81
86
  simplecov-rcov (0.3.1)
82
87
  simplecov (>= 0.4.1)
83
88
  simplecov_json_formatter (0.1.4)
84
- tzinfo (2.0.4)
89
+ tzinfo (2.0.6)
85
90
  concurrent-ruby (~> 1.0)
86
- unicode-display_width (2.1.0)
91
+ unicode-display_width (2.4.2)
87
92
 
88
93
  PLATFORMS
89
- ruby
94
+ x86_64-linux
90
95
 
91
96
  DEPENDENCIES
92
97
  bundler
@@ -105,4 +110,4 @@ DEPENDENCIES
105
110
  simplecov-rcov
106
111
 
107
112
  BUNDLED WITH
108
- 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
@@ -33,10 +33,4 @@ Gem::Specification.new do |spec|
33
33
  spec.require_paths = ['lib']
34
34
 
35
35
  spec.add_dependency 'activerecord'
36
-
37
- spec.add_development_dependency 'bundler'
38
- spec.add_development_dependency 'mysql2'
39
- spec.add_development_dependency 'pg'
40
- spec.add_development_dependency 'rake'
41
- spec.add_development_dependency 'rspec'
42
36
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module FriendlyFk
2
- VERSION = '1.0.20'.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.20
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: 2022-06-22 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
data/.travis.yml DELETED
@@ -1,24 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.6.10
4
- - 2.7.6
5
- - 3.0.4
6
- - 3.1.2
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