activerecord-like 2.0 → 2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -3
- data/Appraisals +4 -0
- data/Gemfile +0 -17
- data/activerecord-like.gemspec +7 -1
- data/gemfiles/rails_5_0.gemfile +0 -6
- data/gemfiles/rails_5_1.gemfile +7 -0
- data/lib/active_record/like.rb +5 -1
- data/lib/active_record/like/version.rb +1 -1
- metadata +47 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3e8f03f4997b7392648d80a676684f11c0cd081
|
4
|
+
data.tar.gz: 34c1684aedf672fd501445eb3151bc6596c2bee8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99f469e8b86a8af0505c295d1f4f9d838134bccd3cf010e4e6df1b7f42eb138fa19f002151f2883533514efd70f43c3af8dbb35f9d8a8a53b70f628e142ff8ef
|
7
|
+
data.tar.gz: 609f7592e5eca2777fe448055bf401b4d07525e741f9d01f036751c4e9ccc00d83ad73e236bb25515d3933426d922b8bd5f78157924e9e18c86205e8e1625393
|
data/.travis.yml
CHANGED
@@ -4,9 +4,10 @@ sudo: false
|
|
4
4
|
language: ruby
|
5
5
|
cache: bundler
|
6
6
|
rvm:
|
7
|
-
- 2.2.
|
8
|
-
- 2.3.
|
9
|
-
- 2.4.
|
7
|
+
- 2.2.8
|
8
|
+
- 2.3.6
|
9
|
+
- 2.4.3
|
10
|
+
- 2.5.0
|
10
11
|
- ruby-head
|
11
12
|
env:
|
12
13
|
- DB=pg
|
@@ -14,6 +15,7 @@ env:
|
|
14
15
|
- DB=mysql
|
15
16
|
gemfile:
|
16
17
|
- gemfiles/rails_5_0.gemfile
|
18
|
+
- gemfiles/rails_5_1.gemfile
|
17
19
|
before_script:
|
18
20
|
- psql -c 'create database activerecord_like_test' -U postgres
|
19
21
|
- mysql -e 'create database activerecord_like_test'
|
data/Appraisals
CHANGED
data/Gemfile
CHANGED
@@ -1,20 +1,3 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
gem 'activerecord', '>= 4.0.0'
|
4
|
-
|
5
|
-
group :test do
|
6
|
-
gem 'rake'
|
7
|
-
|
8
|
-
case ENV['DB']
|
9
|
-
when 'pg'
|
10
|
-
gem 'pg'
|
11
|
-
when 'mysql'
|
12
|
-
gem 'mysql2'
|
13
|
-
else
|
14
|
-
gem 'sqlite3'
|
15
|
-
end
|
16
|
-
|
17
|
-
gem 'minitest', '>= 3'
|
18
|
-
end
|
19
|
-
|
20
3
|
gemspec
|
data/activerecord-like.gemspec
CHANGED
@@ -18,8 +18,14 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.add_dependency "activerecord", ">= 5.0.0"
|
19
19
|
|
20
20
|
# Required for Travis build to pass
|
21
|
-
|
21
|
+
# pg 1.x not supported in all AR versions
|
22
|
+
gem.add_development_dependency "pg", "< 1.0.0"
|
22
23
|
gem.add_development_dependency "mysql2"
|
24
|
+
gem.add_development_dependency "sqlite3"
|
25
|
+
|
26
|
+
gem.add_development_dependency "rake"
|
27
|
+
|
28
|
+
gem.add_development_dependency "minitest", ">= 3"
|
23
29
|
|
24
30
|
gem.add_development_dependency "appraisal", "~> 2.0"
|
25
31
|
end
|
data/gemfiles/rails_5_0.gemfile
CHANGED
data/lib/active_record/like.rb
CHANGED
@@ -43,7 +43,11 @@ module ActiveRecord
|
|
43
43
|
node_type.new(equal_where_clause_predicate.left, equal_where_clause_predicate.right)
|
44
44
|
end
|
45
45
|
|
46
|
-
|
46
|
+
# Passing `Arel::Nodes::Node` into `where_clause_factory`
|
47
|
+
# Will lose the binding values since 5.1
|
48
|
+
# due to this PR
|
49
|
+
# https://github.com/rails/rails/pull/26073
|
50
|
+
new_where_clause = Relation::WhereClause.new([new_predicate], equal_where_clause.binds)
|
47
51
|
|
48
52
|
s.where_clause += new_where_clause
|
49
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-like
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '2.
|
4
|
+
version: '2.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- René van den Berg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -26,6 +26,20 @@ dependencies:
|
|
26
26
|
version: 5.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pg
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "<"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.0.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mysql2
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - ">="
|
@@ -39,7 +53,7 @@ dependencies:
|
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
56
|
+
name: sqlite3
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - ">="
|
@@ -52,6 +66,34 @@ dependencies:
|
|
52
66
|
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: minitest
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3'
|
55
97
|
- !ruby/object:Gem::Dependency
|
56
98
|
name: appraisal
|
57
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,6 +125,7 @@ files:
|
|
83
125
|
- Rakefile
|
84
126
|
- activerecord-like.gemspec
|
85
127
|
- gemfiles/rails_5_0.gemfile
|
128
|
+
- gemfiles/rails_5_1.gemfile
|
86
129
|
- lib/active_record/like.rb
|
87
130
|
- lib/active_record/like/version.rb
|
88
131
|
- lib/activerecord-like.rb
|
@@ -110,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
153
|
version: '0'
|
111
154
|
requirements: []
|
112
155
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.
|
156
|
+
rubygems_version: 2.6.14
|
114
157
|
signing_key:
|
115
158
|
specification_version: 4
|
116
159
|
summary: 'ActiveRecord::Like provides ActiveRecord::Base with where.like(attribute:
|