polymorphic_integer_type 2.2.4 → 2.2.5

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: 71d86331b1421461b63d205d371f2194139604604850c2fca777fa03d779d5b6
4
- data.tar.gz: 051307d6d4844ff3657acca8b2e5b75ce45afd774553da5801d7fad1a991dd6d
3
+ metadata.gz: ffe9ae194b9a0be401d770ef0b2dbcef7ebf20f39a8d3c5a6c84bb8247085610
4
+ data.tar.gz: 5df31e9e5463c7cf1ed62d3417d93a8162de83ad8d2bb9e7ace34eb995813491
5
5
  SHA512:
6
- metadata.gz: a495033bdbe6a71f90268ed764521d8b1be527dbc614244dbfad48a49ec9a71f680906457e7f0fb69196dc79122906783c62ac909f8770d55107ad23fd78b825
7
- data.tar.gz: 1ab16457dfae29bebf25e180053e3061f5b14a69187d0fa540bab78f74dfa5953fcf1fdf25aa0ea2d1136cc3336cb2db79be1dacaf0af8e7c619ab50e28ecbb8
6
+ metadata.gz: 07d497236946c160efe5d19c19b6cd63254d79d45088794ba71f6e916ba96c5e65313151c57122010e4a72a354363b358da4fc4c29a96b921d29a574f2b7be13
7
+ data.tar.gz: 36c0844e4b66881bd7df5052b0dd2d8dfa3de1a1505d5932c179721239a50efad292bb3f47a98d86ac16b6e74702158fc11c8da6a361483e20c5b045e39dc4bc
data/Rakefile CHANGED
@@ -2,6 +2,17 @@ require "bundler/gem_tasks"
2
2
  require "yaml"
3
3
  require "active_record"
4
4
 
5
+ namespace :test do
6
+ task :all do
7
+ Dir.glob("./gemfiles/Gemfile*").each do |gemfile|
8
+ next if gemfile.end_with?(".lock")
9
+ puts "Running specs for #{Pathname.new(gemfile).basename}"
10
+ system("BUNDLE_GEMFILE=#{gemfile} bundle install > /dev/null && BUNDLE_GEMFILE=#{gemfile} bundle exec rspec")
11
+ puts ""
12
+ end
13
+ end
14
+ end
15
+
5
16
  namespace :db do
6
17
  database_config = YAML.load(File.open("./spec/support/database.yml"))
