arel-extensions 6.0.0.4 → 6.0.0.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: '08c6ce3898d57f105c59837161e36e1fe45f25afd4daa95d54916bef1c3782e5'
4
- data.tar.gz: 1f2efc0c80e2b25c826421126eb8d963a7244b1c386a7a0f871b46fcad701c11
3
+ metadata.gz: 77163aa72e10eb31450da65c1b1df14a021e5b4075fb4593d5fef7bcc99b5601
4
+ data.tar.gz: 6f3c923426a618ff4cab75573a9249f5ff96f03ce270fa4f70218815df617fed
5
5
  SHA512:
6
- metadata.gz: d5610a339bd005e10ef756715bf25b0cc96dc471e6fec233a8f9735e6c4bb05f50425aaf0f465b6d4e57c0320949ed80a6e93d46b399e1975a4753185112fac3
7
- data.tar.gz: a5fde1fd877f44e52bde43595d4eb1237742f85ea338ad1a00597d075c5d0f30320bac95b41d5b58bf1460784035d51f14728702e22dd4cc401293137b28b1fb
6
+ metadata.gz: 6b4ba6222a1324e349ee69e4f6463f5fa964b4f965291db74712876749af64ddc77fe957c38fd2081cfcbf7263440989aa5230708a69ce6562a76417a131eef3
7
+ data.tar.gz: 448a6441598e3a7648df5f9e261b52840988ad1d0ac2836eecfbd45110a1d2918033622702261efd7cf9b6ca604e9d130cc878e6f34dc5a20032e21700c3e610
data/.travis.yml CHANGED
@@ -16,6 +16,9 @@ env:
16
16
  - RAILS_VERSION=v6.0.0.rc1 GEM=activerecord:mysql2
17
17
  - RAILS_VERSION=v6.0.0.rc1 GEM=activerecord:sqlite3
18
18
  - RAILS_VERSION=v6.0.0.rc1 GEM=activerecord:postgresql
19
+ - RAILS_VERSION=v6.0.0.rc2 GEM=activerecord:mysql2
20
+ - RAILS_VERSION=v6.0.0.rc2 GEM=activerecord:sqlite3
21
+ - RAILS_VERSION=v6.0.0.rc2 GEM=activerecord:postgresql
19
22
 
20
23
  services:
21
24
  - mysql
data/Gemfile.lock CHANGED
@@ -1,18 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- arel-extensions (6.0.0.2)
5
- activerecord (>= 6.0.0.rc1)
4
+ arel-extensions (6.0.0.5)
5
+ activerecord (>= 6.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (6.0.0.rc2)
11
- activesupport (= 6.0.0.rc2)
12
- activerecord (6.0.0.rc2)
13
- activemodel (= 6.0.0.rc2)
14
- activesupport (= 6.0.0.rc2)
15
- activesupport (6.0.0.rc2)
10
+ activemodel (6.0.0)
11
+ activesupport (= 6.0.0)
12
+ activerecord (6.0.0)
13
+ activemodel (= 6.0.0)
14
+ activesupport (= 6.0.0)
15
+ activesupport (6.0.0)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 0.7, < 2)
18
18
  minitest (~> 5.1)
@@ -24,19 +24,19 @@ GEM
24
24
  i18n (1.6.0)
25
25
  concurrent-ruby (~> 1.0)
26
26
  minitest (5.11.3)
27
- minitest-reporters (1.3.5)
27
+ minitest-reporters (1.3.8)
28
28
  ansi
29
29
  builder
30
30
  minitest (>= 5.0)
31
31
  ruby-progressbar
32
- pg (1.1.3)
33
- rake (12.3.1)
34
- rgeo (1.0.0)
35
- ruby-progressbar (1.10.0)
32
+ pg (1.1.4)
33
+ rake (12.3.3)
34
+ rgeo (2.1.0)
35
+ ruby-progressbar (1.10.1)
36
36
  thread_safe (0.3.6)
37
37
  tzinfo (1.2.5)
