active_mocker 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -2
- data/lib/active_mocker/mock/base.rb +10 -1
- data/lib/active_mocker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c9b8b50a769f0fd124221aefa61ec465b8950b4
|
4
|
+
data.tar.gz: 1c3a9909ef77657aecc9c1594b20acbd14747c17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45027e22f496a48bfc8d8653bb6ececf3332e139252ceeba5643cde16eb80bda6725d69ffa4faf54619313b57a48adae270712438ee781335190651535249ef3
|
7
|
+
data.tar.gz: eb5696f31e0f43c9a685fae05b37c4edf80f1a829ce8e729ed177bec160564a1d794cdf680cb80d4d61c5f05c7baee11bce7f457e70a1714f6f0469f262b780f
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
## 2.2.
|
4
|
+
## 2.2.5 - 2016-08-28
|
5
|
+
### Fix
|
6
|
+
- Ensure '#update' calls save. Addressing the case where an object had not been saved prior would not get persisted.
|
7
|
+
|
8
|
+
### Enhancement
|
9
|
+
- Add documentation to `#assign_attributes`
|
10
|
+
|
11
|
+
## 2.2.4 - 2016-08-13
|
5
12
|
### Fix
|
6
13
|
- `BigDecimal`, `Date`, `DateTime`, and `Time` when used as defaults in the schema caused mock generation failures.
|
7
14
|
|
@@ -9,7 +16,7 @@ All notable changes to this project will be documented in this file.
|
|
9
16
|
### Fix
|
10
17
|
- Constant values assigned to non sudo primitives objects causing issues. https://github.com/zeisler/active_mocker/issues/72
|
11
18
|
|
12
|
-
|
19
|
+
### Enhancement
|
13
20
|
- Tested support for Rails RC2
|
14
21
|
|
15
22
|
## 2.2.2 - 2016-05-05
|
@@ -186,9 +186,18 @@ module ActiveMocker
|
|
186
186
|
|
187
187
|
def update(attributes = {})
|
188
188
|
assign_attributes(attributes)
|
189
|
+
save
|
189
190
|
end
|
190
191
|
|
191
|
-
#
|
192
|
+
# Allows you to set all the attributes by passing in a hash of attributes with
|
193
|
+
# keys matching the attribute names (which again matches the column names).
|
194
|
+
#
|
195
|
+
# cat = Cat.new(name: "Gorby", status: "yawning")
|
196
|
+
# cat.attributes # => { "name" => "Gorby", "status" => "yawning", "created_at" => nil, "updated_at" => nil}
|
197
|
+
# cat.assign_attributes(status: "sleeping")
|
198
|
+
# cat.attributes # => { "name" => "Gorby", "status" => "sleeping", "created_at" => nil, "updated_at" => nil }
|
199
|
+
#
|
200
|
+
# Aliased to <tt>attributes=</tt>.
|
192
201
|
def assign_attributes(new_attributes)
|
193
202
|
yield self if block_given?
|
194
203
|
unless new_attributes.respond_to?(:stringify_keys)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_mocker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dustin Zeisler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|