rhoconnect 3.3.6 → 3.4.2
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.
- data/CHANGELOG.md +40 -4
- data/Gemfile +2 -2
- data/Gemfile.lock +27 -25
- data/bench/benchapp/Gemfile +7 -27
- data/bench/benchapp/config.ru +9 -31
- data/bench/blobapp/Gemfile +7 -27
- data/bench/blobapp/config.ru +9 -29
- data/bench/lib/bench.rb +8 -1
- data/bench/lib/bench/test_data.rb +4 -1
- data/bench/scripts/blob_cud_script.rb +4 -0
- data/bench/scripts/cud_script.rb +7 -1
- data/bench/scripts/helpers.rb +1 -1
- data/bench/scripts/test_query_script.rb +20 -7
- data/bench/spec/bench_spec_helper.rb +3 -1
- data/bin/rhoconnect +22 -12
- data/commands/{commands/dtach_commands → dtach}/dtach_about.rb +0 -0
- data/commands/{commands/dtach_commands → dtach}/dtach_install.rb +0 -0
- data/commands/{commands/redis_commands → dtach}/redis_attach.rb +0 -0
- data/commands/execute.rb +14 -15
- data/commands/generators/update.rb +26 -0
- data/commands/{commands/redis_commands → redis}/redis_about.rb +0 -0
- data/commands/redis/redis_download.rb +13 -0
- data/commands/redis/redis_install.rb +26 -0
- data/commands/{commands/redis_commands → redis}/redis_make.rb +0 -0
- data/commands/{commands/redis_commands → redis}/redis_restart.rb +3 -2
- data/commands/{commands/redis_commands → redis}/redis_start.rb +0 -0
- data/commands/{commands/redis_commands → redis}/redis_startbg.rb +0 -0
- data/commands/{commands/redis_commands → redis}/redis_stop.rb +3 -2
- data/commands/{commands/rhoconnect → rhoconnect}/clean_start.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect}/config.rb +7 -2
- data/commands/{commands/rhoconnect → rhoconnect}/create_user.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect}/delete_device.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect}/delete_user.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect}/flushdb.rb +4 -4
- data/commands/{commands/rhoconnect → rhoconnect}/get_token.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect}/reset.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect}/reset_refresh.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect}/restart.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect}/secret.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect}/set_admin_password.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect}/spec.rb +0 -0
- data/commands/rhoconnect/start.rb +27 -0
- data/commands/{commands/rhoconnect → rhoconnect}/startbg.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect}/startdebug.rb +2 -2
- data/commands/{commands/rhoconnect → rhoconnect}/stop.rb +3 -4
- data/commands/{commands/rhoconnect → rhoconnect}/version.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect}/web.rb +0 -0
- data/commands/rhoconnect_attach/attach.rb +10 -0
- data/commands/rhoconnect_console/console.rb +16 -0
- data/commands/{commands/rhoconnect → rhoconnect_console}/console_helper.rb +0 -0
- data/commands/{commands/rhoconnect → rhoconnect_war}/war.rb +0 -0
- data/commands/{commands/redis_commands → utilities}/redis_runner.rb +22 -19
- data/commands/utilities/utilities.rb +6 -0
- data/doc/benchmarks.txt +2 -2
- data/doc/bulk-sync.txt +12 -1
- data/doc/client-java.txt +3 -3
- data/doc/client-objc.txt +1 -1
- data/doc/client.txt +5 -5
- data/doc/command-line.txt +80 -135
- data/doc/deploying.txt +119 -12
- data/doc/extending-rhoconnect-server.txt +1 -1
- data/doc/heroku-addon.txt +119 -23
- data/doc/install.txt +101 -39
- data/doc/java-plugin.txt +2 -2
- data/doc/licensing.txt +1 -1
- data/doc/plugin-intro.txt +3 -1
- data/doc/preparing-production.txt +4 -4
- data/doc/public/cli.txt +2 -2
- data/doc/push-backend-setup.txt +11 -1
- data/doc/push-client-setup.txt +72 -2
- data/doc/push-server-setup.txt +129 -8
- data/doc/rails-plugin.txt +245 -40
- data/doc/rest-api.txt +10 -6
- data/doc/rhoconnect-calculator.txt +237 -0
- data/doc/rhoconnect-redis-stack.txt +35 -0
- data/doc/session-and-configuration.txt +24 -0
- data/doc/settings.txt +51 -41
- data/doc/source-adapters.txt +45 -45
- data/doc/stats-middleware.txt +2 -2
- data/doc/supported-platforms.txt +6 -6
- data/doc/testing.txt +2 -2
- data/doc/tutorial.txt +63 -63
- data/examples/simple/Gemfile +7 -35
- data/examples/simple/config.ru +8 -26
- data/examples/simple/sources/product.rb +6 -6
- data/generators/rhoconnect.rb +5 -0
- data/generators/templates/application/Gemfile +7 -37
- data/generators/templates/application/Rakefile +8 -0
- data/generators/templates/application/config.ru +12 -31
- data/generators/templates/application/rcgemfile +44 -0
- data/generators/templates/application/settings/settings.yml +7 -5
- data/install.sh +4 -4
- data/installer/unix-like/create_texts.rb +7 -2
- data/installer/unix-like/rho_connect_install_constants.rb +2 -2
- data/installer/unix-like/rho_connect_install_installers.rb +1 -16
- data/lib/rhoconnect.rb +51 -38
- data/lib/rhoconnect/api/app/query.rb +4 -1
- data/lib/rhoconnect/api/app/search.rb +4 -1
- data/lib/rhoconnect/api/client/list_client_docs.rb +3 -1
- data/lib/rhoconnect/api/user/ping.rb +1 -5
- data/lib/rhoconnect/application/init.rb +43 -0
- data/lib/rhoconnect/async.rb +11 -6
- data/lib/rhoconnect/client_sync.rb +30 -37
- data/lib/rhoconnect/document.rb +4 -0
- data/lib/rhoconnect/graph_helper.rb +74 -56
- data/lib/rhoconnect/middleware/helpers.rb +4 -0
- data/lib/rhoconnect/ping.rb +1 -0
- data/lib/rhoconnect/ping/gcm.rb +58 -0
- data/lib/rhoconnect/predefined_adapters/bench_adapter.rb +7 -1
- data/lib/rhoconnect/source.rb +70 -56
- data/lib/rhoconnect/source_sync.rb +33 -5
- data/lib/rhoconnect/store.rb +358 -110
- data/lib/rhoconnect/user.rb +8 -0
- data/lib/rhoconnect/utilities.rb +16 -14
- data/lib/rhoconnect/version.rb +1 -1
- data/lib/rhoconnect/web-console/models/client.js +1 -1
- data/lib/rhoconnect/web-console/public/UNVR67bold.ttf +0 -0
- data/lib/rhoconnect/web-console/public/bootstrap.css +6 -0
- data/lib/rhoconnect/web-console/public/logo.png +0 -0
- data/lib/rhoconnect/web-console/server.rb +13 -11
- data/lib/rhoconnect/web-console/templates/index.erb +5 -5
- data/lib/rhoconnect/web-console/templates/jqplot.erb +1 -0
- data/lib/rhoconnect/web-console/views/doc.js +0 -4
- data/lib/rhoconnect/web-console/views/home.js +2 -1
- data/lib/rhoconnect/web-console/views/new_ping.js +11 -6
- data/lib/rhoconnect/web-console/views/stats.js +9 -5
- data/rhoconnect.gemspec +6 -4
- data/spec/api/app/fast_update_spec.rb +2 -2
- data/spec/api/source/get_source_params_spec.rb +1 -0
- data/spec/apps/rhotestapp/settings/settings.yml +5 -5
- data/spec/client_sync_spec.rb +3 -14
- data/spec/perf/perf_spec_helper.rb +11 -7
- data/spec/perf/store_perf_spec.rb +88 -11
- data/spec/ping/gcm_spec.rb +99 -0
- data/spec/server/server_spec.rb +7 -0
- data/spec/server/stats_spec.rb +9 -2
- data/spec/source_sync_spec.rb +29 -0
- data/spec/spec_helper.rb +40 -38
- data/spec/stats/record_spec.rb +18 -9
- data/spec/store_spec.rb +128 -19
- data/spec/testdata/10000-data.txt +0 -0
- data/spec/testdata/5-data.txt +0 -0
- data/spec/testdata/5000-data.txt +0 -0
- data/tasks/jasmine.rake +1 -0
- data/tasks/redis.rake +16 -13
- metadata +71 -39
- data/commands/commands/redis_commands/redis_download.rb +0 -33
- data/commands/commands/redis_commands/redis_install.rb +0 -26
- data/commands/commands/rhoconnect/attach.rb +0 -8
- data/commands/commands/rhoconnect/console.rb +0 -15
- data/commands/commands/rhoconnect/start.rb +0 -18
- data/commands/utilities/dtach_installed.rb +0 -10
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,43 @@
|
|
|
1
|
-
## 3.
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
## 3.4.2 (2012-11-8)
|
|
2
|
+
* fixed `rhoconnect redis-start` and `rhoconnect redis-restart` commands on windows
|
|
3
|
+
# D-04052 - Resque.after_fork hook wasn't initializing efficiently
|
|
4
|
+
|
|
5
|
+
## 3.4.1 (2012-11-6)
|
|
6
|
+
* D-04031 - `rhoconnect startbg` and `startdebug` commands not working on windows
|
|
7
|
+
* Locked win32-process gem to previous release (0.6.6) so Process.fork is available for
|
|
8
|
+
`startbg` and `startdebug` commands.
|
|
9
|
+
* `rhoconnect update` command handles exceptions with useful error message
|
|
10
|
+
|
|
11
|
+
## 3.4.0 (2012-11-1)
|
|
12
|
+
* Let `pass_through` and `push_notify` be string or boolean
|
|
13
|
+
* B-90921 - `rhoconnect` command sets are now platform-specific
|
|
14
|
+
* D-03946 - Fixed `rhoconnect console` command on Windows
|
|
15
|
+
* B-91297 - Added defaults for api_token and push appname
|
|
16
|
+
|
|
17
|
+
## 3.4.0.rc5 (2012-10-26)
|
|
18
|
+
* Refactor 'Gemfile' in app generator template, add rhoconnect cmd 'update' to simplify upgrade legacy apps to latest gem
|
|
19
|
+
|
|
20
|
+
## 3.4.0.rc4 (2012-10-19)
|
|
21
|
+
* Updated production stack to ruby 1.9.3p286
|
|
22
|
+
* TK-04054 - fixed GCM push payload so 'data' field is passed to client
|
|
23
|
+
|
|
24
|
+
## 3.4.0.rc3 (2012-10-15)
|
|
25
|
+
* B-03380 - Added Google Cloud Messaging (GCM) support
|
|
26
|
+
* Filter added to simplecov report so spec files are not included
|
|
27
|
+
* D-01639 - Issues with Resque workers connection to Redis using connection pool
|
|
28
|
+
* D-01563 - `rake resque:work` fails with undefined ROOT_PATH
|
|
29
|
+
|
|
30
|
+
## 3.4.0.rc2 (2012-10-11)
|
|
31
|
+
* Removing Redis ConnectionPool from 1.8.7 (not supported there)
|
|
32
|
+
* Fixing GetClientDocs API with stats (incorrect return)
|
|
33
|
+
|
|
34
|
+
## 3.4.0.rc1 (2012-10-09)
|
|
35
|
+
* Add Redis connection pool as a default
|
|
36
|
+
* Add redis_timeout option
|
|
37
|
+
* Implement automatic user notify after push_objects, push_deletes
|
|
38
|
+
* B-03739 - Store re-design : implement diff by object - optimizes speed and Redis memory usage
|
|
39
|
+
* Bump nginx to v. 1.3.6, add http_stub_status_module and include "least_conn" directive to upstream section
|
|
40
|
+
* B-03303 - Move page_token and count into separate headers for easy access (to avoid heavy JSON parsing)
|
|
5
41
|
|
|
6
42
|
## 3.3.5 (2012-09-20)
|
|
7
43
|
* merge changes from master to fix broken bench script helper
|
data/Gemfile
CHANGED
|
@@ -7,7 +7,7 @@ gem 'win32-process', :platforms => [:mswin, :mingw]
|
|
|
7
7
|
|
|
8
8
|
# use thin and eventmachine everywhere except JRuby
|
|
9
9
|
platforms :ruby, :ruby_19, :mingw, :mingw_19 do
|
|
10
|
-
gem "eventmachine", "~> 1.0.0
|
|
10
|
+
gem "eventmachine", "~> 1.0.0"
|
|
11
11
|
# using thin by default
|
|
12
12
|
gem 'thin'
|
|
13
13
|
end
|
|
@@ -39,7 +39,7 @@ end
|
|
|
39
39
|
group :test do
|
|
40
40
|
gem 'rspec', '~> 2.10.0'
|
|
41
41
|
gem "rcov", '~> 1.0.0', :require => false, :platforms => :ruby_18
|
|
42
|
-
gem 'simplecov', :require => false, :platforms => [:ruby_19,:jruby]
|
|
42
|
+
gem 'simplecov', '>= 0.7.1', :require => false, :platforms => [:ruby_19,:jruby]
|
|
43
43
|
gem 'rack-test', '>= 0.5.3', :require => 'rack/test'
|
|
44
44
|
gem 'jasmine', :platforms => :ruby_19
|
|
45
45
|
gem 'jasmine-headless-webkit', :platforms => :ruby_19
|
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rhoconnect (3.
|
|
4
|
+
rhoconnect (3.4.2)
|
|
5
5
|
bundler (~> 1.0)
|
|
6
|
+
connection_pool (>= 0.9.2)
|
|
6
7
|
json (~> 1.6.0)
|
|
7
8
|
rake (~> 0.9.2.2)
|
|
8
9
|
redis (>= 3.0.1)
|
|
@@ -28,27 +29,28 @@ GEM
|
|
|
28
29
|
mime-types
|
|
29
30
|
xml-simple
|
|
30
31
|
backports (2.6.2)
|
|
31
|
-
builder (3.1.
|
|
32
|
+
builder (3.1.4)
|
|
32
33
|
cabin (0.4.4)
|
|
33
34
|
json
|
|
34
|
-
childprocess (0.3.
|
|
35
|
+
childprocess (0.3.6)
|
|
35
36
|
ffi (~> 1.0, >= 1.0.6)
|
|
36
37
|
clamp (0.3.1)
|
|
37
38
|
coffee-script (2.2.0)
|
|
38
39
|
coffee-script-source
|
|
39
40
|
execjs
|
|
40
|
-
coffee-script-source (1.
|
|
41
|
+
coffee-script-source (1.4.0)
|
|
42
|
+
connection_pool (0.9.2)
|
|
41
43
|
crack (0.3.1)
|
|
42
44
|
daemons (1.1.9)
|
|
43
45
|
diff-lcs (1.1.3)
|
|
44
46
|
eventmachine (1.0.0)
|
|
45
|
-
excon (0.16.
|
|
47
|
+
excon (0.16.10)
|
|
46
48
|
execjs (1.4.0)
|
|
47
49
|
multi_json (~> 1.0)
|
|
48
50
|
extlib (0.9.15)
|
|
49
51
|
ffaker (1.14.0)
|
|
50
|
-
ffi (1.
|
|
51
|
-
fog (1.
|
|
52
|
+
ffi (1.2.0)
|
|
53
|
+
fog (1.8.0)
|
|
52
54
|
builder
|
|
53
55
|
excon (~> 0.14)
|
|
54
56
|
formatador (~> 0.2.0)
|
|
@@ -58,8 +60,8 @@ GEM
|
|
|
58
60
|
net-ssh (>= 2.1.3)
|
|
59
61
|
nokogiri (~> 1.5.0)
|
|
60
62
|
ruby-hmac
|
|
61
|
-
formatador (0.2.
|
|
62
|
-
fpm (0.4.
|
|
63
|
+
formatador (0.2.4)
|
|
64
|
+
fpm (0.4.24)
|
|
63
65
|
arr-pm (~> 0.0.7)
|
|
64
66
|
backports (= 2.6.2)
|
|
65
67
|
cabin (~> 0.4.3)
|
|
@@ -67,28 +69,27 @@ GEM
|
|
|
67
69
|
json (= 1.6.6)
|
|
68
70
|
highline (1.6.15)
|
|
69
71
|
hike (1.2.1)
|
|
70
|
-
jasmine (1.
|
|
71
|
-
jasmine-core (
|
|
72
|
+
jasmine (1.3.1)
|
|
73
|
+
jasmine-core (~> 1.3.1)
|
|
72
74
|
rack (~> 1.0)
|
|
73
75
|
rspec (>= 1.3.1)
|
|
74
76
|
selenium-webdriver (>= 0.1.3)
|
|
75
|
-
jasmine-core (1.
|
|
77
|
+
jasmine-core (1.3.1)
|
|
76
78
|
jasmine-headless-webkit (0.8.4)
|
|
77
79
|
coffee-script
|
|
78
80
|
jasmine-core (~> 1.1)
|
|
79
81
|
multi_json
|
|
80
82
|
rainbow
|
|
81
83
|
sprockets (~> 2)
|
|
82
|
-
jruby-pageant (1.1.1)
|
|
83
84
|
json (1.6.6)
|
|
84
|
-
libwebsocket (0.1.
|
|
85
|
+
libwebsocket (0.1.7.1)
|
|
85
86
|
addressable
|
|
87
|
+
websocket
|
|
86
88
|
mime-types (1.19)
|
|
87
|
-
multi_json (1.
|
|
89
|
+
multi_json (1.4.0)
|
|
88
90
|
net-scp (1.0.4)
|
|
89
91
|
net-ssh (>= 1.99.1)
|
|
90
|
-
net-ssh (2.6.
|
|
91
|
-
jruby-pageant (>= 1.1.1)
|
|
92
|
+
net-ssh (2.6.2)
|
|
92
93
|
nokogiri (1.5.5)
|
|
93
94
|
rack (1.4.1)
|
|
94
95
|
rack-fiber_pool (0.9.2)
|
|
@@ -119,20 +120,20 @@ GEM
|
|
|
119
120
|
rspec-mocks (2.10.1)
|
|
120
121
|
ruby-hmac (0.4.0)
|
|
121
122
|
rubyzip (0.9.9)
|
|
122
|
-
selenium-webdriver (2.
|
|
123
|
+
selenium-webdriver (2.26.0)
|
|
123
124
|
childprocess (>= 0.2.5)
|
|
124
125
|
libwebsocket (~> 0.1.3)
|
|
125
126
|
multi_json (~> 1.0)
|
|
126
127
|
rubyzip
|
|
127
|
-
simplecov (0.
|
|
128
|
+
simplecov (0.7.1)
|
|
128
129
|
multi_json (~> 1.0)
|
|
129
|
-
simplecov-html (~> 0.
|
|
130
|
-
simplecov-html (0.
|
|
130
|
+
simplecov-html (~> 0.7.1)
|
|
131
|
+
simplecov-html (0.7.1)
|
|
131
132
|
sinatra (1.3.3)
|
|
132
133
|
rack (~> 1.3, >= 1.3.6)
|
|
133
134
|
rack-protection (~> 1.2)
|
|
134
135
|
tilt (~> 1.3, >= 1.3.3)
|
|
135
|
-
sprockets (2.
|
|
136
|
+
sprockets (2.8.1)
|
|
136
137
|
hike (~> 1.2)
|
|
137
138
|
multi_json (~> 1.0)
|
|
138
139
|
rack (~> 1.0)
|
|
@@ -154,7 +155,8 @@ GEM
|
|
|
154
155
|
webmock (1.8.11)
|
|
155
156
|
addressable (>= 2.2.7)
|
|
156
157
|
crack (>= 0.1.7)
|
|
157
|
-
|
|
158
|
+
websocket (1.0.4)
|
|
159
|
+
xml-simple (1.1.2)
|
|
158
160
|
|
|
159
161
|
PLATFORMS
|
|
160
162
|
ruby
|
|
@@ -165,7 +167,7 @@ DEPENDENCIES
|
|
|
165
167
|
aws-s3 (>= 0.6.2)
|
|
166
168
|
dbd-jdbc (>= 0.1.4)
|
|
167
169
|
dbi (>= 0.4.5)
|
|
168
|
-
eventmachine (~> 1.0.0
|
|
170
|
+
eventmachine (~> 1.0.0)
|
|
169
171
|
ffaker (~> 1.14.0)
|
|
170
172
|
fog (>= 1.1.0)
|
|
171
173
|
fpm (>= 0.4.9)
|
|
@@ -178,7 +180,7 @@ DEPENDENCIES
|
|
|
178
180
|
rcov (~> 1.0.0)
|
|
179
181
|
rhoconnect!
|
|
180
182
|
rspec (~> 2.10.0)
|
|
181
|
-
simplecov
|
|
183
|
+
simplecov (>= 0.7.1)
|
|
182
184
|
sqlite3 (>= 1.3.3)
|
|
183
185
|
thin
|
|
184
186
|
warbler
|
data/bench/benchapp/Gemfile
CHANGED
|
@@ -2,31 +2,11 @@ source 'http://rubygems.org'
|
|
|
2
2
|
|
|
3
3
|
gem 'rhoconnect', :path => '../../'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
# using thin by default
|
|
13
|
-
gem 'thin'
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# for async framework
|
|
17
|
-
# for Async, Eventful execution
|
|
18
|
-
platforms :ruby_19, :mingw_19 do
|
|
19
|
-
gem 'rack-fiber_pool'
|
|
20
|
-
gem 'async-rack'
|
|
5
|
+
gemfile_path = File.join(File.dirname(__FILE__), '..', '..', 'generators','templates', 'application', ".rcgemfile")
|
|
6
|
+
begin
|
|
7
|
+
eval(IO.read(gemfile_path))
|
|
8
|
+
rescue Exception => e
|
|
9
|
+
puts "ERROR: Couldn't find RhoConnect .rcgemfile"
|
|
10
|
+
puts e.message
|
|
11
|
+
exit 1
|
|
21
12
|
end
|
|
22
|
-
|
|
23
|
-
platforms :jruby do
|
|
24
|
-
gem 'jdbc-sqlite3', ">= 3.7.2"
|
|
25
|
-
gem 'dbi', ">= 0.4.5"
|
|
26
|
-
gem 'dbd-jdbc', ">= 0.1.4"
|
|
27
|
-
gem 'jruby-openssl', ">= 0.7.4"
|
|
28
|
-
gem 'trinidad'
|
|
29
|
-
gem 'warbler'
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
gem 'sqlite3', ">= 1.3.3", :platforms => [:ruby, :mswin, :mingw]
|
data/bench/benchapp/config.ru
CHANGED
|
@@ -1,38 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
require '
|
|
3
|
-
require 'bundler'
|
|
4
|
-
Bundler.require
|
|
2
|
+
require 'rhoconnect/application/init'
|
|
5
3
|
|
|
6
|
-
# Try to load vendor-ed rhoconnect, otherwise load the gem
|
|
7
|
-
begin
|
|
8
|
-
require 'vendor/rhoconnect/lib/rhoconnect/server'
|
|
9
|
-
require 'vendor/rhoconnect/lib/rhoconnect/web-console/server'
|
|
10
|
-
rescue LoadError
|
|
11
|
-
require 'rhoconnect/server'
|
|
12
|
-
require 'rhoconnect/web-console/server'
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
# By default, turn on the resque web console
|
|
16
|
-
require 'resque/server'
|
|
17
|
-
|
|
18
|
-
ROOT_PATH = File.expand_path(File.dirname(__FILE__))
|
|
19
|
-
|
|
20
|
-
# Rhoconnect server flags
|
|
21
|
-
Rhoconnect::Server.disable :run
|
|
22
|
-
Rhoconnect::Server.disable :clean_trace
|
|
23
|
-
Rhoconnect::Server.enable :raise_errors
|
|
24
4
|
Rhoconnect::Server.set :secret, 'cf8e8a1d3653fcfb2332d8b1af9f6762c3c45ea12144bb5f15cd5618cc8e453b45a02dd304bdd791489dcd1ae35b807e4b4f4e6f7faedb551e76996c0f3c11c6'
|
|
25
|
-
|
|
26
|
-
|
|
5
|
+
|
|
6
|
+
# !!! Add your custom initializers and overrides here !!!
|
|
7
|
+
# For example, uncomment the following line to enable Stats
|
|
8
|
+
#Rhoconnect::Server.enable :stats
|
|
27
9
|
Rhoconnect::Server.disable :logging
|
|
28
|
-
#Rhoconnect::Server.set :use_async_model, false # true by default
|
|
29
|
-
#Rhoconnect::Server.set :fiberpool_size, 50 # default is 100
|
|
30
10
|
|
|
31
|
-
# Load
|
|
32
|
-
require
|
|
11
|
+
# Load RhoConnect application
|
|
12
|
+
require './application'
|
|
33
13
|
|
|
34
14
|
# Setup the url map
|
|
35
|
-
run
|
|
36
|
-
|
|
37
|
-
"/resque" => Resque::Server.new, # If you don't want resque frontend, disable it here
|
|
38
|
-
"/console" => RhoconnectConsole::Server.new # If you don't want rhoconnect frontend, disable it here
|
|
15
|
+
# run RhoConnect Application
|
|
16
|
+
run Rhoconnect.app
|
data/bench/blobapp/Gemfile
CHANGED
|
@@ -2,31 +2,11 @@ source 'http://rubygems.org'
|
|
|
2
2
|
|
|
3
3
|
gem 'rhoconnect', :path => '../../'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
# using thin by default
|
|
13
|
-
gem 'thin'
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# for async framework
|
|
17
|
-
# for Async, Eventful execution
|
|
18
|
-
platforms :ruby_19, :mingw_19 do
|
|
19
|
-
gem 'rack-fiber_pool'
|
|
20
|
-
gem 'async-rack'
|
|
5
|
+
gemfile_path = File.join(File.dirname(__FILE__), '..', '..', 'generators','templates', 'application', ".rcgemfile")
|
|
6
|
+
begin
|
|
7
|
+
eval(IO.read(gemfile_path))
|
|
8
|
+
rescue Exception => e
|
|
9
|
+
puts "ERROR: Couldn't find RhoConnect .rcgemfile"
|
|
10
|
+
puts e.message
|
|
11
|
+
exit 1
|
|
21
12
|
end
|
|
22
|
-
|
|
23
|
-
platforms :jruby do
|
|
24
|
-
gem 'jdbc-sqlite3', ">= 3.7.2"
|
|
25
|
-
gem 'dbi', ">= 0.4.5"
|
|
26
|
-
gem 'dbd-jdbc', ">= 0.1.4"
|
|
27
|
-
gem 'jruby-openssl', ">= 0.7.4"
|
|
28
|
-
gem 'trinidad'
|
|
29
|
-
gem 'warbler'
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
gem 'sqlite3', ">= 1.3.3", :platforms => [:ruby, :mswin, :mingw]
|
data/bench/blobapp/config.ru
CHANGED
|
@@ -1,35 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
require '
|
|
3
|
-
require 'bundler'
|
|
4
|
-
Bundler.require
|
|
2
|
+
require 'rhoconnect/application/init'
|
|
5
3
|
|
|
6
|
-
# Try to load vendor-ed rhoconnect, otherwise load the gem
|
|
7
|
-
begin
|
|
8
|
-
require 'vendor/rhoconnect/lib/rhoconnect/server'
|
|
9
|
-
require 'vendor/rhoconnect/lib/rhoconnect/web-console/server'
|
|
10
|
-
rescue LoadError
|
|
11
|
-
require 'rhoconnect/server'
|
|
12
|
-
require 'rhoconnect/web-console/server'
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
# By default, turn on the resque web console
|
|
16
|
-
require 'resque/server'
|
|
17
|
-
|
|
18
|
-
ROOT_PATH = File.expand_path(File.dirname(__FILE__))
|
|
19
|
-
|
|
20
|
-
# Rhoconnect server flags
|
|
21
|
-
Rhoconnect::Server.disable :run
|
|
22
|
-
Rhoconnect::Server.disable :clean_trace
|
|
23
|
-
Rhoconnect::Server.enable :raise_errors
|
|
24
4
|
Rhoconnect::Server.set :secret, '096a8a4212b18d2b281d377f2c350421898a21fec78ac1baf5482c68ee41b30dcc46309cc2fb51ccc37f24789eeaed673a291efdfd0ec42df9f62351e71806f8'
|
|
25
|
-
Rhoconnect::Server.set :root, ROOT_PATH
|
|
26
|
-
Rhoconnect::Server.use Rack::Static, :urls => ["/data"], :root => Rhoconnect::Server.root
|
|
27
5
|
|
|
28
|
-
#
|
|
29
|
-
|
|
6
|
+
# !!! Add your custom initializers and overrides here !!!
|
|
7
|
+
# For example, uncomment the following line to enable Stats
|
|
8
|
+
#Rhoconnect::Server.enable :stats
|
|
9
|
+
|
|
10
|
+
# Load RhoConnect application
|
|
11
|
+
require './application'
|
|
30
12
|
|
|
31
13
|
# Setup the url map
|
|
32
|
-
run
|
|
33
|
-
|
|
34
|
-
"/resque" => Resque::Server.new, # If you don't want resque frontend, disable it here
|
|
35
|
-
"/console" => RhoconnectConsole::Server.new # If you don't want rhoconnect frontend, disable it here
|
|
14
|
+
# run RhoConnect Application
|
|
15
|
+
run Rhoconnect.app
|
data/bench/lib/bench.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require 'rest_client'
|
|
2
2
|
require 'zip/zip'
|
|
3
|
+
require 'securerandom'
|
|
3
4
|
$:.unshift File.dirname(__FILE__)
|
|
4
5
|
require 'bench/timer'
|
|
5
6
|
require 'bench/logging'
|
|
@@ -91,7 +92,13 @@ module Bench
|
|
|
91
92
|
{:app_name => @app_name, :attributes => {:login => user_name, :password => password}}.to_json,
|
|
92
93
|
{:content_type => :json, 'X-RhoConnect-API-TOKEN' => token})
|
|
93
94
|
end
|
|
94
|
-
|
|
95
|
+
|
|
96
|
+
def delete_user(user_name)
|
|
97
|
+
token = get_token
|
|
98
|
+
RestClient.delete("#{@host}/rc/v1/users/#{user_name}",
|
|
99
|
+
{ 'X-RhoConnect-API-TOKEN' => token } )
|
|
100
|
+
end
|
|
101
|
+
|
|
95
102
|
def set_server_state(doc,data,append=false)
|
|
96
103
|
token = get_token
|
|
97
104
|
params = {:data => data, :append => append}
|
|
@@ -51,7 +51,10 @@ module Bench
|
|
|
51
51
|
"Email" => Faker::Internet.free_email,
|
|
52
52
|
"Company" => Faker::Company.name,
|
|
53
53
|
"JobTitle" => title,
|
|
54
|
-
"Phone1" => Faker::PhoneNumber.phone_number
|
|
54
|
+
"Phone1" => Faker::PhoneNumber.phone_number,
|
|
55
|
+
"Geolocation" => Faker::Geolocation.lat.to_s + ":" + Faker::Geolocation.lng.to_s,
|
|
56
|
+
"Education" => Faker::Education.degree,
|
|
57
|
+
"School" => Faker::Education.school
|
|
55
58
|
}
|
|
56
59
|
if generate_blob
|
|
57
60
|
img_file_name = IMAGE_FILES[rand(IMAGE_FILES.size)]
|
data/bench/scripts/cud_script.rb
CHANGED
data/bench/scripts/helpers.rb
CHANGED
|
@@ -72,7 +72,7 @@ module BenchHelpers
|
|
|
72
72
|
end
|
|
73
73
|
sleep rand(timeout)
|
|
74
74
|
token = JSON.parse(session.last_result.body)[1]['token']
|
|
75
|
-
progress_count = JSON.parse(session.last_result.body)[4]['total_count']
|
|
75
|
+
progress_count = JSON.parse(session.last_result.body)[4]['total_count']
|
|
76
76
|
return progress_count if token == ''
|
|
77
77
|
|
|
78
78
|
verify_count(session,caller+"\n"+current_line)
|