rhoconnect 3.0.5 → 3.0.6
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 +7 -1
- data/Gemfile.lock +9 -9
- data/README.md +4 -4
- data/Rakefile +41 -28
- data/bench/bench_runner.rb +4 -5
- data/bench/benchapp/Gemfile +1 -1
- data/bench/benchapp/Gemfile.lock +26 -27
- data/bench/benchapp/config.ru +4 -0
- data/bench/benchapp/log/passenger.3000.log +1 -0
- data/bench/benchapp/log/passenger.9292.log +59 -0
- data/bench/benchapp/settings/settings.yml +2 -0
- data/bench/benchapp/tmp/pids/passenger.3000.pid.lock +0 -0
- data/bench/benchapp/tmp/pids/passenger.9292.pid.lock +0 -0
- data/bench/distr_bench/distr_bench +7 -0
- data/bench/distr_bench/distr_bench_main +99 -0
- data/bench/distr_bench/run_distr_client.sh +12 -0
- data/bench/distr_bench/run_test_query_script.sh +50 -0
- data/bench/lib/bench/bench_result_processor.rb +90 -0
- data/bench/lib/bench/cli.rb +35 -2
- data/bench/lib/bench/logging.rb +2 -0
- data/bench/lib/bench/runner.rb +4 -2
- data/bench/lib/bench/session.rb +3 -1
- data/bench/lib/bench/statistics.rb +41 -1
- data/bench/lib/bench/timer.rb +7 -0
- data/bench/lib/bench/utils.rb +8 -0
- data/bench/lib/bench.rb +35 -9
- data/bench/lib/testdata/0-data.txt +0 -0
- data/bench/lib/testdata/1-data.txt +0 -0
- data/bench/lib/testdata/10-data.txt +15 -0
- data/bench/lib/testdata/2-data.txt +3 -0
- data/bench/lib/testdata/25-data.txt +39 -0
- data/bench/lib/testdata/250-data.txt +353 -0
- data/bench/lib/testdata/3-data.txt +4 -0
- data/bench/lib/testdata/5-data.txt +7 -8
- data/bench/lib/testdata/50-data.txt +70 -0
- data/bench/lib/testdata/500-data.txt +711 -0
- data/bench/prepare_bench +45 -0
- data/bench/run_bench.sh +3 -3
- data/bench/run_blob_script.sh +1 -1
- data/bench/run_cud_script.sh +1 -1
- data/bench/run_query_md_script.sh +1 -1
- data/bench/run_query_only_script.sh +1 -1
- data/bench/run_query_script.sh +1 -1
- data/bench/run_test_query_script.sh +30 -0
- data/bench/run_test_source_script.sh +21 -0
- data/bench/scripts/test_query_script.rb +64 -0
- data/bench/scripts/test_source_script.rb +27 -0
- data/bin/rhoconnect-benchmark +13 -0
- data/doc/client-objc.txt +236 -1
- data/doc/client.txt +132 -0
- data/doc/extending-rhoconnect-server.txt +79 -0
- data/doc/install.txt +1 -1
- data/doc/java-plugin.txt +291 -0
- data/doc/rest-api.txt +3 -1
- data/installer/unix-like/create_texts.rb +73 -16
- data/installer/unix-like/pre_install.sh +1 -1
- data/installer/unix-like/rho_connect_install_constants.rb +1 -1
- data/installer/utils/constants.rb +2 -2
- data/installer/utils/nix_install_test.rb +85 -75
- data/installer/utils/package_upload/repos.rake +82 -2
- data/installer/windows/rhosync.nsi +5 -5
- data/lib/rhoconnect/api/application/queue_updates.rb +14 -0
- data/lib/rhoconnect/api/source/set_db_doc.rb +3 -1
- data/lib/rhoconnect/server.rb +9 -17
- data/lib/rhoconnect/version.rb +1 -1
- data/rhoconnect.gemspec +1 -1
- data/spec/api/admin/get_api_token_spec.rb +6 -0
- data/spec/api/source/set_db_doc_spec.rb +13 -0
- data/spec/server/server_spec.rb +27 -1
- data/tasks/redis.rake +2 -2
- metadata +73 -48
- data/examples/simple/dump.rdb +0 -0
- data/installer/utils/package_upload/repos.rb +0 -83
|
@@ -15,5 +15,18 @@ describe "RhoconnectApiSetDbDoc" do
|
|
|
15
15
|
last_response.should be_ok
|
|
16
16
|
verify_result('abc:abc:str' => data)
|
|
17
17
|
end
|
|
18
|
+
|
|
19
|
+
it "should append data in set db document by doc name and data" do
|
|
20
|
+
data = {'1' => {'foo' => 'bar'}}
|
|
21
|
+
data2 = {'2' => {'foo1' => 'bar1'}}
|
|
22
|
+
data3 = data.merge(data2)
|
|
23
|
+
post "/api/source/set_db_doc", :api_token => @api_token, :doc => 'abc:abc', :data => data
|
|
24
|
+
last_response.should be_ok
|
|
25
|
+
verify_result('abc:abc' => data)
|
|
26
|
+
|
|
27
|
+
post "/api/source/set_db_doc", :api_token => @api_token, :doc => 'abc:abc', :data => data2, :append => true
|
|
28
|
+
last_response.should be_ok
|
|
29
|
+
verify_result('abc:abc' => data3)
|
|
30
|
+
end
|
|
18
31
|
end
|
|
19
32
|
end
|
data/spec/server/server_spec.rb
CHANGED
|
@@ -251,6 +251,16 @@ describe "Server" do
|
|
|
251
251
|
last_response.headers["Warning"].index('deprecated').should_not == nil
|
|
252
252
|
verify_result("test_update_storage" => {'1'=>@product1})
|
|
253
253
|
end
|
|
254
|
+
|
|
255
|
+
it "should post records for update using the /api/application route and have the deprecation warning" do
|
|
256
|
+
params = {'update'=>{'1'=>@product1},:client_id => @c.id,:source_name => @s.name,
|
|
257
|
+
:version => ClientSync::VERSION}
|
|
258
|
+
do_post "/api/application", params
|
|
259
|
+
last_response.should be_ok
|
|
260
|
+
last_response.body.should == ''
|
|
261
|
+
last_response.headers["Warning"].index('deprecated').should_not == nil
|
|
262
|
+
verify_result("test_update_storage" => {'1'=>@product1})
|
|
263
|
+
end
|
|
254
264
|
|
|
255
265
|
it "should post records for delete" do
|
|
256
266
|
params = {'delete'=>{'1'=>@product1},:client_id => @c.id,:source_name => @s.name,
|
|
@@ -298,6 +308,19 @@ describe "Server" do
|
|
|
298
308
|
JSON.parse(last_response.body).should == [{"version"=>ClientSync::VERSION},{"token"=>token},
|
|
299
309
|
{"count"=>2}, {"progress_count"=>0},{"total_count"=>2},{'insert'=>data}]
|
|
300
310
|
end
|
|
311
|
+
|
|
312
|
+
it "should get inserts json with the /api/application route and show deprecation warning" do
|
|
313
|
+
cs = ClientSync.new(@s,@c,1)
|
|
314
|
+
data = {'1'=>@product1,'2'=>@product2}
|
|
315
|
+
set_test_data('test_db_storage',data)
|
|
316
|
+
get "/api/application",:client_id => @c.id,:source_name => @s.name,:version => ClientSync::VERSION
|
|
317
|
+
last_response.should be_ok
|
|
318
|
+
last_response.headers["Warning"].index('deprecated').should_not == nil
|
|
319
|
+
last_response.content_type.should =~ /application\/json/
|
|
320
|
+
token = @c.get_value(:page_token)
|
|
321
|
+
JSON.parse(last_response.body).should == [{"version"=>ClientSync::VERSION},{"token"=>token},
|
|
322
|
+
{"count"=>2}, {"progress_count"=>0},{"total_count"=>2},{'insert'=>data}]
|
|
323
|
+
end
|
|
301
324
|
|
|
302
325
|
it "should get inserts json and confirm token" do
|
|
303
326
|
cs = ClientSync.new(@s,@c,1)
|
|
@@ -464,7 +487,10 @@ describe "Server" do
|
|
|
464
487
|
Rack::Test::UploadedFile.new(File.join(File.dirname(__FILE__),'..','testdata',file1), "application/octet-stream"),
|
|
465
488
|
'txtfile-rhoblob-2' =>
|
|
466
489
|
Rack::Test::UploadedFile.new(File.join(File.dirname(__FILE__),'..','testdata',file2), "application/octet-stream")}
|
|
467
|
-
|
|
490
|
+
last_response.should be_ok
|
|
491
|
+
data = Store.get_data('test_create_storage')
|
|
492
|
+
data.size.should == 2
|
|
493
|
+
data.each do |id,obj|
|
|
468
494
|
File.exists?(obj['txtfile-rhoblob']).should == true
|
|
469
495
|
end
|
|
470
496
|
end
|
data/tasks/redis.rake
CHANGED
|
@@ -7,7 +7,7 @@ def windows?
|
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
if windows?
|
|
10
|
-
$redis_ver = "redis-2.4.
|
|
10
|
+
$redis_ver = "redis-2.4.2"
|
|
11
11
|
$redis_zip = "C:/#{$redis_ver}.zip"
|
|
12
12
|
$redis_dest = "C:/"
|
|
13
13
|
end
|
|
@@ -181,7 +181,7 @@ namespace :redis do
|
|
|
181
181
|
else
|
|
182
182
|
sh 'rm -rf /tmp/redis/' if File.exists?("#{RedisRunner.redisdir}")
|
|
183
183
|
sh 'git clone git://github.com/antirez/redis.git /tmp/redis -n'
|
|
184
|
-
sh "cd #{RedisRunner.redisdir} && git reset --hard && git checkout 2.4.
|
|
184
|
+
sh "cd #{RedisRunner.redisdir} && git reset --hard && git checkout 2.4.2"
|
|
185
185
|
end
|
|
186
186
|
end
|
|
187
187
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rhoconnect
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 11
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 3
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 3.0.
|
|
9
|
+
- 6
|
|
10
|
+
version: 3.0.6
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Rhomobile
|
|
@@ -15,10 +15,12 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-
|
|
18
|
+
date: 2011-11-15 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
|
-
|
|
21
|
+
type: :runtime
|
|
22
|
+
prerelease: false
|
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
22
24
|
none: false
|
|
23
25
|
requirements:
|
|
24
26
|
- - ~>
|
|
@@ -28,12 +30,12 @@ dependencies:
|
|
|
28
30
|
- 1
|
|
29
31
|
- 0
|
|
30
32
|
version: "1.0"
|
|
31
|
-
|
|
32
|
-
type: :runtime
|
|
33
|
-
prerelease: false
|
|
33
|
+
version_requirements: *id001
|
|
34
34
|
name: bundler
|
|
35
35
|
- !ruby/object:Gem::Dependency
|
|
36
|
-
|
|
36
|
+
type: :runtime
|
|
37
|
+
prerelease: false
|
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
37
39
|
none: false
|
|
38
40
|
requirements:
|
|
39
41
|
- - ~>
|
|
@@ -43,15 +45,15 @@ dependencies:
|
|
|
43
45
|
- 1
|
|
44
46
|
- 3
|
|
45
47
|
version: "1.3"
|
|
46
|
-
|
|
47
|
-
type: :runtime
|
|
48
|
-
prerelease: false
|
|
48
|
+
version_requirements: *id002
|
|
49
49
|
name: sinatra
|
|
50
50
|
- !ruby/object:Gem::Dependency
|
|
51
|
-
|
|
51
|
+
type: :runtime
|
|
52
|
+
prerelease: false
|
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
|
52
54
|
none: false
|
|
53
55
|
requirements:
|
|
54
|
-
- -
|
|
56
|
+
- - ~>
|
|
55
57
|
- !ruby/object:Gem::Version
|
|
56
58
|
hash: 63
|
|
57
59
|
segments:
|
|
@@ -59,12 +61,12 @@ dependencies:
|
|
|
59
61
|
- 9
|
|
60
62
|
- 2
|
|
61
63
|
version: 0.9.2
|
|
62
|
-
|
|
63
|
-
type: :runtime
|
|
64
|
-
prerelease: false
|
|
64
|
+
version_requirements: *id003
|
|
65
65
|
name: rake
|
|
66
66
|
- !ruby/object:Gem::Dependency
|
|
67
|
-
|
|
67
|
+
type: :runtime
|
|
68
|
+
prerelease: false
|
|
69
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
|
68
70
|
none: false
|
|
69
71
|
requirements:
|
|
70
72
|
- - ~>
|
|
@@ -75,12 +77,12 @@ dependencies:
|
|
|
75
77
|
- 5
|
|
76
78
|
- 0
|
|
77
79
|
version: 1.5.0
|
|
78
|
-
|
|
79
|
-
type: :runtime
|
|
80
|
-
prerelease: false
|
|
80
|
+
version_requirements: *id004
|
|
81
81
|
name: json
|
|
82
82
|
- !ruby/object:Gem::Dependency
|
|
83
|
-
|
|
83
|
+
type: :runtime
|
|
84
|
+
prerelease: false
|
|
85
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
|
84
86
|
none: false
|
|
85
87
|
requirements:
|
|
86
88
|
- - ~>
|
|
@@ -91,12 +93,12 @@ dependencies:
|
|
|
91
93
|
- 9
|
|
92
94
|
- 4
|
|
93
95
|
version: 0.9.4
|
|
94
|
-
|
|
95
|
-
type: :runtime
|
|
96
|
-
prerelease: false
|
|
96
|
+
version_requirements: *id005
|
|
97
97
|
name: rubyzip
|
|
98
98
|
- !ruby/object:Gem::Dependency
|
|
99
|
-
|
|
99
|
+
type: :runtime
|
|
100
|
+
prerelease: false
|
|
101
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
|
100
102
|
none: false
|
|
101
103
|
requirements:
|
|
102
104
|
- - ">="
|
|
@@ -107,12 +109,12 @@ dependencies:
|
|
|
107
109
|
- 1
|
|
108
110
|
- 1
|
|
109
111
|
version: 2.1.1
|
|
110
|
-
|
|
111
|
-
type: :runtime
|
|
112
|
-
prerelease: false
|
|
112
|
+
version_requirements: *id006
|
|
113
113
|
name: uuidtools
|
|
114
114
|
- !ruby/object:Gem::Dependency
|
|
115
|
-
|
|
115
|
+
type: :runtime
|
|
116
|
+
prerelease: false
|
|
117
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
|
116
118
|
none: false
|
|
117
119
|
requirements:
|
|
118
120
|
- - ">="
|
|
@@ -123,12 +125,12 @@ dependencies:
|
|
|
123
125
|
- 2
|
|
124
126
|
- 0
|
|
125
127
|
version: 2.2.0
|
|
126
|
-
|
|
127
|
-
type: :runtime
|
|
128
|
-
prerelease: false
|
|
128
|
+
version_requirements: *id007
|
|
129
129
|
name: redis
|
|
130
130
|
- !ruby/object:Gem::Dependency
|
|
131
|
-
|
|
131
|
+
type: :runtime
|
|
132
|
+
prerelease: false
|
|
133
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
|
132
134
|
none: false
|
|
133
135
|
requirements:
|
|
134
136
|
- - ~>
|
|
@@ -139,12 +141,12 @@ dependencies:
|
|
|
139
141
|
- 19
|
|
140
142
|
- 0
|
|
141
143
|
version: 1.19.0
|
|
142
|
-
|
|
143
|
-
type: :runtime
|
|
144
|
-
prerelease: false
|
|
144
|
+
version_requirements: *id008
|
|
145
145
|
name: resque
|
|
146
146
|
- !ruby/object:Gem::Dependency
|
|
147
|
-
|
|
147
|
+
type: :runtime
|
|
148
|
+
prerelease: false
|
|
149
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
|
148
150
|
none: false
|
|
149
151
|
requirements:
|
|
150
152
|
- - ~>
|
|
@@ -155,12 +157,12 @@ dependencies:
|
|
|
155
157
|
- 6
|
|
156
158
|
- 1
|
|
157
159
|
version: 1.6.1
|
|
158
|
-
|
|
159
|
-
type: :runtime
|
|
160
|
-
prerelease: false
|
|
160
|
+
version_requirements: *id009
|
|
161
161
|
name: rest-client
|
|
162
162
|
- !ruby/object:Gem::Dependency
|
|
163
|
-
|
|
163
|
+
type: :runtime
|
|
164
|
+
prerelease: false
|
|
165
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
|
164
166
|
none: false
|
|
165
167
|
requirements:
|
|
166
168
|
- - ~>
|
|
@@ -171,14 +173,13 @@ dependencies:
|
|
|
171
173
|
- 0
|
|
172
174
|
- 0
|
|
173
175
|
version: 1.0.0
|
|
174
|
-
|
|
175
|
-
type: :runtime
|
|
176
|
-
prerelease: false
|
|
176
|
+
version_requirements: *id010
|
|
177
177
|
name: templater
|
|
178
178
|
description: RhoConnect App Integration Server and related command-line utilities
|
|
179
179
|
email: dev@rhomobile.com
|
|
180
180
|
executables:
|
|
181
181
|
- rhoconnect
|
|
182
|
+
- rhoconnect-benchmark
|
|
182
183
|
extensions: []
|
|
183
184
|
|
|
184
185
|
extra_rdoc_files:
|
|
@@ -200,6 +201,8 @@ files:
|
|
|
200
201
|
- bench/benchapp/config.ru
|
|
201
202
|
- bench/benchapp/Gemfile
|
|
202
203
|
- bench/benchapp/Gemfile.lock
|
|
204
|
+
- bench/benchapp/log/passenger.3000.log
|
|
205
|
+
- bench/benchapp/log/passenger.9292.log
|
|
203
206
|
- bench/benchapp/Rakefile
|
|
204
207
|
- bench/benchapp/settings/license.key
|
|
205
208
|
- bench/benchapp/settings/settings.yml
|
|
@@ -208,6 +211,8 @@ files:
|
|
|
208
211
|
- bench/benchapp/spec/sources/mock_adapter_spec.rb
|
|
209
212
|
- bench/benchapp/spec/sources/queue_mock_adapter_spec.rb
|
|
210
213
|
- bench/benchapp/spec/spec_helper.rb
|
|
214
|
+
- bench/benchapp/tmp/pids/passenger.3000.pid.lock
|
|
215
|
+
- bench/benchapp/tmp/pids/passenger.9292.pid.lock
|
|
211
216
|
- bench/blobapp/application.rb
|
|
212
217
|
- bench/blobapp/config.ru
|
|
213
218
|
- bench/blobapp/Gemfile
|
|
@@ -218,6 +223,11 @@ files:
|
|
|
218
223
|
- bench/blobapp/sources/blob_adapter.rb
|
|
219
224
|
- bench/blobapp/spec/sources/blob_adapter_spec.rb
|
|
220
225
|
- bench/blobapp/spec/spec_helper.rb
|
|
226
|
+
- bench/distr_bench/distr_bench
|
|
227
|
+
- bench/distr_bench/distr_bench_main
|
|
228
|
+
- bench/distr_bench/run_distr_client.sh
|
|
229
|
+
- bench/distr_bench/run_test_query_script.sh
|
|
230
|
+
- bench/lib/bench/bench_result_processor.rb
|
|
221
231
|
- bench/lib/bench/cli.rb
|
|
222
232
|
- bench/lib/bench/logging.rb
|
|
223
233
|
- bench/lib/bench/mock_client.rb
|
|
@@ -229,8 +239,17 @@ files:
|
|
|
229
239
|
- bench/lib/bench/timer.rb
|
|
230
240
|
- bench/lib/bench/utils.rb
|
|
231
241
|
- bench/lib/bench.rb
|
|
242
|
+
- bench/lib/testdata/0-data.txt
|
|
243
|
+
- bench/lib/testdata/1-data.txt
|
|
244
|
+
- bench/lib/testdata/10-data.txt
|
|
232
245
|
- bench/lib/testdata/100-data.txt
|
|
246
|
+
- bench/lib/testdata/2-data.txt
|
|
247
|
+
- bench/lib/testdata/25-data.txt
|
|
248
|
+
- bench/lib/testdata/250-data.txt
|
|
249
|
+
- bench/lib/testdata/3-data.txt
|
|
233
250
|
- bench/lib/testdata/5-data.txt
|
|
251
|
+
- bench/lib/testdata/50-data.txt
|
|
252
|
+
- bench/lib/testdata/500-data.txt
|
|
234
253
|
- bench/lib/testdata/images/icon.ico
|
|
235
254
|
- bench/lib/testdata/images/icon.png
|
|
236
255
|
- bench/lib/testdata/images/loading-Landscape.png
|
|
@@ -240,18 +259,23 @@ files:
|
|
|
240
259
|
- bench/lib/testdata/images/loading-PortraitUpsideDown.png
|
|
241
260
|
- bench/lib/testdata/images/loading.png
|
|
242
261
|
- bench/lib/testdata/images/loading@2x.png
|
|
262
|
+
- bench/prepare_bench
|
|
243
263
|
- bench/run_bench.sh
|
|
244
264
|
- bench/run_blob_script.sh
|
|
245
265
|
- bench/run_cud_script.sh
|
|
246
266
|
- bench/run_query_md_script.sh
|
|
247
267
|
- bench/run_query_only_script.sh
|
|
248
268
|
- bench/run_query_script.sh
|
|
269
|
+
- bench/run_test_query_script.sh
|
|
270
|
+
- bench/run_test_source_script.sh
|
|
249
271
|
- bench/scripts/blob_cud_script.rb
|
|
250
272
|
- bench/scripts/cud_script.rb
|
|
251
273
|
- bench/scripts/helpers.rb
|
|
252
274
|
- bench/scripts/query_md_script.rb
|
|
253
275
|
- bench/scripts/query_only_script.rb
|
|
254
276
|
- bench/scripts/query_script.rb
|
|
277
|
+
- bench/scripts/test_query_script.rb
|
|
278
|
+
- bench/scripts/test_source_script.rb
|
|
255
279
|
- bench/spec/bench_spec_helper.rb
|
|
256
280
|
- bench/spec/logging_spec.rb
|
|
257
281
|
- bench/spec/mock_adapter_spec.rb
|
|
@@ -270,9 +294,11 @@ files:
|
|
|
270
294
|
- doc/command-line.txt
|
|
271
295
|
- doc/contributing.txt
|
|
272
296
|
- doc/deploying.txt
|
|
297
|
+
- doc/extending-rhoconnect-server.txt
|
|
273
298
|
- doc/heroku-addon.txt
|
|
274
299
|
- doc/install.txt
|
|
275
300
|
- doc/introduction.txt
|
|
301
|
+
- doc/java-plugin.txt
|
|
276
302
|
- doc/licensing.txt
|
|
277
303
|
- doc/metadata.txt
|
|
278
304
|
- doc/migration.txt
|
|
@@ -293,7 +319,6 @@ files:
|
|
|
293
319
|
- doc/web-console.txt
|
|
294
320
|
- examples/simple/application.rb
|
|
295
321
|
- examples/simple/config.ru
|
|
296
|
-
- examples/simple/dump.rdb
|
|
297
322
|
- examples/simple/Rakefile
|
|
298
323
|
- examples/simple/settings/license.key
|
|
299
324
|
- examples/simple/settings/settings.yml
|
|
@@ -328,7 +353,6 @@ files:
|
|
|
328
353
|
- installer/utils/nix_install_test.rb
|
|
329
354
|
- installer/utils/nix_installation.rake
|
|
330
355
|
- installer/utils/package_upload/repos.rake
|
|
331
|
-
- installer/utils/package_upload/repos.rb
|
|
332
356
|
- installer/utils/package_upload/s3_upload.rb
|
|
333
357
|
- installer/windows/configUi.ini
|
|
334
358
|
- installer/windows/EnvVarUpdate.nsh
|
|
@@ -563,6 +587,7 @@ files:
|
|
|
563
587
|
- spec/testdata/upload2.txt
|
|
564
588
|
- spec/user_spec.rb
|
|
565
589
|
- bin/rhoconnect
|
|
590
|
+
- bin/rhoconnect-benchmark
|
|
566
591
|
homepage: http://rhomobile.com/products/rhoconnect
|
|
567
592
|
licenses: []
|
|
568
593
|
|
|
@@ -592,7 +617,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
592
617
|
requirements: []
|
|
593
618
|
|
|
594
619
|
rubyforge_project:
|
|
595
|
-
rubygems_version: 1.8.
|
|
620
|
+
rubygems_version: 1.8.10
|
|
596
621
|
signing_key:
|
|
597
622
|
specification_version: 3
|
|
598
623
|
summary: RhoConnect App Integration Server
|
data/examples/simple/dump.rdb
DELETED
|
Binary file
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require 'find'
|
|
4
|
-
|
|
5
|
-
# CONSTANTS
|
|
6
|
-
|
|
7
|
-
PKG_DIR = '/packages'
|
|
8
|
-
START_DIR = PKG_DIR
|
|
9
|
-
BUCKET = 'rhoconnect'
|
|
10
|
-
|
|
11
|
-
def cmd(cmd)
|
|
12
|
-
puts cmd unless @raked
|
|
13
|
-
system(cmd)
|
|
14
|
-
end #cmd
|
|
15
|
-
|
|
16
|
-
def prepare_destination
|
|
17
|
-
# Prompt to remove the /deb directory if it exists
|
|
18
|
-
if File.directory?("#{PKG_DIR}/deb")
|
|
19
|
-
if !@raked
|
|
20
|
-
puts "Remove #{PKG_DIR}/deb?"
|
|
21
|
-
remove = STDIN.gets.strip.downcase.chars.first
|
|
22
|
-
else
|
|
23
|
-
remove = 'y'
|
|
24
|
-
end #if
|
|
25
|
-
if remove == 'y'
|
|
26
|
-
cmd "sudo rm -rf #{PKG_DIR}/deb"
|
|
27
|
-
end #if
|
|
28
|
-
end #if
|
|
29
|
-
|
|
30
|
-
# Create deb directory if it does not already exist
|
|
31
|
-
cmd "sudo mkdir -p #{PKG_DIR}/deb" unless File.directory?("#{PKG_DIR}/deb")
|
|
32
|
-
|
|
33
|
-
# Create configuration file "ditributions" in deb directory
|
|
34
|
-
filename = "#{PKG_DIR}/deb/conf/"
|
|
35
|
-
cmd "sudo mkdir -p #{filename}"
|
|
36
|
-
distributions = "Origin: Rhomobile, Inc.\n" +
|
|
37
|
-
"Label: Rhomobile, Inc.\n" +
|
|
38
|
-
"Codename: rhoconnect\n" +
|
|
39
|
-
"Architectures: i386 amd64\n" +
|
|
40
|
-
"Components: main\n" +
|
|
41
|
-
"Description: Rhoconnect APT Repository"
|
|
42
|
-
cmd "touch #{filename}/distributions"
|
|
43
|
-
|
|
44
|
-
# Write distributions string to corresponding file
|
|
45
|
-
dist_file = File.new("#{filename}/distributions", "w")
|
|
46
|
-
dist_file.write(distributions)
|
|
47
|
-
dist_file.close
|
|
48
|
-
|
|
49
|
-
# Create rpm directory if it does not already exist
|
|
50
|
-
cmd "sudo mkdir -p #{PKG_DIR}/rpm" unless File.directory?("#{PKG_DIR}/rpm")
|
|
51
|
-
|
|
52
|
-
end #prepare_destination
|
|
53
|
-
|
|
54
|
-
def copy_files
|
|
55
|
-
# Copy the packages to their respective directory
|
|
56
|
-
Find.find('./pkg') do |file|
|
|
57
|
-
if !FileTest.directory?(file)
|
|
58
|
-
dest_dir = File.extname(file)
|
|
59
|
-
#get rid of '.' before extension name
|
|
60
|
-
dest_dir[0] = ''
|
|
61
|
-
if dest_dir == 'deb' || dest_dir == 'rpm'
|
|
62
|
-
if dest_dir == 'deb'
|
|
63
|
-
@deb_pkg = File.basename(file)
|
|
64
|
-
end #if
|
|
65
|
-
file_path = File.expand_path(file)
|
|
66
|
-
cmd "sudo cp -rf #{file_path} #{PKG_DIR}/#{dest_dir}"
|
|
67
|
-
end #if
|
|
68
|
-
end #if
|
|
69
|
-
end #do
|
|
70
|
-
end #copy_files
|
|
71
|
-
|
|
72
|
-
@raked = true
|
|
73
|
-
|
|
74
|
-
prepare_destination
|
|
75
|
-
|
|
76
|
-
copy_files
|
|
77
|
-
|
|
78
|
-
# REPOIFY!
|
|
79
|
-
cmd "sudo reprepro -b #{PKG_DIR}/deb includedeb rhoconnect #{PKG_DIR}/deb/#{@deb_pkg}"
|
|
80
|
-
cmd "sudo createrepo #{PKG_DIR}/rpm"
|
|
81
|
-
|
|
82
|
-
# Call S3 upload script
|
|
83
|
-
cmd "ruby ./installer/utils/package_upload/s3_upload.rb #{START_DIR} #{BUCKET} #{@raked}"
|