nsastorage 0.7.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 +4 -4
- data/lib/nsastorage/dimensions.rb +4 -2
- data/lib/nsastorage/features.rb +1 -1
- data/lib/nsastorage/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94e09062ff5f8bce4702b3f5f7e25f666642c619fe30be72a0e264107242dc1f
|
4
|
+
data.tar.gz: 780cbe3b2b626c8af04c8d9fa588ccf7c163196de2ed7d9c83bb14b5298bd221
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/nsastorage/features.rb
CHANGED
@@ -10,7 +10,7 @@ module NSAStorage
|
|
10
10
|
text = element.text
|
11
11
|
|
12
12
|
new(
|
13
|
-
climate_controlled: text.include?('
|
13
|
+
climate_controlled: text.include?('Heated and Cooled'),
|
14
14
|
drive_up_access: text.include?('Drive Up Access'),
|
15
15
|
first_floor_access: text.include?('1st Floor')
|
16
16
|
)
|
data/lib/nsastorage/version.rb
CHANGED
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.
|
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
|
+
date: 2024-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|