innards 0.1.0.pre → 0.1.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 +7 -0
- data/.gitignore +21 -0
- data/.rspec +1 -0
- data/.travis.yml +9 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +49 -0
- data/README.md +26 -6
- data/Rakefile +2 -0
- data/innards.gemspec +26 -0
- data/lib/innards.rb +9 -1
- data/lib/innards/connection.rb +198 -109
- data/lib/innards/cookie_handler.rb +24 -0
- data/lib/innards/digest_handler.rb +93 -0
- data/lib/innards/exceptions.rb +31 -4
- data/lib/innards/multipart_handler.rb +31 -0
- data/lib/innards/parsers/get_metadata_parser.rb +64 -0
- data/lib/innards/parsers/login_parser.rb +29 -0
- data/lib/innards/parsers/logout_parser.rb +29 -0
- data/lib/innards/parsers/parser_base.rb +73 -0
- data/lib/innards/parsers/search_parser.rb +41 -0
- data/lib/innards/version.rb +2 -2
- data/spec/innards/connection_spec.rb +232 -0
- data/spec/innards/cookie_handler_spec.rb +16 -0
- data/spec/innards/digest_handler_spec.rb +31 -0
- data/spec/innards/multipart_handler_spec.rb +28 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/stubs/getobject_success.txt +14 -0
- data/spec/stubs/login_success.xml +14 -0
- data/spec/stubs/logout_success.xml +7 -0
- data/spec/stubs/metadata_success.xml +127 -0
- data/spec/stubs/rets_error.xml +1 -0
- data/spec/stubs/search_success.xml +10 -0
- data/tasks/util.rake +9 -0
- metadata +64 -34
@@ -0,0 +1,16 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Innards::CookieHandler do
|
4
|
+
|
5
|
+
before do
|
6
|
+
@cookies = { :cookies => [] }
|
7
|
+
@cookie_handler = Innards::CookieHandler.new @cookies
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should parse and build cookie header" do
|
11
|
+
cookie_string = "name=value"
|
12
|
+
@cookie_handler.parse "#{cookie_string};"
|
13
|
+
@cookie_handler.build.should match cookie_string
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "uri"
|
3
|
+
|
4
|
+
describe Innards::DigestHandler do
|
5
|
+
|
6
|
+
before do
|
7
|
+
@params = { :digest => [], :login_uri => URI("http://Mufasa:Circle%20Of%20Life@www.test.com/dir/index.html"), :request_count => "1" }
|
8
|
+
@digest_handler = Innards::DigestHandler.new @params
|
9
|
+
@digest_string = 'Digest realm="testrealm@host.com", qop="auth,auth-int", nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093", opaque="5ccc069c403ebaf9f0171e9517f40e41"'
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should parse and build digest header" do
|
13
|
+
@digest_handler.parse @digest_string
|
14
|
+
@digest_handler.build_for("/dir/index.html").scan(/(\w+)="(.*?)"/) {
|
15
|
+
case $1
|
16
|
+
when "username"
|
17
|
+
$2.should match "Mufasa"
|
18
|
+
when "realm"
|
19
|
+
$2.should match "testrealm@host.com"
|
20
|
+
when "nonce"
|
21
|
+
$2.should match "dcd98b7102dd2f0e8b11d0f600bfb0c093"
|
22
|
+
when "uri"
|
23
|
+
$2.should match "/dir/index.html"
|
24
|
+
end
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should throw exception on stale digest" do
|
29
|
+
expect { @digest_handler.parse "#{@digest_string}, stale=true" }.to raise_error
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Innards::DigestHandler do
|
4
|
+
|
5
|
+
before do
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should return true for is_multipart_response? with a valid content-type" do
|
9
|
+
multipart_string = ["multipart/parallel;",
|
10
|
+
"boundary=\"aa58ae6\""].join(" ")
|
11
|
+
@multipart_handler = Innards::MultipartHandler.new multipart_string
|
12
|
+
@multipart_handler.is_multipart_response?.should be_true
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should return false for is_multipart_response? with an invalid content-type" do
|
16
|
+
multipart_string = "Invalid Header"
|
17
|
+
@multipart_handler = Innards::MultipartHandler.new multipart_string
|
18
|
+
@multipart_handler.is_multipart_response?.should be_false
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should return an empty array with an invalid body" do
|
22
|
+
multipart_string = ["multipart/parallel;",
|
23
|
+
"boundary=\"aa58ae6\""].join(" ")
|
24
|
+
@multipart_handler = Innards::MultipartHandler.new multipart_string
|
25
|
+
@multipart_handler.parse("").should be_empty
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
--aa58ae639983623715598443ccfe159ccf009de8
|
3
|
+
Content-ID: 2
|
4
|
+
Object-ID: 1
|
5
|
+
Content-Type: image/jpeg
|
6
|
+
|
7
|
+
This is the data
|
8
|
+
--aa58ae639983623715598443ccfe159ccf009de8
|
9
|
+
Content-ID: 2
|
10
|
+
Object-ID: 2
|
11
|
+
Content-Type: image/jpeg
|
12
|
+
|
13
|
+
This is the second data
|
14
|
+
--aa58ae639983623715598443ccfe159ccf009de8--
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<RETS ReplyCode="0" ReplyText="Operation Successful">
|
2
|
+
Broker =
|
3
|
+
MemberName = Joe Schmoe
|
4
|
+
MetadataVersion = 1.00.00001
|
5
|
+
MinMetadataVersion = 1.00.00001
|
6
|
+
User = Joe,NULL,NULL,NULL
|
7
|
+
Login = http://www.dis.com:6103/rets/login
|
8
|
+
Logout = http://www.dis.com:6103/rets/logout
|
9
|
+
Search = http://www.dis.com:6103/rets/search
|
10
|
+
GetMetadata = http://www.dis.com:6103/rets/getMetadata
|
11
|
+
GetObject = http://www.dis.com:6103/rets/getObject
|
12
|
+
Balance = 116,805.54
|
13
|
+
TimeoutSeconds = 1800
|
14
|
+
</RETS>
|
@@ -0,0 +1,127 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<RETS ReplyCode="0" ReplyText="Operation Successful">
|
3
|
+
<METADATA-SYSTEM Version="1.00.00001" Date="Mon, 18 Aug 2003 17:00:00 GMT">
|
4
|
+
<SYSTEM SystemID="CRTRETS" SystemDescription="Center for REALTOR Technology"/>
|
5
|
+
<COMMENTS></COMMENTS>
|
6
|
+
</METADATA-SYSTEM>
|
7
|
+
<METADATA-RESOURCE Version="1.00.00001" Date="Mon, 18 Aug 2003 17:00:00 GMT">
|
8
|
+
<COLUMNS> ResourceID StandardName VisibleName Description KeyField ClassCount ClassVersion ClassDate ObjectVersion ObjectDate SearchHelpVersion SearchHelpDate EditMaskVersion EditMaskDate LookupVersion LookupDate UpdateHelpVersion UpdateHelpDate ValidationExpressionVersion ValidationExpressionDate ValidationLookupVersion ValidationLookupDate ValidationExternalVersion ValidationExternalDate </COLUMNS>
|
9
|
+
<DATA> Property Property Property Property Database ListingID 2 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT </DATA>
|
10
|
+
<DATA> Agent Agent Agent Agent Database AgentID 1 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT </DATA>
|
11
|
+
</METADATA-RESOURCE>
|
12
|
+
<METADATA-CLASS Resource="Property" Version="1.00.00001" Date="Mon, 18 Aug 2003 17:00:00 GMT">
|
13
|
+
<COLUMNS> ClassName StandardName VisibleName Description TableVersion TableDate UpdateVersion UpdateDate ClassTimeStamp DeletedFlagField DeletedFlagValue HasKeyIndex </COLUMNS>
|
14
|
+
<DATA> COM CommercialProperty Commercial Commercial Property 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 0 </DATA>
|
15
|
+
<DATA> RES ResidentialProperty Single Family Single Family Residential 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT </DATA>
|
16
|
+
</METADATA-CLASS>
|
17
|
+
<METADATA-TABLE Resource="Property" Class="COM" Version="1.00.00001" Date="Mon, 18 Aug 2003 17:00:00 GMT">
|
18
|
+
<COLUMNS> MetadataEntryID SystemName StandardName LongName DBName ShortName MaximumLength DataType Precision Searchable Interpretation Alignment UseSeparator EditMaskID LookupName MaxSelect Units Index Minimum Maximum Default Required SearchHelpID Unique ModTimeStamp ForeignKeyName ForeignField KeyQuery KeySelect InKeyIndex </COLUMNS>
|
19
|
+
<DATA> BuildingName BuildingName Building Name building_name Bld Nm 50 Character 0 0 Left 0 0 0 0 0 </DATA>
|
20
|
+
<DATA> Status Status ListingStatus Listing Status status Status 12 Character 0 1 Lookup Left 0 Status 0 0 0 0 0 0 </DATA>
|
21
|
+
<DATA> AgentID AgentID AgentID Agend ID agent_id aid 12 Int 0 1 Left 0 0 0 0 0 0 0 PropertyAgent 0 0 0 </DATA>
|
22
|
+
<DATA> ListDate ListDate ListDate Listing Date list_date LstDate 10 Date 0 1 Left 0 0 0 0 0 </DATA>
|
23
|
+
<DATA> State State StateOrProvince State Or Province state State 24 Character 0 1 Left 0 0 0 0 0 0 </DATA>
|
24
|
+
<DATA> ZipCode ZipCode PostalCode Zip/Postal Code zip Zip 10 Character 0 1 Left 0 0 0 0 0 0 0 </DATA>
|
25
|
+
<DATA> City City City City city City 24 Character 0 1 Left 0 0 0 0 0 0 0 0 </DATA>
|
26
|
+
<DATA> ContractDate ContractDate ContractDate Contract Date contract_date Con Date 10 Date 0 1 Left 0 0 0 0 </DATA>
|
27
|
+
<DATA> SqFt SqFt Square Footage sqft SqFt 15 Decimal 5 1 Left 0 0 0 0 0 0 0 0 </DATA>
|
28
|
+
<DATA> ClosePrice ClosePrice ClosePrice Close Price close_price Cls Pr 10 Int 0 1 Currency Left 0 0 0 0 </DATA>
|
29
|
+
<DATA> County County County County county County 24 Character 0 1 Left 0 0 0 0 0 0 0 0 </DATA>
|
30
|
+
<DATA> YearBuilt YearBuilt YearBuilt Year Built year_built Year 4 Int 0 1 Left 0 0 0 0 0 </DATA>
|
31
|
+
<DATA> TenencyType TenencyType Tenency Type tenency_type Tenency 10 Character 0 1 Left 0 0 0 0 0 </DATA>
|
32
|
+
<DATA> StreetNumber StreetNumber StreetNumber Street Number street_number StNum 12 Character 0 0 Left 0 0 0 0 </DATA>
|
33
|
+
<DATA> StreetDirection StreetDirection StreetDirectionPrefix Street Direction Prefix street_direction StreetDir 12 Character 0 0 Left 0 </DATA>
|
34
|
+
<DATA> NumberOfFloors NumberOfFloors Number of Floors number_of_floors Floors 10 Int 0 1 Left 0 0 0 0 </DATA>
|
35
|
+
<DATA> BuildingNumber BuildingNumber Building Number building_number Bld No 12 Character 0 0 Left 0 0 0 0 0 </DATA>
|
36
|
+
<DATA> ListPrice ListPrice ListPrice Listing Price list_price Lst Pr 10 Int 0 1 Currency Left 0 0 0 0 </DATA>
|
37
|
+
<DATA> Board Board Board Local Board board Board 24 Character 0 1 Left 0 0 0 0 0 0 0 </DATA>
|
38
|
+
<DATA> ModificationTimestamp ModificationTimestamp ModificationTimestamp Modification Timestamp modification_timestamp Mod TS 24 DateTime 0 1 Left 0 </DATA>
|
39
|
+
<DATA> ListingID ListingID ListingID ListingID id ID 12 Int 0 1 Left 0 0 0 0 0 0 </DATA>
|
40
|
+
<DATA> CloseDate CloseDate CloseDate Close Date close_date Cls Dt 10 DateTime 0 1 Left 0 0 0 0 </DATA>
|
41
|
+
<DATA> StreetName StreetName StreetName Street Name street_name StName 24 Character 0 0 Left 0 0 0 0 </DATA>
|
42
|
+
</METADATA-TABLE>
|
43
|
+
<METADATA-TABLE Resource="Property" Class="RES" Version="1.00.00001" Date="Mon, 18 Aug 2003 17:00:00 GMT">
|
44
|
+
<COLUMNS> MetadataEntryID SystemName StandardName LongName DBName ShortName MaximumLength DataType Precision Searchable Interpretation Alignment UseSeparator EditMaskID LookupName MaxSelect Units Index Minimum Maximum Default Required SearchHelpID Unique ModTimeStamp ForeignKeyName ForeignField KeyQuery KeySelect InKeyIndex </COLUMNS>
|
45
|
+
<DATA> Status Status ListingStatus Listing Status status Status 12 Character 0 1 Lookup Left 0 Status 0 0 0 0 10 1 </DATA>
|
46
|
+
<DATA> Rooms Rooms TotalRooms TotalRooms rooms Rooms 8 Int 0 1 Left 0 0 0 0 0 20 0 </DATA>
|
47
|
+
<DATA> ZipCode ZipCode PostalCode Zip Code zip Zip 10 Character 0 0 Left 0 0 0 0 0 16 0 </DATA>
|
48
|
+
<DATA> City City City City city City 24 Character 0 1 Left 0 0 0 0 0 13 0 0 </DATA>
|
49
|
+
<DATA> ContractDate ContractDate ContractDate Contract Date contract_date Con Date 10 Date 0 1 Left 0 0 0 0 DATE_SEARCH_HELP 0 0 0 0 0 </DATA>
|
50
|
+
<DATA> ClosePrice ClosePrice ClosePrice Close Price close_price Cls Pr 8 Int 0 1 Currency Right 1 0 0 14 </DATA>
|
51
|
+
<DATA> County County County County county County 24 Character 0 1 Left 0 0 0 0 0 14 0 0 </DATA>
|
52
|
+
<DATA> YearBuilt YearBuilt YearBuilt YearBuilt year_built YearBuilt 4 Int 0 1 Left 0 0 0 0 17 0 0 0 0 0 0 </DATA>
|
53
|
+
<DATA> Garage Garage Garage Garage garage Garage 8 Int 0 1 Left 0 0 0 0 0 18 0 0 0 </DATA>
|
54
|
+
<DATA> LivingArea LivingArea LivingArea LivingArea living_area LivingArea 8 Int 0 1 Left 0 0 0 0 19 0 0 0 0 0 0 </DATA>
|
55
|
+
<DATA> StreetNumber StreetNumber StreetNumber Street Number street_number St Num 12 Character 0 0 Left 0 0 0 0 10 0 0 0 0 0 0 </DATA>
|
56
|
+
<DATA> StreetDirection StreetDirection StreetDirPrefix Street Direction Prefix street_direction StreetDir 12 Character 0 1 Left 0 0 11 0 0 0 0 0 0 </DATA>
|
57
|
+
<DATA> Board Board Board Local Board board Board 24 Character 0 1 Left 0 0 0 0 0 7 0 </DATA>
|
58
|
+
<DATA> ModificationTimestamp ModificationTimestamp ModificationTimestamp Modification Timestamp modification_timestamp ModTS 24 DateTime 0 1 Left 0 </DATA>
|
59
|
+
<DATA> StreetName StreetName StreetName Street Name street_name St Nam 24 Character 0 1 Left 0 0 0 0 12 0 0 0 0 0 0 </DATA>
|
60
|
+
<DATA> AgentID AgentID AgentID Agent ID agent_id aid 12 Int 0 1 Left 0 0 0 0 0 5 0 ResPropertyAgent 0 0 0 </DATA>
|
61
|
+
<DATA> ListDate ListDate ListDate Listing Date list_date Lst Dt 10 Date 0 1 Left 0 0 0 0 0 DATE_SEARCH_HELP 0 0 0 0 0 </DATA>
|
62
|
+
<DATA> State State StateOrProvince State state State 24 Character 0 1 Left 0 0 0 0 0 15 0 </DATA>
|
63
|
+
<DATA> Unit Unit UnitNumber Unit Number unit Un Num 12 Character 0 0 Left 0 0 0 0 0 10 0 </DATA>
|
64
|
+
<DATA> SqFt SqFt Square Footage sqft SqrFt 15 Decimal 5 1 Left 0 0 SqFt 0 0 0 21 0 0 </DATA>
|
65
|
+
<DATA> Bedrooms Bedrooms Beds Bedrooms beds Beds 8 Int 0 1 Left 0 0 0 0 0 9 0 </DATA>
|
66
|
+
<DATA> ListPrice ListPrice ListPrice Listing Price list_price Lst Pr 8 Int 0 1 Currency Right 1 0 0 14 </DATA>
|
67
|
+
<DATA> ListingID ListingID ListingID Listing ID id id 40 Int 0 1 Number Left 0 0 0 1 0 1 LN_SEARCH_HELP 1 0 0 0 0 </DATA>
|
68
|
+
<DATA> Baths Baths Baths Baths Total baths Baths 8 Int 0 1 Left 0 0 0 0 0 8 0 0 </DATA>
|
69
|
+
<DATA> CloseDate CloseDate CloseDate Close Date close_date Cls Dt 10 Date 0 1 Left 0 DATE_EDITMASK 0 0 0 DATE_SEARCH_HELP 0 0 0 0 0 </DATA>
|
70
|
+
</METADATA-TABLE>
|
71
|
+
<METADATA-OBJECT Resource="Property" Version="1.00.00001" Date="Mon, 18 Aug 2003 17:00:00 GMT">
|
72
|
+
<COLUMNS> MetadataEntryID ObjectType MimeType VisibleName Description ObjectTimeStamp ObjectCount </COLUMNS>
|
73
|
+
<DATA> BrandedPhoto BrandedPhoto image/jpeg Full, Branded Photos A branded image image (Not covered by the RETS Specification) </DATA>
|
74
|
+
<DATA> BrandedThumbnailPhoto BrandedThumbnail image/jpeg Small, Branded Photos A branded lower-resolution image (Not covered by the RETS Specification) </DATA>
|
75
|
+
<DATA> EnlargedPhoto Enlarged image/jpeg Enlarged Photos An enlarged image (Not covered by the RETS Specification) </DATA>
|
76
|
+
<DATA> BrandedEnlargedPhoto BrandedEnlarged image/jpeg Enlarged, Branded Photos A branded and enlarged image (Not covered by the RETS Specification) </DATA>
|
77
|
+
<DATA> ThumbnailPhoto Thumbnail image/jpeg Small Photos A lower-resolution image related to the element defined by the resource KeyField </DATA>
|
78
|
+
<DATA> Photo Photo image/jpeg Full Photos A representation image related to the element defined by the resource KeyField </DATA>
|
79
|
+
</METADATA-OBJECT>
|
80
|
+
<METADATA-SEARCH_HELP Resource="Property" Version="1.00.00001" Date="Mon, 18 Aug 2003 17:00:00 GMT">
|
81
|
+
<COLUMNS> MetadataEntryID SearchHelpID Value </COLUMNS>
|
82
|
+
<DATA> LNSEARCHHELP LN_SEARCH_HELP Listing Number (all numbers) </DATA>
|
83
|
+
<DATA> DATESEARCHHELP DATE_SEARCH_HELP Date (YYYY-MM-DD) </DATA>
|
84
|
+
<DATA> LISTINGSTATUSSEARCHHELP LISTING_STATUS_SEARCH_HELP Status of the Listing </DATA>
|
85
|
+
</METADATA-SEARCH_HELP>
|
86
|
+
<METADATA-EDITMASK Resource="Property" Version="1.00.00001" Date="Mon, 18 Aug 2003 17:00:00 GMT">
|
87
|
+
<COLUMNS> MetadataEntryID EditMaskID Value </COLUMNS>
|
88
|
+
<DATA> DATETIMEEDITMASK DATETIME_EDITMASK [0-9]{4}-[0-9]{2}-[0-9]{2} </DATA>
|
89
|
+
<DATA> LNEDITMASK LN_EDITMASK [0-9]{4,8} </DATA>
|
90
|
+
<DATA> SQFTEDITMASK SQFT_EDITMASK [0-9]{1,3}[x][0-9]{1,3} </DATA>
|
91
|
+
<DATA> DATEEDITMASK DATE_EDITMASK [0-9]{4}-[0-9]{2}-[0-9]{2} </DATA>
|
92
|
+
</METADATA-EDITMASK>
|
93
|
+
<METADATA-LOOKUP Resource="Property" Version="1.00.00001" Date="Mon, 18 Aug 2003 17:00:00 GMT">
|
94
|
+
<COLUMNS> MetadataEntryID LookupName VisibleName Version Date </COLUMNS>
|
95
|
+
<DATA> Status Status Listing Status 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT </DATA>
|
96
|
+
</METADATA-LOOKUP>
|
97
|
+
<METADATA-LOOKUP_TYPE Resource="Property" Lookup="Status" Version="1.00.00001" Date="Mon, 18 Aug 2003 17:00:00 GMT">
|
98
|
+
<COLUMNS> MetadataEntryID LongValue ShortValue Value </COLUMNS>
|
99
|
+
<DATA> S Sold S S </DATA>
|
100
|
+
<DATA> 0 Off Market 0 O </DATA>
|
101
|
+
<DATA> A Active A A </DATA>
|
102
|
+
<DATA> W Withdrawn W W </DATA>
|
103
|
+
<DATA> U Under Contract U U </DATA>
|
104
|
+
<DATA> C Closed C C </DATA>
|
105
|
+
<DATA> T Temp Off Market T T </DATA>
|
106
|
+
<DATA> P Pending P P </DATA>
|
107
|
+
<DATA> L Leased L L </DATA>
|
108
|
+
<DATA> X Expired X X </DATA>
|
109
|
+
</METADATA-LOOKUP_TYPE>
|
110
|
+
<METADATA-CLASS Resource="Agent" Version="1.00.00001" Date="Mon, 18 Aug 2003 17:00:00 GMT">
|
111
|
+
<COLUMNS> ClassName StandardName VisibleName Description TableVersion TableDate UpdateVersion UpdateDate ClassTimeStamp DeletedFlagField DeletedFlagValue HasKeyIndex </COLUMNS>
|
112
|
+
<DATA> AGT REAgent Agent Agent 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 1.00.00001 Mon, 18 Aug 2003 17:00:00 GMT 0 </DATA>
|
113
|
+
</METADATA-CLASS>
|
114
|
+
<METADATA-TABLE Resource="Agent" Class="AGT" Version="1.00.00001" Date="Mon, 18 Aug 2003 17:00:00 GMT">
|
115
|
+
<COLUMNS> MetadataEntryID SystemName StandardName LongName DBName ShortName MaximumLength DataType Precision Searchable Interpretation Alignment UseSeparator EditMaskID LookupName MaxSelect Units Index Minimum Maximum Default Required SearchHelpID Unique ModTimeStamp ForeignKeyName ForeignField KeyQuery KeySelect InKeyIndex </COLUMNS>
|
116
|
+
<DATA> OfficePhone OfficePhone AgentOfficePhone Agent Office Phone office_phone Office 11 Character 0 1 Left 0 0 </DATA>
|
117
|
+
<DATA> AgentID AgentID AgentID Agent ID id AID 7 Int 0 1 Left 0 0 0 1 0 1 1 1 </DATA>
|
118
|
+
<DATA> FirstName FirstName AgentFirstName First Name first_name FName 12 Character 0 1 Left 0 0 0 0 </DATA>
|
119
|
+
<DATA> URL URL URL Agent Website url URL 40 Character 0 1 Left 0 0 0 0 0 4 0 </DATA>
|
120
|
+
<DATA> LastName LastName AgentLastName Last Name last_name LName 18 Character 0 1 Left 0 0 0 0 </DATA>
|
121
|
+
<DATA> CellPhone CellPhone CellPhone Agent Cell Phone cell_phone Cell 11 Character 0 1 Left 0 0 0 </DATA>
|
122
|
+
</METADATA-TABLE>
|
123
|
+
<METADATA-FOREIGNKEYS>
|
124
|
+
<COLUMNS> ForeignKeyID ParentResourceID ParentClassID ParentSystemName ChildResourceID ChildClassID ChildSystemName ConditionalParentField ConditionalParentValue </COLUMNS>
|
125
|
+
<DATA> ResPropertyAgent Agent AGT AgentID Property RES AgentID </DATA>
|
126
|
+
</METADATA-FOREIGNKEYS>
|
127
|
+
</RETS>
|
@@ -0,0 +1 @@
|
|
1
|
+
<RETS ReplyCode="20701" ReplyText="Not logged in"/>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<RETS ReplyCode="0" ReplyText="Operation Successful">
|
3
|
+
<DELIMITER value="09"/>
|
4
|
+
<COLUMNS> AgentID Baths Bedrooms Board City CloseDate ClosePrice ContractDate County Garage ListingID ListDate ListPrice LivingArea ModificationTimestamp Rooms SqFt State Status StreetDirection StreetName StreetNumber Unit YearBuilt ZipCode </COLUMNS>
|
5
|
+
<DATA> 1 3 4 TestMLS Buffalo Grove Lake 3 1 2008-05-30T07:00:00Z 380000 2000 2008-12-31T08:00:00Z 12 4000 IL Active Fox Hill 83 1985 60089 </DATA>
|
6
|
+
<DATA> 1 1 3 FakeMLS Chicago Cook 1 2 2009-03-23T07:00:00Z 250000 900 2009-02-01T08:00:00Z 8 900 IL Active W Armitage Ave 1250 22B 1975 60613 </DATA>
|
7
|
+
<DATA> 1 1 1 FakeMLS Chicago Cook 5 2009-02-22T08:00:00Z 150000 1000 2008-12-31T08:00:00Z 5 1000 IL Active S Harper Ave. 5429 2N 1915 60615 </DATA>
|
8
|
+
<DATA> 1 3 4 FakeMLS Chicago 2009-04-15T07:00:00Z 233000 Cook 2 3 2009-01-22T08:00:00Z 250000 1100 2008-12-31T08:00:00Z 9 1100 IL Closed N Michigan Ave. 625 6 1978 60611 </DATA>
|
9
|
+
<DATA> 1 3 5 TestMLS Evenston Cook 3 4 2008-10-03T07:00:00Z 425000 2500 2009-02-01T09:00:00Z 14 3000 IL Active Main St. 120 1922 60533 </DATA>
|
10
|
+
</RETS>
|
data/tasks/util.rake
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
|
2
|
+
desc "Remove trailing whitespace for source files"
|
3
|
+
task :strip_whitespace do
|
4
|
+
files = %w[ Gemfile ]
|
5
|
+
globs = %w[ lib/**/*.rb spec/**/*.rb ]
|
6
|
+
files_from_globs = globs.map { |glob| Dir[glob] }
|
7
|
+
files_to_strip = (files + files_from_globs).flatten
|
8
|
+
system "/usr/bin/sed -e 's/[ \t]*$//' -i '' #{files_to_strip.join(" ")}"
|
9
|
+
end
|
metadata
CHANGED
@@ -1,36 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: innards
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0
|
5
|
-
prerelease: 6
|
4
|
+
version: 0.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Paul Trippett
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-08-04 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
14
|
+
name: ox
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
version: 2.0.5
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
26
|
+
version: 2.0.5
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: excon
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,43 +34,52 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 0.25.1
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
42
|
+
name: multipart-parser
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.1.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
52
60
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
61
|
+
version: '0'
|
54
62
|
type: :development
|
55
63
|
prerelease: false
|
56
64
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
65
|
requirements:
|
59
|
-
- -
|
66
|
+
- - '>='
|
60
67
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
68
|
+
version: '0'
|
62
69
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
70
|
+
name: rspec
|
64
71
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
72
|
requirements:
|
67
|
-
- -
|
73
|
+
- - '>='
|
68
74
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
75
|
+
version: '0'
|
70
76
|
type: :development
|
71
77
|
prerelease: false
|
72
78
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
79
|
requirements:
|
75
|
-
- -
|
80
|
+
- - '>='
|
76
81
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
82
|
+
version: '0'
|
78
83
|
description: Innards; the internal parts especially of a structure or mechanism; in
|
79
84
|
our case it's the core RETS library for TurboRETS
|
80
85
|
email:
|
@@ -83,36 +88,61 @@ executables: []
|
|
83
88
|
extensions: []
|
84
89
|
extra_rdoc_files: []
|
85
90
|
files:
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
89
|
-
-
|
91
|
+
- .gitignore
|
92
|
+
- .rspec
|
93
|
+
- .travis.yml
|
94
|
+
- Gemfile
|
95
|
+
- Gemfile.lock
|
90
96
|
- LICENSE.txt
|
91
97
|
- README.md
|
92
98
|
- Rakefile
|
99
|
+
- innards.gemspec
|
100
|
+
- lib/innards.rb
|
101
|
+
- lib/innards/connection.rb
|
102
|
+
- lib/innards/cookie_handler.rb
|
103
|
+
- lib/innards/digest_handler.rb
|
104
|
+
- lib/innards/exceptions.rb
|
105
|
+
- lib/innards/multipart_handler.rb
|
106
|
+
- lib/innards/parsers/get_metadata_parser.rb
|
107
|
+
- lib/innards/parsers/login_parser.rb
|
108
|
+
- lib/innards/parsers/logout_parser.rb
|
109
|
+
- lib/innards/parsers/parser_base.rb
|
110
|
+
- lib/innards/parsers/search_parser.rb
|
111
|
+
- lib/innards/version.rb
|
112
|
+
- spec/innards/connection_spec.rb
|
113
|
+
- spec/innards/cookie_handler_spec.rb
|
114
|
+
- spec/innards/digest_handler_spec.rb
|
115
|
+
- spec/innards/multipart_handler_spec.rb
|
116
|
+
- spec/spec_helper.rb
|
117
|
+
- spec/stubs/getobject_success.txt
|
118
|
+
- spec/stubs/login_success.xml
|
119
|
+
- spec/stubs/logout_success.xml
|
120
|
+
- spec/stubs/metadata_success.xml
|
121
|
+
- spec/stubs/rets_error.xml
|
122
|
+
- spec/stubs/search_success.xml
|
123
|
+
- tasks/util.rake
|
93
124
|
homepage: http://github.com/TurboRETS/innards
|
94
125
|
licenses:
|
95
126
|
- AGPL
|
127
|
+
metadata: {}
|
96
128
|
post_install_message:
|
97
129
|
rdoc_options: []
|
98
130
|
require_paths:
|
99
131
|
- lib
|
100
132
|
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
-
none: false
|
102
133
|
requirements:
|
103
|
-
- -
|
134
|
+
- - '>='
|
104
135
|
- !ruby/object:Gem::Version
|
105
136
|
version: '0'
|
106
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
-
none: false
|
108
138
|
requirements:
|
109
|
-
- -
|
139
|
+
- - '>='
|
110
140
|
- !ruby/object:Gem::Version
|
111
141
|
version: 1.3.6
|
112
142
|
requirements: []
|
113
143
|
rubyforge_project: innards
|
114
|
-
rubygems_version:
|
144
|
+
rubygems_version: 2.0.6
|
115
145
|
signing_key:
|
116
|
-
specification_version:
|
146
|
+
specification_version: 4
|
117
147
|
summary: RETS Library for Ruby
|
118
148
|
test_files: []
|