active_record-acts_as 2.0.1 → 2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 761438498f49dac20f75381f874a88e27ec138cd
|
4
|
+
data.tar.gz: 36469a2966a6daf4b2c949f7d470ec2b2a83493a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c5a6238806ba9f7c760ac24c234f3862fa4439b31504d98162482bd86d4b74b4fcaa272941fc62d3abd91053bf5ecc8ce1e52a2d2b1cef9bdfe2fee396a29d1
|
7
|
+
data.tar.gz: b4a41d99a5da3cc2c7bf64ffc0ba1cfb4941558d25ee03324c3610fbf7b72a3f80d4640c322db23bce2059bdc09dc006b80632e1cb546e7267449d6eb04fb534
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
## [2.0.1] - 2016-10-05
|
8
|
+
### Added
|
9
|
+
- Added this changelog
|
10
|
+
- Added `touch` option to skip touching the `acting_as` object (https://github.com/hzamani/active_record-acts_as/pull/78, thanks to [allenwq](https://github.com/allenwq)!)
|
11
|
+
|
7
12
|
## [2.0.0] - 2016-09-14
|
8
13
|
### Added
|
9
14
|
- Added support for Rails 5 (https://github.com/hzamani/active_record-acts_as/pull/80, thanks to [nicklandgrebe](https://github.com/nicklandgrebe)!)
|
@@ -15,7 +20,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
15
20
|
### Fixed
|
16
21
|
- Fixed `remove_actable` migration helper (https://github.com/hzamani/active_record-acts_as/pull/71, thanks to [nuclearpidgeon](https://github.com/nuclearpidgeon)!)
|
17
22
|
|
18
|
-
[Unreleased]: https://github.com/hzamani/active_record-acts_as/compare/v2.0.
|
23
|
+
[Unreleased]: https://github.com/hzamani/active_record-acts_as/compare/v2.0.1...HEAD
|
24
|
+
[2.0.1]: https://github.com/hzamani/active_record-acts_as/compare/v2.0.0...v2.0.1
|
19
25
|
[2.0.0]: https://github.com/hzamani/active_record-acts_as/compare/v1.0.8...v2.0.0
|
20
26
|
[1.0.8]: https://github.com/hzamani/active_record-acts_as/compare/v1.0.7...v1.0.8
|
21
27
|
[1.0.7]: https://github.com/hzamani/active_record-acts_as/compare/v1.0.6...v1.0.7
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
module ActiveRecord
|
3
2
|
module ActsAs
|
4
3
|
module InstanceMethods
|
@@ -93,6 +92,9 @@ module ActiveRecord
|
|
93
92
|
end
|
94
93
|
end
|
95
94
|
|
95
|
+
def touch
|
96
|
+
acting_as.touch
|
97
|
+
end
|
96
98
|
|
97
99
|
def respond_to?(name, include_private = false, as_original_class = false)
|
98
100
|
as_original_class ? super(name, include_private) : super(name, include_private) || acting_as.respond_to?(name)
|
data/spec/acts_as_spec.rb
CHANGED
@@ -229,6 +229,12 @@ RSpec.describe "ActiveRecord::Base model with #acts_as called" do
|
|
229
229
|
expect { pen.save }.to_not change { pen.reload.product.updated_at }
|
230
230
|
end
|
231
231
|
|
232
|
+
it "touches supermodel when #touch is called" do
|
233
|
+
pen.save
|
234
|
+
|
235
|
+
expect { pen.touch }.to change { pen.product.updated_at }
|
236
|
+
end
|
237
|
+
|
232
238
|
it "raises NoMethodEror on unexisting method call" do
|
233
239
|
expect { pen.unexisted_method }.to raise_error(NoMethodError)
|
234
240
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record-acts_as
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hassan Zamani
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|