sunstone 5.0.0.beta3 → 5.0.0.1

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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.tm_properties +1 -0
  4. data/.travis.yml +36 -0
  5. data/README.md +1 -2
  6. data/Rakefile.rb +1 -1
  7. data/ext/active_record/associations/collection_association.rb +48 -6
  8. data/ext/active_record/attribute_methods.rb +25 -21
  9. data/ext/active_record/callbacks.rb +17 -0
  10. data/ext/active_record/finder_methods.rb +44 -2
  11. data/ext/active_record/persistence.rb +127 -1
  12. data/ext/active_record/relation.rb +13 -5
  13. data/ext/active_record/relation/calculations.rb +25 -0
  14. data/ext/active_record/statement_cache.rb +3 -2
  15. data/ext/active_record/transactions.rb +60 -0
  16. data/ext/arel/attributes/empty_relation.rb +31 -0
  17. data/ext/arel/attributes/relation.rb +3 -2
  18. data/lib/active_record/connection_adapters/sunstone/database_statements.rb +13 -2
  19. data/lib/active_record/connection_adapters/sunstone/schema_dumper.rb +16 -0
  20. data/lib/active_record/connection_adapters/sunstone/schema_statements.rb +2 -2
  21. data/lib/active_record/connection_adapters/sunstone/type/uuid.rb +21 -0
  22. data/lib/active_record/connection_adapters/sunstone_adapter.rb +54 -30
  23. data/lib/arel/collectors/sunstone.rb +6 -4
  24. data/lib/arel/visitors/sunstone.rb +61 -39
  25. data/lib/sunstone.rb +18 -11
  26. data/lib/sunstone/connection.rb +62 -22
  27. data/lib/sunstone/exception.rb +3 -0
  28. data/lib/sunstone/gis.rb +1 -0
  29. data/lib/sunstone/version.rb +2 -2
  30. data/sunstone.gemspec +4 -5
  31. data/test/active_record/associations/has_and_belongs_to_many_test.rb +12 -0
  32. data/test/active_record/associations/has_many_test.rb +72 -0
  33. data/test/active_record/eager_loading_test.rb +15 -0
  34. data/test/active_record/persistance_test.rb +190 -0
  35. data/test/active_record/preload_test.rb +16 -0
  36. data/test/active_record/query_test.rb +91 -0
  37. data/test/models.rb +91 -0
  38. data/test/sunstone/connection/configuration_test.rb +44 -0
  39. data/test/sunstone/connection/cookie_store_test.rb +37 -0
  40. data/test/sunstone/connection/request_helper_test.rb +105 -0
  41. data/test/sunstone/connection/send_request_test.rb +164 -0
  42. data/test/sunstone/connection_test.rb +2 -298
  43. data/test/test_helper.rb +45 -2
  44. metadata +52 -47
  45. data/ext/active_record/associations/builder/has_and_belongs_to_many.rb +0 -48
  46. data/ext/active_record/calculations.rb +0 -32
  47. data/ext/active_record/query_methods.rb +0 -30
  48. data/ext/active_record/relation/predicate_builder.rb +0 -23
  49. data/test/models/ship.rb +0 -14
  50. data/test/query_test.rb +0 -134
  51. data/test/sunstone/parser_test.rb +0 -124
  52. data/test/sunstone_test.rb +0 -303
@@ -2,304 +2,10 @@ require 'test_helper'
2
2
 
3
3
  class Sunstone::ConnectionTest < Minitest::Test
4
4
 
