rearmed_rails 1.0.1 → 1.0.2
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/Rakefile +5 -11
- data/lib/rearmed_rails/monkey_patches/rails/active_record/query_methods.rb +9 -1
- data/lib/rearmed_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aa8a3fa5d2fae481deba16f2f21e754c19fb7290
|
|
4
|
+
data.tar.gz: d271b7c8b00b2145e54256a4fdf1767dde1a8e83
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d39e2f1584cb770f7795e6bb831558f1db17418d49872e5e284a2e9037bda041bb905717d9a011aeaf381c6d7651ae6ba5a3706dd946631a003628e8b26edb4
|
|
7
|
+
data.tar.gz: 58cef8028c03568d404aadd4c07d706a5d409657391a42b1247c090cdfd2410c154e5a784e22cbeb77bf7be8d9c367e2370b28efc80b23fa0e979fc180cba46b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
CHANGELOG
|
|
2
2
|
---------
|
|
3
3
|
|
|
4
|
+
- **1.0.2 - April 13, 2017**
|
|
5
|
+
- Fix ActiveRecord::Relation::QueryMethods error
|
|
6
|
+
- Add titleize(true) to capitalize first letters of each word only
|
|
4
7
|
- **1.0.1 - March 1, 2017**
|
|
5
8
|
- Fix bug in minitest patches
|
|
6
9
|
- **1.0.0 - Feb 28, 2017**
|
data/Rakefile
CHANGED
|
@@ -11,20 +11,14 @@ task :test do
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
task :console do
|
|
14
|
-
require '
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
hash: true,
|
|
18
|
-
object: true,
|
|
19
|
-
string: true,
|
|
20
|
-
date: true,
|
|
21
|
-
enumerable: true,
|
|
22
|
-
rails_3: true,
|
|
23
|
-
rails_4: true,
|
|
14
|
+
require 'rearmed_rails'
|
|
15
|
+
|
|
16
|
+
RearmedRails.enabled_patches = {
|
|
24
17
|
rails: true,
|
|
25
18
|
minitest: true
|
|
26
19
|
}
|
|
27
|
-
|
|
20
|
+
|
|
21
|
+
require 'rearmed_rails/apply_patches'
|
|
28
22
|
|
|
29
23
|
require 'irb'
|
|
30
24
|
binding.irb
|
|
@@ -6,6 +6,14 @@ if defined?(ActiveRecord)
|
|
|
6
6
|
if enabled || RearmedRails.dig(RearmedRails.enabled_patches, :rails, :active_record, :or)
|
|
7
7
|
|
|
8
8
|
if Rails::VERSION::MAJOR > 4
|
|
9
|
+
unless defined?(ActiveRecord::Relation::QueryMethods)
|
|
10
|
+
module ActiveRecord
|
|
11
|
+
class Relation
|
|
12
|
+
module QueryMethods
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
9
17
|
|
|
10
18
|
module RearmedRails
|
|
11
19
|
class OrChain
|
|
@@ -22,7 +30,7 @@ if defined?(ActiveRecord)
|
|
|
22
30
|
end
|
|
23
31
|
end
|
|
24
32
|
|
|
25
|
-
ActiveRecord::QueryMethods.
|
|
33
|
+
ActiveRecord::QueryMethods.module_eval do
|
|
26
34
|
def or(opts=nil, *rest)
|
|
27
35
|
if opts.nil?
|
|
28
36
|
return RearmedRails::OrChain.new(self)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rearmed_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Weston Ganger
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-04-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|