rapa 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/rapa/resources/item_resource.rb +9 -2
- data/lib/rapa/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9ceb89b2621af6ad448d72cce84ec32b39c8c62
|
4
|
+
data.tar.gz: fcae95c513d568dff5c26480c988291c6f61cd49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 510ae1769236b56584933cd18ee2b60dfc9b663e9074d72bed903549bebb0376beea21cefd8b7d6b54a7517bca19ef45cd7d6fbf72c68c59180d8d9da3efb285
|
7
|
+
data.tar.gz: 50fc87fb4a121e71723656a1446c3204fc0bb8ab0491a9238d28a7eacf9b8dc1180d079b8a922e66e5b7e930cb89205a0721b996339a24c05b2487418e703c65
|
data/CHANGELOG.md
CHANGED
@@ -230,7 +230,7 @@ module Rapa
|
|
230
230
|
# @return [Date, nil]
|
231
231
|
def publication_date
|
232
232
|
if value = source.dig("ItemAttributes", "PublicationDate")
|
233
|
-
|
233
|
+
parse_date(value)
|
234
234
|
end
|
235
235
|
end
|
236
236
|
|
@@ -287,7 +287,7 @@ module Rapa
|
|
287
287
|
# @return [Date, nil]
|
288
288
|
def release_date
|
289
289
|
if value = source.dig("ItemAttributes", "ReleaseDate")
|
290
|
-
|
290
|
+
parse_date(value)
|
291
291
|
end
|
292
292
|
end
|
293
293
|
|
@@ -401,6 +401,13 @@ module Rapa
|
|
401
401
|
result[element["Description"]] = element["URL"]
|
402
402
|
end
|
403
403
|
end
|
404
|
+
|
405
|
+
# @param string [String]
|
406
|
+
# @return [Date]
|
407
|
+
def parse_date(string)
|
408
|
+
string += "-01" if /\A(\d{4})-(\d{2})\z/ === string
|
409
|
+
::Date.parse(string)
|
410
|
+
end
|
404
411
|
end
|
405
412
|
end
|
406
413
|
end
|
data/lib/rapa/version.rb
CHANGED