5
- # ::new =====================================================================
6
- test "setting the site sets the api_key" do
7
- connection = Sunstone::Connection.new(:site => 'https://my_api_key@localhost')
8
- assert_equal('my_api_key', connection.api_key)
9
- end
10
-
11
- test "setting the site sets the host" do
12
- connection = Sunstone::Connection.new(:site => 'https://my_api_key@example.com')
13
- assert_equal('example.com', connection.host)
14
- end
15
-
16
- test "setting the site sets the port" do
17
- connection = Sunstone::Connection.new(:site => 'http://my_api_key@localhost')
18
- assert_equal(80, connection.port)
19
-
20
- connection = Sunstone::Connection.new(:site => 'https://my_api_key@localhost')
21
- assert_equal(443, connection.port)
22
-
23
- connection = Sunstone::Connection.new(:site => 'https://my_api_key@localhost:4321')
24
- assert_equal(4321, connection.port)
25
- end
26
-
27
- test "setting the site sets the use_ssl option" do
28
- connection = Sunstone::Connection.new(:site => 'http://my_api_key@localhost')
29
- assert_equal(false, connection.use_ssl)
30
-
31
- connection = Sunstone::Connection.new(:site => 'https://my_api_key@localhost')
32
- assert_equal(true, connection.use_ssl)
33
- end
34
-
35
- test "setting the user_agent appends it to the User-Agent" do
36
- connection = Sunstone::Connection.new(:site => 'http://my_api_key@localhost')
37
- assert_equal("Sunstone/#{Sunstone::VERSION} Ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} #{RUBY_PLATFORM}", connection.user_agent)
38
-
39
- connection = Sunstone::Connection.new(:site => 'http://my_api_key@localhost', :user_agent => "MyGem/3.14")
40
- assert_equal("MyGem/3.14 Sunstone/#{Sunstone::VERSION} Ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} #{RUBY_PLATFORM}", connection.user_agent)
41
- end
42
-
43
- #send_request =============================================================
44
-
45
- test '#send_request(#<Net::HTTPRequest>)' do
46
- stub_request(:get, "http://testhost.com/test").to_return(:body => "get")
47
-
48
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
49
- assert_equal('get', connection.send_request(Net::HTTP::Get.new('/test')).body)
50
- end
51
-
52
- test '#send_request(#<Net::HTTPRequest>, body) with string body' do
53
- stub_request(:post, "http://testhost.com/test").with(:body => '{"key":"value"}').to_return(:body => "post")
54
-
55
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
56
- assert_equal('post', connection.send_request(Net::HTTP::Post.new('/test'), '{"key":"value"}').body)
57
- end
58
-
59
- test '#send_request(#<Net::HTTPRequest>, body) with IO body' do
60
- stub_request(:post, "http://testhost.com/test").with { |request|
61
- request.headers['Transfer-Encoding'] == "chunked" && request.body == '{"key":"value"}'
62
- }.to_return(:body => "post")
63
-
64
- rd, wr = IO.pipe
65
- wr.write('{"key":"value"}')
66
- wr.close
67
-
68
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
69
- assert_equal('post', connection.send_request(Net::HTTP::Post.new('/test'), rd).body)
70
- end
71
-
72
- test '#send_request(#<Net::HTTPRequest>, body) with Ruby Object body' do
73
- stub_request(:post, "http://testhost.com/test").with(:body => '{"key":"value"}').to_return(:body => "post")
74
-
75
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
76
- assert_equal('post', connection.send_request(Net::HTTP::Post.new('/test'), {:key => 'value'}).body)
77
- end
78
-
79
- test '#send_request(#<Net::HTTPRequest>) raises Sunstone::Exceptions on non-200 responses' do
80
- stub_request(:get, "http://testhost.com/400").to_return(:status => 400)
81
- stub_request(:get, "http://testhost.com/401").to_return(:status => 401)
82
- stub_request(:get, "http://testhost.com/404").to_return(:status => 404)
83
- stub_request(:get, "http://testhost.com/410").to_return(:status => 410)
84
- stub_request(:get, "http://testhost.com/422").to_return(:status => 422)
85
- stub_request(:get, "http://testhost.com/450").to_return(:status => 450)
86
- stub_request(:get, "http://testhost.com/503").to_return(:status => 503)
87
- stub_request(:get, "http://testhost.com/550").to_return(:status => 550)
88
-
89
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
90
- assert_raises(Sunstone::Exception::BadRequest) { connection.send_request(Net::HTTP::Get.new('/400')) }
91
- assert_raises(Sunstone::Exception::Unauthorized) { connection.send_request(Net::HTTP::Get.new('/401')) }
92
- assert_raises(Sunstone::Exception::NotFound) { connection.send_request(Net::HTTP::Get.new('/404')) }
93
- assert_raises(Sunstone::Exception::Gone) { connection.send_request(Net::HTTP::Get.new('/410')) }
94
- assert_raises(Sunstone::Exception::ApiVersionUnsupported) { connection.send_request(Net::HTTP::Get.new('/422')) }
95
- assert_raises(Sunstone::Exception) { connection.send_request(Net::HTTP::Get.new('/450')) }
96
- assert_raises(Sunstone::Exception::ServiceUnavailable) { connection.send_request(Net::HTTP::Get.new('/503')) }
97
- assert_raises(Sunstone::Exception) { connection.send_request(Net::HTTP::Get.new('/550')) }
98
- end
99
-
100
- test '#send_request(#<Net::HTTPRequest>, &block) returns value returned from &block' do
101
- stub_request(:get, "http://testhost.com/test").to_return(:body => 'get')
102
-
103
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
104
- value = connection.send_request(Net::HTTP::Get.new('/test')) do |response|
105
- 3215
106
- end
107
-
108
- assert_equal 3215, value
109
- end
110
-
111
- test '#send_request(#<Net::HTTPRequest>, &block)' do
112
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
113
- stub_request(:get, "http://testhost.com/test").to_return(:body => 'get')
114
-
115
- connection.send_request(Net::HTTP::Get.new('/test')) do |response|
116
- assert_equal 'get', response.body
117
- end
118
-
119
- # make sure block is not called when not in valid_response_codes
120
- stub_request(:get, "http://testhost.com/test").to_return(:status => 401, :body => 'get')
121
-
122
- assert_raises(Sunstone::Exception::Unauthorized) {
123
- connection.send_request(Net::HTTP::Get.new('/test')) do |response|
124
- raise Sunstone::Exception, 'Should not get here'
125
- end
126
- }
127
- end
128
-
129
- test '#send_request(#<Net::HTTPRequest>, &block) with block reading chunks' do
130
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
131
-
132
- rd, wr = IO.pipe
133
- rd = Net::BufferedIO.new(rd)
134
- wr.write(<<-DATA.gsub(/^ +/, '').gsub(/\n/, "\r\n"))
135
- HTTP/1.1 200 OK
136
- Content-Length: 5
137
-
138
- hello
139
- DATA
140
-
141
- res = Net::HTTPResponse.read_new(rd)
142
- mock_connection = mock('connection')
143
- mock_connection.stubs(:request).yields(res)
144
- connection.instance_variable_set(:@connection, mock_connection)
145
-
146
- res.reading_body(rd, true) do
147
- connection.send_request(Net::HTTP::Get.new('/test')) do |response|
148
- response.read_body do |chunk|
149
- assert_equal('hello', chunk)
150
- end
151
- end
152
- end
153
- end
154
- #
155
- # test '#send_request(#<Net::HTTPRequest) adds cookies to the cookie store if present' do
156
- # store = CookieStore::HashStore.new
157
- # stub_request(:get, "http://testhost.com/test").to_return(:body => 'get', :headers => {'Set-Cookie' => 'foo=bar; Max-Age=3600'})
158
- #
159
- # Sunstone.with_cookie_store(store) do
160
- # Sunstone.send_request(Net::HTTP::Get.new('/test'))
161
- # end
162
- #
163
- # assert_equal 1, store.instance_variable_get(:@domains).size
164
- # assert_equal 1, store.instance_variable_get(:@domains)['testhost.com'].size
165
- # assert_equal 1, store.instance_variable_get(:@domains)['testhost.com']['/test'].size
166
- # assert_equal 'bar', store.instance_variable_get(:@domains)['testhost.com']['/test']['foo'].value
167
- # end
168
- #
169
- # test '#send_request(#<Net::HTTPRequest>) includes the headers' do
170
- # stub_request(:get, "http://testhost.com/test").with(:headers => {
171
- # 'Api-Key' => 'test_api_key',
172
- # 'Content-Type' => 'application/json',
173
- # 'User-Agent' => Sunstone.user_agent
174
- # }).to_return(:body => "get")
175
- #
176
- # assert_equal('get', Sunstone.send_request(Net::HTTP::Get.new('/test')).body)
177
- #
178
- # # Test without api key
179
- # Sunstone.site = "http://testhost.com"
180
- # stub_request(:get, "http://testhost.com/test").with(:headers => {
181
- # 'Content-Type'=>'application/json',
182
- # 'User-Agent'=>'Sunstone/0.1 Ruby/2.1.1-p76 x86_64-darwin13.0'
183
- # }).to_return(:body => "get")
184
- #
185
- # assert_equal('get', Sunstone.send_request(Net::HTTP::Get.new('/test')).body)
186
- # end
187
-
188
- #
189
- # # Sunstone.with_cookie_store ================================================
190
- #
191
- # test '#with_cookie_store(store, &block) sets the cookie-store' do
192
- # assert_nil Thread.current[:sunstone_cookie_store]
193
- # Sunstone.with_cookie_store('my_store') do
194
- # assert_equal 'my_store', Thread.current[:sunstone_cookie_store]
195
- # end
196
- # assert_nil Thread.current[:sunstone_cookie_store]
197
- # end
198
-
199
- # Sunstone.get ==============================================================
200
-
201
- test '#get(path)' do
202
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
203
- stub_request(:get, "http://testhost.com/test").to_return(:body => "get")
204
-
205
- assert_equal('get', connection.get('/test').body)
206
- end
207
-
208
- test '#get(path, params) with params as string' do
209
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
210
- stub_request(:get, "http://testhost.com/test").with(:query => {'key' => 'value'}).to_return(:body => "get")
211
-
212
- assert_equal 'get', connection.get('/test', 'key=value').body
213
- end
214
-
215
- test '#get(path, params) with params as hash' do
216
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
217
- stub_request(:get, "http://testhost.com/test").with(:query => {'key' => 'value'}).to_return(:body => "get")
218
-
219
- assert_equal 'get', connection.get('/test', {:key => 'value'}).body
220
- end
221
-
222
- test '#get(path, &block)' do
223
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
224
- stub_request(:get, "http://testhost.com/test").to_return(:body => 'get')
225
-
226
- connection.get('/test') do |response|
227
- assert_equal 'get', response.body
228
- end
229
- end
230
-
231
- # Sunstone.post =============================================================
232
-
233
- test '#post(path)' do
234
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
235
- stub_request(:post, "http://testhost.com/test").to_return(:body => "post")
236
-
237
- assert_equal('post', connection.post('/test').body)
238
- end
239
-
240
- test '#post(path, body)' do
241
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
242
- stub_request(:post, "http://testhost.com/test").with(:body => 'body').to_return(:body => "post")
243
-
244
- assert_equal('post', connection.post('/test', 'body').body)
245
- end
246
-
247
- test '#post(path, &block)' do
248
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
249
- stub_request(:post, "http://testhost.com/test").to_return(:body => 'post')
250
-
251
- connection.post('/test') do |response|
252
- assert_equal 'post', response.body
253
- end
254
- end
255
-
256
- # Sunstone.put ==============================================================
257
-
258
- test '#put(path)' do
259
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
260
- stub_request(:put, "http://testhost.com/test").to_return(:body => "put")
261
-
262
- assert_equal('put', connection.put('/test').body)
263
- end
264
-
265
- test '#put(path, body)' do
266
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
267
- stub_request(:put, "http://testhost.com/test").with(:body => 'body').to_return(:body => "put")
268
-
269
- assert_equal('put', connection.put('/test', 'body').body)
270
- end
271
-
272
- test '#put(path, &block)' do
273
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
274
- stub_request(:put, "http://testhost.com/test").to_return(:body => 'put')
275
-
276
- connection.put('/test') do |response|
277
- assert_equal 'put', response.body
278
- end
279
- end
280
-
281
- # Sunstone.delete ===========================================================
282
-
283
- test '#delete' do
284
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
285
- stub_request(:delete, "http://testhost.com/test").to_return(:body => "delete")
286
-
287
- assert_equal('delete', connection.delete('/test').body)
288
- end
289
-
290
- test '#delete(path, &block)' do
291
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
292
- stub_request(:delete, "http://testhost.com/test").to_return(:body => 'delete')
293
-
294
- connection.delete('/test') do |response|
295
- assert_equal 'delete', response.body
296
- end
297
- end
298
-
299
5
  # #ping =====================================================================
