threetaps-client 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/Gemfile +17 -0
  2. data/Gemfile.lock +43 -0
  3. data/LICENSE.txt +20 -0
  4. data/README.rdoc +48 -0
  5. data/Rakefile +68 -0
  6. data/VERSION +1 -0
  7. data/lib/client/client.rb +43 -0
  8. data/lib/client/geocoder_client.rb +42 -0
  9. data/lib/client/posting_client.rb +88 -0
  10. data/lib/client/reference_client.rb +60 -0
  11. data/lib/client/search_client.rb +82 -0
  12. data/lib/client/status_client.rb +72 -0
  13. data/lib/dto/geocoder/geocoder_request.rb +16 -0
  14. data/lib/dto/geocoder/geocoder_response.rb +7 -0
  15. data/lib/dto/posting/create_response.rb +23 -0
  16. data/lib/dto/posting/delete_response.rb +9 -0
  17. data/lib/dto/posting/exists_response.rb +16 -0
  18. data/lib/dto/posting/update_response.rb +9 -0
  19. data/lib/dto/search/best_match_response.rb +20 -0
  20. data/lib/dto/search/count_response.rb +9 -0
  21. data/lib/dto/search/query_request +0 -0
  22. data/lib/dto/search/range_request.rb +23 -0
  23. data/lib/dto/search/range_response.rb +26 -0
  24. data/lib/dto/search/search_request.rb +79 -0
  25. data/lib/dto/search/search_response.rb +37 -0
  26. data/lib/dto/search/summary_request.rb +13 -0
  27. data/lib/dto/search/summary_response.rb +20 -0
  28. data/lib/dto/status/get_status_response.rb +43 -0
  29. data/lib/dto/status/status_update_request.rb +27 -0
  30. data/lib/models/annotations/annotation.rb +21 -0
  31. data/lib/models/annotations/annotation_option.rb +9 -0
  32. data/lib/models/category.rb +26 -0
  33. data/lib/models/location.rb +30 -0
  34. data/lib/models/message.rb +9 -0
  35. data/lib/models/posting.rb +97 -0
  36. data/lib/models/posting_history.rb +8 -0
  37. data/lib/models/source.rb +27 -0
  38. data/lib/struct.rb +16 -0
  39. data/lib/threetaps-client.rb +44 -0
  40. data/spec/client/client_spec.rb +18 -0
  41. data/spec/client/geocoder_client_spec.rb +18 -0
  42. data/spec/client/posting_client_spec.rb +36 -0
  43. data/spec/client/reference_client_spec.rb +37 -0
  44. data/spec/client/search_client_spec.rb +53 -0
  45. data/spec/client/status_client_spec.rb +39 -0
  46. data/spec/dto/geocoder/geocoder_response_spec.rb +14 -0
  47. data/spec/dto/search/search_request_spec.rb +26 -0
  48. data/spec/dto/search/search_response_spec.rb +12 -0
  49. data/spec/spec_helper.rb +29 -0
  50. data/test/client/test_client.rb +11 -0
  51. data/test/client/test_geocoder_client.rb +43 -0
  52. data/test/client/test_posting_client.rb +88 -0
  53. data/test/client/test_reference_client.rb +32 -0
  54. data/test/client/test_search_client.rb +56 -0
  55. data/test/client/test_status_client.rb +49 -0
  56. data/test/dto/geocoder/test_geocoder_request.rb +16 -0
  57. data/test/dto/geocoder/test_geocoder_response.rb +14 -0
  58. data/test/dto/search/test_best_match_response.rb +10 -0
  59. data/test/dto/search/test_range_request.rb +13 -0
  60. data/test/dto/status/test_status_update_request.rb +18 -0
  61. data/test/helper.rb +18 -0
  62. data/test/models/test_posting.rb +28 -0
  63. data/test/test_struct.rb +17 -0
  64. data/test/test_threetaps-client.rb +7 -0
  65. data/threetaps-client.gemspec +153 -0
  66. metadata +266 -0
