rhoconnect 3.2.1 → 3.3.1.beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. data/CHANGELOG.md +24 -5
  2. data/Gemfile +2 -2
  3. data/Gemfile.lock +20 -20
  4. data/bench/benchapp/Gemfile +17 -20
  5. data/bench/benchapp/config.ru +2 -2
  6. data/bench/benchapp/settings/settings.yml +3 -3
  7. data/bench/blobapp/Gemfile +16 -13
  8. data/bench/blobapp/config.ru +2 -2
  9. data/bench/blobapp/settings/settings.yml +5 -3
  10. data/bench/lib/bench.rb +35 -32
  11. data/bench/lib/bench/session.rb +9 -1
  12. data/bench/scripts/blob_cud_script.rb +13 -17
  13. data/bench/scripts/cud_script.rb +11 -12
  14. data/bench/scripts/helpers.rb +5 -7
  15. data/bench/scripts/query_md_script.rb +18 -12
  16. data/bench/scripts/query_only_script.rb +19 -11
  17. data/bench/scripts/query_script.rb +17 -13
  18. data/bench/scripts/test_query_script.rb +46 -17
  19. data/bench/scripts/test_source_script.rb +7 -7
  20. data/commands/commands/dtach_commands/dtach_install.rb +44 -16
  21. data/commands/commands/rhoconnect/spec.rb +13 -9
  22. data/commands/commands/rhoconnect/version.rb +6 -0
  23. data/commands/execute.rb +10 -6
  24. data/doc/deploying.txt +75 -13
  25. data/doc/install.txt +3 -3
  26. data/doc/push-client-setup.txt +1 -1
  27. data/doc/rest-api.txt +4 -23
  28. data/doc/rhoconnect-redis-stack.txt +26 -7
  29. data/doc/settings.txt +9 -3
  30. data/examples/simple/Gemfile +3 -1
  31. data/examples/simple/application.rb +5 -0
  32. data/examples/simple/config.ru +3 -2
  33. data/examples/simple/my_server.rb +14 -0
  34. data/examples/simple/settings/settings.yml +1 -0
  35. data/generators/templates/application/Gemfile +4 -4
  36. data/generators/templates/application/application.rb +4 -0
  37. data/generators/templates/application/settings/settings.yml +4 -1
  38. data/installer/unix-like/create_texts.rb +39 -1
  39. data/installer/unix-like/rho_connect_install_constants.rb +1 -1
  40. data/installer/utils/package_upload/repos.rake +7 -5
  41. data/lib/rhoconnect.rb +3 -2
  42. data/lib/rhoconnect/api/app/ans_login.rb +3 -0
  43. data/lib/rhoconnect/api/app/bulk_data.rb +6 -0
  44. data/lib/rhoconnect/api/{source → app}/fast_delete.rb +1 -1
  45. data/lib/rhoconnect/api/{source → app}/fast_insert.rb +2 -2
  46. data/lib/rhoconnect/api/{source → app}/fast_update.rb +2 -2
  47. data/lib/rhoconnect/api/app/login.rb +5 -0
  48. data/lib/rhoconnect/api/{source → app}/push_deletes.rb +1 -1
  49. data/lib/rhoconnect/api/{source → app}/push_objects.rb +1 -1
  50. data/lib/rhoconnect/api/app/query.rb +4 -0
  51. data/lib/rhoconnect/api/app/queue_updates.rb +94 -0
  52. data/lib/rhoconnect/api/app/search.rb +4 -0
  53. data/lib/rhoconnect/api/client/client_get_db_doc.rb +5 -0
  54. data/lib/rhoconnect/api/client/client_set_db_doc.rb +8 -0
  55. data/lib/rhoconnect/api/client/create.rb +7 -0
  56. data/lib/rhoconnect/api/client/get_client_params.rb +2 -1
  57. data/lib/rhoconnect/api/client/list_client_docs.rb +2 -1
  58. data/lib/rhoconnect/api/client/register.rb +12 -0
  59. data/lib/rhoconnect/api/client/reset.rb +5 -0
  60. data/lib/rhoconnect/api/{source → readstate}/set_refresh_time.rb +2 -1
  61. data/lib/rhoconnect/api/source/get_source_params.rb +3 -2
  62. data/lib/rhoconnect/api/source/list_sources.rb +2 -1
  63. data/lib/rhoconnect/api/source/update_source_params.rb +3 -3
  64. data/lib/rhoconnect/api/store/get_db_doc.rb +4 -0
  65. data/lib/rhoconnect/api/store/set_db_doc.rb +7 -0
  66. data/lib/rhoconnect/api/system/get_adapter.rb +4 -0
  67. data/lib/rhoconnect/api/{admin → system}/get_license_info.rb +2 -1
  68. data/lib/rhoconnect/api/system/login.rb +15 -0
  69. data/lib/rhoconnect/api/{admin → system}/reset.rb +3 -2
  70. data/lib/rhoconnect/api/system/save_adapter.rb +4 -0
  71. data/lib/rhoconnect/api/{admin → system}/stats.rb +2 -1
  72. data/lib/rhoconnect/api/user/create_user.rb +2 -2
  73. data/lib/rhoconnect/api/user/delete_client.rb +6 -0
  74. data/lib/rhoconnect/api/user/delete_user.rb +2 -1
  75. data/lib/rhoconnect/api/user/list_clients.rb +4 -0
  76. data/lib/rhoconnect/api/user/list_source_docs.rb +11 -0
  77. data/lib/rhoconnect/api/user/list_users.rb +1 -1
  78. data/lib/rhoconnect/api/user/ping.rb +7 -0
  79. data/lib/rhoconnect/api/user/show_user.rb +3 -0
  80. data/lib/rhoconnect/api/user/update_user.rb +3 -2
  81. data/lib/rhoconnect/api/user/user_get_db_doc.rb +5 -0
  82. data/lib/rhoconnect/api/user/user_set_db_doc.rb +10 -0
  83. data/lib/rhoconnect/app.rb +12 -2
  84. data/lib/rhoconnect/async.rb +6 -10
  85. data/lib/rhoconnect/bulk_data/bulk_data.rb +4 -4
  86. data/lib/rhoconnect/client.rb +10 -9
  87. data/lib/rhoconnect/client_sync.rb +24 -19
  88. data/lib/rhoconnect/document.rb +18 -4
  89. data/lib/rhoconnect/graph_helper.rb +4 -2
  90. data/lib/rhoconnect/jobs/bulk_data_job.rb +1 -1
  91. data/lib/rhoconnect/jobs/ping_job.rb +39 -29
  92. data/lib/rhoconnect/middleware/admin_user.rb +23 -0
  93. data/lib/rhoconnect/middleware/body_content_type_parser.rb +35 -0
  94. data/lib/rhoconnect/{cors.rb → middleware/cors.rb} +1 -0
  95. data/lib/rhoconnect/middleware/current_app.rb +16 -0
  96. data/lib/rhoconnect/middleware/current_request.rb +16 -0
  97. data/lib/rhoconnect/middleware/current_user.rb +17 -0
  98. data/lib/rhoconnect/middleware/helpers.rb +105 -0
  99. data/lib/rhoconnect/middleware/login_required.rb +22 -0
  100. data/lib/rhoconnect/{stats/middleware.rb → middleware/stats.rb} +5 -3
  101. data/lib/rhoconnect/middleware/x_domain_session_wrapper.rb +58 -0
  102. data/lib/rhoconnect/ping.rb +1 -0
  103. data/lib/rhoconnect/ping/apple.rb +18 -16
  104. data/lib/rhoconnect/ping/blackberry.rb +9 -9
  105. data/lib/rhoconnect/ping/rhoconnect_push.rb +45 -0
  106. data/lib/rhoconnect/server.rb +98 -91
  107. data/lib/rhoconnect/source.rb +5 -1
  108. data/lib/rhoconnect/source_sync.rb +4 -3
  109. data/lib/rhoconnect/stats/record.rb +15 -15
  110. data/lib/rhoconnect/store.rb +253 -75
  111. data/lib/rhoconnect/tasks.rb +3 -3
  112. data/lib/rhoconnect/version.rb +1 -1
  113. data/lib/rhoconnect/web-console/controllers/admins.js +1 -14
  114. data/lib/rhoconnect/web-console/models/adapter.js +18 -8
  115. data/lib/rhoconnect/web-console/models/client.js +15 -9
  116. data/lib/rhoconnect/web-console/models/doc.js +7 -11
  117. data/lib/rhoconnect/web-console/models/session.js +5 -2
  118. data/lib/rhoconnect/web-console/models/source.js +55 -36
  119. data/lib/rhoconnect/web-console/models/user.js +20 -11
  120. data/lib/rhoconnect/web-console/public/backbone.js +8 -2
  121. data/lib/rhoconnect/web-console/templates/index.erb +11 -5
  122. data/lib/rhoconnect/web-console/views/doc.js +6 -8
  123. data/lib/rhoconnect/web-console/views/edit_user.js +6 -3
  124. data/lib/rhoconnect/web-console/views/home.js +98 -25
  125. data/lib/rhoconnect/web-console/views/index.js +1 -1
  126. data/lib/rhoconnect/web-console/views/new_ping.js +6 -3
  127. data/lib/rhoconnect/web-console/views/server_doc.js +12 -4
  128. data/lib/rhoconnect/web-console/views/show_device.js +6 -3
  129. data/rhoconnect.gemspec +1 -2
  130. data/spec/api/{source → app}/fast_delete_spec.rb +4 -4
  131. data/spec/api/{source → app}/fast_insert_spec.rb +4 -4
  132. data/spec/api/{source → app}/fast_update_spec.rb +22 -6
  133. data/spec/api/{source → app}/push_deletes_spec.rb +2 -2
  134. data/spec/api/app/push_objects_spec.rb +45 -0
  135. data/spec/api/client/client_get_db_doc_spec.rb +31 -0
  136. data/spec/api/client/client_set_db_doc_spec.rb +14 -0
  137. data/spec/api/client/get_client_params_spec.rb +3 -2
  138. data/spec/api/client/list_client_docs_spec.rb +2 -2
  139. data/spec/api/{source → readstate}/set_refresh_time_spec.rb +15 -9
  140. data/spec/api/source/get_source_params_spec.rb +3 -2
  141. data/spec/api/source/list_sources_spec.rb +3 -9
  142. data/spec/api/source/update_source_params_spec.rb +4 -4
  143. data/spec/api/store/get_db_doc_spec.rb +32 -0
  144. data/spec/api/store/set_db_doc_spec.rb +43 -0
  145. data/spec/api/system/adapter_spec.rb +33 -0
  146. data/spec/api/{admin → system}/get_license_info_spec.rb +2 -5
  147. data/spec/api/{admin/get_api_token_spec.rb → system/login_spec.rb} +4 -11
  148. data/spec/api/{admin → system}/reset_spec.rb +2 -2
  149. data/spec/api/{admin → system}/stats_spec.rb +19 -13
  150. data/spec/api/user/create_user_spec.rb +15 -8
  151. data/spec/api/{client → user}/delete_client_spec.rb +3 -4
  152. data/spec/api/user/delete_user_spec.rb +33 -4
  153. data/spec/api/user/list_clients_spec.rb +30 -0
  154. data/spec/api/user/list_source_docs_spec.rb +35 -0
  155. data/spec/api/user/list_users_spec.rb +5 -6
  156. data/spec/api/{client → user}/ping_spec.rb +4 -6
  157. data/spec/api/user/show_user_spec.rb +14 -0
  158. data/spec/api/user/update_user_spec.rb +28 -10
  159. data/spec/api/user/user_get_db_doc_spec.rb +16 -0
  160. data/spec/api/user/user_set_db_doc_spec.rb +41 -0
  161. data/spec/apps/rhotestapp/application.rb +4 -0
  162. data/spec/apps/rhotestapp/settings/settings.yml +3 -1
  163. data/spec/bulk_data/bulk_data_spec.rb +13 -0
  164. data/spec/client_sync_spec.rb +41 -59
  165. data/spec/document_spec.rb +23 -0
  166. data/spec/javascripts/doc_view_spec.js +1 -1
  167. data/spec/javascripts/home_view_spec.js +10 -5
  168. data/spec/javascripts/index_view_spec.js +1 -1
  169. data/spec/jobs/ping_job_spec.rb +26 -0
  170. data/spec/perf/store_perf_spec.rb +1 -1
  171. data/spec/ping/android_spec.rb +0 -7
  172. data/spec/ping/apple_spec.rb +7 -0
  173. data/spec/ping/blackberry_spec.rb +10 -0
  174. data/spec/ping/rhoconnect_push_spec.rb +58 -0
  175. data/spec/server/cors_spec.rb +1 -1
  176. data/spec/server/server_spec.rb +152 -104
  177. data/spec/{stats/middleware_spec.rb → server/stats_spec.rb} +4 -5
  178. data/spec/server/x_domain_session_wrapper_spec.rb +3 -3
  179. data/spec/source_spec.rb +2 -2
  180. data/spec/source_sync_spec.rb +2 -0
  181. data/spec/spec_helper.rb +17 -3
  182. data/spec/stats/record_spec.rb +18 -19
  183. data/spec/store_spec.rb +51 -26
  184. data/spec/support/shared_examples.rb +4 -0
  185. data/spec/sync_states_spec.rb +2 -2
  186. metadata +104 -88
  187. data/bench/benchapp/Gemfile.lock +0 -87
  188. data/bench/blobapp/Gemfile.lock +0 -107
  189. data/bench/lib/testdata/5-data.txt +0 -8
  190. data/doc/release.txt +0 -41
  191. data/lib/rhoconnect/api/admin/get_api_token.rb +0 -14
  192. data/lib/rhoconnect/api/admin/login.rb +0 -6
  193. data/lib/rhoconnect/api/application/bulk_data.rb +0 -7
  194. data/lib/rhoconnect/api/application/clientcreate.rb +0 -8
  195. data/lib/rhoconnect/api/application/clientlogin.rb +0 -6
  196. data/lib/rhoconnect/api/application/clientregister.rb +0 -13
  197. data/lib/rhoconnect/api/application/clientreset.rb +0 -6
  198. data/lib/rhoconnect/api/application/query.rb +0 -7
  199. data/lib/rhoconnect/api/application/queue_updates.rb +0 -20
  200. data/lib/rhoconnect/api/application/search.rb +0 -6
  201. data/lib/rhoconnect/api/client/create_client.rb +0 -3
  202. data/lib/rhoconnect/api/client/delete_client.rb +0 -5
  203. data/lib/rhoconnect/api/client/list_clients.rb +0 -3
  204. data/lib/rhoconnect/api/client/ping.rb +0 -7
  205. data/lib/rhoconnect/api/source/get_adapter.rb +0 -3
  206. data/lib/rhoconnect/api/source/get_db_doc.rb +0 -7
  207. data/lib/rhoconnect/api/source/list_source_docs.rb +0 -10
  208. data/lib/rhoconnect/api/source/save_adapter.rb +0 -3
  209. data/lib/rhoconnect/api/source/set_db_doc.rb +0 -10
  210. data/lib/rhoconnect/api/source/upload_file.rb +0 -4
  211. data/lib/rhoconnect/body_content_type_parser.rb +0 -32
  212. data/lib/rhoconnect/x_domain_session_wrapper.rb +0 -53
  213. data/spec/api/admin/api_token_spec.rb +0 -13
  214. data/spec/api/client/create_client_spec.rb +0 -13
  215. data/spec/api/client/list_clients_spec.rb +0 -22
  216. data/spec/api/source/adapter_spec.rb +0 -29
  217. data/spec/api/source/get_db_doc_spec.rb +0 -21
  218. data/spec/api/source/list_source_docs_spec.rb +0 -25
  219. data/spec/api/source/push_objects_spec.rb +0 -27
  220. data/spec/api/source/set_db_doc_spec.rb +0 -32
  221. data/spec/api/source/upload_file_spec.rb +0 -26
