rentjuicer 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
@@ -58,7 +58,7 @@ module Rentjuicer
58
58
  end
59
59
 
60
60
  def mls_disclaimer
61
- attribution_split[1] if mls_listing?
61
+ attribution_split[1].gsub('<br />', '') if mls_listing? && attribution_split[1]
62
62
  end
63
63
 
64
64
  def courtesy_of
@@ -68,7 +68,7 @@ module Rentjuicer
68
68
  private
69
69
 
70
70
  def attribution_split
71
- @attribution_parts ||= attribution.split('<br /><br />')
71
+ @attribution_parts ||= attribution.split('<br />', 2)
72
72
  end
73
73
 
74
74
  end
data/rentjuicer.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rentjuicer}
8
- s.version = "0.4.1"
8
+ s.version = "0.4.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["tcocca"]
12
- s.date = %q{2010-12-08}
12
+ s.date = %q{2010-12-14}
13
13
  s.description = %q{Ruby API wrapper for rentjuice.com built with httparty}
14
14
  s.email = %q{tom.cocca@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -95,18 +95,53 @@ describe Rentjuicer::Listing do
95
95
  end
96
96
 
97
97
  context "mls_listing" do
98
- before do
99
- @listing = Rentjuicer::Listing.new(valid_listing_rash.merge({
100
- "source_type" => "mls",
101
- "source_name" => "MLS PIN",
102
- "attribution" => "This listing courtesy of Holly Kampler at Classic Realty<br \/><br \/>The property listing data and information, or the Images, set forth herein were provided to MLS Property Information Network, Inc. from third party sources, including sellers, lessors and public records, and were compiled by MLS Property Information Network, Inc. The property listing data and information, and the Images, are for the personal, non-commercial use of consumers having a good faith interest in purchasing or leasing listed properties of the type displayed to them and may not be used for any purpose other than to identify prospective properties which such consumers may have a good faith interest in purchasing or leasing. MLS Property Information Network, Inc. and its subscribers disclaim any and all representations and warranties as to the accuracy of the property listing data and information, or as to the accuracy of any of the Images, set forth herein."
103
- }))
98
+ context "mlspin - 2 br tags" do
99
+ before do
100
+ @listing = Rentjuicer::Listing.new(valid_listing_rash.merge({
101
+ "source_type" => "mls",
102
+ "source_name" => "MLS PIN",
103
+ "attribution" => "This listing courtesy of Holly Kampler at Classic Realty<br \/><br \/>The property listing data and information, or the Images, set forth herein were provided to MLS Property Information Network, Inc. from third party sources, including sellers, lessors and public records, and were compiled by MLS Property Information Network, Inc. The property listing data and information, and the Images, are for the personal, non-commercial use of consumers having a good faith interest in purchasing or leasing listed properties of the type displayed to them and may not be used for any purpose other than to identify prospective properties which such consumers may have a good faith interest in purchasing or leasing. MLS Property Information Network, Inc. and its subscribers disclaim any and all representations and warranties as to the accuracy of the property listing data and information, or as to the accuracy of any of the Images, set forth herein."
104
+ }))
105
+ end
106
+
107
+ it { @listing.mls_listing?.should be_true }
108
+ it { @listing.source_name.should == "MLS PIN" }
109
+ it { @listing.attribution.should == "This listing courtesy of Holly Kampler at Classic Realty<br \/><br \/>The property listing data and information, or the Images, set forth herein were provided to MLS Property Information Network, Inc. from third party sources, including sellers, lessors and public records, and were compiled by MLS Property Information Network, Inc. The property listing data and information, and the Images, are for the personal, non-commercial use of consumers having a good faith interest in purchasing or leasing listed properties of the type displayed to them and may not be used for any purpose other than to identify prospective properties which such consumers may have a good faith interest in purchasing or leasing. MLS Property Information Network, Inc. and its subscribers disclaim any and all representations and warranties as to the accuracy of the property listing data and information, or as to the accuracy of any of the Images, set forth herein."}
110
+ it { @listing.courtesy_of.should == "This listing courtesy of Holly Kampler at Classic Realty"}
111
+ it { @listing.mls_disclaimer.should == "The property listing data and information, or the Images, set forth herein were provided to MLS Property Information Network, Inc. from third party sources, including sellers, lessors and public records, and were compiled by MLS Property Information Network, Inc. The property listing data and information, and the Images, are for the personal, non-commercial use of consumers having a good faith interest in purchasing or leasing listed properties of the type displayed to them and may not be used for any purpose other than to identify prospective properties which such consumers may have a good faith interest in purchasing or leasing. MLS Property Information Network, Inc. and its subscribers disclaim any and all representations and warranties as to the accuracy of the property listing data and information, or as to the accuracy of any of the Images, set forth herein."}
112
+ end
113
+
114
+ context "RAMB - no disclaimer, attribution only" do
115
+ before do
116
+ @listing = Rentjuicer::Listing.new(valid_listing_rash.merge({
117
+ "source_type" => "mls",
118
+ "source_name" => "RAMB",
119
+ "attribution" => "This listing is courtesy of XYZ Realty"
120
+ }))
121
+ end
122
+
123
+ it { @listing.mls_listing?.should be_true }
124
+ it { @listing.source_name.should == "RAMB" }
125
+ it { @listing.attribution.should == "This listing is courtesy of XYZ Realty"}
126
+ it { @listing.courtesy_of.should == "This listing is courtesy of XYZ Realty"}
127
+ it { @listing.mls_disclaimer.should be_nil}
104
128
  end
105
129
 
106
- it { @listing.mls_listing?.should be_true }
107
- it { @listing.source_name.should == "MLS PIN" }
108
- it { @listing.attribution.should == "This listing courtesy of Holly Kampler at Classic Realty<br \/><br \/>The property listing data and information, or the Images, set forth herein were provided to MLS Property Information Network, Inc. from third party sources, including sellers, lessors and public records, and were compiled by MLS Property Information Network, Inc. The property listing data and information, and the Images, are for the personal, non-commercial use of consumers having a good faith interest in purchasing or leasing listed properties of the type displayed to them and may not be used for any purpose other than to identify prospective properties which such consumers may have a good faith interest in purchasing or leasing. MLS Property Information Network, Inc. and its subscribers disclaim any and all representations and warranties as to the accuracy of the property listing data and information, or as to the accuracy of any of the Images, set forth herein."}
109
- it { @listing.courtesy_of.should == "This listing courtesy of Holly Kampler at Classic Realty"}
110
- it { @listing.mls_disclaimer.should == "The property listing data and information, or the Images, set forth herein were provided to MLS Property Information Network, Inc. from third party sources, including sellers, lessors and public records, and were compiled by MLS Property Information Network, Inc. The property listing data and information, and the Images, are for the personal, non-commercial use of consumers having a good faith interest in purchasing or leasing listed properties of the type displayed to them and may not be used for any purpose other than to identify prospective properties which such consumers may have a good faith interest in purchasing or leasing. MLS Property Information Network, Inc. and its subscribers disclaim any and all representations and warranties as to the accuracy of the property listing data and information, or as to the accuracy of any of the Images, set forth herein."}
130
+ context "MRED - 1 br and an image" do
131
+ before do
132
+ @listing = Rentjuicer::Listing.new(valid_listing_rash.merge({
133
+ "source_type" => "mls",
134
+ "source_name" => "MRED",
135
+ "attribution" => "<img src=\"http://idx.advancedaccess.com/disclaimer/brlogo125.jpg\" style=\"float:left; padding-right:10px;\" />Listing office: XYZ Realty<br />Properties marked with the MRED approved icon are courtesy of Midwest Real Estate Data, LLC. Information deemed reliable but not guaranteed. Copyright&copy; 2010 Midwest Real Estate Data LLC. All rights reserved."
136
+ }))
137
+ end
138
+
139
+ it { @listing.mls_listing?.should be_true }
140
+ it { @listing.source_name.should == "MRED" }
141
+ it { @listing.attribution.should == "<img src=\"http://idx.advancedaccess.com/disclaimer/brlogo125.jpg\" style=\"float:left; padding-right:10px;\" />Listing office: XYZ Realty<br />Properties marked with the MRED approved icon are courtesy of Midwest Real Estate Data, LLC. Information deemed reliable but not guaranteed. Copyright&copy; 2010 Midwest Real Estate Data LLC. All rights reserved."}
142
+ it { @listing.courtesy_of.should == "<img src=\"http://idx.advancedaccess.com/disclaimer/brlogo125.jpg\" style=\"float:left; padding-right:10px;\" />Listing office: XYZ Realty"}
143
+ it { @listing.mls_disclaimer.should == "Properties marked with the MRED approved icon are courtesy of Midwest Real Estate Data, LLC. Information deemed reliable but not guaranteed. Copyright&copy; 2010 Midwest Real Estate Data LLC. All rights reserved."}
144
+ end
111
145
  end
146
+
112
147
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rentjuicer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - tcocca
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-12-08 00:00:00 -05:00
12
+ date: 2010-12-14 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency