rets 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.1.4 / 2012-03-12
2
+
3
+ * fix: an MLS uses lower case in RETS tag
4
+
1
5
  ### 0.1.3 / 2012-03-05
2
6
 
3
7
  * fixes to support location=1 in getobject query
data/lib/rets/client.rb CHANGED
@@ -324,8 +324,9 @@ module Rets
324
324
  if !response.body.empty?
325
325
  xml = Nokogiri::XML.parse(response.body, nil, nil, Nokogiri::XML::ParseOptions::STRICT)
326
326
 
327
- reply_text = xml.xpath("/RETS").attr("ReplyText").value
328
- reply_code = xml.xpath("/RETS").attr("ReplyCode").value.to_i
327
+ rets_element = xml.xpath("/RETS")
328
+ reply_text = (rets_element.attr("ReplyText") || rets_element.attr("replyText")).value
329
+ reply_code = (rets_element.attr("ReplyCode") || rets_element.attr("replyCode")).value.to_i
329
330
 
330
331
  if reply_code.nonzero?
331
332
  raise InvalidRequest, "Got error code #{reply_code} (#{reply_text})."
@@ -16,12 +16,14 @@ module Rets
16
16
  class Table
17
17
  attr_accessor :type
18
18
  attr_accessor :name
19
+ attr_accessor :long_name
19
20
  attr_accessor :table_fragment
20
21
 
21
22
  def initialize(table_fragment)
22
23
  self.table_fragment = table_fragment
23
24
  self.type = table_fragment["DataType"]
24
25
  self.name = table_fragment["SystemName"]
26
+ self.long_name = table_fragment["LongName"]
25
27
  end
26
28
 
27
29
  def print_tree
@@ -43,12 +45,14 @@ module Rets
43
45
  attr_accessor :lookup_name
44
46
  attr_accessor :name
45
47
  attr_accessor :interpretation
48
+ attr_accessor :long_name
46
49
 
47
50
  def initialize(table_fragment, resource)
48
51
  self.resource = resource
49
52
  self.name = table_fragment["SystemName"]
50
53
  self.interpretation = table_fragment["Interpretation"]
51
54
  self.lookup_name = table_fragment["LookupName"]
55
+ self.long_name = table_fragment["LongName"]
52
56
  end
53
57
 
54
58
  def multi?
data/lib/rets.rb CHANGED
@@ -8,7 +8,7 @@ require 'net/http/persistent'
8
8
  require 'nokogiri'
9
9
 
10
10
  module Rets
11
- VERSION = '0.1.3'
11
+ VERSION = '0.1.4'
12
12
 
13
13
  AuthorizationFailure = Class.new(ArgumentError)
14
14
  InvalidRequest = Class.new(ArgumentError)
metadata CHANGED
@@ -1,99 +1,85 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rets
3
- version: !ruby/object:Gem::Version
4
- hash: 29
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.4
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 3
10
- version: 0.1.3
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Estately, Inc. Open Source
14
9
  - Ben Bleything
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2012-03-06 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
13
+ date: 2012-03-12 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
22
16
  name: net-http-persistent
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &70169260555460 !ruby/object:Gem::Requirement
25
18
  none: false
26
- requirements:
19
+ requirements:
27
20
  - - ~>
28
- - !ruby/object:Gem::Version
29
- hash: 1
30
- segments:
31
- - 1
32
- - 7
33
- version: "1.7"
21
+ - !ruby/object:Gem::Version
22
+ version: '1.7'
34
23
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: nokogiri
38
24
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *70169260555460
26
+ - !ruby/object:Gem::Dependency
27
+ name: nokogiri
28
+ requirement: &70169260555040 !ruby/object:Gem::Requirement
40
29
  none: false
41
- requirements:
30
+ requirements:
42
31
  - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 15
45
- segments:
46
- - 1
47
- - 4
48
- - 4
32
+ - !ruby/object:Gem::Version
49
33
  version: 1.4.4
