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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb3ab2ee2253bda6f6205c8f7c29f36a916b232d
|
4
|
+
data.tar.gz: 252006c75ba9b36df90da8cfe805cd58716d278b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
45
|
-
|
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.
|
104
|
+
ActiveRecord::Base.class_eval do
|
105
|
+
include ActiveRecord::DelayTouching
|
106
|
+
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.
|
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
|
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:
|
181
|
+
version: 1.9.3
|
182
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
183
|
requirements:
|
184
184
|
- - ">="
|