adaptive_alias 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +70 -70
- data/.gitignore +62 -62
- data/.rubocop.yml +1227 -1227
- data/CHANGELOG.md +4 -1
- data/CODE_OF_CONDUCT.md +49 -49
- data/LICENSE +21 -21
- data/README.md +67 -46
- data/Rakefile +10 -10
- data/adaptive_alias.gemspec +44 -45
- data/bin/console +14 -14
- data/bin/setup +8 -8
- data/gemfiles/6.0.gemfile +10 -10
- data/gemfiles/6.1.gemfile +10 -10
- data/gemfiles/7.0.gemfile +11 -11
- data/lib/adaptive_alias/active_model_patches/read_attribute.rb +20 -20
- data/lib/adaptive_alias/active_model_patches/remove_alias_attribute.rb +27 -27
- data/lib/adaptive_alias/hooks/association.rb +13 -13
- data/lib/adaptive_alias/hooks/relation.rb +21 -21
- data/lib/adaptive_alias/hooks/singular_association.rb +13 -13
- data/lib/adaptive_alias/patches/{back_patch.rb → backward_patch.rb} +21 -21
- data/lib/adaptive_alias/patches/base.rb +75 -75
- data/lib/adaptive_alias/patches/forward_patch.rb +21 -21
- data/lib/adaptive_alias/version.rb +3 -3
- data/lib/adaptive_alias.rb +2 -2
- metadata +12 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30f173abecacd0433c7b31d5edc931945548ed1d0e63124fa3e77147c163e447
|
4
|
+
data.tar.gz: ee006bc1c5ac3373b9215777e54e8270ecb17634d1ea4a8a49f0ba8705a29e23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dd5ffd800e5dbc9119fdd81df25f874077cefa2ed3aea5ab5b23a1f072004316e7d28d5354a81c149a68c613120cbf294673095f606945da584a81f355ad2ae
|
7
|
+
data.tar.gz: c8d1ebd0356c16e19bb36f815049d9f53fce915ea0f04502bad1bf388e21dcc5bbb1053146783f1036d987edba9405c784ba0e0933b8fc32980b24b824ad003d
|
data/.github/workflows/ruby.yml
CHANGED
@@ -1,70 +1,70 @@
|
|
1
|
-
name: Ruby
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
paths-ignore:
|
6
|
-
- 'README.md'
|
7
|
-
- 'CHANGELOG.md'
|
8
|
-
pull_request:
|
9
|
-
branches: [ master ]
|
10
|
-
paths-ignore:
|
11
|
-
- 'README.md'
|
12
|
-
- 'CHANGELOG.md'
|
13
|
-
|
14
|
-
jobs:
|
15
|
-
test:
|
16
|
-
runs-on: ubuntu-latest
|
17
|
-
name: Test
|
18
|
-
if: "contains(github.event.commits[0].message, '[ci skip]') == false"
|
19
|
-
strategy:
|
20
|
-
fail-fast: false
|
21
|
-
matrix:
|
22
|
-
db:
|
23
|
-
- mysql
|
24
|
-
ruby:
|
25
|
-
- 2.6
|
26
|
-
- 2.7
|
27
|
-
- 3.0
|
28
|
-
- 3.1
|
29
|
-
gemfile:
|
30
|
-
- 6.0.gemfile
|
31
|
-
- 6.1.gemfile
|
32
|
-
- 7.0.gemfile
|
33
|
-
exclude:
|
34
|
-
- gemfile: 7.0.gemfile
|
35
|
-
ruby: 2.6
|
36
|
-
env:
|
37
|
-
BUNDLE_GEMFILE: "gemfiles/${{ matrix.gemfile }}"
|
38
|
-
|
39
|
-
services:
|
40
|
-
mysql:
|
41
|
-
image: mysql:5.6
|
42
|
-
env:
|
43
|
-
MYSQL_ROOT_PASSWORD: root_password
|
44
|
-
MYSQL_USER: developer
|
45
|
-
MYSQL_PASSWORD: developer_password
|
46
|
-
MYSQL_DATABASE: github_actions_test
|
47
|
-
ports:
|
48
|
-
- 3306:3306
|
49
|
-
# Set health checks to wait until mysql has started
|
50
|
-
options: >-
|
51
|
-
--health-cmd "mysqladmin ping"
|
52
|
-
--health-interval 10s
|
53
|
-
--health-timeout 5s
|
54
|
-
--health-retries 3
|
55
|
-
|
56
|
-
steps:
|
57
|
-
- name: Checkout
|
58
|
-
uses: actions/checkout@v2
|
59
|
-
- name: Setup Ruby
|
60
|
-
uses: ruby/setup-ruby@v1
|
61
|
-
with:
|
62
|
-
ruby-version: ${{ matrix.ruby }}
|
63
|
-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
64
|
-
- name: Run tests
|
65
|
-
run: bundle exec rake
|
66
|
-
- name: Publish code coverage
|
67
|
-
if: ${{ success() }}
|
68
|
-
uses: paambaati/codeclimate-action@v2.7.5
|
69
|
-
env:
|
70
|
-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
paths-ignore:
|
6
|
+
- 'README.md'
|
7
|
+
- 'CHANGELOG.md'
|
8
|
+
pull_request:
|
9
|
+
branches: [ master ]
|
10
|
+
paths-ignore:
|
11
|
+
- 'README.md'
|
12
|
+
- 'CHANGELOG.md'
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
test:
|
16
|
+
runs-on: ubuntu-latest
|
17
|
+
name: Test
|
18
|
+
if: "contains(github.event.commits[0].message, '[ci skip]') == false"
|
19
|
+
strategy:
|
20
|
+
fail-fast: false
|
21
|
+
matrix:
|
22
|
+
db:
|
23
|
+
- mysql
|
24
|
+
ruby:
|
25
|
+
- 2.6
|
26
|
+
- 2.7
|
27
|
+
- 3.0
|
28
|
+
- 3.1
|
29
|
+
gemfile:
|
30
|
+
- 6.0.gemfile
|
31
|
+
- 6.1.gemfile
|
32
|
+
- 7.0.gemfile
|
33
|
+
exclude:
|
34
|
+
- gemfile: 7.0.gemfile
|
35
|
+
ruby: 2.6
|
36
|
+
env:
|
37
|
+
BUNDLE_GEMFILE: "gemfiles/${{ matrix.gemfile }}"
|
38
|
+
|
39
|
+
services:
|
40
|
+
mysql:
|
41
|
+
image: mysql:5.6
|
42
|
+
env:
|
43
|
+
MYSQL_ROOT_PASSWORD: root_password
|
44
|
+
MYSQL_USER: developer
|
45
|
+
MYSQL_PASSWORD: developer_password
|
46
|
+
MYSQL_DATABASE: github_actions_test
|
47
|
+
ports:
|
48
|
+
- 3306:3306
|
49
|
+
# Set health checks to wait until mysql has started
|
50
|
+
options: >-
|
51
|
+
--health-cmd "mysqladmin ping"
|
52
|
+
--health-interval 10s
|
53
|
+
--health-timeout 5s
|
54
|
+
--health-retries 3
|
55
|
+
|
56
|
+
steps:
|
57
|
+
- name: Checkout
|
58
|
+
uses: actions/checkout@v2
|
59
|
+
- name: Setup Ruby
|
60
|
+
uses: ruby/setup-ruby@v1
|
61
|
+
with:
|
62
|
+
ruby-version: ${{ matrix.ruby }}
|
63
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
64
|
+
- name: Run tests
|
65
|
+
run: bundle exec rake
|
66
|
+
- name: Publish code coverage
|
67
|
+
if: ${{ success() }}
|
68
|
+
uses: paambaati/codeclimate-action@v2.7.5
|
69
|
+
env:
|
70
|
+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
data/.gitignore
CHANGED
@@ -1,62 +1,62 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
/.config
|
4
|
-
/.bundle/
|
5
|
-
/.yardoc
|
6
|
-
/_yardoc/
|
7
|
-
/coverage/
|
8
|
-
/InstalledFiles
|
9
|
-
/doc/
|
10
|
-
/pkg/
|
11
|
-
/spec/reports/
|
12
|
-
/spec/examples.txt
|
13
|
-
/test/tmp/
|
14
|
-
/test/version_tmp/
|
15
|
-
/tmp/
|
16
|
-
.idea/
|
17
|
-
|
18
|
-
# Used by dotenv library to load environment variables.
|
19
|
-
# .env
|
20
|
-
|
21
|
-
# Ignore Byebug command history file.
|
22
|
-
.byebug_history
|
23
|
-
|
24
|
-
## Specific to RubyMotion:
|
25
|
-
.dat*
|
26
|
-
.repl_history
|
27
|
-
build/
|
28
|
-
*.bridgesupport
|
29
|
-
build-iPhoneOS/
|
30
|
-
build-iPhoneSimulator/
|
31
|
-
|
32
|
-
## Specific to RubyMotion (use of CocoaPods):
|
33
|
-
#
|
34
|
-
# We recommend against adding the Pods directory to your .gitignore. However
|
35
|
-
# you should judge for yourself, the pros and cons are mentioned at:
|
36
|
-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
37
|
-
#
|
38
|
-
# vendor/Pods/
|
39
|
-
|
40
|
-
## Documentation cache and generated files:
|
41
|
-
/.yardoc/
|
42
|
-
/_yardoc/
|
43
|
-
/doc/
|
44
|
-
/rdoc/
|
45
|
-
|
46
|
-
## Environment normalization:
|
47
|
-
/.bundle/
|
48
|
-
/vendor/bundle
|
49
|
-
/lib/bundler/man/
|
50
|
-
|
51
|
-
# for a library or gem, you might want to ignore these files since the code is
|
52
|
-
# intended to run in multiple environments; otherwise, check them in:
|
53
|
-
Gemfile.lock
|
54
|
-
/gemfiles/*.gemfile.lock
|
55
|
-
.ruby-version
|
56
|
-
.ruby-gemset
|
57
|
-
|
58
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
59
|
-
.rvmrc
|
60
|
-
|
61
|
-
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
62
|
-
# .rubocop-https?--*
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/.bundle/
|
5
|
+
/.yardoc
|
6
|
+
/_yardoc/
|
7
|
+
/coverage/
|
8
|
+
/InstalledFiles
|
9
|
+
/doc/
|
10
|
+
/pkg/
|
11
|
+
/spec/reports/
|
12
|
+
/spec/examples.txt
|
13
|
+
/test/tmp/
|
14
|
+
/test/version_tmp/
|
15
|
+
/tmp/
|
16
|
+
.idea/
|
17
|
+
|
18
|
+
# Used by dotenv library to load environment variables.
|
19
|
+
# .env
|
20
|
+
|
21
|
+
# Ignore Byebug command history file.
|
22
|
+
.byebug_history
|
23
|
+
|
24
|
+
## Specific to RubyMotion:
|
25
|
+
.dat*
|
26
|
+
.repl_history
|
27
|
+
build/
|
28
|
+
*.bridgesupport
|
29
|
+
build-iPhoneOS/
|
30
|
+
build-iPhoneSimulator/
|
31
|
+
|
32
|
+
## Specific to RubyMotion (use of CocoaPods):
|
33
|
+
#
|
34
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
35
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
36
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
37
|
+
#
|
38
|
+
# vendor/Pods/
|
39
|
+
|
40
|
+
## Documentation cache and generated files:
|
41
|
+
/.yardoc/
|
42
|
+
/_yardoc/
|
43
|
+
/doc/
|
44
|
+
/rdoc/
|
45
|
+
|
46
|
+
## Environment normalization:
|
47
|
+
/.bundle/
|
48
|
+
/vendor/bundle
|
49
|
+
/lib/bundler/man/
|
50
|
+
|
51
|
+
# for a library or gem, you might want to ignore these files since the code is
|
52
|
+
# intended to run in multiple environments; otherwise, check them in:
|
53
|
+
Gemfile.lock
|
54
|
+
/gemfiles/*.gemfile.lock
|
55
|
+
.ruby-version
|
56
|
+
.ruby-gemset
|
57
|
+
|
58
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
59
|
+
.rvmrc
|
60
|
+
|
61
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
62
|
+
# .rubocop-https?--*
|