@@ -6,7 +6,6 @@ STATS_RECORD_RESOLUTION = 2 unless defined? STATS_RECORD_RESOLUTION
6
6
  STATS_RECORD_SIZE = 8 unless defined? STATS_RECORD_SIZE
7
7
 
8
8
  include Rhoconnect
9
- include Rhoconnect::Stats
10
9
 
11
10
  describe "Middleware" do
12
11
 
@@ -17,7 +16,7 @@ describe "Middleware" do
17
16
  app.stub!(:call)
18
17
  Rhoconnect.stats = true
19
18
  Rhoconnect::Server.enable :stats
20
- @middleware_new_routes = Middleware.new(app)
19
+ @middleware_new_routes = Rhoconnect::Middleware::Stats.new(app)
21
20
  Store.stub!(:lock).and_yield
22
21
  end
23
22
 
@@ -37,20 +36,20 @@ describe "Middleware" do
37
36
  }
38
37
  10.times { @middleware_new_routes.call(env) }
39
38
  metric = 'http:GET:/api/application/query:SampleAdapter'
40
- Record.key(metric).should == "stat:#{metric}"
39
+ Rhoconnect::Stats::Record.key(metric).should == "stat:#{metric}"
41
40
 
42
41
  # The conversion algorithm (float to string) currently checks two precisions.
