rapa 0.5.3 → 0.5.4

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: 3ecbcbb044c73f4560332f62639e955ab9c0aa24
4
- data.tar.gz: 140d7ba67512d311bed4a09137c30523fb13e618
3
+ metadata.gz: 99c5ffe4c3de7048313caf6adac60329635e2315
4
+ data.tar.gz: 4baa9be1a9122505643aea52f9fec12cb1ace24f
5
5
  SHA512:
6
- metadata.gz: 82cdcaa05a32009924fe002eb01caac7b5e2ca1a18ba504375f84d45b74fa59c22f6ce0e55728b4fc726d3b56e36d4dc5caa0a12c691caf85e168f1281ef87e4
7
- data.tar.gz: 74639cdb934485b3734e4fed9c8ed0fa8441d77df4ba2feb40d1b5f5e7316a2cc2dfcb8f6e9fd20d85241899e4bd950682fe2f897582593e058b5d6f4020c745
6
+ metadata.gz: 80857814a20dac64b2145861917c413d4e22374afe57307f6310995db9f17955ddf399b8dac781d345ae085ee31820317a29593d746bb71b3570790a0634741e
7
+ data.tar.gz: d639f85b8c8e15f42d2d3c681cb98ddfab71b09692c87ce89a8281b63f44f32542dc900f7ea71dc4c14c60c841002d3239e36bc74f15afa1bb7d897400f6791e
@@ -1,4 +1,8 @@
1
- ## Unreleased
1
+ ## v0.5.4
2
+
3
+ - Support YYYY date format
4
+
5
+ ## v0.5.3
2
6
 
3
7
  - Add some price method on `Rapa::Resources::ItemResource`
4
8
 
data/README.md CHANGED
@@ -144,6 +144,9 @@ Available methods:
144
144
  - `#package_length`
145
145
  - `#package_weight`
146
146
  - `#package_width`
147
+ - `#price_lowest_collectible`
148
+ - `#price_lowest_new`
149
+ - `#price_lowest_used`
147
150
  - `#product_group`
148
151
  - `#product_type_name`
149
152
  - `#publication_date`
@@ -424,10 +424,16 @@ module Rapa
424
424
  end
425
425
 
426
426
  # @param string [String]
427
- # @return [Date]
427
+ # @return [Date, nil]
428
428
  def parse_date(string)
429
- string += "-01" if /\A(\d{4})-(\d{2})\z/ === string
430
- ::Date.parse(string)
429
+ case string
430
+ when /\A\d{1,4}\z/
431
+ ::Date.parse("#{string}-01-01")
432
+ when /\A\d{1,4}-\d{1,2}\z/
433
+ ::Date.parse("#{string}-01")
434
+ when /\A\d{1,4}-\d{1,2}-\d{1,2}\z/
435
+ ::Date.parse(string)
436
+ end
431
437
  end
432
438
  end
433
439
  end
@@ -1,3 +1,3 @@
1
1
  module Rapa
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rapa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-28 00:00:00.000000000 Z
11
+ date: 2017-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday