parse-stack 1.0.8 → 1.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 165349f0e4fd1b1a0205243c503652c6b368a216
4
- data.tar.gz: d6796a7fc8df73afefbb3887fa576c3c0784c49d
3
+ metadata.gz: 913104081f5e4fb6b264dccaed1c8b48e07aa5fb
4
+ data.tar.gz: 34f8a85123921817ebcc50ac16de2ddd41425f65
5
5
  SHA512:
6
- metadata.gz: bd504bcc1a7ba6b36027e8a4efe208adb6e4cc3fc84bf3829ab1aac3708e87112828634c98451619c6fc96177b77880a535204e99e532e2328a296b3654154aa
7
- data.tar.gz: e58c3f344e90c1fce73e6de012a373c47612903894c190649cd11ee8ffda00daf9056fbb9ed715fa1cff41ebb0cacaa501874a3c39a374da6accb0f1323fbc9a
6
+ metadata.gz: 8b7ae367ad4c0ee10a8cdd4ceae7f1bf84f28a4e6c61969a583cc00cdf720963abd31d6f79cfe42e6e377f903a76a9a45bee232b5ebf138950c5921fee54e25d
7
+ data.tar.gz: 419c656d9bf3d357a95ccdcb335ad166a26760f74818f6799489e452351c3b58df1231a3592c129c7e56f4fcefefc013159fbfb8bed44851f1fd58f0e5561652
data/Changes.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Parse-Stack Changes
2
2
 
3
+ 1.0.9
4
+ -----------
5
+ - Fixes issues with setting default values as dirty when using the builder or before_save hook.
6
+
3
7
  1.0.8
4
8
  -----------
5
9
  - Fixes issues when setting a collection proxy property with a collection proxy.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parse-stack (1.0.8)
4
+ parse-stack (1.0.9)
5
5
  active_model_serializers (>= 0.9, < 1)
6
6
  activemodel (>= 4, < 5)
7
7
  activesupport (>= 4, < 5)
@@ -28,7 +28,7 @@ GEM
28
28
  binding_of_caller (0.7.2)
29
29
  debug_inspector (>= 0.0.1)
30
30
  builder (3.2.2)
31
- coderay (1.1.0)
31
+ coderay (1.1.1)
32
32
  debug_inspector (0.0.2)
33
33
  dotenv (2.1.0)
34
34
  faraday (0.9.2)
@@ -41,7 +41,7 @@ GEM
41
41
  minitest (5.8.4)
42
42
  moneta (0.8.0)
43
43
  multipart-post (2.0.0)
44
- parallel (1.6.2)
44
+ parallel (1.7.0)
45
45
  pry (0.10.3)
46
46
  coderay (~> 1.1.0)
47
47
  method_source (~> 0.8.1)
@@ -283,7 +283,7 @@ module Parse
283
283
  def apply_attributes!(hash, dirty_track: false)
284
284
  return unless hash.is_a?(Hash)
285
285
 
286
- @id ||= hash["id"] || hash["objectId"]
286
+ @id ||= hash["id"] || hash["objectId"] || hash[:objectId]
287
287
  hash.each do |key, value|
288
288
  method = "#{key}_set_attribute!"
289
289
  send(method, value, dirty_track) if respond_to?( method )
@@ -242,11 +242,9 @@ module Parse
242
242
  klass = Parse::Model.find_class className
243
243
  o = nil
244
244
  if klass.present?
245
- o = klass.new
246
245
  # when creating objects from Parse JSON data, don't use dirty tracking since
247
246
  # we are considering these objects as "pristine"
248
- o.apply_attributes!(json, dirty_track: false)
249
- o.clear_changes!
247
+ o = klass.new(json)
250
248
  else
251
249
  o = Parse::Pointer.new className, (json["objectId"] || json[:objectId])
252
250
  end
@@ -1,5 +1,5 @@
1
1
  module Parse
2
2
  module Stack
3
- VERSION = "1.0.8"
3
+ VERSION = "1.0.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parse-stack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Persaud