activerecord-delay_touching 0.0.2 → 0.0.3

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: 426d6e9fd101a7f79ad3d9990af5b314c02bf112
4
- data.tar.gz: 030124ea58d1fd33a80887ced69cb284516e451e
3
+ metadata.gz: fb3ab2ee2253bda6f6205c8f7c29f36a916b232d
4
+ data.tar.gz: 252006c75ba9b36df90da8cfe805cd58716d278b
5
5
  SHA512:
6
- metadata.gz: 19460ef389fbcda962b5e88ad6c0946c73c4035e33080d25509cbc309d2a0a89a5735f50b7bed97e7d20be24ce1f9de280fd00f9f436dc0f574f39a93b7fab8e
7
- data.tar.gz: 9688457c932379adb77a33f1e7a9ac3684ea0f49fc8a72dba59d916e4f363afd607f66c414719ce222cf173217f5a222394203b2c878a6442bde53b61579ff91
6
+ metadata.gz: e0582f5ab6cecfbbe5ab2e28411154b5b5d7ddf8eb851dd3fe68e3a712bd17915e4931c59edaca46bd15e88e262dadb0d6689c743c8a507340f4274fc2fe8ef6
7
+ data.tar.gz: ea148565acd6d3d2138b748e44589b828df5d2168f8a71c8b2f17216af0d3ac1b1ea9db51bce193a03ee22afee4a1b15d0103f95f8da57f8361702b421408b0b
@@ -13,6 +13,8 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = ""
14
14
  spec.license = "MIT"
15
15
 
16
+ spec.required_ruby_version = ">= 1.9.3"
17
+
16
18
  spec.files = `git ls-files -z`.split("\x0")
17
19
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
20
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
@@ -7,7 +7,7 @@ module ActiveRecord
7
7
 
8
8
  # Override ActiveRecord::Base#touch.
9
9
  def touch(name = nil)
10
- if self.class.delay_touching? && !try(:no_touching?)
10
+ if self.class.delay_touching? && (!respond_to?(:no_touching?) || !try(:no_touching?))
11
11
  DelayTouching.add_record(self, name)
12
12
  true
13
13
  else
@@ -41,8 +41,8 @@ module ActiveRecord
41
41
  Thread.current[:delay_touching_state] ||= State.new
42
42
  end
43
43
 
44
- class << self
45
- delegate :add_record, to: :state
44
+ def self.add_record(record, column)
45
+ state.add_record(record, column)
46
46
  end
47
47
 
48
48
  # Start delaying all touches. When done, apply them. (Unless nested.)
@@ -101,4 +101,6 @@ module ActiveRecord
101
101
  end
102
102
  end
103
103
 
104
- ActiveRecord::Base.include ActiveRecord::DelayTouching
104
+ ActiveRecord::Base.class_eval do
105
+ include ActiveRecord::DelayTouching
106
+ end
@@ -1,5 +1,5 @@
1
1
  module Activerecord
2
2
  module DelayTouching
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-delay_touching
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Morearty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-07 00:00:00.000000000 Z
11
+ date: 2015-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -178,7 +178,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
178
178
  requirements:
179
179
  - - ">="
180
180
  - !ruby/object:Gem::Version
181
- version: '0'
181
+ version: 1.9.3
182
182
  required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - ">="