7
18
  admin_database_config = database_config.merge(database: "mysql")
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec path: ".."
6
+
7
+ gem "activerecord", github: "rails/rails", branch: "4-2-stable"
8
+ gem "sqlite3", "~> 1.3.6"
@@ -0,0 +1,68 @@
1
+ GIT
2
+ remote: git://github.com/rails/rails.git
3
+ revision: e9d6b85f3e834ceea2aeabe4cbaa96a7c73eb896
4
+ branch: 4-2-stable
5
+ specs:
6
+ activemodel (4.2.11.1)
7
+ activesupport (= 4.2.11.1)
8
+ builder (~> 3.1)
9
+ activerecord (4.2.11.1)
10
+ activemodel (= 4.2.11.1)
11
+ activesupport (= 4.2.11.1)
12
+ arel (~> 6.0)
13
+ activesupport (4.2.11.1)
14
+ i18n (~> 0.7)
15
+ minitest (~> 5.1)
16
+ thread_safe (~> 0.3, >= 0.3.4)
17
+ tzinfo (~> 1.1)
18
+
19
+ PATH
20
+ remote: ..
21
+ specs:
22
+ polymorphic_integer_type (2.2.4)
23
+ activerecord
24
+
25
+ GEM
26
+ remote: https://rubygems.org/
27
+ specs:
28
+ arel (6.0.4)
29
+ builder (3.2.4)
30
+ byebug (11.0.1)
31
+ concurrent-ruby (1.1.5)
32
+ diff-lcs (1.3)
33
+ i18n (0.9.5)
34
+ concurrent-ruby (~> 1.0)
35
+ minitest (5.13.0)
36
+ rake (13.0.1)
37
+ rspec (3.9.0)
38
+ rspec-core (~> 3.9.0)
39
+ rspec-expectations (~> 3.9.0)
40
+ rspec-mocks (~> 3.9.0)
41
+ rspec-core (3.9.0)
42
+ rspec-support (~> 3.9.0)
43
+ rspec-expectations (3.9.0)
44
+ diff-lcs (>= 1.2.0, < 2.0)
45
+ rspec-support (~> 3.9.0)
46
+ rspec-mocks (3.9.0)
47
+ diff-lcs (>= 1.2.0, < 2.0)
48
+ rspec-support (~> 3.9.0)
49
+ rspec-support (3.9.0)
50
+ sqlite3 (1.3.13)
51
+ thread_safe (0.3.6)
52
+ tzinfo (1.2.5)
53
+ thread_safe (~> 0.1)
54
+
55
+ PLATFORMS
56
+ ruby
57
+
58
+ DEPENDENCIES
59
+ activerecord!
60
+ bundler
61
+ byebug
62
+ polymorphic_integer_type!
63
+ rake
64
+ rspec
65
+ sqlite3 (~> 1.3.6)
66
+
67
+ BUNDLED WITH
68
+ 1.16.1
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec path: ".."
6
+
7
+ gem "activerecord", github: "rails/rails", branch: "5-0-stable"
8
+ gem "sqlite3", "~> 1.3.6"
@@ -0,0 +1,66 @@
1
+ GIT
2
+ remote: git://github.com/rails/rails.git
3
+ revision: ac6aa32f7cf66264ba87eabed7c042bb60bcf3a2
4
+ branch: 5-0-stable
5
+ specs:
6
+ activemodel (5.0.7.2)
7
+ activesupport (= 5.0.7.2)
8
+ activerecord (5.0.7.2)
9
+ activemodel (= 5.0.7.2)
10
+ activesupport (= 5.0.7.2)
11
+ arel (~> 7.0)
12
+ activesupport (5.0.7.2)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 0.7, < 2)
15
+ minitest (~> 5.1)
16
+ tzinfo (~> 1.1)
17
+
18
+ PATH
19
+ remote: ..
20
+ specs:
21
+ polymorphic_integer_type (2.2.4)
22
+ activerecord
23
+
24
+ GEM
25
+ remote: https://rubygems.org/
26
+ specs:
27
+ arel (7.1.4)
28
+ byebug (11.0.1)
29
+ concurrent-ruby (1.1.5)
30
+ diff-lcs (1.3)
31
+ i18n (1.7.0)
32
+ concurrent-ruby (~> 1.0)
33
+ minitest (5.13.0)
34
+ rake (13.0.1)
35
+ rspec (3.9.0)
36
+ rspec-core (~> 3.9.0)
37
+ rspec-expectations (~> 3.9.0)
38
+ rspec-mocks (~> 3.9.0)
39
+ rspec-core (3.9.0)
40
+ rspec-support (~> 3.9.0)
41
+ rspec-expectations (3.9.0)
42
+ diff-lcs (>= 1.2.0, < 2.0)
43
+ rspec-support (~> 3.9.0)
44
+ rspec-mocks (3.9.0)
45
+ diff-lcs (>= 1.2.0, < 2.0)
46
+ rspec-support (~> 3.9.0)
47
+ rspec-support (3.9.0)
48
+ sqlite3 (1.3.13)
49
+ thread_safe (0.3.6)
50
+ tzinfo (1.2.5)
51
+ thread_safe (~> 0.1)
52
+
53
+ PLATFORMS
54
+ ruby
55
+
56
+ DEPENDENCIES
57
+ activerecord!
58
+ bundler
59
+ byebug
60
+ polymorphic_integer_type!
61
+ rake
62
+ rspec
63
+ sqlite3 (~> 1.3.6)
64
+
65
+ BUNDLED WITH
66
+ 1.16.1
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec path: ".."
6
+
7
+ gem "activerecord", github: "rails/rails", branch: "5-1-stable"
@@ -0,0 +1,66 @@
1
+ GIT
2
+ remote: git://github.com/rails/rails.git
3
+ revision: 663206d20aec374a28a24bb43bc7b1233042ed9b
4
+ branch: 5-1-stable
5
+ specs:
6
+ activemodel (5.1.7)
7
+ activesupport (= 5.1.7)
8
+ activerecord (5.1.7)
9
+ activemodel (= 5.1.7)
10
+ activesupport (= 5.1.7)
11
+ arel (~> 8.0)
12
+ activesupport (5.1.7)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 0.7, < 2)
15
+ minitest (~> 5.1)
16
+ tzinfo (~> 1.1)
17
+
18
+ PATH
19
+ remote: ..
20
+ specs:
21
+ polymorphic_integer_type (2.2.4)
22
+ activerecord
23
+
24
+ GEM
25
+ remote: https://rubygems.org/
26
+ specs:
27
+ arel (8.0.0)
28
+ byebug (11.0.1)
29
+ concurrent-ruby (1.1.5)
30
+ diff-lcs (1.3)
31
+ i18n (1.7.0)
32
+ concurrent-ruby (~> 1.0)
33
+ minitest (5.13.0)
34
+ rake (13.0.1)
35
+ rspec (3.9.0)
36
+ rspec-core (~> 3.9.0)
37
+ rspec-expectations (~> 3.9.0)
38
+ rspec-mocks (~> 3.9.0)
39
+ rspec-core (3.9.0)
40
+ rspec-support (~> 3.9.0)
41
+ rspec-expectations (3.9.0)
42
+ diff-lcs (>= 1.2.0, < 2.0)
43
+ rspec-support (~> 3.9.0)
44
+ rspec-mocks (3.9.0)
45
+ diff-lcs (>= 1.2.0, < 2.0)
46
+ rspec-support (~> 3.9.0)
47
+ rspec-support (3.9.0)
48
+ sqlite3 (1.4.2)
49
+ thread_safe (0.3.6)
50
+ tzinfo (1.2.5)
51
+ thread_safe (~> 0.1)
52
+
53
+ PLATFORMS
54
+ ruby
55
+
56
+ DEPENDENCIES
57
+ activerecord!
58
+ bundler
59
+ byebug
60
+ polymorphic_integer_type!
61
+ rake
62
+ rspec
63
+ sqlite3
64
+
65
+ BUNDLED WITH
66
+ 1.16.1
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec path: ".."
6
+
7
+ gem "activerecord", github: "rails/rails", branch: "5-2-stable"
@@ -0,0 +1,66 @@
1
+ GIT
2
+ remote: git://github.com/rails/rails.git
3
+ revision: 892eab777c418135ce0646e91bc9ebb08a29ab9b
4
+ branch: 5-2-stable
5
+ specs:
6
+ activemodel (5.2.4.1)
7
+ activesupport (= 5.2.4.1)
8
+ activerecord (5.2.4.1)
9
+ activemodel (= 5.2.4.1)
10
+ activesupport (= 5.2.4.1)
11
+ arel (>= 9.0)
12
+ activesupport (5.2.4.1)
13
+ concurrent-ruby (~> 1.0, >= 1.0.2)
14
+ i18n (>= 0.7, < 2)
15
+ minitest (~> 5.1)
16
+ tzinfo (~> 1.1)
17
+
18
+ PATH
19
+ remote: ..
20
+ specs:
21
+ polymorphic_integer_type (2.2.4)
22
+ activerecord
23
+
24
+ GEM
25
+ remote: https://rubygems.org/
26
+ specs:
27
+ arel (9.0.0)
28
+ byebug (11.0.1)
29
+ concurrent-ruby (1.1.5)
30
+ diff-lcs (1.3)
31
+ i18n (1.7.0)
32
+ concurrent-ruby (~> 1.0)
33
+ minitest (5.13.0)
34
+ rake (13.0.1)
35
+ rspec (3.9.0)
36
+ rspec-core (~> 3.9.0)
37
+ rspec-expectations (~> 3.9.0)
38
+ rspec-mocks (~> 3.9.0)
39
+ rspec-core (3.9.0)
40
+ rspec-support (~> 3.9.0)
41
+ rspec-expectations (3.9.0)
42
+ diff-lcs (>= 1.2.0, < 2.0)
43
+ rspec-support (~> 3.9.0)
44
+ rspec-mocks (3.9.0)
45
+ diff-lcs (>= 1.2.0, < 2.0)
46
+ rspec-support (~> 3.9.0)
47
+ rspec-support (3.9.0)
48
+ sqlite3 (1.4.2)
49
+ thread_safe (0.3.6)
50
+ tzinfo (1.2.5)
51
+ thread_safe (~> 0.1)
52
+
53
+ PLATFORMS
54
+ ruby
55
+
56
+ DEPENDENCIES
57
+ activerecord!
58
+ bundler
59
+ byebug
60
+ polymorphic_integer_type!
61
+ rake
62
+ rspec
63
+ sqlite3
64
+
65
+ BUNDLED WITH
66
+ 1.16.1
@@ -95,7 +95,7 @@ module PolymorphicIntegerType
95
95
  def retrieve_polymorphic_type_mapping(polymorphic_type:, class_name:)
96
96
  return if polymorphic_type.nil?
97
97
 
98
- belongs_to_class = class_name.safe_constantize
98
+ belongs_to_class = compute_type(class_name)
99
99
  method_name = "#{polymorphic_type}_type_mapping"
100
100
 
101
101
  if belongs_to_class && belongs_to_class.respond_to?(method_name)
@@ -1,3 +1,3 @@
1
1
  module PolymorphicIntegerType
2
- VERSION = "2.2.4"
2
+ VERSION = "2.2.5"
3
3
  end
@@ -261,7 +261,7 @@ describe PolymorphicIntegerType do
261
261
 
262
262
  self.table_name = "drinks"
263
263
 
264
- has_many :inline_links2, as: :target
264
+ has_many :inline_link2s, as: :target
265
265
  end
266
266
 
267
267
  let!(:animal) { InlineAnimal2.create!(name: "Lucy") }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polymorphic_integer_type
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle d'Oliveira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-18 00:00:00.000000000 Z
11
+ date: 2020-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -108,6 +108,14 @@ files:
108
108
  - README.md
109
109
  - Rakefile
110
110
  - bin/setup
111
+ - gemfiles/Gemfile.rails-4.2-stable
112
+ - gemfiles/Gemfile.rails-4.2-stable.lock
113
+ - gemfiles/Gemfile.rails-5.0-stable
114
+ - gemfiles/Gemfile.rails-5.0-stable.lock
115
+ - gemfiles/Gemfile.rails-5.1-stable
116
+ - gemfiles/Gemfile.rails-5.1-stable.lock
117
+ - gemfiles/Gemfile.rails-5.2-stable
118
+ - gemfiles/Gemfile.rails-5.2-stable.lock
111
119
  - lib/polymorphic_integer_type.rb
112
120
  - lib/polymorphic_integer_type/activerecord_4/belongs_to_polymorphic_association_extension.rb
113
121
  - lib/polymorphic_integer_type/activerecord_4/predicate_builder_extension.rb
@@ -152,8 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
160
  - !ruby/object:Gem::Version
153
161
  version: '0'
154
162
  requirements: []
155
- rubyforge_project:
156
- rubygems_version: 2.7.9
163
+ rubygems_version: 3.0.6
157
164
  signing_key:
158
165
  specification_version: 4
159
166
  summary: Use integers rather than strings for the _type field