where-or 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2f81ecc810527c811c55941f9f7bc23376dcd75
4
- data.tar.gz: d5dfe157818c2e5f9cc451613a3939b2e5a39e43
3
+ metadata.gz: bb25ac3a827b4dd90acbffff6c2529fd4f70665a
4
+ data.tar.gz: 8af01a9d4f4b801a8a6944b66b8fa084c5742d55
5
5
  SHA512:
6
- metadata.gz: fe9affdef0fb817a152ab975f3d7de3b36fda610f0fe81f44f457574113cdfabfe2d1b19a1be3c97a2b4f6936964291b2c3d7a02aa4d9a48acd4101c6a9c648c
7
- data.tar.gz: 9cc489658e4bd70ee4463cd2d193bdd66d0334e8bf2d89131b78c82a2f1d931849332b160a6737acbbc2a4bef93bd269cef0373b3f01b8ba22d83f284dceabc8
6
+ metadata.gz: '07853e00daaa9046abfa3f388b7e887eee0621e63046a32902a132da624a00d93c1311addff9ee943ba7073683f234f29d6507bb15d4f8ee923c52a2d63cd1ad'
7
+ data.tar.gz: b318ac9524c5a7d4960627de6fa59838381776dcb46f57289fb9d888a5f9d2227ebee04619861bdff2252d350f6f90b4245cdad1591514440cbb25725cb07192
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,4 +1,4 @@
1
- abort "Congrats for being on Rails 5. Now please remove this patch" if ActiveRecord::VERSION::MAJOR > 4
1
+ abort "Congrats for being on Rails 5. Now please remove this patch by getting rid of the `where-or` gem" if ActiveRecord::VERSION::MAJOR > 4
2
2
  # Tested on Rails Rails 4.2.3
3
3
  warn "Patching ActiveRecord::Relation#or. This might blow up" if ActiveRecord.version.to_s < '4.2.3'
4
4
  # https://github.com/rails/rails/commit/9e42cf019f2417473e7dcbfcb885709fa2709f89.patch
@@ -92,7 +92,9 @@ ActiveSupport.on_load(:active_record) do
92
92
  self
93
93
  end
94
94
 
95
- private def structurally_compatible_for_or?(other) # :nodoc:
95
+ private
96
+
97
+ def structurally_compatible_for_or?(other) # :nodoc:
96
98
  (ActiveRecord::Relation::SINGLE_VALUE_METHODS - [:from]).all? { |m| send("#{m}_value") == other.send("#{m}_value") } &&
97
99
  (ActiveRecord::Relation::MULTI_VALUE_METHODS - [:references, :eager_load, :extending, :where, :having, :bind]).all? { |m| send("#{m}_values") == other.send("#{m}_values") }
98
100
  # https://github.com/rails/rails/commit/2c46d6db4feaf4284415f2fb6ceceb1bb535f278
@@ -101,8 +103,6 @@ ActiveSupport.on_load(:active_record) do
101
103
  # (ActiveRecord::Relation::CLAUSE_METHODS - [:having, :where]).all? { |m| send("#{m}_clause") != other.send("#{m}_clause") }
102
104
  end
103
105
 
104
- private
105
-
106
106
  def new_where_clause
107
107
  ActiveRecord::Relation::WhereClause.empty
108
108
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: where-or
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Fleischer
@@ -31,7 +31,7 @@ cert_chain:
31
31
  R5k6Ma92sW8jupX4cqbSu9rntdVQkNRpoHIrfU0MZT0cKsg/D1zMteylxrO3KMsz
32
32
  SPQRv+nrI1J0zevFqb8010heoR8SDyUA0Mm3+Q==
33
33
  -----END CERTIFICATE-----
34
- date: 2016-11-11 00:00:00.000000000 Z
34
+ date: 2016-11-26 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rails
metadata.gz.sig CHANGED
Binary file