50
34
  type: :runtime
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
- name: mocha
54
35
  prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *70169260555040
37
+ - !ruby/object:Gem::Dependency
38
+ name: mocha
39
+ requirement: &70169260554620 !ruby/object:Gem::Requirement
56
40
  none: false
57
- requirements:
41
+ requirements:
58
42
  - - ~>
59
- - !ruby/object:Gem::Version
60
- hash: 35
61
- segments:
62
- - 0
63
- - 9
64
- - 12
43
+ - !ruby/object:Gem::Version
65
44
  version: 0.9.12
66
45
  type: :development
67
- version_requirements: *id003
68
- - !ruby/object:Gem::Dependency
69
- name: hoe
70
46
  prerelease: false
71
- requirement: &id004 !ruby/object:Gem::Requirement
47
+ version_requirements: *70169260554620
48
+ - !ruby/object:Gem::Dependency
49
+ name: rdoc
50
+ requirement: &70169260554200 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ version: '3.10'
56
+ type: :development
57
+ prerelease: false
58
+ version_requirements: *70169260554200
59
+ - !ruby/object:Gem::Dependency
60
+ name: hoe
61
+ requirement: &70169260553780 !ruby/object:Gem::Requirement
72
62
  none: false
73
- requirements:
63
+ requirements:
74
64
  - - ~>
75
- - !ruby/object:Gem::Version
76
- hash: 27
77
- segments:
78
- - 2
79
- - 12
80
- version: "2.12"
65
+ - !ruby/object:Gem::Version
66
+ version: '2.13'
81
67
  type: :development
82
- version_requirements: *id004
83
- description: |-
84
- A pure-ruby library for fetching data from [RETS] servers.
85
-
86
- [RETS]: http://www.rets.org
87
- email:
68
+ prerelease: false
69
+ version_requirements: *70169260553780
70
+ description: ! 'A pure-ruby library for fetching data from [RETS] servers.
71
+
72
+
73
+ [RETS]: http://www.rets.org'
74
+ email:
88
75
  - opensource@estately.com
89
76
  - ben@bleything.net
90
- executables:
77
+ executables:
91
78
  - rets
92
79
  extensions: []
93
-
94
- extra_rdoc_files:
80
+ extra_rdoc_files:
95
81
  - Manifest.txt
96
- files:
82
+ files:
97
83
  - CHANGELOG.md
98
84
  - Manifest.txt
99
85
  - README.md
@@ -120,39 +106,31 @@ files:
120
106
  - .gemtest
121
107
  homepage: http://github.com/estately/rets
122
108
  licenses: []
123
-
124
109
  post_install_message:
125
- rdoc_options:
110
+ rdoc_options:
126
111
  - --main
127
112
  - README.md
128
- require_paths:
113
+ require_paths:
129
114
  - lib
130
- required_ruby_version: !ruby/object:Gem::Requirement
115
+ required_ruby_version: !ruby/object:Gem::Requirement
131
116
  none: false
132
- requirements:
133
- - - ">="
134
- - !ruby/object:Gem::Version
135
- hash: 3
136
- segments:
137
- - 0
138
- version: "0"
139
- required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ required_rubygems_version: !ruby/object:Gem::Requirement
140
122
  none: false
141
- requirements:
142
- - - ">="
143
- - !ruby/object:Gem::Version
144
- hash: 3
145
- segments:
146
- - 0
147
- version: "0"
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
148
127
  requirements: []
149
-
150
128
  rubyforge_project: rets
151
- rubygems_version: 1.8.10
129
+ rubygems_version: 1.8.15
152
130
  signing_key:
153
131
  specification_version: 3
154
132
  summary: A pure-ruby library for fetching data from [RETS] servers
155
- test_files:
133
+ test_files:
156
134
  - test/test_client.rb
157
135
  - test/test_metadata.rb
158
136
  - test/test_parser_compact.rb