rearmed_rails 1.0.1 → 1.0.2

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: 1f829123e5c404ffa148cc2c482db41843aa80c6
4
- data.tar.gz: 9d04ddc3473378e75393d3e7614896ed931c14c4
3
+ metadata.gz: aa8a3fa5d2fae481deba16f2f21e754c19fb7290
4
+ data.tar.gz: d271b7c8b00b2145e54256a4fdf1767dde1a8e83
5
5
  SHA512:
6
- metadata.gz: a2aedc840f0454845bae1f6115134c8daa7557229c55330d00ed9447edd4cd622db52b8e69bfb264b85b0f56a7f3c8ef01cde03d3a9cb86fd6fc812c46871b94
7
- data.tar.gz: 2e044aaa8ba45690b1b70653ac6cffa3e2d923fc720b7e8521b60af3ffdad0ed9a305a11e91e7f8d2bd80eb3eebd0bf7e78949f7a0a6a8d3feb19c37f2b4e325
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 'rearmed'
15
- Rearmed.enabled_patches = {
16
- array: true,
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
- require 'rearmed/apply_patches'
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.class_eval do
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)
@@ -1,3 +1,3 @@
1
1
  module RearmedRails
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
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.1
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-03-01 00:00:00.000000000 Z
11
+ date: 2017-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake