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
@@ -1,87 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- SystemTimer (1.2.3)
5
- async-rack (0.5.1)
6
- rack (~> 1.1)
7
- daemons (1.1.8)
8
- diff-lcs (1.1.3)
9
- eventmachine (0.12.10)
10
- extlib (0.9.15)
11
- highline (1.6.11)
12
- json (1.6.5)
13
- mime-types (1.17.2)
14
- multi_json (1.1.0)
15
- rack (1.4.1)
16
- rack-fiber_pool (0.9.2)
17
- rack-protection (1.2.0)
18
- rack
19
- rack-test (0.6.1)
20
- rack (>= 1.0)
21
- rake (0.9.2.2)
22
- redis (2.2.2)
23
- redis-namespace (1.0.3)
24
- redis (< 3.0.0)
25
- resque (1.19.0)
26
- multi_json (~> 1.0)
27
- redis-namespace (~> 1.0.2)
28
- sinatra (>= 0.9.2)
29
- vegas (~> 0.1.2)
30
- rest-client (1.6.7)
31
- mime-types (>= 1.16)
32
- rhoconnect (3.1.2)
33
- bundler (~> 1.0)
34
- json (~> 1.6.0)
35
- rake (~> 0.9.2)
36
- redis (>= 2.2.0)
37
- resque (~> 1.19.0)
38
- rest-client (~> 1.6.1)
39
- rubyzip (~> 0.9.4)
40
- sinatra (~> 1.3)
41
- templater (~> 1.0.0)
42
- uuidtools (>= 2.1.1)
43
- rspec (2.6.0)
44
- rspec-core (~> 2.6.0)
45
- rspec-expectations (~> 2.6.0)
46
- rspec-mocks (~> 2.6.0)
47
- rspec-core (2.6.4)
48
- rspec-expectations (2.6.0)
49
- diff-lcs (~> 1.1.2)
50
- rspec-mocks (2.6.0)
51
- rubyzip (0.9.6.1)
52
- sinatra (1.3.2)
53
- rack (~> 1.3, >= 1.3.6)
54
- rack-protection (~> 1.2)
55
- tilt (~> 1.3, >= 1.3.3)
56
- sqlite3 (1.3.5)
57
- templater (1.0.0)
58
- diff-lcs (>= 1.1.2)
59
- extlib (>= 0.9.5)
60
- highline (>= 1.4.0)
61
- thin (1.3.1)
62
- daemons (>= 1.0.9)
63
- eventmachine (>= 0.12.6)
64
- rack (>= 1.0.0)
65
- tilt (1.3.3)
66
- uuidtools (2.1.2)
67
- vegas (0.1.11)
68
- rack (>= 1.0.0)
69
-
70
- PLATFORMS
71
- ruby
72
-
73
- DEPENDENCIES
74
- SystemTimer (~> 1.2.3)
75
- async-rack
76
- dbd-jdbc (>= 0.1.4)
77
- dbi (>= 0.4.5)
78
- jdbc-sqlite3 (>= 3.7.2)
79
- jruby-openssl (>= 0.7.4)
80
- rack-fiber_pool
81
- rack-test (>= 0.5.3)
82
- rhoconnect (~> 3.1.0)
83
- rspec (~> 2.6.0)
84
- sqlite3 (>= 1.3.3)
85
- thin
86
- trinidad
87
- warbler
@@ -1,107 +0,0 @@
1
- PATH
2
- remote: ../../
3
- specs:
4
- rhoconnect (3.1.2)
5
- bundler (~> 1.0)
6
- json (~> 1.6.0)
7
- rake (~> 0.9.2)
8
- redis (>= 2.2.0)
9
- resque (~> 1.19.0)
10
- rest-client (~> 1.6.1)
11
- rubyzip (~> 0.9.4)
12
- sinatra (~> 1.3)
13
- templater (~> 1.0.0)
14
- uuidtools (>= 2.1.1)
15
-
16
- GEM
17
- remote: http://rubygems.org/
18
- specs:
19
- SystemTimer (1.2.3)
20
- bouncy-castle-java (1.5.0146.1)
21
- daemons (1.1.8)
22
- dbd-jdbc (0.1.4)
23
- dbi (0.4.5)
24
- deprecated (= 2.0.1)
25
- deprecated (2.0.1)
26
- diff-lcs (1.1.3)
27
- eventmachine (0.12.10)
28
- extlib (0.9.15)
29
- highline (1.6.11)
30
- jdbc-sqlite3 (3.7.2)
31
- jruby-jars (1.6.7)
32
- jruby-openssl (0.7.6.1)
33
- bouncy-castle-java (>= 1.5.0146.1)
34
- jruby-rack (1.1.4)
35
- json (1.6.5)
36
- json (1.6.5-java)
37
- mime-types (1.17.2)
38
- multi_json (1.1.0)
39
- rack (1.4.1)
40
- rack-protection (1.2.0)
41
- rack
42
- rack-test (0.6.1)
43
- rack (>= 1.0)
44
- rake (0.9.2.2)
45
- redis (2.2.2)
46
- redis-namespace (1.0.3)
47
- redis (< 3.0.0)
48
- resque (1.19.0)
49
- multi_json (~> 1.0)
50
- redis-namespace (~> 1.0.2)
51
- sinatra (>= 0.9.2)
52
- vegas (~> 0.1.2)
53
- rest-client (1.6.7)
54
- mime-types (>= 1.16)
55
- rspec (2.6.0)
56
- rspec-core (~> 2.6.0)
57
- rspec-expectations (~> 2.6.0)
58
- rspec-mocks (~> 2.6.0)
59
- rspec-core (2.6.4)
60
- rspec-expectations (2.6.0)
61
- diff-lcs (~> 1.1.2)
62
- rspec-mocks (2.6.0)
63
- rubyzip (0.9.6.1)
64
- sinatra (1.3.2)
65
- rack (~> 1.3, >= 1.3.6)
66
- rack-protection (~> 1.2)
67
- tilt (~> 1.3, >= 1.3.3)
68
- sqlite3 (1.3.5)
69
- templater (1.0.0)
70
- diff-lcs (>= 1.1.2)
71
- extlib (>= 0.9.5)
72
- highline (>= 1.4.0)
73
- thin (1.3.1)
74
- daemons (>= 1.0.9)
75
- eventmachine (>= 0.12.6)
76
- rack (>= 1.0.0)
77
- tilt (1.3.3)
78
- trinidad (1.3.4)
79
- jruby-rack (>= 1.1.1)
80
- trinidad_jars (>= 1.0.1)
81
- trinidad_jars (1.0.2)
82
- uuidtools (2.1.2)
83
- vegas (0.1.11)
84
- rack (>= 1.0.0)
85
- warbler (1.3.2)
86
- jruby-jars (>= 1.4.0)
87
- jruby-rack (>= 1.0.0)
88
- rake (>= 0.8.7)
89
- rubyzip (>= 0.9.4)
90
-
91
- PLATFORMS
92
- java
93
- ruby
94
-
95
- DEPENDENCIES
96
- SystemTimer (~> 1.2.3)
97
- dbd-jdbc (>= 0.1.4)
98
- dbi (>= 0.4.5)
99
- jdbc-sqlite3 (>= 3.7.2)
100
- jruby-openssl (>= 0.7.4)
101
- rack-test (>= 0.5.3)
102
- rhoconnect!
103
- rspec (~> 2.6.0)
104
- sqlite3 (>= 1.3.3)
105
- thin
106
- trinidad
107
- warbler
@@ -1,8 +0,0 @@
1
- {
2
- "%33aeb9bbc03f4851951693ba1a2183bd{ "
3
- Email"tanner_lockman@hotmail.com"%c6e7fc3340ba47b0a124b6d2bb426f85{ @" Feeney@
4
- "Electronics Chef@ " Taurean@"(282)065-1907@"Stiedemann-Johnston@"%c6e7fc3340ba47b0a124b6d2bb426f85@"michale.barrows@yahoo.com"%3ff828d21711438d9ac2f6e2fcd0fc99{ @" Pacocha@
5
- "Business Systems Helper@ " Dwight@"189.978.8343 x5359@"Streich and Sons@"%3ff828d21711438d9ac2f6e2fcd0fc99@"sabina.towne@yahoo.com"%0ac9dbd03fa44dca970d1cd4f6c2873c{ @"Romaguera@
6
- "Laboratory Worker@ "
7
- Laury@"405-997-3034 x1471@"Feil-Kessler@"%0ac9dbd03fa44dca970d1cd4f6c2873c@"wiley@hotmail.com"%f9d9a24d67324e6b82e163916e3493b5{ @" Feeney@
8
- "Account Superintendent@ " Rupert@"638-436-7732 x960@"Corwin-Raynor@"%f9d9a24d67324e6b82e163916e3493b5@"lorena@yahoo.com
@@ -1,41 +0,0 @@
1
- RhoConnect Release Process
2
- ===
3
- The RhoConnect release process addresses following requirements:
4
-
5
- * Introduce new features in timely fashion
6
- * Be very responsive to the bugs and requests from forum and customer requests
7
- * Provide the highest-quality possible
8
- * Provide up-to-date documentation and trackable CHANGELOG of the project history
9
-
10
- ### Release cycle
11
- * Each release will be focused on a single feature (or a few small ones)
12
- * Each release will include bug fixes requested by customers
13
- * Each release will be done in 1-2 weeks time
14
-
15
- ### Versioning
16
- Versioning will be done according to [http://semver.org/ Semantic Versioning] and input from pm/sales.
17
-
18
- ### Pivotal tracker story workflow
19
-
20
- * Research is done, design/api is done and reviewed
21
- * Feature is split into smaller tasks and added to pivotal (recommended length of an individual task is 4-8 hours)
22
- * Test code / implementation code cycle is done
23
- * Docs are written including relevant code samples or sample applications
24
- * Code review is done
25
- * CHANGELOG is updated with message under ## <version> header
26
- * Send announcement to dev@rhomobile.com about new feature with links to docs, samples, and tests
27
-
28
- ### Conditions to accept pivotal story
29
- * Bug/feature is implemented or fixed and reviewed
30
- * Tests are written and reviewed
31
- * Docs are updated as needed
32
- * CHANGELOG is updated with message under ## <version> header
33
-
34
- ### Release steps
35
- * To make a release one or more features or bugs should be accepted in pivotal
36
- * Make sure each feature & bugfix has an entry in CHANGELOG under ## <version> header
37
- * To accept feature or bug in pivotal see instructions above
38
- * Tag applied to git and gem is created
39
- * When all test tickets are accepted gem is released to rubygems.org
40
- * Pivotal milestone is marked completed
41
- * The same procedure follows for minor release
@@ -1,14 +0,0 @@
1
- Server.api :get_api_token, :admin do |params,user|
2
- warning_message = "API method 'get_api_token' is deprecated.
3
- Use 'login' method only, it returns api token in response's body"
4
- params[:warning] = warning_message unless params.nil?
5
- do_get_api_token(params, user)
6
- end
7
-
8
- def do_get_api_token(params, user)
9
- if user and user.admin == 1 and user.token
10
- user.token.value
11
- else
12
- raise ApiException.new(422, "Invalid/missing API user")
13
- end
14
- end
@@ -1,6 +0,0 @@
1
- Server.api :login, :admin do |params,user,server|
2
- token = ''
3
- server.logout
4
- server.do_login
5
- token = do_get_api_token(params, server.current_user)
6
- end
@@ -1,7 +0,0 @@
1
- Server.api :bulk_data, :application, :get do |params,user,server|
2
- server.catch_all do
3
- server.content_type :json
4
- data = ClientSync.bulk_data(params[:partition].to_sym,server.current_client)
5
- data.to_json
6
- end
7
- end
@@ -1,8 +0,0 @@
1
- Server.api :clientcreate, :application, :get do |params,user,server|
2
- server.catch_all do
3
- server.content_type :json
4
- client = Client.create(:user_id => server.current_user.id,:app_id => server.current_app.id)
5
- client.update_fields(params)
6
- { "client" => { "client_id" => client.id.to_s } }.to_json
7
- end
8
- end
@@ -1,6 +0,0 @@
1
- Server.api :clientlogin, :application, :post do |params,user,server|
2
- server.catch_all do
3
- server.logout
4
- server.do_login
5
- end
6
- end
@@ -1,13 +0,0 @@
1
- Server.api :clientregister, :application, :post do |params,user,server|
2
- server.catch_all do
3
- current_client = server.current_client
4
- if current_client.nil? and server.current_user and server.current_app
5
- fields = {:user_id => server.current_user.id}
6
- fields[:id] = params[:client_id].to_s
7
- fields[:app_id] = server.current_app.id
8
- current_client = Client.create(fields)
9
- end
10
- current_client.update_fields(params)
11
- server.status 200
12
- end
13
- end
@@ -1,6 +0,0 @@
1
- Server.api :clientreset, :application, :get do |params,user,server|
2
- server.catch_all do
3
- ClientSync.reset(server.current_client, params)
4
- server.status 200
5
- end
6
- end
@@ -1,7 +0,0 @@
1
- Server.api :query, :application, :get do |params,user,server|
2
- server.catch_all do
3
- server.content_type :json
4
- res = server.current_client_sync.send_cud(params[:token],params[:query]).to_json
5
- res
6
- end
7
- end
@@ -1,20 +0,0 @@
1
- Server.api :queue_updates, :application, :post do |params,user,server|
2
- begin
3
- if params["cud"]
4
- cud = JSON.parse(params["cud"])
5
- params.delete("cud")
6
- params.merge!(cud)
7
- end
8
- rescue JSON::ParserError => jpe
9
- log jpe.message + jpe.backtrace.join("\n")
10
- throw :halt, [500, "Server error while processing client data"]
11
- rescue Exception => e
12
- log e.message + e.backtrace.join("\n")
13
- throw :halt, [500, "Internal server error"]
14
- end
15
-
16
- server.catch_all do
17
- server.current_client_sync.receive_cud(params)
18
- server.status 200
19
- end
20
- end
@@ -1,6 +0,0 @@
1
- Server.api :search, :application, :get do |params,user,server|
2
- server.catch_all do
3
- server.content_type :json
4
- ClientSync.search_all(server.current_client,params).to_json
5
- end
6
- end
@@ -1,3 +0,0 @@
1
- Server.api :create_client, :client do |params,user|
2
- Client.create(:user_id => params[:user_id],:app_id => APP_NAME).id
3
- end
@@ -1,5 +0,0 @@
1
- Server.api :delete_client, :client do |params,user|
2
- Client.load(params[:client_id],{:source_name => '*'}).delete
3
- User.load(params[:user_id]).clients.delete(params[:client_id])
4
- "Client deleted"
5
- end
@@ -1,3 +0,0 @@
1
- Server.api :list_clients, :client do |params,user|
2
- User.load(params[:user_id]).clients.members.to_json
3
- end
@@ -1,7 +0,0 @@
1
- Server.api :ping, :client do |params,user|
2
- if params['async']
3
- PingJob.enqueue(params)
4
- else
5
- PingJob.perform(params)
6
- end
7
- end
@@ -1,3 +0,0 @@
1
- Server.api :get_adapter, :source do |params,user|
2
- {:adapter_url => Rhoconnect.appserver}.to_json
3
- end
@@ -1,7 +0,0 @@
1
- Server.api :get_db_doc, :source do |params,user|
2
- if params[:data_type] and params[:data_type] == 'string'
3
- Store.get_value(params[:doc])
4
- else
5
- Store.get_data(params[:doc]).to_json
6
- end
7
- end
@@ -1,10 +0,0 @@
1
- Server.api :list_source_docs, :source do |params,user|
2
- res = {}
3
- s = Source.load(params[:source_id], {:app_id => APP_NAME,:user_id => params[:user_id]})
4
- [:md,:md_size,:md_copy,:errors].each do |doc|
5
- db_key = s.docname(doc)
6
- res.merge!(doc => db_key)
7
- end
8
- res.to_json
9
- end
10
-
@@ -1,3 +0,0 @@
1
- Server.api :save_adapter, :source do |params,user|
2
- Rhoconnect.appserver = params[:attributes]['adapter_url'] || params['adapter_url']
3
- end
@@ -1,10 +0,0 @@
1
- Server.api :set_db_doc, :source do |params,user|
2
- if params[:data_type] and params[:data_type] == 'string'
3
- Store.put_value(params[:doc],params[:data])
4
- else
5
- append_to_doc = params[:append]
6
- append_to_doc ||= false
7
- Store.put_data(params[:doc],params[:data],append_to_doc)
8
- end
9
- ''
10
- end
@@ -1,4 +0,0 @@
1
- Server.api :upload_file, :source do |params,user|
2
- unzip_file(Rhoconnect.app_directory,params[:upload_file]) if File.exists?(Rhoconnect.app_directory)
3
- "File uploaded"
4
- end
@@ -1,32 +0,0 @@
1
- module Rhoconnect
2
- class BodyContentTypeParser
3
-
4
- # Constants
5
- #
6
- CONTENT_TYPE = 'CONTENT_TYPE'.freeze
7
- POST_BODY = 'rack.input'.freeze
8
- FORM_INPUT = 'rack.request.form_input'.freeze
9
- FORM_HASH = 'rack.request.form_hash'.freeze
10
-
11
- def initialize(app)
12
- @app = app
13
- end
14
-
15
- def call(env)
16
- if env[CONTENT_TYPE] && env[CONTENT_TYPE].match(/^application\/json/)
17
- begin
18
- if (body = env[POST_BODY].read).length != 0
19
- # for some reason , if we do not do this
20
- # Ruby 1.9 will fail
21
- env[POST_BODY] = StringIO.new(body)
22
- env.update(FORM_HASH => JSON.parse(body), FORM_INPUT => env[POST_BODY])
23
- end
24
- rescue JSON::ParserError => jpe
25
- log jpe.message + jpe.backtrace.join("\n")
26
- return [500, {'Content-Type' => 'text/plain'}, ["Server error while processing client data"]]
27
- end
28
- end
29
- @app.call(env)
30
- end
31
- end
32
- end