@@ -0,0 +1,17 @@
1
+ require 'helper'
2
+
3
+ class TestStruct < Test::Unit::TestCase
4
+ class MyClass < Struct.new(:name, :id); end
5
+
6
+ should "create struct from hash with symbol keys" do
7
+ o = MyClass.from_hash(:name => "name", :id => 1)
8
+ assert_equal "name", o.name
9
+ assert_equal 1, o.id
10
+ end
11
+
12
+ should "create struct from hash with string keys" do
13
+ o = MyClass.from_hash("name" => "name", "id" => 1)
14
+ assert_equal "name", o.name
15
+ assert_equal 1, o.id
16
+ end
17
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestThreetapsClient < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ #flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
@@ -0,0 +1,153 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{threetaps-client}
8
+ s.version = "0.5.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["3taps.com"]
12
+ s.date = %q{2011-03-22}
13
+ s.description = %q{A Ruby gem for accessing the 3taps API. See more at http://developers.3taps.net}
14
+ s.email = %q{developers@3taps.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ "Gemfile",
21
+ "Gemfile.lock",
22
+ "LICENSE.txt",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "lib/client/client.rb",
27
+ "lib/client/geocoder_client.rb",
28
+ "lib/client/posting_client.rb",
29
+ "lib/client/reference_client.rb",
30
+ "lib/client/search_client.rb",
31
+ "lib/client/status_client.rb",
32
+ "lib/dto/geocoder/geocoder_request.rb",
33
+ "lib/dto/geocoder/geocoder_response.rb",
34
+ "lib/dto/posting/create_response.rb",
35
+ "lib/dto/posting/delete_response.rb",
36
+ "lib/dto/posting/exists_response.rb",
37
+ "lib/dto/posting/update_response.rb",
38
+ "lib/dto/search/best_match_response.rb",
39
+ "lib/dto/search/count_response.rb",
40
+ "lib/dto/search/query_request",
41
+ "lib/dto/search/range_request.rb",
42
+ "lib/dto/search/range_response.rb",
43
+ "lib/dto/search/search_request.rb",
44
+ "lib/dto/search/search_response.rb",
45
+ "lib/dto/search/summary_request.rb",
46
+ "lib/dto/search/summary_response.rb",
47
+ "lib/dto/status/get_status_response.rb",
48
+ "lib/dto/status/status_update_request.rb",
49
+ "lib/models/annotations/annotation.rb",
50
+ "lib/models/annotations/annotation_option.rb",
51
+ "lib/models/category.rb",
52
+ "lib/models/location.rb",
53
+ "lib/models/message.rb",
54
+ "lib/models/posting.rb",
55
+ "lib/models/posting_history.rb",
56
+ "lib/models/source.rb",
57
+ "lib/struct.rb",
58
+ "lib/threetaps-client.rb",
59
+ "spec/client/client_spec.rb",
60
+ "spec/client/geocoder_client_spec.rb",
61
+ "spec/client/posting_client_spec.rb",
62
+ "spec/client/reference_client_spec.rb",
63
+ "spec/client/search_client_spec.rb",
64
+ "spec/client/status_client_spec.rb",
65
+ "spec/dto/geocoder/geocoder_response_spec.rb",
66
+ "spec/dto/search/search_request_spec.rb",
67
+ "spec/dto/search/search_response_spec.rb",
68
+ "spec/spec_helper.rb",
69
+ "test/client/test_client.rb",
70
+ "test/client/test_geocoder_client.rb",
71
+ "test/client/test_posting_client.rb",
72
+ "test/client/test_reference_client.rb",
73
+ "test/client/test_search_client.rb",
74
+ "test/client/test_status_client.rb",
75
+ "test/dto/geocoder/test_geocoder_request.rb",
76
+ "test/dto/geocoder/test_geocoder_response.rb",
77
+ "test/dto/search/test_best_match_response.rb",
78
+ "test/dto/search/test_range_request.rb",
79
+ "test/dto/status/test_status_update_request.rb",
80
+ "test/helper.rb",
81
+ "test/models/test_posting.rb",
82
+ "test/test_struct.rb",
83
+ "test/test_threetaps-client.rb",
84
+ "threetaps-client.gemspec"
85
+ ]
86
+ s.homepage = %q{https://github.com/3taps/3taps-Ruby-Client}
87
+ s.licenses = ["MIT"]
88
+ s.require_paths = ["lib"]
89
+ s.rubygems_version = %q{1.3.7}
90
+ s.summary = %q{A Ruby gem for accessing the 3taps API}
91
+ s.test_files = [
92
+ "spec/client/client_spec.rb",
93
+ "spec/client/geocoder_client_spec.rb",
94
+ "spec/client/posting_client_spec.rb",
95
+ "spec/client/reference_client_spec.rb",
96
+ "spec/client/search_client_spec.rb",
97
+ "spec/client/status_client_spec.rb",
98
+ "spec/dto/geocoder/geocoder_response_spec.rb",
99
+ "spec/dto/search/search_request_spec.rb",
100
+ "spec/dto/search/search_response_spec.rb",
101
+ "spec/spec_helper.rb",
102
+ "test/client/test_client.rb",
103
+ "test/client/test_geocoder_client.rb",
104
+ "test/client/test_posting_client.rb",
105
+ "test/client/test_reference_client.rb",
106
+ "test/client/test_search_client.rb",
107
+ "test/client/test_status_client.rb",
108
+ "test/dto/geocoder/test_geocoder_request.rb",
109
+ "test/dto/geocoder/test_geocoder_response.rb",
110
+ "test/dto/search/test_best_match_response.rb",
111
+ "test/dto/search/test_range_request.rb",
112
+ "test/dto/status/test_status_update_request.rb",
113
+ "test/helper.rb",
114
+ "test/models/test_posting.rb",
115
+ "test/test_struct.rb",
116
+ "test/test_threetaps-client.rb"
117
+ ]
118
+
119
+ if s.respond_to? :specification_version then
120
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
121
+ s.specification_version = 3
122
+
123
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
124
+ s.add_runtime_dependency(%q<supermodel>, ["~> 0.1.4"])
125
+ s.add_runtime_dependency(%q<curb>, ["~> 0.7.9"])
126
+ s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.0"])
127
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
128
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
129
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
130
+ s.add_development_dependency(%q<rcov>, [">= 0"])
131
+ s.add_development_dependency(%q<rspec>, [">= 0"])
132
+ else
133
+ s.add_dependency(%q<supermodel>, ["~> 0.1.4"])
134
+ s.add_dependency(%q<curb>, ["~> 0.7.9"])
135
+ s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
136
+ s.add_dependency(%q<shoulda>, [">= 0"])
137
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
138
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
139
+ s.add_dependency(%q<rcov>, [">= 0"])
140
+ s.add_dependency(%q<rspec>, [">= 0"])
141
+ end
142
+ else
143
+ s.add_dependency(%q<supermodel>, ["~> 0.1.4"])
144
+ s.add_dependency(%q<curb>, ["~> 0.7.9"])
145
+ s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
146
+ s.add_dependency(%q<shoulda>, [">= 0"])
147
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
148
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
149
+ s.add_dependency(%q<rcov>, [">= 0"])
150
+ s.add_dependency(%q<rspec>, [">= 0"])
151
+ end
152
+ end
153
+
metadata ADDED
@@ -0,0 +1,266 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: threetaps-client
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 5
8
+ - 1
9
+ version: 0.5.1
10
+ platform: ruby
11
+ authors:
12
+ - 3taps.com
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2011-03-22 00:00:00 +02:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: supermodel
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ - 1
31
+ - 4
32
+ version: 0.1.4
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: curb
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ segments:
44
+ - 0
45
+ - 7
46
+ - 9
47
+ version: 0.7.9
48
+ type: :runtime
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
51
+ name: activesupport
52
+ prerelease: false
53
+ requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ~>
57
+ - !ruby/object:Gem::Version
58
+ segments:
59
+ - 3
60
+ - 0
61
+ - 0
62
+ version: 3.0.0
63
+ type: :runtime
64
+ version_requirements: *id003
65
+ - !ruby/object:Gem::Dependency
66
+ name: shoulda
67
+ prerelease: false
68
+ requirement: &id004 !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ segments:
74
+ - 0
75
+ version: "0"
76
+ type: :development
77
+ version_requirements: *id004
78
+ - !ruby/object:Gem::Dependency
79
+ name: bundler
80
+ prerelease: false
81
+ requirement: &id005 !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ~>
85
+ - !ruby/object:Gem::Version
86
+ segments:
87
+ - 1
88
+ - 0
89
+ - 0
90
+ version: 1.0.0
91
+ type: :development
92
+ version_requirements: *id005
93
+ - !ruby/object:Gem::Dependency
94
+ name: jeweler
95
+ prerelease: false
96
+ requirement: &id006 !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ segments:
102
+ - 1
103
+ - 5
104
+ - 2
105
+ version: 1.5.2
106
+ type: :development
107
+ version_requirements: *id006
108
+ - !ruby/object:Gem::Dependency
109
+ name: rcov
110
+ prerelease: false
111
+ requirement: &id007 !ruby/object:Gem::Requirement
112
+ none: false
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ segments:
117
+ - 0
118
+ version: "0"
119
+ type: :development
120
+ version_requirements: *id007
121
+ - !ruby/object:Gem::Dependency
122
+ name: rspec
123
+ prerelease: false
124
+ requirement: &id008 !ruby/object:Gem::Requirement
125
+ none: false
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ segments:
130
+ - 0
131
+ version: "0"
132
+ type: :development
133
+ version_requirements: *id008
134
+ description: A Ruby gem for accessing the 3taps API. See more at http://developers.3taps.net
135
+ email: developers@3taps.com
136
+ executables: []
137
+
138
+ extensions: []
139
+
140
+ extra_rdoc_files:
141
+ - LICENSE.txt
142
+ - README.rdoc
143
+ files:
144
+ - Gemfile
145
+ - Gemfile.lock
146
+ - LICENSE.txt
147
+ - README.rdoc
148
+ - Rakefile
149
+ - VERSION
150
+ - lib/client/client.rb
151
+ - lib/client/geocoder_client.rb
152
+ - lib/client/posting_client.rb
153
+ - lib/client/reference_client.rb
154
+ - lib/client/search_client.rb
155
+ - lib/client/status_client.rb
156
+ - lib/dto/geocoder/geocoder_request.rb
157
+ - lib/dto/geocoder/geocoder_response.rb
158
+ - lib/dto/posting/create_response.rb
159
+ - lib/dto/posting/delete_response.rb
160
+ - lib/dto/posting/exists_response.rb
161
+ - lib/dto/posting/update_response.rb
162
+ - lib/dto/search/best_match_response.rb
163
+ - lib/dto/search/count_response.rb
164
+ - lib/dto/search/query_request
165
+ - lib/dto/search/range_request.rb
166
+ - lib/dto/search/range_response.rb
167
+ - lib/dto/search/search_request.rb
168
+ - lib/dto/search/search_response.rb
169
+ - lib/dto/search/summary_request.rb
170
+ - lib/dto/search/summary_response.rb
171
+ - lib/dto/status/get_status_response.rb
172
+ - lib/dto/status/status_update_request.rb
173
+ - lib/models/annotations/annotation.rb
174
+ - lib/models/annotations/annotation_option.rb
175
+ - lib/models/category.rb
176
+ - lib/models/location.rb
177
+ - lib/models/message.rb
178
+ - lib/models/posting.rb
179
+ - lib/models/posting_history.rb
180
+ - lib/models/source.rb
181
+ - lib/struct.rb
182
+ - lib/threetaps-client.rb
183
+ - spec/client/client_spec.rb
184
+ - spec/client/geocoder_client_spec.rb
185
+ - spec/client/posting_client_spec.rb
186
+ - spec/client/reference_client_spec.rb
187
+ - spec/client/search_client_spec.rb
188
+ - spec/client/status_client_spec.rb
189
+ - spec/dto/geocoder/geocoder_response_spec.rb
190
+ - spec/dto/search/search_request_spec.rb
191
+ - spec/dto/search/search_response_spec.rb
192
+ - spec/spec_helper.rb
193
+ - test/client/test_client.rb
194
+ - test/client/test_geocoder_client.rb
195
+ - test/client/test_posting_client.rb
196
+ - test/client/test_reference_client.rb
197
+ - test/client/test_search_client.rb
198
+ - test/client/test_status_client.rb
199
+ - test/dto/geocoder/test_geocoder_request.rb
200
+ - test/dto/geocoder/test_geocoder_response.rb
201
+ - test/dto/search/test_best_match_response.rb
202
+ - test/dto/search/test_range_request.rb
203
+ - test/dto/status/test_status_update_request.rb
204
+ - test/helper.rb
205
+ - test/models/test_posting.rb
206
+ - test/test_struct.rb
207
+ - test/test_threetaps-client.rb
208
+ - threetaps-client.gemspec
209
+ has_rdoc: true
210
+ homepage: https://github.com/3taps/3taps-Ruby-Client
211
+ licenses:
212
+ - MIT
213
+ post_install_message:
214
+ rdoc_options: []
215
+
216
+ require_paths:
217
+ - lib
218
+ required_ruby_version: !ruby/object:Gem::Requirement
219
+ none: false
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ segments:
224
+ - 0
225
+ version: "0"
226
+ required_rubygems_version: !ruby/object:Gem::Requirement
227
+ none: false
228
+ requirements:
229
+ - - ">="
230
+ - !ruby/object:Gem::Version
231
+ segments:
232
+ - 0
233
+ version: "0"
234
+ requirements: []
235
+
236
+ rubyforge_project:
237
+ rubygems_version: 1.3.7
238
+ signing_key:
239
+ specification_version: 3
240
+ summary: A Ruby gem for accessing the 3taps API
241
+ test_files:
242
+ - spec/client/client_spec.rb
243
+ - spec/client/geocoder_client_spec.rb
244
+ - spec/client/posting_client_spec.rb
245
+ - spec/client/reference_client_spec.rb
246
+ - spec/client/search_client_spec.rb
247
+ - spec/client/status_client_spec.rb
248
+ - spec/dto/geocoder/geocoder_response_spec.rb
249
+ - spec/dto/search/search_request_spec.rb
250
+ - spec/dto/search/search_response_spec.rb
251
+ - spec/spec_helper.rb
252
+ - test/client/test_client.rb
253
+ - test/client/test_geocoder_client.rb
254
+ - test/client/test_posting_client.rb
255
+ - test/client/test_reference_client.rb
256
+ - test/client/test_search_client.rb
257
+ - test/client/test_status_client.rb
258
+ - test/dto/geocoder/test_geocoder_request.rb
259
+ - test/dto/geocoder/test_geocoder_response.rb
260
+ - test/dto/search/test_best_match_response.rb
261
+ - test/dto/search/test_range_request.rb
262
+ - test/dto/status/test_status_update_request.rb
263
+ - test/helper.rb
264
+ - test/models/test_posting.rb
265
+ - test/test_struct.rb
266
+ - test/test_threetaps-client.rb