polterheist 0.0.1 → 0.0.2
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/polterheist/themls.rb +0 -3
- data/lib/polterheist/version.rb +1 -1
- data/spec/lib/polterheist/themls_spec.rb +3 -3
- 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: 0a442888593054991027f1ee2027f84413ec0469
|
4
|
+
data.tar.gz: bfe4f95df09a2620dcbcb5e4a792ebd67b6e0801
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee583adb841548e99863b5ad776d376719c18425bf8461f9fc70a24342f0fa86d9e5f0cfbe61549d9465999c8aa82bc96e1754dae1e2897c4c43cc40bdeca409
|
7
|
+
data.tar.gz: 5d5c9bc8d4bf7ad8bb91e9a13bce22c2f4774f903102dcfece9cde1f7db28d39fc5ea322835fcc8eed16f6210a23685a4db9538de350d33dbb6d4dfc87413884
|
data/lib/polterheist/themls.rb
CHANGED
@@ -11,13 +11,10 @@ module Polterheist
|
|
11
11
|
click_on "Search"
|
12
12
|
loop do
|
13
13
|
if page.has_css?(".mainImage")
|
14
|
-
puts "Found a house at #{address}"
|
15
14
|
return page.body
|
16
15
|
elsif page.has_text? "No Homes Found"
|
17
|
-
puts "Did not find any houses at #{address}"
|
18
16
|
return false
|
19
17
|
else
|
20
|
-
print "."
|
21
18
|
sleep 1
|
22
19
|
end
|
23
20
|
end
|
data/lib/polterheist/version.rb
CHANGED
@@ -4,7 +4,7 @@ describe Polterheist::TheMLS do
|
|
4
4
|
describe "#locate_property" do
|
5
5
|
let(:result) { subject.locate_property address }
|
6
6
|
|
7
|
-
context "not
|
7
|
+
context "could not locate property with address" do
|
8
8
|
let(:address) { "8622 LEHIGH Ave" }
|
9
9
|
|
10
10
|
it "returns false" do
|
@@ -12,10 +12,10 @@ describe Polterheist::TheMLS do
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
context "located" do
|
15
|
+
context "located the property with the address" do
|
16
16
|
let(:address) { "7654 WESTLAND Ave" }
|
17
17
|
|
18
|
-
it "can be further
|
18
|
+
it "data can be further extracted" do
|
19
19
|
doc = Nokogiri::HTML.parse(result)
|
20
20
|
img_src = doc.css(".mainImage img").first.attr :src
|
21
21
|
img_src.should match /(jpg|png)/
|