safe_polymorphic 0.1.3 → 0.1.4
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 +4 -4
- data/.rubocop.yml +1 -1
- data/Gemfile +6 -6
- data/Gemfile.lock +93 -56
- data/README.md +1 -3
- data/gogrow_logo.svg +44 -0
- data/lib/safe_polymorphic/version.rb +1 -1
- data/safe_polymorphic.gemspec +2 -2
- metadata +9 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6a678b5a76f5ad4dc7a5bcd36d63c9bb5665a0680566346628a8ff6cc9a44bb5
|
|
4
|
+
data.tar.gz: 5bfcd6dac5b7a25d4be30c87d6571c79a61d3d3b0b834feab0adc07b0b51e631
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f53936eae5e5c8ffdc1b305d7ba8974b4eafea7f104075532079c5ca8f3fb1bda99b937819aee3bc25609ad77f751874ff18227a8e621a78afa42c762a70969a
|
|
7
|
+
data.tar.gz: c7dc9e1abf1f92ad5ef2b57c60dfbc1e9b6924cf34be1497c23eeaed57ccdc621add2a9ae463d161b4feef2158033835b3e5e3c3d4c08fa7da84a30a699241d8
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
|
@@ -5,9 +5,9 @@ source 'https://rubygems.org'
|
|
|
5
5
|
# Specify your gem's dependencies in safe_polymorphic.gemspec
|
|
6
6
|
gemspec
|
|
7
7
|
|
|
8
|
-
gem 'database_cleaner-active_record', '~>
|
|
9
|
-
gem 'rake', '~> 13.
|
|
10
|
-
gem 'rspec', '~> 3.
|
|
11
|
-
gem 'rubocop', '~> 1.
|
|
12
|
-
gem 'simplecov', '~> 0.
|
|
13
|
-
gem 'sqlite3', '~>
|
|
8
|
+
gem 'database_cleaner-active_record', '~> 2.2.2', require: false, group: :test
|
|
9
|
+
gem 'rake', '~> 13.3.1'
|
|
10
|
+
gem 'rspec', '~> 3.13.2'
|
|
11
|
+
gem 'rubocop', '~> 1.85.1'
|
|
12
|
+
gem 'simplecov', '~> 0.22.0', require: false, group: :test
|
|
13
|
+
gem 'sqlite3', '~> 2.9.1', require: false, group: :test
|
data/Gemfile.lock
CHANGED
|
@@ -1,78 +1,115 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
safe_polymorphic (0.1.
|
|
5
|
-
activerecord (>=
|
|
4
|
+
safe_polymorphic (0.1.4)
|
|
5
|
+
activerecord (>= 7.0, < 8.3)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activemodel (
|
|
11
|
-
activesupport (=
|
|
12
|
-
activerecord (
|
|
13
|
-
activemodel (=
|
|
14
|
-
activesupport (=
|
|
15
|
-
|
|
10
|
+
activemodel (7.1.6)
|
|
11
|
+
activesupport (= 7.1.6)
|
|
12
|
+
activerecord (7.1.6)
|
|
13
|
+
activemodel (= 7.1.6)
|
|
14
|
+
activesupport (= 7.1.6)
|
|
15
|
+
timeout (>= 0.4.0)
|
|
16
|
+
activesupport (7.1.6)
|
|
17
|
+
base64
|
|
18
|
+
benchmark (>= 0.3)
|
|
19
|
+
bigdecimal
|
|
16
20
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
21
|
+
connection_pool (>= 2.2.5)
|
|
22
|
+
drb
|
|
17
23
|
i18n (>= 1.6, < 2)
|
|
24
|
+
logger (>= 1.4.2)
|
|
18
25
|
minitest (>= 5.1)
|
|
26
|
+
mutex_m
|
|
27
|
+
securerandom (>= 0.3)
|
|
19
28
|
tzinfo (~> 2.0)
|
|
20
|
-
|
|
21
|
-
|
|
29
|
+
addressable (2.8.9)
|
|
30
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
31
|
+
ast (2.4.3)
|
|
32
|
+
base64 (0.3.0)
|
|
33
|
+
benchmark (0.5.0)
|
|
34
|
+
bigdecimal (4.0.1)
|
|
22
35
|
concurrent-ruby (1.1.10)
|
|
23
|
-
|
|
24
|
-
database_cleaner-active_record (
|
|
25
|
-
activerecord
|
|
26
|
-
database_cleaner (~>
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
connection_pool (3.0.2)
|
|
37
|
+
database_cleaner-active_record (2.2.2)
|
|
38
|
+
activerecord (>= 5.a)
|
|
39
|
+
database_cleaner-core (~> 2.0)
|
|
40
|
+
database_cleaner-core (2.0.1)
|
|
41
|
+
diff-lcs (1.6.2)
|
|
42
|
+
docile (1.4.1)
|
|
43
|
+
drb (2.2.3)
|
|
29
44
|
i18n (1.12.0)
|
|
30
45
|
concurrent-ruby (~> 1.0)
|
|
31
|
-
json (2.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
46
|
+
json (2.19.1)
|
|
47
|
+
json-schema (6.2.0)
|
|
48
|
+
addressable (~> 2.8)
|
|
49
|
+
bigdecimal (>= 3.1, < 5)
|
|
50
|
+
language_server-protocol (3.17.0.5)
|
|
51
|
+
lint_roller (1.1.0)
|
|
52
|
+
logger (1.7.0)
|
|
53
|
+
mcp (0.8.0)
|
|
54
|
+
json-schema (>= 4.1)
|
|
55
|
+
minitest (6.0.2)
|
|
56
|
+
drb (~> 2.0)
|
|
57
|
+
prism (~> 1.5)
|
|
58
|
+
mutex_m (0.3.0)
|
|
59
|
+
parallel (1.27.0)
|
|
60
|
+
parser (3.3.10.2)
|
|
35
61
|
ast (~> 2.4.1)
|
|
62
|
+
racc
|
|
63
|
+
prism (1.9.0)
|
|
64
|
+
public_suffix (7.0.5)
|
|
65
|
+
racc (1.8.1)
|
|
36
66
|
rainbow (3.1.1)
|
|
37
|
-
rake (13.
|
|
38
|
-
regexp_parser (2.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
rspec-
|
|
42
|
-
rspec-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
rspec-expectations (3.12.1)
|
|
67
|
+
rake (13.3.1)
|
|
68
|
+
regexp_parser (2.11.3)
|
|
69
|
+
rspec (3.13.2)
|
|
70
|
+
rspec-core (~> 3.13.0)
|
|
71
|
+
rspec-expectations (~> 3.13.0)
|
|
72
|
+
rspec-mocks (~> 3.13.0)
|
|
73
|
+
rspec-core (3.13.6)
|
|
74
|
+
rspec-support (~> 3.13.0)
|
|
75
|
+
rspec-expectations (3.13.5)
|
|
47
76
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
48
|
-
rspec-support (~> 3.
|
|
49
|
-
rspec-mocks (3.
|
|
77
|
+
rspec-support (~> 3.13.0)
|
|
78
|
+
rspec-mocks (3.13.8)
|
|
50
79
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
51
|
-
rspec-support (~> 3.
|
|
52
|
-
rspec-support (3.
|
|
53
|
-
rubocop (1.
|
|
80
|
+
rspec-support (~> 3.13.0)
|
|
81
|
+
rspec-support (3.13.7)
|
|
82
|
+
rubocop (1.85.1)
|
|
54
83
|
json (~> 2.3)
|
|
84
|
+
language_server-protocol (~> 3.17.0.2)
|
|
85
|
+
lint_roller (~> 1.1.0)
|
|
86
|
+
mcp (~> 0.6)
|
|
55
87
|
parallel (~> 1.10)
|
|
56
|
-
parser (>= 3.
|
|
88
|
+
parser (>= 3.3.0.2)
|
|
57
89
|
rainbow (>= 2.2.2, < 4.0)
|
|
58
|
-
regexp_parser (>=
|
|
59
|
-
|
|
60
|
-
rubocop-ast (>= 1.23.0, < 2.0)
|
|
90
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
91
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
61
92
|
ruby-progressbar (~> 1.7)
|
|
62
|
-
unicode-display_width (>=
|
|
63
|
-
rubocop-ast (1.
|
|
64
|
-
parser (>= 3.
|
|
65
|
-
|
|
66
|
-
|
|
93
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
94
|
+
rubocop-ast (1.49.1)
|
|
95
|
+
parser (>= 3.3.7.2)
|
|
96
|
+
prism (~> 1.7)
|
|
97
|
+
ruby-progressbar (1.13.0)
|
|
98
|
+
securerandom (0.4.1)
|
|
99
|
+
simplecov (0.22.0)
|
|
67
100
|
docile (~> 1.1)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
simplecov-html (0.
|
|
71
|
-
|
|
101
|
+
simplecov-html (~> 0.11)
|
|
102
|
+
simplecov_json_formatter (~> 0.1)
|
|
103
|
+
simplecov-html (0.13.2)
|
|
104
|
+
simplecov_json_formatter (0.1.4)
|
|
105
|
+
sqlite3 (2.9.1-arm64-darwin)
|
|
106
|
+
sqlite3 (2.9.1-x86_64-linux-gnu)
|
|
107
|
+
timeout (0.6.1)
|
|
72
108
|
tzinfo (2.0.5)
|
|
73
109
|
concurrent-ruby (~> 1.0)
|
|
74
|
-
unicode-display_width (2.
|
|
75
|
-
|
|
110
|
+
unicode-display_width (3.2.0)
|
|
111
|
+
unicode-emoji (~> 4.1)
|
|
112
|
+
unicode-emoji (4.2.0)
|
|
76
113
|
|
|
77
114
|
PLATFORMS
|
|
78
115
|
arm64-darwin-21
|
|
@@ -80,13 +117,13 @@ PLATFORMS
|
|
|
80
117
|
x86_64-linux
|
|
81
118
|
|
|
82
119
|
DEPENDENCIES
|
|
83
|
-
database_cleaner-active_record (~>
|
|
84
|
-
rake (~> 13.
|
|
85
|
-
rspec (~> 3.
|
|
86
|
-
rubocop (~> 1.
|
|
120
|
+
database_cleaner-active_record (~> 2.2.2)
|
|
121
|
+
rake (~> 13.3.1)
|
|
122
|
+
rspec (~> 3.13.2)
|
|
123
|
+
rubocop (~> 1.85.1)
|
|
87
124
|
safe_polymorphic!
|
|
88
|
-
simplecov (~> 0.
|
|
89
|
-
sqlite3 (~>
|
|
125
|
+
simplecov (~> 0.22.0)
|
|
126
|
+
sqlite3 (~> 2.9.1)
|
|
90
127
|
|
|
91
128
|
BUNDLED WITH
|
|
92
129
|
2.4.1
|
data/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
[](https://badge.fury.io/rb/safe_polymorphic.svg)
|
|
2
2
|
[](https://github.com/gogrow-dev/safe_polymorphic/actions/workflows/main.yml)
|
|
3
|
-
[](https://codeclimate.com/github/gogrow-dev/safe_polymorphic/maintainability)
|
|
4
|
-
[](https://codeclimate.com/github/gogrow-dev/safe_polymorphic/test_coverage)
|
|
5
3
|
|
|
6
4
|
# SafePolymorphic
|
|
7
5
|
|
|
@@ -16,7 +14,7 @@ An ActiveRecord extension for polymorphic associations.
|
|
|
16
14
|
* **Powerful.** It packages some helpful scopes and helper methods.
|
|
17
15
|
|
|
18
16
|
<a href="https://gogrow.dev/?utm_source=github&utm_content=safe_polymorphic">
|
|
19
|
-
<img src="
|
|
17
|
+
<img src="./gogrow_logo.svg" alt="Built by GoGrow" width="230"></a>
|
|
20
18
|
|
|
21
19
|
|
|
22
20
|
> Credits: [Improve ActiveRecord Polymorphic Associations](https://blog.rstankov.com/allowed-class-names-in-activerecord-polymorphic-associations/).
|
data/gogrow_logo.svg
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<svg width="170" height="28" viewBox="0 0 170 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M30.321 7.26187L26.3803 8.67045L17.2815 3.82185L7.74309 7.22523L13.0924 10.0709L15.8933 9.06126L13.2838 7.65676L17.2286 6.23597L23.6934 9.63528L12.9499 13.4783L0 6.65122L17.3548 0.381836L30.321 7.26187Z" fill="url(#paint0_linear_1617_3649)"/>
|
|
3
|
+
<path d="M30.5541 7.90527L26.6133 9.31792L22.6563 18.8401L13.1219 22.2597L15.4506 16.6661L18.2555 15.6687L17.1319 18.4126L21.0849 17.004L23.9264 10.2787L13.183 14.1217L7.50391 27.6172L24.8953 21.4536L30.5541 7.90527Z" fill="url(#paint1_linear_1617_3649)"/>
|
|
4
|
+
<path d="M91.9562 24.2479C90.6507 24.2597 89.3576 23.9947 88.162 23.4703C87.0017 22.9617 85.9562 22.2236 85.0884 21.3005C84.2017 20.3551 83.5027 19.2499 83.0285 18.0436C82.5269 16.754 82.2755 15.3807 82.2875 13.997C82.2793 12.6548 82.5152 11.3223 82.9837 10.0644C83.4317 8.86001 84.1091 7.75396 84.9785 6.80761C85.8616 5.85326 86.935 5.09466 88.1294 4.58075C89.4337 4.02478 90.8398 3.74745 92.2575 3.76655C94.0261 3.77091 95.773 4.15694 97.3788 4.89829C98.1605 5.25397 98.8926 5.70967 99.5568 6.25395L97.7371 9.25836C97.0081 8.58828 96.1489 8.07553 95.213 7.75208C94.2799 7.406 93.2934 7.22552 92.2982 7.21878C91.4402 7.20173 90.5887 7.37119 89.8026 7.71544C89.0953 8.03628 88.4703 8.51377 87.9747 9.11181C87.4695 9.73383 87.0881 10.4469 86.8511 11.2125C86.589 12.0586 86.4599 12.9403 86.4685 13.8261C86.4555 14.7772 86.6013 15.7238 86.9 16.6269C87.1602 17.4181 87.5677 18.1529 88.1009 18.7927C88.6003 19.3844 89.2208 19.862 89.9207 20.1931C90.6186 20.5204 91.3808 20.6873 92.1516 20.6817C92.7814 20.6831 93.4067 20.5757 93.9999 20.3641C94.5786 20.1653 95.1165 19.8632 95.5876 19.4726C96.0428 19.1022 96.4169 18.6421 96.6867 18.121C96.9605 17.5974 97.1004 17.0142 97.0938 16.4234V16.1221H91.8992V15.2468L101.031 11.99V16.1099C101.045 17.2523 100.789 18.3821 100.286 19.4074C99.7915 20.3961 99.0985 21.272 98.25 21.9803C97.3843 22.7082 96.3959 23.2761 95.3311 23.6576C94.2497 24.0516 93.1072 24.2514 91.9562 24.2479Z" fill="url(#paint2_linear_1617_3649)"/>
|
|
5
|
+
<path d="M69.9082 24.2453C68.5739 24.2565 67.2522 23.9874 66.0285 23.4555C64.8379 22.9387 63.7605 22.1932 62.8572 21.2612C60.979 19.3115 59.9297 16.7097 59.9297 14.0026C59.9297 11.2954 60.979 8.69361 62.8572 6.74393C63.7605 5.81195 64.8379 5.06641 66.0285 4.54965C67.2548 4.02841 68.5737 3.75977 69.9062 3.75977C71.2387 3.75977 72.5575 4.02841 73.7838 4.54965C74.975 5.06539 76.0526 5.81105 76.9551 6.74393C77.8659 7.68562 78.5909 8.79051 79.0924 10.0008C79.6108 11.2665 79.8723 12.6226 79.8619 13.9904C79.8825 16.6975 78.8386 19.3044 76.9551 21.249C76.0526 22.1819 74.975 22.9275 73.7838 23.4433C72.5624 23.9791 71.242 24.2523 69.9082 24.2453ZM69.9082 20.5121C70.7069 20.5212 71.4982 20.3588 72.2287 20.0358C72.9275 19.7172 73.5517 19.2554 74.0606 18.6802C74.5955 18.0762 75.01 17.3757 75.282 16.6162C75.5621 15.7741 75.6944 14.8898 75.6728 14.0026C75.6905 13.1103 75.5528 12.2218 75.2657 11.3768C74.9905 10.6274 74.5761 9.93673 74.0444 9.34125C73.2416 8.47365 72.1889 7.87711 71.0321 7.63422C69.8753 7.39134 68.6716 7.51413 67.5877 7.98559C66.8881 8.30282 66.2637 8.76487 65.7558 9.34125C65.2179 9.94296 64.803 10.6441 64.5344 11.4053C64.2487 12.2464 64.111 13.1307 64.1273 14.0189C64.111 14.907 64.2487 15.7913 64.5344 16.6325C64.803 17.3936 65.2179 18.0948 65.7558 18.6965C66.2637 19.2745 66.8898 19.7368 67.5918 20.0521C68.3182 20.3683 69.1039 20.5252 69.896 20.5121H69.9082Z" fill="url(#paint3_linear_1617_3649)"/>
|
|
6
|
+
<path d="M131.636 24.2475C130.303 24.2588 128.982 23.9897 127.76 23.4577C126.569 22.942 125.491 22.1963 124.589 21.2635C122.706 19.3178 121.661 16.712 121.678 14.0048C121.661 11.2977 122.706 8.69185 124.589 6.74617C125.491 5.81329 126.569 5.06763 127.76 4.55189C128.983 4.03302 130.299 3.76562 131.628 3.76562C132.956 3.76563 134.272 4.03302 135.495 4.55189C136.686 5.06763 137.764 5.81329 138.666 6.74617C140.549 8.69185 141.594 11.2977 141.577 14.0048C141.594 16.712 140.549 19.3178 138.666 21.2635C137.771 22.1937 136.702 22.9392 135.519 23.4577C134.295 23.9905 132.971 24.2596 131.636 24.2475ZM131.636 20.5144C132.434 20.5244 133.226 20.3619 133.956 20.0381C134.656 19.7216 135.281 19.2594 135.788 18.6824C136.323 18.0785 136.737 17.3779 137.009 16.6184C137.303 15.7787 137.449 14.8944 137.441 14.0048C137.443 13.1097 137.289 12.221 136.985 11.379C136.713 10.6195 136.298 9.91895 135.764 9.31499C135.255 8.73917 134.631 8.2772 133.932 7.95934C133.201 7.64504 132.415 7.48294 131.619 7.48294C130.824 7.48294 130.037 7.64504 129.307 7.95934C128.608 8.28693 127.987 8.75864 127.483 9.34349C126.945 9.9452 126.53 10.6464 126.262 11.4075C125.978 12.2491 125.84 13.1331 125.855 14.0211C125.84 14.9091 125.978 15.7931 126.262 16.6347C126.53 17.3958 126.945 18.097 127.483 18.6987C127.992 19.2758 128.618 19.7379 129.319 20.0544C130.046 20.3702 130.831 20.527 131.623 20.5144H131.636Z" fill="url(#paint4_linear_1617_3649)"/>
|
|
7
|
+
<path d="M148.27 23.8763L142.977 5.52006L142.57 4.13184H146.877L150.611 18.5636L154.03 6.84721L154.824 4.13184H157.731L158.101 5.39793L161.932 18.5636L165.238 5.8376L165.677 4.13184H170.001L164.301 23.8763H159.998L156.282 11.6103L153.102 22.1461L152.581 23.8763H148.27Z" fill="url(#paint5_linear_1617_3649)"/>
|
|
8
|
+
<path d="M114.009 15.9913C114.879 15.7552 115.691 15.3391 116.39 14.77C117.044 14.2307 117.56 13.5443 117.897 12.7671C118.26 11.9229 118.44 11.0113 118.426 10.0924C118.462 8.9652 118.18 7.85062 117.612 6.87632C117.059 5.98541 116.256 5.27732 115.303 4.8408C114.201 4.34236 113 4.09885 111.79 4.12837H105.057V7.22643H110.585C111.79 7.22643 112.722 7.48426 113.382 7.99992C113.708 8.26472 113.965 8.60342 114.134 8.9879C114.302 9.37237 114.377 9.79151 114.351 10.2105C114.367 10.7858 114.211 11.3528 113.903 11.8389C113.586 12.3006 113.138 12.6566 112.617 12.8607C111.967 13.1074 111.276 13.2249 110.581 13.2068H108.936V9.0991L105.057 10.524V23.8769H108.936V16.4351H109.873L115.572 23.8769H120.457L119.342 22.5131L114.009 15.9913Z" fill="url(#paint6_linear_1617_3649)"/>
|
|
9
|
+
<path d="M48.1359 24.2473C46.825 24.2619 45.5259 23.9968 44.3255 23.4698C43.1645 22.9601 42.1178 22.2222 41.2478 21.2999C40.3697 20.3526 39.679 19.2475 39.2123 18.0431C38.7074 16.7543 38.4545 15.3806 38.4673 13.9965C38.459 12.6543 38.6949 11.3217 39.1634 10.0639C39.6128 8.85923 40.2916 7.75319 41.1623 6.80706C42.0466 5.84561 43.1247 5.08249 44.3255 4.56799C45.6299 4.01271 47.0359 3.73541 48.4535 3.75379C50.2223 3.75686 51.9695 4.14296 53.5748 4.88553C54.3475 5.24493 55.07 5.70338 55.7243 6.24933L53.9087 9.25374C53.1799 8.58643 52.3223 8.07522 51.3887 7.75153C50.4553 7.40617 49.469 7.22572 48.4738 7.21823C47.6186 7.20301 46.7702 7.37241 45.9864 7.7149C45.2804 8.03588 44.6567 8.51341 44.1626 9.11126C43.6545 9.73204 43.2716 10.4454 43.0349 11.2119C42.7745 12.0584 42.6455 12.9399 42.6523 13.8255C42.6479 14.7776 42.8006 15.7239 43.1042 16.6264C43.3707 17.419 43.7851 18.1539 44.3255 18.7922C44.8197 19.3824 45.4347 19.8599 46.1289 20.1926C46.8282 20.5199 47.5918 20.6868 48.3639 20.6811C48.9937 20.6823 49.6189 20.5748 50.2122 20.3636C50.7901 20.1656 51.3268 19.8635 51.7958 19.472C52.2423 19.0983 52.6091 18.6387 52.8746 18.1204C53.1465 17.5961 53.2862 17.0134 53.2817 16.4228V16.1216H48.0871V13.1212H57.2184V16.1094C57.2333 17.2523 56.9766 18.3825 56.4693 19.4069C55.977 20.3966 55.2837 21.2729 54.4338 21.9798C53.5669 22.7059 52.5788 23.2737 51.5149 23.657C50.432 24.0509 49.2882 24.2507 48.1359 24.2473Z" fill="url(#paint7_linear_1617_3649)"/>
|
|
10
|
+
<defs>
|
|
11
|
+
<linearGradient id="paint0_linear_1617_3649" x1="8.01977e-06" y1="13.4784" x2="31.1654" y2="10.3283" gradientUnits="userSpaceOnUse">
|
|
12
|
+
<stop stop-color="#0071BC"/>
|
|
13
|
+
<stop offset="1" stop-color="#0000FF"/>
|
|
14
|
+
</linearGradient>
|
|
15
|
+
<linearGradient id="paint1_linear_1617_3649" x1="7.50391" y1="27.6174" x2="31.3758" y2="26.3986" gradientUnits="userSpaceOnUse">
|
|
16
|
+
<stop stop-color="#0071BC"/>
|
|
17
|
+
<stop offset="1" stop-color="#0000FF"/>
|
|
18
|
+
</linearGradient>
|
|
19
|
+
<linearGradient id="paint2_linear_1617_3649" x1="82.2871" y1="24.2484" x2="101.719" y2="23.4721" gradientUnits="userSpaceOnUse">
|
|
20
|
+
<stop stop-color="#0071BC"/>
|
|
21
|
+
<stop offset="1" stop-color="#0000FF"/>
|
|
22
|
+
</linearGradient>
|
|
23
|
+
<linearGradient id="paint3_linear_1617_3649" x1="59.9297" y1="24.2458" x2="80.5893" y2="23.3682" gradientUnits="userSpaceOnUse">
|
|
24
|
+
<stop stop-color="#0071BC"/>
|
|
25
|
+
<stop offset="1" stop-color="#0000FF"/>
|
|
26
|
+
</linearGradient>
|
|
27
|
+
<linearGradient id="paint4_linear_1617_3649" x1="121.678" y1="24.2481" x2="142.303" y2="23.3732" gradientUnits="userSpaceOnUse">
|
|
28
|
+
<stop stop-color="#0071BC"/>
|
|
29
|
+
<stop offset="1" stop-color="#0000FF"/>
|
|
30
|
+
</linearGradient>
|
|
31
|
+
<linearGradient id="paint5_linear_1617_3649" x1="142.57" y1="23.8765" x2="170.948" y2="22.1552" gradientUnits="userSpaceOnUse">
|
|
32
|
+
<stop stop-color="#0071BC"/>
|
|
33
|
+
<stop offset="1" stop-color="#0000FF"/>
|
|
34
|
+
</linearGradient>
|
|
35
|
+
<linearGradient id="paint6_linear_1617_3649" x1="105.057" y1="23.8771" x2="121.029" y2="23.3333" gradientUnits="userSpaceOnUse">
|
|
36
|
+
<stop stop-color="#0071BC"/>
|
|
37
|
+
<stop offset="1" stop-color="#0000FF"/>
|
|
38
|
+
</linearGradient>
|
|
39
|
+
<linearGradient id="paint7_linear_1617_3649" x1="38.4668" y1="24.2481" x2="57.9072" y2="23.4715" gradientUnits="userSpaceOnUse">
|
|
40
|
+
<stop stop-color="#0071BC"/>
|
|
41
|
+
<stop offset="1" stop-color="#0000FF"/>
|
|
42
|
+
</linearGradient>
|
|
43
|
+
</defs>
|
|
44
|
+
</svg>
|
data/safe_polymorphic.gemspec
CHANGED
|
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
|
13
13
|
spec.description = 'ActiveRecord extension which allows us to safely use polymorphic associations, by validating' \
|
|
14
14
|
'which classes are allowed to be related to, while also adding scopes and helper methods.'
|
|
15
15
|
spec.homepage = 'https://github.com/gogrow-dev/safe_polymorphic'
|
|
16
|
-
spec.required_ruby_version = '>= 2.
|
|
16
|
+
spec.required_ruby_version = '>= 3.2.0'
|
|
17
17
|
|
|
18
18
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
19
19
|
spec.metadata['source_code_uri'] = spec.homepage
|
|
@@ -31,5 +31,5 @@ Gem::Specification.new do |spec|
|
|
|
31
31
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
32
32
|
spec.require_paths = ['lib']
|
|
33
33
|
|
|
34
|
-
spec.add_dependency 'activerecord', '>=
|
|
34
|
+
spec.add_dependency 'activerecord', '>= 7.0', '< 8.3'
|
|
35
35
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: safe_polymorphic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nicolas Erlichman
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-03-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -16,20 +16,20 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '7.0'
|
|
20
20
|
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '8.
|
|
22
|
+
version: '8.3'
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
26
|
requirements:
|
|
27
27
|
- - ">="
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: '
|
|
29
|
+
version: '7.0'
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '8.
|
|
32
|
+
version: '8.3'
|
|
33
33
|
description: ActiveRecord extension which allows us to safely use polymorphic associations,
|
|
34
34
|
by validatingwhich classes are allowed to be related to, while also adding scopes
|
|
35
35
|
and helper methods.
|
|
@@ -48,6 +48,7 @@ files:
|
|
|
48
48
|
- LICENSE.md
|
|
49
49
|
- README.md
|
|
50
50
|
- Rakefile
|
|
51
|
+
- gogrow_logo.svg
|
|
51
52
|
- lib/safe_polymorphic.rb
|
|
52
53
|
- lib/safe_polymorphic/associations.rb
|
|
53
54
|
- lib/safe_polymorphic/locales/en.yml
|
|
@@ -70,14 +71,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
70
71
|
requirements:
|
|
71
72
|
- - ">="
|
|
72
73
|
- !ruby/object:Gem::Version
|
|
73
|
-
version: 2.
|
|
74
|
+
version: 3.2.0
|
|
74
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
76
|
requirements:
|
|
76
77
|
- - ">="
|
|
77
78
|
- !ruby/object:Gem::Version
|
|
78
79
|
version: '0'
|
|
79
80
|
requirements: []
|
|
80
|
-
rubygems_version: 3.
|
|
81
|
+
rubygems_version: 3.5.22
|
|
81
82
|
signing_key:
|
|
82
83
|
specification_version: 4
|
|
83
84
|
summary: Safely use polymorphic associations by validating which classes are allowed
|