valkyrie 1.1.1 → 1.1.2

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: 60764ab5c68cc918ebfd0058eda42e2f1805dfe8
4
- data.tar.gz: 17e1baa69b726e14e70f9ee238acfa677045656a
3
+ metadata.gz: 2b7dcc5a9a264acb744d602fd069a7c2ff5a1c11
4
+ data.tar.gz: 82fdcd0161085c15492f9fb5fdd8515ffde5d7e3
5
5
  SHA512:
6
- metadata.gz: 1c0eee04f1d13d5ff2ad4c8e2875d6536f2ab9fc147bc0f9b42166700d5ebef8cc785679f21e7fd0b09bc45d77efb6707a031f6d7af925edb90ae7cf81ea8a9d
7
- data.tar.gz: f4dc4207a4ea984aff4668b10b8415b32f77ba24a5d6d94408fda399e97d10b4528a137c70d670bf67ff58bd045136cc9b6d20611b7f382668d17badc88ad93d
6
+ metadata.gz: ef3b35b27a29849cb2bd00e136d20018067c6852f1f3ead55f92fd202d1030b6ecc073fed84f43b724b9ba52aba193bd28d9b5eece9144ecac1b6edbabdc200c
7
+ data.tar.gz: '0824a51c53a59ec27205872aa5e29b22ad8bd711ac035bd307d17db1b5b17e1178d159d30229467f87d33b755ee4d6b979719333f287fd6ce74d979d382ed58b'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # v1.1.2 2018-06-08
2
+
3
+ ## Changes since last release
4
+
5
+ * Performance improvements for ActiveRecord to Valkyrie::Resource conversions.
6
+ [tpendragon](https://github.com/tpendragon)
7
+
1
8
  # v1.1.1 2018-05-31
2
9
 
3
10
  ## Changes since last release
@@ -43,7 +43,9 @@ module Valkyrie::Persistence::Postgres
43
43
  class RDFMetadata
44
44
  attr_reader :metadata
45
45
  def initialize(metadata)
46
- @metadata = metadata
46
+ # nil hash values are handled by the default state in dry-types
47
+ # anyways, so don't bother processing them here.
48
+ @metadata = metadata.compact
47
49
  end
48
50
 
49
51
  def result
@@ -107,6 +109,20 @@ module Valkyrie::Persistence::Postgres
107
109
  end
108
110
  end
109
111
 
112
+ # Handles iterating over arrays of values and converting each value.
113
+ class EnumeratorValue < ::Valkyrie::ValueMapper
114
+ PostgresValue.register(self)
115
+ def self.handles?(value)
116
+ value.respond_to?(:each)
117
+ end
118
+
119
+ def result
120
+ value.map do |value|
121
+ calling_mapper.for(value).result
122
+ end
123
+ end
124
+ end
125
+
110
126
  # Converts Date strings to `DateTime`
111
127
  class DateValue < ::Valkyrie::ValueMapper
112
128
  PostgresValue.register(self)
@@ -124,20 +140,6 @@ module Valkyrie::Persistence::Postgres
124
140
  DateTime.iso8601(value).utc
125
141
  end
126
142
  end
127
-
128
- # Handles iterating over arrays of values and converting each value.
129
- class EnumeratorValue < ::Valkyrie::ValueMapper
130
- PostgresValue.register(self)
131
- def self.handles?(value)
132
- value.respond_to?(:each)
133
- end
134
-
135
- def result
136
- value.map do |value|
137
- calling_mapper.for(value).result
138
- end
139
- end
140
- end
141
143
  end
142
144
  end
143
145
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Valkyrie
3
- VERSION = "1.1.1"
3
+ VERSION = "1.1.2"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valkyrie
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trey Pendragon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-31 00:00:00.000000000 Z
11
+ date: 2018-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct