activerecord-like 2.2 → 6.1.0

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
- SHA1:
3
- metadata.gz: 9a5c0c2ab913d52c04984736a54d8a2cd2832ea9
4
- data.tar.gz: 665673067501add2fff21343a6b73d2449ca2604
2
+ SHA256:
3
+ metadata.gz: 17697882d9797eb85a6b4a1e80d80c49b5fffd8ab8cd8f12f8b2d72214b96dba
4
+ data.tar.gz: 6270ce1472c08edff4c6bed332cdc291273d240069c47eabfcae5400ebad67a9
5
5
  SHA512:
6
- metadata.gz: e4cca0a25e3480c37a079bbb41c80e88b6bf06dc73f59fa56640fe6d1dec4ce1c147e6b79cca32db42a3f59f313ec4cac38297acf5d2a371809579bf035be369
7
- data.tar.gz: 208c3fba7b26f6f59b5ea7b7cc82b409c0fc3baeb8aca2da51e017992f027e9087c5fea6dbae303c06ab8d81af7583ccd4db0f8cdd6b7bacd34b67925dc4738d
6
+ metadata.gz: 8be7e5510726ad3f76ec93a75720ce28e37e04c13ed7f386cdd43d0faadee816f1cf06073f36a328f0a691ede4e34e6a8780f45fd49a7d6b2b27a1edc828fe8a
7
+ data.tar.gz: a044ba63ce7215909b9cd807130cf19b5fbe35854afd1291d4e1b05e260adcaa076b1ddd65d52702b72d9ee9a928a353ba774f78e73206a0f16eb3acbf915f7a
data/.travis.yml CHANGED
@@ -3,23 +3,20 @@
3
3
  sudo: false
4
4
  language: ruby
5
5
  cache: bundler
6
+ services:
7
+ - postgresql
8
+ - mysql
6
9
  rvm:
7
- - 2.2.8
8
- - 2.3.6
9
- - 2.4.3
10
- - 2.5.0
10
+ - 2.7.5
11
+ - 3.0.3
11
12
  - ruby-head
12
13
  env:
13
14
  - DB=pg
14
15
  - DB=sqlite3
15
16
  - DB=mysql
16
17
  gemfile:
17
- - gemfiles/rails_5_0.gemfile
18
- - gemfiles/rails_5_1.gemfile
19
- - gemfiles/rails_5_2.gemfile
20
- before_script:
21
- - psql -c 'create database activerecord_like_test' -U postgres
22
- - mysql -e 'create database activerecord_like_test'
18
+ - gemfiles/rails_6_0.gemfile
19
+ - gemfiles/rails_6_1.gemfile
23
20
  matrix:
24
21
  fast_finish: true
25
22
  allow_failures:
data/Appraisals CHANGED
@@ -1,4 +1,4 @@
1
- ("5.0".."5.2").each do |version|
1
+ ("6.0".."6.1").each do |version|
2
2
  appraise "rails_#{version.tr('.', '_')}" do
3
3
  gem "activerecord", "~> #{version}.0"
4
4
  end
@@ -15,11 +15,10 @@ Gem::Specification.new do |gem|
15
15
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
16
  gem.require_paths = ["lib"]
17
17
 
18
- gem.add_dependency "activerecord", ">= 5.0.0"
18
+ gem.add_dependency "activerecord", "~> 6.0", ">= 6.0.0"
19
19
 
20
20
  # Required for Travis build to pass
21
- # pg 1.x not supported in all AR versions
22
- gem.add_development_dependency "pg", "< 1.0.0"
21
+ gem.add_development_dependency "pg"
23
22
  gem.add_development_dependency "mysql2"
24
23
  gem.add_development_dependency "sqlite3"
25
24
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "~> 5.0.0"
5
+ gem "activerecord", "~> 6.0.0"
6
6
 
7
7
  gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "~> 5.1.0"
5
+ gem "activerecord", "~> 6.1.0"
6
6
 
7
7
  gemspec path: "../"
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Like
3
- VERSION = "2.2"
3
+ VERSION = "6.1.0"
4
4
  end
5
5
  end
@@ -31,7 +31,13 @@ module ActiveRecord
31
31
  # 1. Build a where clause to generate "predicates" & "binds"
32
32
  # 2. Convert "predicates" into the one that matches `node_type` (like/not like)
33
33
  # 3. Re-use binding values to create new where clause
34
- equal_where_clause = s.send(:where_clause_factory).build({key => value}, rest)
34
+ equal_where_clause = if s.respond_to?(:where_clause_factory, true)
35
+ # ActiveRecord 5.0 to 6.0
36
+ s.send(:where_clause_factory).build({key => value}, rest)
37
+ else
38
+ # ActiveRecord 6.1, maybe higher
39
+ s.send(:build_where_clause, {key => value}, rest)
40
+ end
35
41
  equal_where_clause_predicate = equal_where_clause.send(:predicates).first
36
42
 
37
43
  new_predicate = if equal_where_clause_predicate.right.is_a?(Array)
data/test/helper.rb CHANGED
@@ -92,9 +92,7 @@ else
92
92
  include Test::SQLite3
93
93
  end
94
94
 
95
- unless ENV['TRAVIS'] # if we're running on Travis, no drop/create needed
96
- drop_and_create_database
97
- end
95
+ drop_and_create_database
98
96
 
99
97
  connect_db
100
98
 
metadata CHANGED
@@ -1,43 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-like
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.2'
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - René van den Berg
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-28 00:00:00.000000000 Z
11
+ date: 2022-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '6.0'
17
20
  - - ">="
18
21
  - !ruby/object:Gem::Version
19
- version: 5.0.0
22
+ version: 6.0.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '6.0'
24
30
  - - ">="
25
31
  - !ruby/object:Gem::Version
26
- version: 5.0.0
32
+ version: 6.0.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: pg
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "<"
37
+ - - ">="
32
38
  - !ruby/object:Gem::Version
33
- version: 1.0.0
39
+ version: '0'
34
40
  type: :development
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - "<"
44
+ - - ">="
39
45
  - !ruby/object:Gem::Version
40
- version: 1.0.0
46
+ version: '0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: mysql2
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -124,9 +130,8 @@ files:
124
130
  - README.md
125
131
  - Rakefile
126
132
  - activerecord-like.gemspec
127
- - gemfiles/rails_5_0.gemfile
128
- - gemfiles/rails_5_1.gemfile
129
- - gemfiles/rails_5_2.gemfile
133
+ - gemfiles/rails_6_0.gemfile
134
+ - gemfiles/rails_6_1.gemfile
130
135
  - lib/active_record/like.rb
131
136
  - lib/active_record/like/version.rb
132
137
  - lib/activerecord-like.rb
@@ -138,7 +143,7 @@ files:
138
143
  homepage: http://github.com/ReneB/activerecord-like
139
144
  licenses: []
140
145
  metadata: {}
141
- post_install_message:
146
+ post_install_message:
142
147
  rdoc_options: []
143
148
  require_paths:
144
149
  - lib
@@ -153,9 +158,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
158
  - !ruby/object:Gem::Version
154
159
  version: '0'
155
160
  requirements: []
156
- rubyforge_project:
157
- rubygems_version: 2.6.14
158
- signing_key:
161
+ rubygems_version: 3.2.3
162
+ signing_key:
159
163
  specification_version: 4
160
164
  summary: 'ActiveRecord::Like provides ActiveRecord::Base with where.like(attribute:
161
165
  string)-style extensions. This functionality was, at one point, included in Rails-master,
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "~> 5.2.0"
6
-
7
- gemspec path: "../"