38
38
  thread_safe (~> 0.1)
39
- zeitwerk (2.1.9)
39
+ zeitwerk (2.1.10)
40
40
 
41
41
  PLATFORMS
42
42
  ruby
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'arel-extensions'
3
- gem.version = '6.0.0.4'
3
+ gem.version = '6.0.0.5'
4
4
  gem.authors = ["Jon Bracy"]
5
5
  gem.email = ["jonbracy@gmail.com"]
6
6
  gem.summary = %q{Adds support for missing SQL operators and functions to Arel}
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
11
11
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
12
12
  gem.require_paths = ["lib"]
13
13
 
14
- gem.add_dependency 'activerecord', '>= 6.0.0.rc1'
14
+ gem.add_dependency 'activerecord', '>= 6.0.0'
15
15
 
16
16
  gem.add_development_dependency "bundler"
17
17
  gem.add_development_dependency "rake"
@@ -26,6 +26,7 @@ require File.expand_path('../nodes/ts_rank_cd', __FILE__)
26
26
  require File.expand_path('../ts_predications', __FILE__)
27
27
  Arel::Attributes::Attribute.include(Arel::TSPredications)
28
28
 
29
+ require File.expand_path('../nodes/relation', __FILE__)
29
30
 
30
31
  require File.expand_path('../gis_predications', __FILE__)
31
32
  Arel::Attributes::Attribute.include(Arel::GISPredications)
@@ -38,4 +39,8 @@ end
38
39
 
39
40
  if defined?(Arel::Visitors::Sunstone)
40
41
  require File.expand_path('../visitors/sunstone_extensions', __FILE__)
42
+ end
43
+
44
+ if defined?(Arel::Visitors::ToSql)
45
+ require File.expand_path('../visitors/to_sql_extensions', __FILE__)
41
46
  end
@@ -0,0 +1,31 @@
1
+ module Arel
2
+ module Attributes
3
+ class Relation < Attribute
4
+
5
+ attr_accessor :collection, :for_write
6
+
7
+ def initialize(relation, name, collection = false, for_write=false)
8
+ self[:relation] = relation
9
+ self[:name] = name
10
+ @collection = collection
11
+ @for_write = for_write
12
+ end
13
+
14
+ def able_to_type_cast?
15
+ false
16
+ end
17
+
18
+ def table_name
19
+ nil
20
+ end
21
+
22
+ def eql? other
23
+ self.class == other.class &&
24
+ self.relation == other.relation &&
25
+ self.name == other.name &&
26
+ self.collection == other.collection
27
+ end
28
+
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,11 @@
1
+ module Arel
2
+ module Visitors
3
+ class ToSql
4
+
5
+ def visit_Arel_Attributes_Relation(o, collector)
6
+ visit(o.relation, collector)
7
+ end
8
+
9
+ end
10
+ end
11
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arel-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.4
4
+ version: 6.0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Bracy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-13 00:00:00.000000000 Z
11
+ date: 2019-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 6.0.0.rc1
19
+ version: 6.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 6.0.0.rc1
26
+ version: 6.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -138,6 +138,7 @@ files:
138
138
  - lib/arel/nodes/has_keys.rb
139
139
  - lib/arel/nodes/hex_encoded_binary.rb
140
140
  - lib/arel/nodes/overlaps.rb
141
+ - lib/arel/nodes/relation.rb
141
142
  - lib/arel/nodes/ts_match.rb
142
143
  - lib/arel/nodes/ts_query.rb
143
144
  - lib/arel/nodes/ts_rank.rb
@@ -147,6 +148,7 @@ files:
147
148
  - lib/arel/ts_predications.rb
148
149
  - lib/arel/visitors/postgresql_extensions.rb
149
150
  - lib/arel/visitors/sunstone_extensions.rb
151
+ - lib/arel/visitors/to_sql_extensions.rb
150
152
  - test/database.rb
151
153
  - test/sunstone_test.rb
152
154
  - test/test_helper.rb