nsastorage 0.8.0 → 0.9.0

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
  SHA256:
3
- metadata.gz: 25f9928da25644b2ac5762c8c400bc97d14f75421ea2f6b717931ef3b1de2ac8
4
- data.tar.gz: 9b561d664872d11ac2478840f8f55c8daeaeef67e1e48d2b509ca033f3cfd0b3
3
+ metadata.gz: 94e09062ff5f8bce4702b3f5f7e25f666642c619fe30be72a0e264107242dc1f
4
+ data.tar.gz: 780cbe3b2b626c8af04c8d9fa588ccf7c163196de2ed7d9c83bb14b5298bd221
5
5
  SHA512:
6
- metadata.gz: 45b801b891ec0be544495c8f766d28e605a933b934d7ff2e8c60fae09480097ab764eca457bc883744c15794b35003479ff1ba45c0fc88a8a2272031f1ed2ac8
7
- data.tar.gz: 32cd81b1a9a8a3a012e573e87cffadf79c164e4d67b4fe514ee79dd37da901b609e7ea22b6c8a05cd1b7a7526af218dad97fe5921389584fe562eb6b024d44d4
6
+ metadata.gz: b17cf2b4dbc7c01bdec1632b5670cfb797d09320771339719aae168fa758b711334ad8fac2443c1f4ec8f5f0bf4ac8806e50b0e419f495c5cbcdaa7917206154
7
+ data.tar.gz: 9e6d7714d6298946f20331ce25fe52f473dd3f3faa64df3a37ead1ca7e5f697015bf015d6864f78a4cdb5f82df9370879f76d7809542719bd5b14ac764702b27
@@ -3,6 +3,8 @@
3
3
  module NSAStorage
4
4
  # The dimensions (width + depth + sqft) of a price.
5
5
  class Dimensions
6
+ DEFAULT_WIDTH = 5.0 # feet
7
+ DEFAULT_DEPTH = 5.0 # feet
6
8
  DEFAULT_HEIGHT = 8.0 # feet
7
9
 
8
10
  DIMENSIONS_REGEX = /(?<width>[\d\.]+) x (?<depth>[\d\.]+)/
@@ -65,8 +67,8 @@ module NSAStorage
65
67
  text = element.at_css('.unit-select-item-detail').text
66
68
  match = DIMENSIONS_REGEX.match(text)
67
69
 
68
- width = Float(match[:width])
69
- depth = Float(match[:depth])
70
+ width = match ? Float(match[:width]) : DEFAULT_WIDTH
71
+ depth = match ? Float(match[:depth]) : DEFAULT_DEPTH
70
72
  new(depth:, width:, height: DEFAULT_HEIGHT)
71
73
  end
72
74
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NSAStorage
4
- VERSION = '0.8.0'
4
+ VERSION = '0.9.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nsastorage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-11 00:00:00.000000000 Z
11
+ date: 2024-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http