where-or 0.1.0 → 0.1.1

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +2 -0
  4. data/lib/where-or.rb +3 -3
  5. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00f9b066d1de2204206334bd09620eb5d2f48153
4
- data.tar.gz: e08eaff0f6245b9e14f46a17f09a215ac9d457ca
3
+ metadata.gz: 570e1bbf0c33343e297c3c359928edebf9b0979e
4
+ data.tar.gz: 8add070663225de7bab2a8a3786fa944b9c77ea4
5
5
  SHA512:
6
- metadata.gz: f9855f971b1e406b405e556f06a0882eaf582ac344c010ab47c68999a99dec03401b9b44ea534650c7697433a16e7795dea76d4199de829a2c3fa886f3980380
7
- data.tar.gz: 415af9190110cee119358e4b9d64ef9ce141ea0c01d3a49d2fd76d03f13245dff41ac5885370d6831d679dffe40c110b5666b2a83c8876dee8ad8624a7ac17b4
6
+ metadata.gz: deb95ae420bfeb2bd809d9a70fab3113215800149f77823e846ea4019309c102b61f02925c03f4a781a04703adb95c045b5979ce7be10bba4a2af60304e58363
7
+ data.tar.gz: 4a079a3599ba1e0da29f8b8cf889f00ede75c467bc0702aa4c030afe918879eeb860659026f7fa6b1f8f0e548687a5bb596ceb9024b842e58e8d9a54b015bb8e
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015 Eric Guo
3
+ Copyright (c) 2015 Benjamin Fleischer, Eric Guo
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [Where or](https://github.com/rails/rails/pull/16052) function backport from Rails 5 for Rails 4.2
4
4
 
5
+ Confirm works from Rails 4.2.3 to 4.2.5. [with some issues](https://github.com/Eric-Guo/where-or/issues?utf8=%E2%9C%93&q=is%3Aissue)
6
+
5
7
  [![Gem Version](https://badge.fury.io/rb/where-or.svg)](https://badge.fury.io/for/rb/where-or)
6
8
 
7
9
  Installation:
@@ -1,6 +1,6 @@
1
- abort "Congrats for being on Rails 5. Now please remove this patch" if Rails::VERSION::MAJOR > 4
1
+ abort "Congrats for being on Rails 5. Now please remove this patch" if ActiveRecord::VERSION::MAJOR > 4
2
2
  # Tested on Rails Rails 4.2.3
3
- warn "Patching ActiveRecord::Relation#or. This might blow up" if Rails.version < '4.2.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
5
5
  # CHANGELOG.md
6
6
  # * Added the `#or` method on ActiveRecord::Relation, allowing use of the OR
@@ -64,7 +64,7 @@ ActiveSupport.on_load(:active_record) do
64
64
  #
65
65
  # The two relations must be structurally compatible: they must be scoping the same model, and
66
66
  # they must differ only by +where+ (if no +group+ has been defined) or +having+ (if a +group+ is
67
- # present). Neither relation may have a +limit+, +offset+, or +uniq+ set.
67
+ # present). Neither relation may have a +limit+, +offset+, or +distinct+ set.
68
68
  #
69
69
  # Post.where("id = 1").or(Post.where("id = 2"))
70
70
  # # SELECT `posts`.* FROM `posts` WHERE (('id = 1' OR 'id = 2'))
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: where-or
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
+ - Benjamin Fleischer
7
8
  - Eric Guo
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-09-16 00:00:00.000000000 Z
12
+ date: 2016-03-12 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rails