43
42
  # In Ruby 1.9, it tries 16 digits and if that's not enough it then uses 17.
44
43
  # In 1.8, it's the same but with 15 and 16.
45
44
  if RUBY_VERSION =~ /1.9/
46
- Record.range(metric, 0, -1).should == [
45
+ Rhoconnect::Stats::Record.range(metric, 0, -1).should == [
47
46
  "2.0,0.6000000000000014:12",
48
47
  "2.0,0.6000000000000014:14",
49
48
  "2.0,0.6000000000000014:16",
50
49
  "2.0,0.6000000000000014:18"
51
50
  ]
52
51
  else
53
- Record.range(metric, 0, -1).should == [
52
+ Rhoconnect::Stats::Record.range(metric, 0, -1).should == [
54
53
  "2.0,0.600000000000002:12",
55
54
  "2.0,0.600000000000002:14",
56
55
  "2.0,0.600000000000002:16",
@@ -1,4 +1,4 @@
1
- require 'rhoconnect/x_domain_session_wrapper'
1
+ require 'rhoconnect/middleware/x_domain_session_wrapper'
2
2
  require File.join(File.dirname(__FILE__),'..','spec_helper')
3
3
 
4
4
  require "cgi"
@@ -30,13 +30,13 @@ describe "XDomainSessionWrapper middleware" do
30
30
  before(:each) do
31
31
  app ||= StubApp.new
32
32
 
33
- @middleware_new_routes = XDomainSessionWrapper.new(app, {
33
+ @middleware_new_routes = Rhoconnect::Middleware::XDomainSessionWrapper.new(app, {
34
34
  :session_cookie => COOKIE_NAME,
35
35
  :api_uri_regexp => /\A\/api\/application/,
36
36
  :login_uri_regexp => /\A\/api\/application\/clientlogin/
37
37
  })
38
38
 
39
- @middleware_old_routes = XDomainSessionWrapper.new(app, {
39
+ @middleware_old_routes = Rhoconnect::Middleware::XDomainSessionWrapper.new(app, {
40
40
  :session_cookie => COOKIE_NAME,
41
41
  :api_uri_regexp => /\A\/application/,
42
42
  :login_uri_regexp => /\A\/application\/clientlogin/
@@ -12,7 +12,7 @@ describe "Source" do
12
12
  @s.url.should == @s_fields[:url]
13
13
  @s.login.should == @s_fields[:login]
14
14
  @s.app.name.should == @a_fields[:name]
15
- @s.priority.should == 3
15
+ @s.priority.should == 1
16
16
  @s.callback_url.should be_nil
17
17
  @s.queue.should be_nil
18
18
  @s.query_queue.should be_nil
@@ -28,7 +28,7 @@ describe "Source" do
28
28
  @s1.url.should == @s_fields[:url]
29
29
  @s1.login.should == @s_fields[:login]
30
30
  @s1.app.name.should == @a_fields[:name]
31
- @s1.priority.should == 3
31
+ @s1.priority.should == 1
32
32
  @s1.callback_url.should be_nil
33
33
  @s1.poll_interval.should == 300
34
34
  @s1.app_id.should == @s_params[:app_id]
@@ -294,6 +294,7 @@ describe "SourceSync" do
294
294
 
295
295
  it "should detect delete conflict and skip the duplicate record delete" do
296
296
  set_state(@c.docname(:cd) => {'4'=> {'name' => 'Apple'}})
297
+ set_state(@c.docname(:cd_size) => 1)
297
298
  set_zstate({@s.docname(:delete) => {'4'=> { 'name' => 'Apple' }}},@c.id,true)
298
299
  set_zstate({@s.docname(:delete) => {'4'=> { 'name' => 'Apple', 'duplicate_of_cid' => @c.id, 'duplicate_of_key' => '4', 'duplicate_of_queue_index' => '0'}}},@c.id,true)
299
300
  @ss.process_cud
@@ -306,6 +307,7 @@ describe "SourceSync" do
306
307
 
307
308
  it "should detect delete conflict and force an error on duplicate record delete" do
308
309
  set_state(@c.docname(:cd) => {'4'=> {'name' => 'Apple'}})
310
+ set_state(@c.docname(:cd_size) => 1)
309
311
  set_zstate({@s.docname(:delete) => {'4'=> { 'name' => 'Apple' }}},@c.id,true)
310
312
  set_zstate({@s.docname(:delete) => {'4'=> { 'name' => 'Apple', 'force_duplicate_error' => '1'}}},@c.id,true)
311
313
  @ss.process_cud
@@ -60,8 +60,14 @@ module TestHelpers
60
60
  File.expand_path(File.join(File.dirname(__FILE__),'apps','emptyapp'))
61
61
  end
62
62
 
63
- def do_post(url,params)
64
- post url, params.to_json, {'CONTENT_TYPE'=>'application/json'}
63
+ def do_post(url,params,headers = {})
64
+ headers.merge!('CONTENT_TYPE'=>'application/json')
65
+ post url, params.to_json, headers
66
+ end
67
+
68
+ def do_put(url,params,headers = {})
69
+ headers.merge!('CONTENT_TYPE'=>'application/json')
70
+ put url, params.to_json, headers
65
71
  end
66
72
 
67
73
  def bulk_data_docname(app_id,user_id)
@@ -113,6 +119,14 @@ module TestHelpers
113
119
  def json_clone(data)
114
120
  JSON.parse(data.to_json)
115
121
  end
122
+
123
+ def setup_post_yield(response)
124
+ if RUBY_VERSION =~ /1.9/ or defined?(JRUBY_VERSION)
125
+ RestClient.stub!(:post).and_yield(response, nil, nil)
126
+ else
127
+ RestClient.stub!(:post).and_yield(response)
128
+ end
129
+ end
116
130
 
117
131
  def set_state(state,append=false)
118
132
  state.each do |dockey,data|
@@ -171,7 +185,7 @@ module TestHelpers
171
185
  end
172
186
 
173
187
  def validate_db(bulk_data,data)
174
- validate_db_file(bulk_data.dbfile,bulk_data.sources.members,data)
188
+ validate_db_file(bulk_data.dbfile,bulk_data.sources[0, -1],data)
175
189
  end
176
190
 
177
191
  def validate_db_file(dbfile,sources,data)
@@ -5,7 +5,6 @@ STATS_RECORD_RESOLUTION = 2 unless defined? STATS_RECORD_RESOLUTION
5
5
  STATS_RECORD_SIZE = 8 unless defined? STATS_RECORD_SIZE
6
6
 
7
7
  include Rhoconnect
8
- include Rhoconnect::Stats
9
8
 
10
9
  describe "Record" do
11
10
 
@@ -17,42 +16,42 @@ describe "Record" do
17
16
 
18
17
  it "should add metric to the record and trim record size" do
19
18
  Time.stub!(:now).and_return { @now += 1; @now }
20
- 10.times { Record.add('foo') }
19
+ 10.times { Rhoconnect::Stats::Record.add('foo') }
21
20
  Store.db.zrange('stat:foo', 0, -1).should == ["2:12", "2:14", "2:16", "2:18"]
22
21
  end
23
22
 
24
23
  it "should add single record" do
25
24
  Time.stub!(:now).and_return { @now += 1; @now }
26
- Record.add('foo')
25
+ Rhoconnect::Stats::Record.add('foo')
27
26
  Store.db.zrange('stat:foo', 0, -1).should == ["1:10"]
28
27
  end
29
28
 
30
29
  it "should return type of metric" do
31
- Record.add('foo')
32
- Record.rtype('foo').should == 'zset'
30
+ Rhoconnect::Stats::Record.add('foo')
31
+ Rhoconnect::Stats::Record.rtype('foo').should == 'zset'
33
32
  end
34
33
 
35
34
  it "should set string metric" do
36
- Record.set_value('foo', 'bar')
35
+ Rhoconnect::Stats::Record.set_value('foo', 'bar')
37
36
  Store.db.get('stat:foo').should == 'bar'
38
37
  end
39
38
 
40
39
  it "should get string metric" do
41
40
  Store.db.set('stat:foo', 'bar')
42
- Record.get_value('foo').should == 'bar'
41
+ Rhoconnect::Stats::Record.get_value('foo').should == 'bar'
43
42
  end
44
43
 
45
44
  it "should get keys" do
46
- Record.add('foo')
47
- Record.add('bar')
48
- Record.keys.sort.should == ['bar','foo']
45
+ Rhoconnect::Stats::Record.add('foo')
46
+ Rhoconnect::Stats::Record.add('bar')
47
+ Rhoconnect::Stats::Record.keys.sort.should == ['bar','foo']
49
48
  end
50
49
 
51
50
  it "should add absolute metric value" do
52
51
  Time.stub!(:now).and_return { @now += 1; @now }
53
52
  time = 0
54
53
  4.times do
55
- Record.save_average('foo',time)
54
+ Rhoconnect::Stats::Record.save_average('foo',time)
56
55
  time += 1
57
56
  end
58
57
  Store.db.zrange('stat:foo', 0, -1).should == ["2.0,1.0:10", "2.0,5.0:12"]
@@ -62,7 +61,7 @@ describe "Record" do
62
61
  Rhoconnect.stats = true
63
62
  Time.stub!(:now).and_return { @now += 1; @now }
64
63
  4.times do
65
- Record.update('foo') do
64
+ Rhoconnect::Stats::Record.update('foo') do
66
65
  # something interesting
67
66
  end
68
67
  end
@@ -72,22 +71,22 @@ describe "Record" do
72
71
 
73
72
  it "should get range of metric values" do
74
73
  Time.stub!(:now).and_return { @now += 1; @now }
75
- 10.times { Record.add('foo') }
76
- Record.range('foo', 0, 1).should == ["2:12", "2:14"]
74
+ 10.times { Rhoconnect::Stats::Record.add('foo') }
75
+ Rhoconnect::Stats::Record.range('foo', 0, 1).should == ["2:12", "2:14"]
77
76
  end
78
77
 
79
78
  it "should reset metric" do
80
79
  Time.stub!(:now).and_return { @now += 1; @now }
81
- 10.times { Record.add('foo') }
80
+ 10.times { Rhoconnect::Stats::Record.add('foo') }
82
81
  Store.db.zrange('stat:foo', 0, -1).should == ["2:12", "2:14", "2:16", "2:18"]
83
- Record.reset('foo')
82
+ Rhoconnect::Stats::Record.reset('foo')
84
83
  Store.db.zrange('stat:foo', 0, -1).should == []
85
84
  end
86
85
 
87
86
  it "should reset all metrics" do
88
- Record.add('foo')
89
- Record.add('bar')
90
- Record.reset_all
87
+ Rhoconnect::Stats::Record.add('foo')
88
+ Rhoconnect::Stats::Record.add('bar')
89
+ Rhoconnect::Stats::Record.reset_all
91
90
  Store.db.keys('stat:*').should == []
92
91
  end
93
92
  end
@@ -59,11 +59,11 @@ describe "Store" do
59
59
  it "should update_objects with simple data and one changed attribute" do
60
60
  data = { '1' => { 'hello' => 'world', "attr1" => 'value1' } }
61
61
  update_data = { '1' => {'attr1' => 'value2'}}
62
- Store.put_data('mydata', data)
63
- Store.get_data('mydata').should == data
64
- Store.update_objects('mydata', update_data)
62
+ Store.put_data(:md, data)
63
+ Store.get_data(:md).should == data
64
+ Store.update_objects(:md, update_data)
65
65
  data['1'].merge!(update_data['1'])
66
- Store.get_data('mydata').should == data
66
+ Store.get_data(:md).should == data
67
67
  end
68
68
 
69
69
  it "should update_objects with simple data and verify that srem and sadd is called only on affected fields" do
@@ -91,10 +91,16 @@ describe "Store" do
91
91
  Store.delete_objects('mydata', ['1'])
92
92
  end
93
93
 
94
- it "should add simple array data to new set" do
94
+ it "should add simple array data to new list" do
95
+ @data = ['1','2','3']
96
+ Store.put_list(@s.docname(:md),@data).should == true
97
+ Store.get_list(@s.docname(:md)).should == @data
98
+ end
99
+
100
+ it "should add simple array data to new list using *_data methods" do
95
101
  @data = ['1','2','3']
96
102
  Store.put_data(@s.docname(:md),@data).should == true
97
- Store.get_data(@s.docname(:md),Array).sort.should == @data
103
+ Store.get_data(@s.docname(:md),Array).should == @data
98
104
  end
99
105
 
100
106
  it "should replace simple data to existing set" do
@@ -118,13 +124,6 @@ describe "Store" do
118
124
  Store.decr('foo').should == 9
119
125
  end
120
126
 
121
- it "should return true/false if element ismember of a set" do
122
- Store.put_data('foo',['a'])
123
- Store.ismember?('foo','a').should == true
124
-
125
- Store.ismember?('foo','b').should == false
126
- end
127
-
128
127
  it "should return attributes modified in doc2" do
129
128
  Store.put_data(@s.docname(:md),@data).should == true
130
129
  Store.get_data(@s.docname(:md)).should == @data
@@ -135,7 +134,7 @@ describe "Store" do
135
134
 
136
135
  Store.put_data(@c.docname(:cd),@data1)
137
136
  Store.get_data(@c.docname(:cd)).should == @data1
138
- Store.get_diff_data(@s.docname(:md),@c.docname(:cd)).should == [expected,1]
137
+ Store.get_diff_data(@s.docname(:md),@c.docname(:cd)).should == expected
139
138
  end
140
139
 
141
140
  it "should return attributes modified and missed in doc2" do
@@ -148,7 +147,7 @@ describe "Store" do
148
147
 
149
148
  Store.put_data(@c.docname(:cd),@data1)
150
149
  Store.get_data(@c.docname(:cd)).should == @data1
151
- Store.get_diff_data(@c.docname(:cd),@s.docname(:md)).should == [expected,2]
150
+ Store.get_diff_data(@c.docname(:cd),@s.docname(:md)).should == expected
152
151
  end
153
152
 
154
153
  it "should ignore reserved attributes" do
@@ -183,25 +182,22 @@ describe "Store" do
183
182
  key = 'test_flash_data'
184
183
  Store.put_data(key,@data)
185
184
  Store.db.should_not_receive(:keys)
186
- Store.db.should_receive(:del).once.with(key).and_return(true)
185
+ Store.db.should_receive(:del).once.with("#{key}:#{get_sha1('1')[0..1]}").and_return(true)
186
+ Store.db.should_receive(:del).once.with("#{key}:#{get_sha1('2')[0..1]}").and_return(true)
187
+ Store.db.should_receive(:del).once.with("#{key}:#{get_sha1('3')[0..1]}").and_return(true)
188
+ Store.db.should_receive(:del).once.with("#{key}:indices").and_return(true)
187
189
  Store.flash_data(key)
188
190
  end
189
191
 
190
192
  it "should flash_data and call KEYS when there are pattern matching characters in the provided keymask" do
191
193
  keys = ['test_flash_data1','test_flash_data2']
192
194
  keys.each {|key| Store.put_data(key,@data)}
193
- Store.db.should_receive(:keys).exactly(1).times.with("test_flash_data*").and_return(keys)
194
- Store.db.should_receive(:del).exactly(2).times.with(/^test_flash_data[12]$/).and_return(true)
195
+ docs = Store.db.keys("test_flash_data*")
196
+ Store.db.should_receive(:keys).exactly(1).times.with("test_flash_data*").and_return(docs)
197
+ Store.db.should_receive(:del).exactly(8).times.and_return(true)
195
198
  Store.flash_data("test_flash_data*")
196
199
  end
197
200
 
198
- it "should get_keys" do
199
- expected = ["doc1:1:1:1:source1", "doc1:1:1:1:source2"]
200
- Store.put_data(expected[0],@data)
201
- Store.put_data(expected[1],@data)
202
- Store.get_keys('doc1:1:1:1:*').sort.should == expected
203
- end
204
-
205
201
  it "should put_zdata and get_zdata" do
206
202
  create_doc = {'1' => {'foo' => 'bar'}}
207
203
  assoc_key = 'my_assoc_key'
@@ -350,7 +346,36 @@ describe "Store" do
350
346
  Store.put_data('somedoc',{'foo'=>'bar'})
351
347
  }.to raise_exception(ArgumentError, "Invalid value object: #{foobar['foo'].inspect}. Hash is expected.")
352
348
  end
353
-
349
+
350
+ it "should put_object into the bucketed md" do
351
+ key1 = '1'
352
+ data1 = {'foo' => 'bar'}
353
+ key2 = '2'
354
+ data2 = {'one' => 'two', 'three' => 'four'}
355
+ docindex1 = get_sha1(key1)[0..1]
356
+ docindex2 = get_sha1(key2)[0..1]
357
+ Store.put_object(:md, key1, data1)
358
+ Store.put_object(:md, key2, data2)
359
+ Store.db.exists(:md).should be_false
360
+ Store.db.exists("#{:md}:#{docindex1}").should be_true
361
+ Store.db.exists("#{:md}:#{docindex2}").should be_true
362
+ Store.db.exists("#{:md}:indices").should be_true
363
+ Store.db.hkeys("#{:md}:indices").should == ["#{docindex1}", "#{docindex2}"]
364
+ Store.db.hvals("#{:md}:indices").should == ["#{:md}:#{docindex1}", "#{:md}:#{docindex2}"]
365
+ end
366
+
367
+ it "should get_object from the bucketed md" do
368
+ key1 = '1'
369
+ data1 = {'foo' => 'bar'}
370
+ key2 = '2'
371
+ data2 = {'one' => 'two', 'three' => 'four'}
372
+ docindex1 = get_sha1(key1)[0..1]
373
+ docindex2 = get_sha1(key2)[0..1]
374
+ Store.put_object(:md, key1, data1)
375
+ Store.put_object(:md, key2, data2)
376
+ obj2 = Store.get_object(:md, key2)
377
+ obj2.should == data2
378
+ end
354
379
  end
355
380
  end
356
381
  end
@@ -37,12 +37,14 @@ shared_examples_for "SharedRhoconnectHelper" do |params|
37
37
  :url => 'http://example.com',
38
38
  :login => 'testuser',
39
39
  :password => 'testpass',
40
+ :priority => '1'
40
41
  }
41
42
  @s1_fields = {
42
43
  :name => 'FixedSchemaAdapter',
43
44
  :url => 'http://example.com',
44
45
  :login => 'testuser',
45
46
  :password => 'testpass',
47
+ :priority => '5'
46
48
  }
47
49
  @s_params = {
48
50
  :user_id => @u.id,
@@ -130,12 +132,14 @@ shared_examples_for "ApiHelper" do
130
132
  :url => 'http://example.com',
131
133
  :login => 'testuser',
132
134
  :password => 'testpass',
135
+ :priority => '1'
133
136
  }
134
137
  @s1_fields = {
135
138
  :name => 'FixedSchemaAdapter',
136
139
  :url => 'http://example.com',
137
140
  :login => 'testuser',
138
141
  :password => 'testpass',
142
+ :priority => '5'
139
143
  }
140
144
  @s_params = {
141
145
  :user_id => @u.id,
@@ -40,8 +40,8 @@ describe "Sync Server States" do
40
40
  @c.docname(:create_links) => {'1'=>{'l'=>'backend_id'}},
41
41
  @s.docname(:md) => backend_data)
42
42
  res = @cs.send_cud
43
- res.should == [{"version"=>3}, {"token"=>res[1]['token']},
44
- {"count"=>0}, {"progress_count"=>1}, {"total_count"=>1},
43
+ res.should == [{'version'=>ClientSync::SYNC_VERSION},{"token"=>res[1]['token']},
44
+ {"count"=>0}, {"progress_count"=>0}, {"total_count"=>1},
45
45
  {"links"=> {'1'=>{'l'=>'backend_id'}}}]
46
46
 
47
47
  end
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhoconnect
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
5
- prerelease:
4
+ hash: 62196479
5
+ prerelease: 6
6
6
  segments:
7
7
  - 3
8
- - 2
8
+ - 3
9
9
  - 1
10
- version: 3.2.1
10
+ - beta
11
+ - 2
12
+ version: 3.3.1.beta2
11
13
  platform: ruby
12
14
  authors:
13
15
  - Rhomobile
@@ -15,7 +17,7 @@ autorequire:
15
17
  bindir: bin
16
18
  cert_chain: []
17
19
 
18
- date: 2012-06-21 00:00:00 Z
20
+ date: 2012-07-10 00:00:00 Z
19
21
  dependencies:
20
22
  - !ruby/object:Gem::Dependency
21
23
  version_requirements: &id001 !ruby/object:Gem::Requirement
@@ -181,12 +183,12 @@ dependencies:
181
183
  requirements:
182
184
  - - ~>
183
185
  - !ruby/object:Gem::Version
184
- hash: 43
186
+ hash: 35
185
187
  segments:
186
188
  - 0
187
- - 14
188
- - 6
189
- version: 0.14.6
189
+ - 15
190
+ - 0
191
+ version: 0.15.0
190
192
  requirement: *id011
191
193
  prerelease: false
192
194
  name: thor
@@ -239,7 +241,6 @@ files:
239
241
  - bench/lib/testdata/images/icon.ico
240
242
  - bench/lib/testdata/images/loading.png
241
243
  - bench/lib/testdata/100-data.txt
242
- - bench/lib/testdata/5-data.txt
243
244
  - bench/benchapp/application.rb
244
245
  - bench/benchapp/sources/queue_mock_adapter.rb
245
246
  - bench/benchapp/sources/mock_adapter.rb
@@ -250,7 +251,6 @@ files:
250
251
  - bench/benchapp/spec/sources/mock_adapter_spec.rb
251
252
  - bench/benchapp/spec/spec_helper.rb
252
253
  - bench/benchapp/config.ru
253
- - bench/benchapp/Gemfile.lock
254
254
  - bench/benchapp/Rakefile
255
255
  - bench/run_query_only_script.sh
256
256
  - bench/spec/bench_spec_helper.rb
@@ -280,7 +280,6 @@ files:
280
280
  - bench/blobapp/spec/sources/blob_adapter_spec.rb
281
281
  - bench/blobapp/spec/spec_helper.rb
282
282
  - bench/blobapp/config.ru
283
- - bench/blobapp/Gemfile.lock
284
283
  - bench/blobapp/Rakefile
285
284
  - bench/run_blob_script.sh
286
285
  - bench/distr_bench/run_test_query_script.sh
@@ -307,6 +306,7 @@ files:
307
306
  - commands/commands/rhoconnect/start.rb
308
307
  - commands/commands/rhoconnect/attach.rb
309
308
  - commands/commands/rhoconnect/console_helper.rb
309
+ - commands/commands/rhoconnect/version.rb
310
310
  - commands/commands/rhoconnect/spec.rb
311
311
  - commands/commands/rhoconnect/flushdb.rb
312
312
  - commands/commands/rhoconnect/set_admin_password.rb
@@ -337,7 +337,6 @@ files:
337
337
  - doc/migration.txt
338
338
  - doc/client-objc.txt
339
339
  - doc/push-server-setup.txt
340
- - doc/release.txt
341
340
  - doc/settings.txt
342
341
  - doc/tutorial.txt
343
342
  - doc/benchmarks.txt
@@ -377,6 +376,7 @@ files:
377
376
  - examples/simple/settings/license.key
378
377
  - examples/simple/settings/settings.yml
379
378
  - examples/simple/Gemfile
379
+ - examples/simple/my_server.rb
380
380
  - examples/simple/config.ru
381
381
  - examples/simple/Rakefile
382
382
  - generators/rhoconnect.rb
@@ -424,13 +424,11 @@ files:
424
424
  - lib/rhoconnect/source_sync.rb
425
425
  - lib/rhoconnect/server.rb
426
426
  - lib/rhoconnect/stats/record.rb
427
- - lib/rhoconnect/stats/middleware.rb
428
427
  - lib/rhoconnect/document.rb
429
428
  - lib/rhoconnect/async.rb
430
429
  - lib/rhoconnect/db_adapter.rb
431
430
  - lib/rhoconnect/client.rb
432
431
  - lib/rhoconnect/lock_ops.rb
433
- - lib/rhoconnect/body_content_type_parser.rb
434
432
  - lib/rhoconnect/console/server.rb
435
433
  - lib/rhoconnect/utilities.rb
436
434
  - lib/rhoconnect/web-console/server.rb
@@ -477,44 +475,47 @@ files:
477
475
  - lib/rhoconnect/web-console/controllers/admins.js
478
476
  - lib/rhoconnect/web-console/templates/jqplot.erb
479
477
  - lib/rhoconnect/web-console/templates/index.erb
478
+ - lib/rhoconnect/api/client/client_get_db_doc.rb
480
479
  - lib/rhoconnect/api/client/get_client_params.rb
481
- - lib/rhoconnect/api/client/list_clients.rb
482
- - lib/rhoconnect/api/client/create_client.rb
480
+ - lib/rhoconnect/api/client/register.rb
481
+ - lib/rhoconnect/api/client/client_set_db_doc.rb
482
+ - lib/rhoconnect/api/client/reset.rb
483
483
  - lib/rhoconnect/api/client/list_client_docs.rb
484
- - lib/rhoconnect/api/client/delete_client.rb
485
- - lib/rhoconnect/api/client/ping.rb
486
- - lib/rhoconnect/api/application/clientlogin.rb
487
- - lib/rhoconnect/api/application/clientcreate.rb
488
- - lib/rhoconnect/api/application/clientregister.rb
489
- - lib/rhoconnect/api/application/queue_updates.rb
490
- - lib/rhoconnect/api/application/query.rb
491
- - lib/rhoconnect/api/application/search.rb
492
- - lib/rhoconnect/api/application/bulk_data.rb
493
- - lib/rhoconnect/api/application/clientreset.rb
484
+ - lib/rhoconnect/api/client/create.rb
485
+ - lib/rhoconnect/api/system/save_adapter.rb
486
+ - lib/rhoconnect/api/system/get_adapter.rb
487
+ - lib/rhoconnect/api/system/login.rb
488
+ - lib/rhoconnect/api/system/stats.rb
489
+ - lib/rhoconnect/api/system/get_license_info.rb
490
+ - lib/rhoconnect/api/system/reset.rb
491
+ - lib/rhoconnect/api/user/user_get_db_doc.rb
494
492
  - lib/rhoconnect/api/user/create_user.rb
495
493
  - lib/rhoconnect/api/user/list_users.rb
496
494
  - lib/rhoconnect/api/user/delete_user.rb
495
+ - lib/rhoconnect/api/user/list_clients.rb
496
+ - lib/rhoconnect/api/user/list_source_docs.rb
497
+ - lib/rhoconnect/api/user/show_user.rb
498
+ - lib/rhoconnect/api/user/user_set_db_doc.rb
499
+ - lib/rhoconnect/api/user/delete_client.rb
497
500
  - lib/rhoconnect/api/user/update_user.rb
498
- - lib/rhoconnect/api/source/fast_delete.rb
499
- - lib/rhoconnect/api/source/upload_file.rb
500
- - lib/rhoconnect/api/source/fast_insert.rb
501
- - lib/rhoconnect/api/source/set_refresh_time.rb
501
+ - lib/rhoconnect/api/user/ping.rb
502
+ - lib/rhoconnect/api/readstate/set_refresh_time.rb
502
503
  - lib/rhoconnect/api/source/update_source_params.rb
503
- - lib/rhoconnect/api/source/save_adapter.rb
504
- - lib/rhoconnect/api/source/get_adapter.rb
505
- - lib/rhoconnect/api/source/push_objects.rb
506
- - lib/rhoconnect/api/source/fast_update.rb
507
- - lib/rhoconnect/api/source/get_db_doc.rb
508
- - lib/rhoconnect/api/source/push_deletes.rb
509
- - lib/rhoconnect/api/source/set_db_doc.rb
510
- - lib/rhoconnect/api/source/list_source_docs.rb
511
504
  - lib/rhoconnect/api/source/list_sources.rb
512
505
  - lib/rhoconnect/api/source/get_source_params.rb
513
- - lib/rhoconnect/api/admin/get_api_token.rb
514
- - lib/rhoconnect/api/admin/login.rb
515
- - lib/rhoconnect/api/admin/stats.rb
516
- - lib/rhoconnect/api/admin/get_license_info.rb
517
- - lib/rhoconnect/api/admin/reset.rb
506
+ - lib/rhoconnect/api/store/get_db_doc.rb
507
+ - lib/rhoconnect/api/store/set_db_doc.rb
508
+ - lib/rhoconnect/api/app/fast_delete.rb
509
+ - lib/rhoconnect/api/app/fast_insert.rb
510
+ - lib/rhoconnect/api/app/push_objects.rb
511
+ - lib/rhoconnect/api/app/fast_update.rb
512
+ - lib/rhoconnect/api/app/queue_updates.rb
513
+ - lib/rhoconnect/api/app/push_deletes.rb
514
+ - lib/rhoconnect/api/app/query.rb
515
+ - lib/rhoconnect/api/app/login.rb
516
+ - lib/rhoconnect/api/app/search.rb
517
+ - lib/rhoconnect/api/app/bulk_data.rb
518
+ - lib/rhoconnect/api/app/ans_login.rb
518
519
  - lib/rhoconnect/graph_helper.rb
519
520
  - lib/rhoconnect/bulk_data/syncdb.index.schema
520
521
  - lib/rhoconnect/bulk_data/bulk_data.rb
@@ -528,12 +529,11 @@ files:
528
529
  - lib/rhoconnect/ping/apple.rb
529
530
  - lib/rhoconnect/ping/blackberry.rb
530
531
  - lib/rhoconnect/ping/android.rb
532
+ - lib/rhoconnect/ping/rhoconnect_push.rb
531
533
  - lib/rhoconnect/source_adapter.rb
532
- - lib/rhoconnect/cors.rb
533
534
  - lib/rhoconnect/generator.rb
534
535
  - lib/rhoconnect/version.rb
535
536
  - lib/rhoconnect/rho_indifferent_access.rb
536
- - lib/rhoconnect/x_domain_session_wrapper.rb
537
537
  - lib/rhoconnect/credential.rb
538
538
  - lib/rhoconnect/test_methods.rb
539
539
  - lib/rhoconnect/bulk_data.rb
@@ -545,6 +545,16 @@ files:
545
545
  - lib/rhoconnect/app.rb
546
546
  - lib/rhoconnect/model.rb
547
547
  - lib/rhoconnect/source.rb
548
+ - lib/rhoconnect/middleware/current_request.rb
549
+ - lib/rhoconnect/middleware/current_user.rb
550
+ - lib/rhoconnect/middleware/current_app.rb
551
+ - lib/rhoconnect/middleware/body_content_type_parser.rb
552
+ - lib/rhoconnect/middleware/login_required.rb
553
+ - lib/rhoconnect/middleware/admin_user.rb
554
+ - lib/rhoconnect/middleware/helpers.rb
555
+ - lib/rhoconnect/middleware/cors.rb
556
+ - lib/rhoconnect/middleware/stats.rb
557
+ - lib/rhoconnect/middleware/x_domain_session_wrapper.rb
548
558
  - lib/rhoconnect/console.rb
549
559
  - lib/rhoconnect/read_state.rb
550
560
  - lib/rhoconnect.rb
@@ -555,44 +565,46 @@ files:
555
565
  - spec/license_spec.rb
556
566
  - spec/user_spec.rb
557
567
  - spec/stats/record_spec.rb
558
- - spec/stats/middleware_spec.rb
559
568
  - spec/spec_helper.rb
560
569
  - spec/read_state_spec.rb
561
570
  - spec/spec.opts
562
571
  - spec/dynamic_adapter_spec.rb
563
572
  - spec/server/cors_spec.rb
564
573
  - spec/server/x_domain_session_wrapper_spec.rb
574
+ - spec/server/stats_spec.rb
565
575
  - spec/server/server_spec.rb
566
576
  - spec/api/client/get_client_params_spec.rb
567
- - spec/api/client/ping_spec.rb
568
- - spec/api/client/delete_client_spec.rb
577
+ - spec/api/client/client_get_db_doc_spec.rb
569
578
  - spec/api/client/list_client_docs_spec.rb
570
- - spec/api/client/create_client_spec.rb
571
- - spec/api/client/list_clients_spec.rb
579
+ - spec/api/client/client_set_db_doc_spec.rb
580
+ - spec/api/system/login_spec.rb
581
+ - spec/api/system/get_license_info_spec.rb
582
+ - spec/api/system/reset_spec.rb
583
+ - spec/api/system/stats_spec.rb
584
+ - spec/api/system/adapter_spec.rb
585
+ - spec/api/user/ping_spec.rb
572
586
  - spec/api/user/delete_user_spec.rb
587
+ - spec/api/user/user_set_db_doc_spec.rb
573
588
  - spec/api/user/create_user_spec.rb
574
589
  - spec/api/user/list_users_spec.rb
590
+ - spec/api/user/delete_client_spec.rb
591
+ - spec/api/user/user_get_db_doc_spec.rb
592
+ - spec/api/user/show_user_spec.rb
575
593
  - spec/api/user/update_user_spec.rb
594
+ - spec/api/user/list_source_docs_spec.rb
595
+ - spec/api/user/list_clients_spec.rb
596
+ - spec/api/readstate/set_refresh_time_spec.rb
576
597
  - spec/api/source/update_source_params_spec.rb
577
- - spec/api/source/set_db_doc_spec.rb
578
- - spec/api/source/set_refresh_time_spec.rb
579
- - spec/api/source/upload_file_spec.rb
580
- - spec/api/source/fast_delete_spec.rb
581
598
  - spec/api/source/list_sources_spec.rb
582
- - spec/api/source/push_objects_spec.rb
583
- - spec/api/source/fast_update_spec.rb
584
- - spec/api/source/adapter_spec.rb
585
- - spec/api/source/list_source_docs_spec.rb
586
- - spec/api/source/push_deletes_spec.rb
587
- - spec/api/source/get_db_doc_spec.rb
588
- - spec/api/source/fast_insert_spec.rb
589
599
  - spec/api/source/get_source_params_spec.rb
590
- - spec/api/admin/get_license_info_spec.rb
591
- - spec/api/admin/reset_spec.rb
592
- - spec/api/admin/api_token_spec.rb
593
- - spec/api/admin/get_api_token_spec.rb
594
- - spec/api/admin/stats_spec.rb
595
600
  - spec/api/api_helper.rb
601
+ - spec/api/store/set_db_doc_spec.rb
602
+ - spec/api/store/get_db_doc_spec.rb
603
+ - spec/api/app/fast_delete_spec.rb
604
+ - spec/api/app/push_objects_spec.rb
605
+ - spec/api/app/fast_update_spec.rb
606
+ - spec/api/app/push_deletes_spec.rb
607
+ - spec/api/app/fast_insert_spec.rb
596
608
  - spec/bulk_data/bulk_data_spec.rb
597
609
  - spec/api_token_spec.rb
598
610
  - spec/app_spec.rb
@@ -603,6 +615,7 @@ files:
603
615
  - spec/jobs/bulk_data_job_spec.rb
604
616
  - spec/store_spec.rb
605
617
  - spec/ping/blackberry_spec.rb
618
+ - spec/ping/rhoconnect_push_spec.rb
606
619
  - spec/ping/apple_spec.rb
607
620
  - spec/ping/android_spec.rb
608
621
  - spec/rhoconnect_spec.rb
@@ -708,44 +721,46 @@ test_files:
708
721
  - spec/license_spec.rb
709
722
  - spec/user_spec.rb
710
723
  - spec/stats/record_spec.rb
711
- - spec/stats/middleware_spec.rb
712
724
  - spec/spec_helper.rb
713
725
  - spec/read_state_spec.rb
714
726
  - spec/spec.opts
715
727
  - spec/dynamic_adapter_spec.rb
716
728
  - spec/server/cors_spec.rb
717
729
  - spec/server/x_domain_session_wrapper_spec.rb
730
+ - spec/server/stats_spec.rb
718
731
  - spec/server/server_spec.rb
719
732
  - spec/api/client/get_client_params_spec.rb
720
- - spec/api/client/ping_spec.rb
721
- - spec/api/client/delete_client_spec.rb
733
+ - spec/api/client/client_get_db_doc_spec.rb
722
734
  - spec/api/client/list_client_docs_spec.rb
723
- - spec/api/client/create_client_spec.rb
724
- - spec/api/client/list_clients_spec.rb
735
+ - spec/api/client/client_set_db_doc_spec.rb
736
+ - spec/api/system/login_spec.rb
737
+ - spec/api/system/get_license_info_spec.rb
738
+ - spec/api/system/reset_spec.rb
739
+ - spec/api/system/stats_spec.rb
740
+ - spec/api/system/adapter_spec.rb
741
+ - spec/api/user/ping_spec.rb
725
742
  - spec/api/user/delete_user_spec.rb
743
+ - spec/api/user/user_set_db_doc_spec.rb
726
744
  - spec/api/user/create_user_spec.rb
727
745
  - spec/api/user/list_users_spec.rb
746
+ - spec/api/user/delete_client_spec.rb
747
+ - spec/api/user/user_get_db_doc_spec.rb
748
+ - spec/api/user/show_user_spec.rb
728
749
  - spec/api/user/update_user_spec.rb
750
+ - spec/api/user/list_source_docs_spec.rb
751
+ - spec/api/user/list_clients_spec.rb
752
+ - spec/api/readstate/set_refresh_time_spec.rb
729
753
  - spec/api/source/update_source_params_spec.rb
730
- - spec/api/source/set_db_doc_spec.rb
731
- - spec/api/source/set_refresh_time_spec.rb
732
- - spec/api/source/upload_file_spec.rb
733
- - spec/api/source/fast_delete_spec.rb
734
754
  - spec/api/source/list_sources_spec.rb
735
- - spec/api/source/push_objects_spec.rb
736
- - spec/api/source/fast_update_spec.rb
737
- - spec/api/source/adapter_spec.rb
738
- - spec/api/source/list_source_docs_spec.rb
739
- - spec/api/source/push_deletes_spec.rb
740
- - spec/api/source/get_db_doc_spec.rb
741
- - spec/api/source/fast_insert_spec.rb
742
755
  - spec/api/source/get_source_params_spec.rb
743
- - spec/api/admin/get_license_info_spec.rb
744
- - spec/api/admin/reset_spec.rb
745
- - spec/api/admin/api_token_spec.rb
746
- - spec/api/admin/get_api_token_spec.rb
747
- - spec/api/admin/stats_spec.rb
748
756
  - spec/api/api_helper.rb
757
+ - spec/api/store/set_db_doc_spec.rb
758
+ - spec/api/store/get_db_doc_spec.rb
759
+ - spec/api/app/fast_delete_spec.rb
760
+ - spec/api/app/push_objects_spec.rb
761
+ - spec/api/app/fast_update_spec.rb
762
+ - spec/api/app/push_deletes_spec.rb
763
+ - spec/api/app/fast_insert_spec.rb
749
764
  - spec/bulk_data/bulk_data_spec.rb
750
765
  - spec/api_token_spec.rb
751
766
  - spec/app_spec.rb
@@ -756,6 +771,7 @@ test_files:
756
771
  - spec/jobs/bulk_data_job_spec.rb
757
772
  - spec/store_spec.rb
758
773
  - spec/ping/blackberry_spec.rb
774
+ - spec/ping/rhoconnect_push_spec.rb
759
775
  - spec/ping/apple_spec.rb
760
776
  - spec/ping/android_spec.rb
761
777
  - spec/rhoconnect_spec.rb