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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc1b9bf4a828daa0ebcaa68966c12654f34532ca
4
- data.tar.gz: 60d7e06e58f04d72ddf0a431faef0bc006e7935e
3
+ metadata.gz: d3e8f03f4997b7392648d80a676684f11c0cd081
4
+ data.tar.gz: 34c1684aedf672fd501445eb3151bc6596c2bee8
5
5
  SHA512:
6
- metadata.gz: 4ec3097f54125b876a19982ce32081ecc005413420374ae8cb19c447967cfee5c555f4079f58a25c0bad8241cabf6c434868adfdc7e767e83a74e7be87338a96
7
- data.tar.gz: c25277c34a1387c51bfb9f33e836436533e636a41fb337959a8b4d70bb3857a3ff80ae5745c8e16de5a1781ee05761f66ebe888ecd5ca9b4176c09546cb28cde
6
+ metadata.gz: 99f469e8b86a8af0505c295d1f4f9d838134bccd3cf010e4e6df1b7f42eb138fa19f002151f2883533514efd70f43c3af8dbb35f9d8a8a53b70f628e142ff8ef
7
+ data.tar.gz: 609f7592e5eca2777fe448055bf401b4d07525e741f9d01f036751c4e9ccc00d83ad73e236bb25515d3933426d922b8bd5f78157924e9e18c86205e8e1625393
@@ -4,9 +4,10 @@ sudo: false
4
4
  language: ruby
5
5
  cache: bundler
6
6
  rvm:
7
- - 2.2.6
8
- - 2.3.3
9
- - 2.4.0
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
@@ -1,3 +1,7 @@
1
1
  appraise "rails_5_0" do
2
2
  gem "activerecord", "~> 5.0.0"
3
3
  end
4
+
5
+ appraise "rails_5_1" do
6
+ gem "activerecord", "~> 5.1.0"
7
+ end
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
@@ -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
- gem.add_development_dependency "pg"
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
@@ -4,10 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "activerecord", "~> 5.0.0"
6
6
 
7
- group :test do
8
- gem "rake"
9
- gem "sqlite3"
10
- gem "minitest", ">= 3"
11
- end
12
-
13
7
  gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 5.1.0"
6
+
7
+ gemspec :path => "../"
@@ -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
- new_where_clause = s.send(:where_clause_factory).build(new_predicate, equal_where_clause.binds)
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
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Like
3
- VERSION = "2.0"
3
+ VERSION = "2.1"
4
4
  end
5
5
  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.0'
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: 2017-01-09 00:00:00.000000000 Z
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: mysql2
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.5.1
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: