chronicle-core 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: 21efb5e6a7bf0dfb29a8e4187dfdfddbac79e47b4a13f636cd7be6e77ff95eea
4
- data.tar.gz: 1527959dfd39a7f4345d784f009d3f5aaf0e67008b31c1734fdf2e1aa0b782db
3
+ metadata.gz: 0f8a25629577c83f71a66b2451f2858cad759e9ace5547e8f9add4eb11be8771
4
+ data.tar.gz: 978d36a75ebdb775b86698afd5f8f7659dc64b9d993b2046f45aaf979ca52549
5
5
  SHA512:
6
- metadata.gz: 10caca6156eb0ffac0cbfbc15fbcdf0b1edc289862f74f7dea019bbd57111acccd08d0490f1c893af022ad1337b0b90858f1b54d3b9940f1dca05459c3aced44
7
- data.tar.gz: f780be776364b03063b033e5f39df64eddee82ff6643b0e75fd6840bf9e144742f2f123696163e76d90bee0dc3a33174988f9daaf6ac162e73eed8a5b6861233
6
+ metadata.gz: 6aff817c68c5d0795389456eafe32aa791f0dd45a3998bb8101a443dc7681b5aaaa719a0de4694c4af001eec98b66b81fffc24f4ed874d089e1951a1ae3d42b6
7
+ data.tar.gz: 362d898e479fe85e629abf911e034d4c56236ef95e21b1000f2c839a12fc8d87b028f765bba661856c65bd77020e8f557ee29780df071a644829e26ea2e3d080
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Chronicle
4
4
  module Core
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
@@ -50,9 +50,7 @@ module Chronicle::Schema
50
50
  end
51
51
 
52
52
  def to_h
53
- identifier_hash
54
- .merge(@properties)
55
- .merge({ meta: meta })
53
+ @properties
56
54
  end
57
55
 
58
56
  def to_h_flattened
@@ -1,7 +1,15 @@
1
1
  module Chronicle::Serialization
2
2
  class HashSerializer < Chronicle::Serialization::Serializer
3
3
  def serializable_hash
4
- @record.to_h
4
+ @record.properties.transform_values do |v|
5
+ if v.is_a?(Array)
6
+ v.map{|record| HashSerializer.new(record).serializable_hash}
7
+ elsif v.is_a?(Chronicle::Schema::Base)
8
+ HashSerializer.new(v).serializable_hash
9
+ else
10
+ v
11
+ end
12
+ end
5
13
  end
6
14
  end
7
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chronicle-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Louis