tiny_dyno 0.1.26 → 0.1.27
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/CHANGES.md +5 -0
- data/lib/patch/active_model_support_test_value_patch.rb +25 -0
- data/lib/tiny_dyno.rb +2 -0
- data/lib/tiny_dyno/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1caf29af0751dfd849a0de80ac3b8b718206f1f4
|
4
|
+
data.tar.gz: 0b4326e1772610c56e56d7dba427bb8c5aa51f06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69e9afd0aa16ca125e8dfae3a726de2ca2f51684c4eeae2865df0b2fb9c85cf9dd5a8361188bd387f869808ee73317f623cec222c25bc5108da4806e8913a40a
|
7
|
+
data.tar.gz: 74c11730911ae4f4199be301d2cd7e3a3679339cf871eab530ad5bcb6e344b1f437d216f45116a05f769155059544cb9c485adf8c485b3be457a1cd315fd7357
|
data/CHANGES.md
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'active_support/hash_with_indifferent_access'
|
2
|
+
require 'active_support/core_ext/object/duplicable'
|
3
|
+
require 'active_support/core_ext/string/filters'
|
4
|
+
|
5
|
+
module ActiveModel
|
6
|
+
|
7
|
+
module Dirty
|
8
|
+
extend ActiveSupport::Concern
|
9
|
+
include ActiveModel::AttributeMethods
|
10
|
+
|
11
|
+
# Handle <tt>*_will_change!</tt> for +method_missing+.
|
12
|
+
def attribute_will_change!(attr)
|
13
|
+
return if attribute_changed?(attr)
|
14
|
+
|
15
|
+
begin
|
16
|
+
value = __send__(attr)
|
17
|
+
value = value.duplicable? ? value.clone : value
|
18
|
+
rescue TypeError, NoMethodError,ArgumentError
|
19
|
+
end
|
20
|
+
|
21
|
+
set_attribute_was(attr, value)
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
data/lib/tiny_dyno.rb
CHANGED
data/lib/tiny_dyno/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiny_dyno
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Gerschner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -201,6 +201,7 @@ files:
|
|
201
201
|
- bin/tracer
|
202
202
|
- ci/tests.sh
|
203
203
|
- lib/config/locales/en.yml
|
204
|
+
- lib/patch/active_model_support_test_value_patch.rb
|
204
205
|
- lib/tiny_dyno.rb
|
205
206
|
- lib/tiny_dyno/adapter.rb
|
206
207
|
- lib/tiny_dyno/adapter/attributes.rb
|