300
6
 
301
7
  test '#ping' do
302
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
8
+ connection = Sunstone::Connection.new(url: "http://testhost.com")
303
9
  stub_request(:get, "http://testhost.com/ping").to_return(:body => 'pong')
304
10
 
305
11
  assert_equal( 'pong', connection.ping )
@@ -308,12 +14,10 @@ class Sunstone::ConnectionTest < Minitest::Test
308
14
  # #server_config ===========================================================
309
15
 
310
16
  test '#config' do
311
- connection = Sunstone::Connection.new(:site => "http://test_api_key@testhost.com")
17
+ connection = Sunstone::Connection.new(url: "http://testhost.com")
312
18
  stub_request(:get, "http://testhost.com/config").to_return(:body => '{"server": "configs"}')
313
19
 
314
20
  assert_equal( {:server => "configs"}, connection.server_config )
315
21
  end
316
22
 
317
-
318
-
319
23
  end
@@ -2,13 +2,21 @@
2
2
  # installed gem
3
3
  $LOAD_PATH << File.expand_path('../lib', __FILE__)
4
4
 
5
- require 'sunstone'
5
+ require 'simplecov'
6
+ SimpleCov.start do
7
+ add_group 'lib', 'sunstone/lib'
8
+ add_group 'ext', 'sunstone/ext'
9
+ end
10
+
11
+ require 'rgeo'
6
12
  require "minitest/autorun"
