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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9be1a4a8a33f8e58e8733ed44ebec8d7a96a41aa
4
- data.tar.gz: 911a0d874d5679fc5e5e85271228ed50844009c4
3
+ metadata.gz: 5c9b8b50a769f0fd124221aefa61ec465b8950b4
4
+ data.tar.gz: 1c3a9909ef77657aecc9c1594b20acbd14747c17
5
5
  SHA512:
6
- metadata.gz: 2043c2a02be22bff409c691d395255bb73cbcd218fa7f1ceab4b609f55b179734394a0f4a0aa7803b3b61674bad0ab062804ce68c19e187bb7a609f41c7bd77d
7
- data.tar.gz: dab8ebc81628445fafaea0693c9eb5d7791a5336a6b720be72fc3b842b8b1a261fc9060e0b9528df49dc78650e55819bb12bc31057b2ad3092a24a40d718a57b
6
+ metadata.gz: 45027e22f496a48bfc8d8653bb6ececf3332e139252ceeba5643cde16eb80bda6725d69ffa4faf54619313b57a48adae270712438ee781335190651535249ef3
7
+ data.tar.gz: eb5696f31e0f43c9a685fae05b37c4edf80f1a829ce8e729ed177bec160564a1d794cdf680cb80d4d61c5f05c7baee11bce7f457e70a1714f6f0469f262b780f
@@ -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 - 2016-06-27
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
- ## Enhancement
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
- # @api private
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)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ActiveMocker
3
- VERSION = "2.2.4"
3
+ VERSION = "2.2.5"
4
4
  end
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
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-13 00:00:00.000000000 Z
11
+ date: 2016-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport