friendly_fk 1.0.20 → 1.0.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64bfd86b74842b7da67dde6bcd7f0e51cf8cf1bfaaf60012d277d29e82a12891
4
- data.tar.gz: 452f186cf3b0f435dffabf4e117da82d6fd04bc15657d3876d4872374e151f46
3
+ metadata.gz: c490993692e0b679d96dc111e928b941cc0dcff1e28ac8cf9ed0b2c8a13c890a
4
+ data.tar.gz: 5c39b731f23124607a4bca796666e77d4da40689683ec426655e937d92eaad5d
5
5
  SHA512:
6
- metadata.gz: 134c5aca94866116894251c40cb95229aa90677aed89ff9dc656b39659ca6a1d03508638ceba9deb87e72547182ed2c2213161e8267b47a4343dcee63ed550b5
7
- data.tar.gz: 857bf0ad1147508aea1d2b7664fe07db110f9fa2f60cdbc2d763c8dff8f6e20a0e83b29ff36d883bca3bc14bd5bbf737c3649b6536957dd32c510c8a606d198a
6
+ metadata.gz: d25a8501d48e64a23ee829ebb50593205b14742f68f1f3f903f2d550d6ed8800851443c4cb7f6f899d51b58f6a5e6716848e2ee383daf444cf52f0ff0860bbc2
7
+ data.tar.gz: 74aa6912fb894cc5640c08dfa0fcadb453059d70b34263974e5368170b593baee0f673d2623967112dd66cd189809c593580770ffe962078c3fa90bf076b9f0d
@@ -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,87 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- friendly_fk (1.0.19)
4
+ friendly_fk (1.0.22)
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.5)
11
+ activesupport (= 7.0.5)
12
+ activerecord (7.0.5)
13
+ activemodel (= 7.0.5)
14
+ activesupport (= 7.0.5)
15
+ activesupport (7.0.5)
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.13.0)
28
28
  concurrent-ruby (~> 1.0)
29
- minitest (5.16.1)
30
- mysql2 (0.5.4)
31
- parallel (1.22.1)
32
- parser (3.1.2.0)
29
+ json (2.6.3)
30
+ minitest (5.18.0)
31
+ mysql2 (0.5.5)
32
+ parallel (1.23.0)
33
+ parser (3.2.2.1)
33
34
  ast (~> 2.4.1)
34
- pg (1.4.0)
35
- rack (2.2.3.1)
35
+ pg (1.5.3)
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.8.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.2)
46
+ rspec-support (~> 3.12.0)
47
+ rspec-expectations (3.12.3)
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.51.0)
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.28.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.1)
65
+ parser (>= 3.2.1.0)
66
+ rubocop-capybara (2.18.0)
67
+ rubocop (~> 1.41)
68
+ rubocop-factory_bot (2.23.1)
69
+ rubocop (~> 1.33)
70
+ rubocop-performance (1.18.0)
65
71
  rubocop (>= 1.7.0, < 2.0)
66
72
  rubocop-ast (>= 0.4.0)
67
- rubocop-rails (2.15.0)
73
+ rubocop-rails (2.19.1)
68
74
  activesupport (>= 4.2.0)
69
75
  rack (>= 1.1)
70
- rubocop (>= 1.7.0, < 2.0)
76
+ rubocop (>= 1.33.0, < 2.0)
71
77
  rubocop-rake (0.6.0)
72
78
  rubocop (~> 1.0)
73
- rubocop-rspec (2.11.1)
74
- rubocop (~> 1.19)
75
- ruby-progressbar (1.11.0)
76
- simplecov (0.21.2)
79
+ rubocop-rspec (2.22.0)
80
+ rubocop (~> 1.33)
81
+ rubocop-capybara (~> 2.17)
82
+ rubocop-factory_bot (~> 2.22)
83
+ ruby-progressbar (1.13.0)
84
+ simplecov (0.22.0)
77
85
  docile (~> 1.1)
78
86
  simplecov-html (~> 0.11)
79
87
  simplecov_json_formatter (~> 0.1)
@@ -81,12 +89,12 @@ GEM
81
89
  simplecov-rcov (0.3.1)
82
90
  simplecov (>= 0.4.1)
83
91
  simplecov_json_formatter (0.1.4)
84
- tzinfo (2.0.4)
92
+ tzinfo (2.0.6)
85
93
  concurrent-ruby (~> 1.0)
86
- unicode-display_width (2.1.0)
94
+ unicode-display_width (2.4.2)
87
95
 
88
96
  PLATFORMS
89
- ruby
97
+ x86_64-linux
90
98
 
91
99
  DEPENDENCIES
92
100
  bundler
@@ -105,4 +113,4 @@ DEPENDENCIES
105
113
  simplecov-rcov
106
114
 
107
115
  BUNDLED WITH
108
- 1.17.3
116
+ 2.4.12
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.22'
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.22
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-05-29 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
@@ -141,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
73
  - !ruby/object:Gem::Version
142
74
  version: '0'
143
75
  requirements: []
144
- rubygems_version: 3.3.7
76
+ rubygems_version: 3.4.12
145
77
  signing_key:
146
78
  specification_version: 4
147
79
  summary: Creates foreign keys with friendly names
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