7
13
  require 'minitest/unit'
8
14
  require 'minitest/reporters'
9
15
  require 'webmock/minitest'
16
+ require 'mocha/mini_test'
10
17
 
11
- Dir.glob(File.expand_path('../models/**/*.rb', __FILE__), &method(:require))
18
+ require 'sunstone'
19
+ require File.expand_path('../models.rb', __FILE__)
12
20
 
13
21
 
14
22
 
@@ -37,6 +45,41 @@ class Minitest::Test
37
45
  end
38
46
  end
39
47
 
48
+ def pack(data)
49
+
50
+ end
51
+
52
+ def unpack(data)
53
+ MessagePack.unpack(CGI::unescape(data))
54
+ end
55
+
56
+ def deep_transform_query(object)
57
+ case object
58
+ when Hash
59
+ object.each_with_object({}) do |(key, value), result|
60
+ result[key.to_s] = deep_transform_query(value)
61
+ end
62
+ when Array
63
+ object.map {|e| deep_transform_query(e) }
64
+ when Symbol
65
+ object.to_s
66
+ else
67
+ object
68
+ end
69
+ end
70
+
71
+ def webmock(method, path, query=nil)
72
+ query = deep_transform_query(query) if query
73
+
74
+ stub_request(method, /^#{ExampleRecord.connection.instance_variable_get(:@connection).url}/).with do |req|
75
+ if query
76
+ req&.uri&.path == path && req.uri.query && unpack(req.uri.query.sub(/=true$/, '')) == query
77
+ else
78
+ req&.uri&.path == path && req.uri.query.nil?
79
+ end
80
+ end
81
+ end
82
+
40
83
  # test/unit backwards compatibility methods
41
84
  alias :assert_raise :assert_raises
42
85
  alias :assert_not_empty :refute_empty
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunstone
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.beta3
4
+ version: 5.0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Bracy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-15 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -165,13 +165,13 @@ dependencies:
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
- name: msgpack
168
+ name: rgeo
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
- type: :runtime
174
+ type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
@@ -179,13 +179,13 @@ dependencies:
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
- name: wankel
182
+ name: simplecov
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
185
  - - ">="
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
- type: :runtime
188
+ type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
@@ -193,7 +193,7 @@ dependencies:
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
- name: cookie_store
196
+ name: msgpack
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
199
  - - ">="
@@ -207,61 +207,47 @@ dependencies:
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  - !ruby/object:Gem::Dependency
210
- name: arel
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - "~>"
214
- - !ruby/object:Gem::Version
215
- version: '7.0'
216
- type: :runtime
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - "~>"
221
- - !ruby/object:Gem::Version
222
- version: '7.0'
223
- - !ruby/object:Gem::Dependency
224
- name: activesupport
210
+ name: cookie_store
225
211
  requirement: !ruby/object:Gem::Requirement
226
212
  requirements:
227
213
  - - ">="
228
214
  - !ruby/object:Gem::Version
229
- version: 5.0.0.beta3
215
+ version: '0'
230
216
  type: :runtime
231
217
  prerelease: false
232
218
  version_requirements: !ruby/object:Gem::Requirement
233
219
  requirements:
234
220
  - - ">="
235
221
  - !ruby/object:Gem::Version
236
- version: 5.0.0.beta3
222
+ version: '0'
237
223
  - !ruby/object:Gem::Dependency
238
- name: activemodel
224
+ name: arel
239
225
  requirement: !ruby/object:Gem::Requirement
240
226
  requirements:
241
- - - ">="
227
+ - - "~>"
242
228
  - !ruby/object:Gem::Version
243
- version: 5.0.0.beta3
229
+ version: '7.0'
244
230
  type: :runtime
245
231
  prerelease: false
246
232
  version_requirements: !ruby/object:Gem::Requirement
247
233
  requirements:
248
- - - ">="
234
+ - - "~>"
249
235
  - !ruby/object:Gem::Version
250
- version: 5.0.0.beta3
236
+ version: '7.0'
251
237
  - !ruby/object:Gem::Dependency
252
238
  name: activerecord
253
239
  requirement: !ruby/object:Gem::Requirement
254
240
  requirements:
255
- - - ">="
241
+ - - '='
256
242
  - !ruby/object:Gem::Version
257
- version: 5.0.0.beta3
243
+ version: 5.0.0.1
258
244
  type: :runtime
259
245
  prerelease: false
260
246
  version_requirements: !ruby/object:Gem::Requirement
261
247
  requirements:
262
- - - ">="
248
+ - - '='
263
249
  - !ruby/object:Gem::Version
264
- version: 5.0.0.beta3
250
+ version: 5.0.0.1
265
251
  description: A library for interacting with REST APIs. Similar to ActiveResource
266
252
  email:
267
253
  - jonbracy@gmail.com
@@ -270,33 +256,37 @@ extensions: []
270
256
  extra_rdoc_files: []
271
257
  files:
272
258
  - ".gitignore"
259
+ - ".tm_properties"
260
+ - ".travis.yml"
273
261
  - Gemfile
274
262
  - LICENSE
275
263
  - README.md
276
264
  - Rakefile.rb
277
265
  - TODO.md
278
- - ext/active_record/associations/builder/has_and_belongs_to_many.rb
279
266
  - ext/active_record/associations/collection_association.rb
280
267
  - ext/active_record/attribute_methods.rb
281
268
  - ext/active_record/batches.rb
282
- - ext/active_record/calculations.rb
269
+ - ext/active_record/callbacks.rb
283
270
  - ext/active_record/finder_methods.rb
284
271
  - ext/active_record/persistence.rb
285
- - ext/active_record/query_methods.rb
286
272
  - ext/active_record/relation.rb
287
- - ext/active_record/relation/predicate_builder.rb
273
+ - ext/active_record/relation/calculations.rb
288
274
  - ext/active_record/statement_cache.rb
275
+ - ext/active_record/transactions.rb
289
276
  - ext/active_support/core_ext/object/to_query.rb
277
+ - ext/arel/attributes/empty_relation.rb
290
278
  - ext/arel/attributes/relation.rb
291
279
  - ext/arel/nodes/eager_load.rb
292
280
  - ext/arel/nodes/select_statement.rb
293
281
  - ext/arel/select_manager.rb
294
282
  - lib/active_record/connection_adapters/sunstone/column.rb
295
283
  - lib/active_record/connection_adapters/sunstone/database_statements.rb
284
+ - lib/active_record/connection_adapters/sunstone/schema_dumper.rb
296
285
  - lib/active_record/connection_adapters/sunstone/schema_statements.rb
297
286
  - lib/active_record/connection_adapters/sunstone/type/array.rb
298
287
  - lib/active_record/connection_adapters/sunstone/type/date_time.rb
299
288
  - lib/active_record/connection_adapters/sunstone/type/ewkb.rb
289
+ - lib/active_record/connection_adapters/sunstone/type/uuid.rb
300
290
  - lib/active_record/connection_adapters/sunstone/type_metadata.rb
301
291
  - lib/active_record/connection_adapters/sunstone_adapter.rb
302
292
  - lib/arel/collectors/sunstone.rb
@@ -304,13 +294,21 @@ files:
304
294
  - lib/sunstone.rb
305
295
  - lib/sunstone/connection.rb
306
296
  - lib/sunstone/exception.rb
297
+ - lib/sunstone/gis.rb
307
298
  - lib/sunstone/version.rb
308
299
  - sunstone.gemspec
309
- - test/models/ship.rb
310
- - test/query_test.rb
300
+ - test/active_record/associations/has_and_belongs_to_many_test.rb
301
+ - test/active_record/associations/has_many_test.rb
302
+ - test/active_record/eager_loading_test.rb
303
+ - test/active_record/persistance_test.rb
304
+ - test/active_record/preload_test.rb
305
+ - test/active_record/query_test.rb
306
+ - test/models.rb
307
+ - test/sunstone/connection/configuration_test.rb
308
+ - test/sunstone/connection/cookie_store_test.rb
309
+ - test/sunstone/connection/request_helper_test.rb
310
+ - test/sunstone/connection/send_request_test.rb
311
311
  - test/sunstone/connection_test.rb
312
- - test/sunstone/parser_test.rb
313
- - test/sunstone_test.rb
314
312
  - test/test_helper.rb
315
313
  homepage: http://sunstonerb.com
316
314
  licenses: []
@@ -326,9 +324,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
326
324
  version: '0'
327
325
  required_rubygems_version: !ruby/object:Gem::Requirement
328
326
  requirements:
329
- - - ">"
327
+ - - ">="
330
328
  - !ruby/object:Gem::Version
331
- version: 1.3.1
329
+ version: '0'
332
330
  requirements: []
333
331
  rubyforge_project:
334
332
  rubygems_version: 2.5.1
@@ -336,9 +334,16 @@ signing_key:
336
334
  specification_version: 4
337
335
  summary: A library for interacting with REST APIs
338
336
  test_files:
339
- - test/models/ship.rb
340
- - test/query_test.rb
337
+ - test/active_record/associations/has_and_belongs_to_many_test.rb
338
+ - test/active_record/associations/has_many_test.rb
339
+ - test/active_record/eager_loading_test.rb
340
+ - test/active_record/persistance_test.rb
341
+ - test/active_record/preload_test.rb
342
+ - test/active_record/query_test.rb
343
+ - test/models.rb
344
+ - test/sunstone/connection/configuration_test.rb
345
+ - test/sunstone/connection/cookie_store_test.rb
346
+ - test/sunstone/connection/request_helper_test.rb
347
+ - test/sunstone/connection/send_request_test.rb
341
348
  - test/sunstone/connection_test.rb
342
- - test/sunstone/parser_test.rb
343
- - test/sunstone_test.rb
344
349
  - test/test_helper.rb