rhoconnect 3.1.2 → 3.2.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +14 -2
- data/CREDITS +151 -10
- data/Gemfile +16 -5
- data/Gemfile.lock +58 -23
- data/Rakefile +70 -50
- data/bench/bench_runner.rb +2 -2
- data/bench/benchapp/Gemfile +6 -0
- data/bench/benchapp/Gemfile.lock +5 -0
- data/bench/benchapp/config.ru +2 -0
- data/bench/lib/bench/cli.rb +2 -0
- data/bench/lib/bench/distr_runner.rb +3 -2
- data/bench/lib/bench/runner.rb +1 -1
- data/bench/lib/bench.rb +10 -1
- data/bench/run_bench.sh +1 -1
- data/bench/scripts/test_query_script.rb +2 -1
- data/bench/spec/bench_spec_helper.rb +1 -0
- data/bin/rhoconnect +9 -27
- data/bin/rhoconnect-benchmark +10 -1
- data/commands/commands/dtach_commands/dtach_about.rb +6 -0
- data/commands/commands/dtach_commands/dtach_install.rb +30 -0
- data/commands/commands/redis_commands/redis_about.rb +6 -0
- data/commands/commands/redis_commands/redis_attach.rb +6 -0
- data/commands/commands/redis_commands/redis_download.rb +33 -0
- data/commands/commands/redis_commands/redis_install.rb +26 -0
- data/commands/commands/redis_commands/redis_make.rb +9 -0
- data/commands/commands/redis_commands/redis_restart.rb +7 -0
- data/commands/commands/redis_commands/redis_runner.rb +67 -0
- data/commands/commands/redis_commands/redis_start.rb +6 -0
- data/commands/commands/redis_commands/redis_startbg.rb +6 -0
- data/commands/commands/redis_commands/redis_stop.rb +6 -0
- data/commands/commands/rhoconnect/attach.rb +7 -0
- data/commands/commands/rhoconnect/clean_start.rb +9 -0
- data/commands/commands/rhoconnect/config.rb +15 -0
- data/commands/commands/rhoconnect/console.rb +15 -0
- data/commands/commands/rhoconnect/console_helper.rb +3 -0
- data/commands/commands/rhoconnect/create_user.rb +18 -0
- data/commands/commands/rhoconnect/delete_device.rb +9 -0
- data/commands/commands/rhoconnect/delete_user.rb +8 -0
- data/commands/commands/rhoconnect/flushdb.rb +14 -0
- data/commands/commands/rhoconnect/get_token.rb +25 -0
- data/commands/commands/rhoconnect/reset.rb +16 -0
- data/commands/commands/rhoconnect/reset_refresh.rb +11 -0
- data/commands/commands/rhoconnect/restart.rb +7 -0
- data/commands/commands/rhoconnect/secret.rb +11 -0
- data/commands/commands/rhoconnect/set_admin_password.rb +26 -0
- data/commands/commands/rhoconnect/spec.rb +15 -0
- data/commands/commands/rhoconnect/start.rb +18 -0
- data/commands/commands/rhoconnect/startbg.rb +34 -0
- data/commands/commands/rhoconnect/startdebug.rb +35 -0
- data/commands/commands/rhoconnect/stop.rb +11 -0
- data/commands/commands/rhoconnect/war.rb +32 -0
- data/commands/commands/rhoconnect/web.rb +7 -0
- data/commands/execute.rb +35 -0
- data/commands/generators/app.rb +6 -0
- data/commands/generators/source.rb +6 -0
- data/commands/utilities/dtach_installed.rb +10 -0
- data/doc/benchmarks-running.txt +5 -0
- data/doc/command-line.txt +216 -27
- data/doc/heroku-addon.txt +1 -1
- data/doc/preparing-production.txt +20 -1
- data/doc/public/cli.txt +191 -0
- data/doc/push-backend-setup.txt +148 -0
- data/doc/push-client-setup.txt +61 -0
- data/doc/push-server-setup.txt +91 -0
- data/doc/push.txt +8 -137
- data/doc/rest-api.txt +96 -0
- data/doc/settings.txt +1 -1
- data/doc/supported-platforms.txt +2 -1
- data/doc/tutorial.txt +6 -4
- data/examples/simple/Gemfile +39 -0
- data/examples/simple/Rakefile +7 -12
- data/examples/simple/config.ru +16 -31
- data/examples/simple/settings/settings.yml +5 -4
- data/examples/simple/sources/product.rb +51 -0
- data/generators/templates/application/Gemfile +7 -0
- data/generators/templates/application/Rakefile +5 -18
- data/generators/templates/application/config.ru +11 -19
- data/install.sh +24 -49
- data/installer/unix-like/create_texts.rb +71 -123
- data/installer/unix-like/post_install.sh +3 -0
- data/installer/unix-like/post_uninstall.sh +2 -0
- data/installer/unix-like/pre_install.sh +5 -3
- data/installer/unix-like/pre_uninstall.sh +14 -6
- data/installer/unix-like/rho_connect_install_checkers.rb +1 -1
- data/installer/unix-like/rho_connect_install_constants.rb +6 -10
- data/installer/unix-like/rho_connect_install_debian.rb +2 -2
- data/installer/unix-like/rho_connect_install_dnd.rb +2 -5
- data/installer/unix-like/rho_connect_install_installers.rb +15 -23
- data/installer/unix-like/rho_connect_install_yum.rb +2 -2
- data/installer/utils/constants.rb +4 -4
- data/installer/utils/create_sha1.rb +1 -1
- data/installer/utils/nix_install_test.rb +32 -31
- data/installer/utils/nix_installation.rake +1 -1
- data/installer/utils/package_upload/repos.rake +34 -30
- data/installer/utils/package_upload/s3_upload.rb +3 -3
- data/lib/rhoconnect/api/source/fast_delete.rb +10 -0
- data/lib/rhoconnect/api/source/fast_insert.rb +10 -0
- data/lib/rhoconnect/api/source/fast_update.rb +10 -0
- data/lib/rhoconnect/api/source/get_source_params.rb +1 -1
- data/lib/rhoconnect/api/source/list_sources.rb +2 -2
- data/lib/rhoconnect/api/source/save_adapter.rb +1 -1
- data/lib/rhoconnect/api/source/update_source_params.rb +6 -0
- data/lib/rhoconnect/async.rb +82 -0
- data/lib/rhoconnect/bulk_data/bulk_data.rb +5 -1
- data/lib/rhoconnect/client_sync.rb +18 -3
- data/lib/rhoconnect/console/rhoconnect_api.rb +2 -2
- data/lib/rhoconnect/console/server.rb +5 -32
- data/lib/rhoconnect/console.rb +2 -2
- data/lib/rhoconnect/graph_helper.rb +225 -0
- data/lib/rhoconnect/jobs/bulk_data_job.rb +24 -2
- data/lib/rhoconnect/server.rb +31 -11
- data/lib/rhoconnect/source.rb +10 -5
- data/lib/rhoconnect/source_sync.rb +32 -2
- data/lib/rhoconnect/tasks.rb +19 -108
- data/lib/rhoconnect/test_methods.rb +20 -0
- data/lib/rhoconnect/utilities.rb +118 -0
- data/lib/rhoconnect/version.rb +1 -1
- data/lib/rhoconnect/web-console/controllers/admins.js +245 -0
- data/lib/rhoconnect/web-console/models/adapter.js +53 -0
- data/lib/rhoconnect/web-console/models/client.js +105 -0
- data/lib/rhoconnect/web-console/models/doc.js +113 -0
- data/lib/rhoconnect/web-console/models/session.js +40 -0
- data/lib/rhoconnect/web-console/models/source.js +115 -0
- data/lib/rhoconnect/web-console/models/stats.js +84 -0
- data/lib/rhoconnect/web-console/models/user.js +111 -0
- data/lib/rhoconnect/web-console/public/backbone.js +1432 -0
- data/lib/rhoconnect/web-console/public/bootstrap.css +3990 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/excanvas.min.js +0 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/jqplot.barRenderer.min.js +0 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/jqplot.canvasAxisLabelRenderer.js +0 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/jqplot.canvasAxisTickRenderer.js +0 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/jqplot.canvasTextRenderer.js +0 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/jqplot.categoryAxisRenderer.min.js +0 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/jqplot.cursor.js +0 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/jqplot.dateAxisRenderer.js +0 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/jqplot.dateAxisRenderer.min.js +0 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/jqplot.pointLabels.min.js +0 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/jquery-1.4.2.min.js +0 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/jquery.jqplot.min.css +0 -0
- data/lib/rhoconnect/{console/app → web-console}/public/jqplot/jquery.jqplot.min.js +0 -0
- data/lib/rhoconnect/web-console/public/jquery-1.7.1.min.js +154 -0
- data/lib/rhoconnect/web-console/public/rhoconnect-web.js +15 -0
- data/lib/rhoconnect/web-console/public/underscore.js +999 -0
- data/lib/rhoconnect/web-console/server.rb +55 -0
- data/lib/rhoconnect/web-console/templates/index.erb +90 -0
- data/lib/rhoconnect/web-console/templates/jqplot.erb +60 -0
- data/lib/rhoconnect/web-console/views/api_token.js +16 -0
- data/lib/rhoconnect/web-console/views/doc.js +63 -0
- data/lib/rhoconnect/web-console/views/edit_user.js +43 -0
- data/lib/rhoconnect/web-console/views/home.js +56 -0
- data/lib/rhoconnect/web-console/views/index.js +63 -0
- data/lib/rhoconnect/web-console/views/new_ping.js +58 -0
- data/lib/rhoconnect/web-console/views/new_user.js +29 -0
- data/lib/rhoconnect/web-console/views/server_doc.js +103 -0
- data/lib/rhoconnect/web-console/views/set_adapter.js +38 -0
- data/lib/rhoconnect/web-console/views/settings.js +53 -0
- data/lib/rhoconnect/web-console/views/show_device.js +56 -0
- data/lib/rhoconnect/web-console/views/show_user.js +38 -0
- data/lib/rhoconnect/web-console/views/source_docs.js +30 -0
- data/lib/rhoconnect/web-console/views/stats.js +69 -0
- data/lib/rhoconnect/web-console/views/users.js +20 -0
- data/lib/rhoconnect.rb +2 -1
- data/rhoconnect.gemspec +3 -1
- data/spec/api/application/rhoconnect_api_spec.rb +3 -5
- data/spec/api/source/fast_delete_spec.rb +27 -0
- data/spec/api/source/fast_insert_spec.rb +28 -0
- data/spec/api/source/fast_update_spec.rb +51 -0
- data/spec/api/source/get_source_params_spec.rb +1 -0
- data/spec/api/source/update_source_params_spec.rb +24 -0
- data/spec/async_spec.rb +19 -0
- data/spec/client_sync_spec.rb +19 -2
- data/spec/javascripts/PlayerSpec.js +58 -0
- data/spec/javascripts/admins_routes_spec.js +117 -0
- data/spec/javascripts/admins_spec.js +27 -0
- data/spec/javascripts/doc_view_spec.js +37 -0
- data/spec/javascripts/edit_user_view_spec.js +44 -0
- data/spec/javascripts/helpers/SpecHelper.js +9 -0
- data/spec/javascripts/helpers/jasmine-jquery.js +305 -0
- data/spec/javascripts/helpers/jasmine-sinon.js +43 -0
- data/spec/javascripts/helpers/sinon-1.3.2.js +3551 -0
- data/spec/javascripts/home_view_spec.js +39 -0
- data/spec/javascripts/index_view_spec.js +42 -0
- data/spec/javascripts/new_ping_view_spec.js +48 -0
- data/spec/javascripts/new_user_view_spec.js +42 -0
- data/spec/javascripts/server_doc_view_spec.js +39 -0
- data/spec/javascripts/set_adapter_view_spec.js +32 -0
- data/spec/javascripts/show_device_view_spec.js +41 -0
- data/spec/javascripts/show_user_view_spec.js +46 -0
- data/spec/javascripts/source_docs_view_spec.js +36 -0
- data/spec/javascripts/support/jasmine.yml +79 -0
- data/spec/javascripts/support/jasmine_config.rb +23 -0
- data/spec/javascripts/support/jasmine_runner.rb +32 -0
- data/spec/javascripts/users_view_spec.js +35 -0
- data/spec/jobs/bulk_data_job_spec.rb +10 -2
- data/spec/perf/bulk_data_perf_spec.rb +1 -0
- data/spec/server/server_spec.rb +3 -1
- data/spec/source_sync_spec.rb +14 -1
- data/spec/spec_helper.rb +51 -0
- data/spec/store_spec.rb +6 -0
- data/spec/test_methods_spec.rb +11 -0
- data/tasks/redis.rake +3 -1
- metadata +172 -64
- data/doc/contributing.txt +0 -60
- data/lib/rhoconnect/console/app/helpers/auth_helper.rb +0 -22
- data/lib/rhoconnect/console/app/helpers/extensions.rb +0 -19
- data/lib/rhoconnect/console/app/helpers/helpers.rb +0 -57
- data/lib/rhoconnect/console/app/public/ThickBox.css +0 -649
- data/lib/rhoconnect/console/app/public/home.css +0 -431
- data/lib/rhoconnect/console/app/public/images/foot_logo_rhoconnect.png +0 -0
- data/lib/rhoconnect/console/app/public/images/header_halo.jpg +0 -0
- data/lib/rhoconnect/console/app/public/images/land_separator.gif +0 -0
- data/lib/rhoconnect/console/app/public/images/landing_header.jpg +0 -0
- data/lib/rhoconnect/console/app/public/images/logo_rhoconnect.png +0 -0
- data/lib/rhoconnect/console/app/public/images/tabs_separator.png +0 -0
- data/lib/rhoconnect/console/app/public/main.css +0 -7
- data/lib/rhoconnect/console/app/public/reset.css +0 -76
- data/lib/rhoconnect/console/app/public/style.css +0 -2201
- data/lib/rhoconnect/console/app/public/text.txt +0 -0
- data/lib/rhoconnect/console/app/routes/adapter.rb +0 -28
- data/lib/rhoconnect/console/app/routes/auth.rb +0 -29
- data/lib/rhoconnect/console/app/routes/client.rb +0 -31
- data/lib/rhoconnect/console/app/routes/docs.rb +0 -145
- data/lib/rhoconnect/console/app/routes/heroku.rb +0 -19
- data/lib/rhoconnect/console/app/routes/home.rb +0 -63
- data/lib/rhoconnect/console/app/routes/timing.rb +0 -242
- data/lib/rhoconnect/console/app/routes/user.rb +0 -122
- data/lib/rhoconnect/console/app/views/adapter.erb +0 -16
- data/lib/rhoconnect/console/app/views/client.erb +0 -30
- data/lib/rhoconnect/console/app/views/content.erb +0 -14
- data/lib/rhoconnect/console/app/views/doc.erb +0 -8
- data/lib/rhoconnect/console/app/views/docdata.erb +0 -28
- data/lib/rhoconnect/console/app/views/docs.erb +0 -30
- data/lib/rhoconnect/console/app/views/edituser.erb +0 -13
- data/lib/rhoconnect/console/app/views/headermenu.erb +0 -40
- data/lib/rhoconnect/console/app/views/home.erb +0 -24
- data/lib/rhoconnect/console/app/views/index.erb +0 -58
- data/lib/rhoconnect/console/app/views/jqplot.erb +0 -52
- data/lib/rhoconnect/console/app/views/layout.erb +0 -153
- data/lib/rhoconnect/console/app/views/login.erb +0 -26
- data/lib/rhoconnect/console/app/views/newuser.erb +0 -17
- data/lib/rhoconnect/console/app/views/ping.erb +0 -40
- data/lib/rhoconnect/console/app/views/result.erb +0 -11
- data/lib/rhoconnect/console/app/views/rightboxlinks.erb +0 -15
- data/lib/rhoconnect/console/app/views/select_doc.erb +0 -17
- data/lib/rhoconnect/console/app/views/upload_doc.erb +0 -23
- data/lib/rhoconnect/console/app/views/user.erb +0 -29
- data/lib/rhoconnect/console/app/views/users.erb +0 -19
- data/lib/rhoconnect/server/views/index.erb +0 -13
data/spec/spec_helper.rb
CHANGED
@@ -7,6 +7,40 @@ if RUBY_VERSION =~ /1.9/ || defined?(JRUBY_VERSION)
|
|
7
7
|
SimpleCov.start
|
8
8
|
end
|
9
9
|
|
10
|
+
# all specs are Async'd in new ruby
|
11
|
+
if RUBY_VERSION =~ /1.9/
|
12
|
+
require 'eventmachine'
|
13
|
+
require 'fiber'
|
14
|
+
|
15
|
+
Thread.abort_on_exception = true
|
16
|
+
|
17
|
+
module RSpec
|
18
|
+
module Core
|
19
|
+
class ExampleGroup
|
20
|
+
|
21
|
+
class << self
|
22
|
+
alias_method :run_alias, :run
|
23
|
+
|
24
|
+
def run(reporter)
|
25
|
+
if EM.reactor_running?
|
26
|
+
run_alias reporter
|
27
|
+
else
|
28
|
+
out = nil
|
29
|
+
EM.run do
|
30
|
+
Fiber.new {
|
31
|
+
out = run_alias reporter
|
32
|
+
EM.stop
|
33
|
+
}.resume
|
34
|
+
end
|
35
|
+
out
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
10
44
|
require 'rhoconnect'
|
11
45
|
include Rhoconnect
|
12
46
|
|
@@ -229,6 +263,23 @@ module TestHelpers
|
|
229
263
|
klass.class_eval "def schema; end"
|
230
264
|
end
|
231
265
|
end
|
266
|
+
|
267
|
+
def mock_schema_no_version_method(adapters, &block)
|
268
|
+
adapters.each do |klass|
|
269
|
+
klass.class_eval 'def schema
|
270
|
+
{
|
271
|
+
"property" => {
|
272
|
+
"name" => "string",
|
273
|
+
"brand" => "string"
|
274
|
+
}
|
275
|
+
}.to_json
|
276
|
+
end'
|
277
|
+
end
|
278
|
+
yield
|
279
|
+
adapters.each do |klass|
|
280
|
+
klass.class_eval "def schema; end"
|
281
|
+
end
|
282
|
+
end
|
232
283
|
|
233
284
|
def unzip_file(file,file_dir)
|
234
285
|
Zip::ZipFile.open(file) do |zip_file|
|
data/spec/store_spec.rb
CHANGED
@@ -203,6 +203,12 @@ describe "Store" do
|
|
203
203
|
keys.should == [assoc_key]
|
204
204
|
end
|
205
205
|
|
206
|
+
it "should return empty list on non-existing get_zdata" do
|
207
|
+
zdata,keys = Store.get_zdata('wrong_doc2')
|
208
|
+
zdata.should == []
|
209
|
+
keys.should == []
|
210
|
+
end
|
211
|
+
|
206
212
|
it "should append duplicate data in put_zdata" do
|
207
213
|
create_doc = {'1' => {'foo' => 'bar'}}
|
208
214
|
assoc_key = 'my_assoc_key'
|
data/spec/test_methods_spec.rb
CHANGED
@@ -129,5 +129,16 @@ describe "TestMethods" do
|
|
129
129
|
set_state(@c.docname(:cd) => @data)
|
130
130
|
cd.should == @data
|
131
131
|
end
|
132
|
+
|
133
|
+
it "should search backend based on params and build a hash of hashes" do
|
134
|
+
expected = {'1'=>@product1,'2'=>@product2, '3'=>@product3}
|
135
|
+
set_state('test_db_storage' => expected)
|
136
|
+
# SampleAdapter has search method by key 'name'
|
137
|
+
test_search({'name' => 'iPhone'}).should == { '1' => @product1 }
|
138
|
+
test_search('name' => 'G2').should == { '2' => @product2 }
|
139
|
+
test_search({'name' => 'Fuze'}).should == { '3' => @product3 }
|
140
|
+
test_search({'name' => 'Some Cool Gadget'}).should == {}
|
141
|
+
end
|
142
|
+
|
132
143
|
end
|
133
144
|
end
|
data/tasks/redis.rake
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
require 'fileutils'
|
3
3
|
require 'open-uri'
|
4
4
|
|
5
|
+
include Rake::DSL
|
6
|
+
|
5
7
|
REDIS_RELEASE = "2.4.10"
|
6
8
|
|
7
9
|
def windows?
|
@@ -105,7 +107,7 @@ namespace :redis do
|
|
105
107
|
RedisRunner.start
|
106
108
|
end
|
107
109
|
|
108
|
-
#
|
110
|
+
# desc 'Start redis' without dtach - for Rhostudio (internal)
|
109
111
|
task :startbg do
|
110
112
|
RedisRunner.startbg
|
111
113
|
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:
|
5
|
-
prerelease:
|
4
|
+
hash: 62196449
|
5
|
+
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 3
|
8
|
-
- 1
|
9
8
|
- 2
|
10
|
-
|
9
|
+
- 0
|
10
|
+
- beta
|
11
|
+
- 1
|
12
|
+
version: 3.2.0.beta1
|
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-04-
|
20
|
+
date: 2012-04-24 00:00:00 Z
|
19
21
|
dependencies:
|
20
22
|
- !ruby/object:Gem::Dependency
|
21
23
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -175,6 +177,22 @@ dependencies:
|
|
175
177
|
prerelease: false
|
176
178
|
name: templater
|
177
179
|
type: :runtime
|
180
|
+
- !ruby/object:Gem::Dependency
|
181
|
+
version_requirements: &id011 !ruby/object:Gem::Requirement
|
182
|
+
none: false
|
183
|
+
requirements:
|
184
|
+
- - ~>
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
hash: 43
|
187
|
+
segments:
|
188
|
+
- 0
|
189
|
+
- 14
|
190
|
+
- 6
|
191
|
+
version: 0.14.6
|
192
|
+
requirement: *id011
|
193
|
+
prerelease: false
|
194
|
+
name: thor
|
195
|
+
type: :runtime
|
178
196
|
description: RhoConnect App Integration Server and related command-line utilities
|
179
197
|
email: dev@rhomobile.com
|
180
198
|
executables:
|
@@ -271,7 +289,46 @@ files:
|
|
271
289
|
- bench/distr_bench/run_distr_client.sh
|
272
290
|
- bench/distr_bench/distr_bench_main
|
273
291
|
- bench/distr_bench/distr_bench
|
292
|
+
- commands/execute.rb
|
293
|
+
- commands/utilities/dtach_installed.rb
|
294
|
+
- commands/generators/app.rb
|
295
|
+
- commands/generators/source.rb
|
296
|
+
- commands/commands/dtach_commands/dtach_about.rb
|
297
|
+
- commands/commands/dtach_commands/dtach_install.rb
|
298
|
+
- commands/commands/rhoconnect/reset_refresh.rb
|
299
|
+
- commands/commands/rhoconnect/clean_start.rb
|
300
|
+
- commands/commands/rhoconnect/secret.rb
|
301
|
+
- commands/commands/rhoconnect/web.rb
|
302
|
+
- commands/commands/rhoconnect/get_token.rb
|
303
|
+
- commands/commands/rhoconnect/war.rb
|
304
|
+
- commands/commands/rhoconnect/create_user.rb
|
305
|
+
- commands/commands/rhoconnect/config.rb
|
306
|
+
- commands/commands/rhoconnect/delete_user.rb
|
307
|
+
- commands/commands/rhoconnect/startbg.rb
|
308
|
+
- commands/commands/rhoconnect/restart.rb
|
309
|
+
- commands/commands/rhoconnect/start.rb
|
310
|
+
- commands/commands/rhoconnect/attach.rb
|
311
|
+
- commands/commands/rhoconnect/console_helper.rb
|
312
|
+
- commands/commands/rhoconnect/spec.rb
|
313
|
+
- commands/commands/rhoconnect/flushdb.rb
|
314
|
+
- commands/commands/rhoconnect/set_admin_password.rb
|
315
|
+
- commands/commands/rhoconnect/reset.rb
|
316
|
+
- commands/commands/rhoconnect/startdebug.rb
|
317
|
+
- commands/commands/rhoconnect/delete_device.rb
|
318
|
+
- commands/commands/rhoconnect/console.rb
|
319
|
+
- commands/commands/rhoconnect/stop.rb
|
320
|
+
- commands/commands/redis_commands/redis_about.rb
|
321
|
+
- commands/commands/redis_commands/redis_make.rb
|
322
|
+
- commands/commands/redis_commands/redis_startbg.rb
|
323
|
+
- commands/commands/redis_commands/redis_start.rb
|
324
|
+
- commands/commands/redis_commands/redis_runner.rb
|
325
|
+
- commands/commands/redis_commands/redis_attach.rb
|
326
|
+
- commands/commands/redis_commands/redis_stop.rb
|
327
|
+
- commands/commands/redis_commands/redis_restart.rb
|
328
|
+
- commands/commands/redis_commands/redis_install.rb
|
329
|
+
- commands/commands/redis_commands/redis_download.rb
|
274
330
|
- doc/benchmarks-running.txt
|
331
|
+
- doc/push-backend-setup.txt
|
275
332
|
- doc/rest-api.txt
|
276
333
|
- doc/web-console.txt
|
277
334
|
- doc/client.txt
|
@@ -281,7 +338,7 @@ files:
|
|
281
338
|
- doc/async-jobs.txt
|
282
339
|
- doc/migration.txt
|
283
340
|
- doc/client-objc.txt
|
284
|
-
- doc/
|
341
|
+
- doc/push-server-setup.txt
|
285
342
|
- doc/release.txt
|
286
343
|
- doc/settings.txt
|
287
344
|
- doc/tutorial.txt
|
@@ -303,6 +360,7 @@ files:
|
|
303
360
|
- doc/public/css/style.css
|
304
361
|
- doc/public/css/print.css
|
305
362
|
- doc/public/css/screen.css
|
363
|
+
- doc/public/cli.txt
|
306
364
|
- doc/hosting-rhohub.txt
|
307
365
|
- doc/adapters-crm.txt
|
308
366
|
- doc/source-adapters.txt
|
@@ -312,12 +370,15 @@ files:
|
|
312
370
|
- doc/plugin-intro.txt
|
313
371
|
- doc/authentication.txt
|
314
372
|
- doc/push.txt
|
373
|
+
- doc/push-client-setup.txt
|
315
374
|
- doc/client-java.txt
|
316
375
|
- examples/simple/application.rb
|
317
376
|
- examples/simple/sources/sample_adapter.rb
|
318
377
|
- examples/simple/sources/simple_adapter.rb
|
378
|
+
- examples/simple/sources/product.rb
|
319
379
|
- examples/simple/settings/license.key
|
320
380
|
- examples/simple/settings/settings.yml
|
381
|
+
- examples/simple/Gemfile
|
321
382
|
- examples/simple/config.ru
|
322
383
|
- examples/simple/Rakefile
|
323
384
|
- generators/rhoconnect.rb
|
@@ -366,70 +427,58 @@ files:
|
|
366
427
|
- lib/rhoconnect/stats/record.rb
|
367
428
|
- lib/rhoconnect/stats/middleware.rb
|
368
429
|
- lib/rhoconnect/document.rb
|
430
|
+
- lib/rhoconnect/async.rb
|
369
431
|
- lib/rhoconnect/db_adapter.rb
|
370
432
|
- lib/rhoconnect/client.rb
|
371
433
|
- lib/rhoconnect/lock_ops.rb
|
372
434
|
- lib/rhoconnect/body_content_type_parser.rb
|
373
435
|
- lib/rhoconnect/console/server.rb
|
374
436
|
- lib/rhoconnect/console/rhoconnect_api.rb
|
375
|
-
- lib/rhoconnect/
|
376
|
-
- lib/rhoconnect/console/
|
377
|
-
- lib/rhoconnect/console/
|
378
|
-
- lib/rhoconnect/console/
|
379
|
-
- lib/rhoconnect/console/
|
380
|
-
- lib/rhoconnect/console/
|
381
|
-
- lib/rhoconnect/console/
|
382
|
-
- lib/rhoconnect/console/
|
383
|
-
- lib/rhoconnect/console/
|
384
|
-
- lib/rhoconnect/console/
|
385
|
-
- lib/rhoconnect/console/
|
386
|
-
- lib/rhoconnect/console/
|
387
|
-
- lib/rhoconnect/console/
|
388
|
-
- lib/rhoconnect/console/
|
389
|
-
- lib/rhoconnect/console/
|
390
|
-
- lib/rhoconnect/console/
|
391
|
-
- lib/rhoconnect/console/
|
392
|
-
- lib/rhoconnect/console/
|
393
|
-
- lib/rhoconnect/console/
|
394
|
-
- lib/rhoconnect/console/
|
395
|
-
- lib/rhoconnect/console/
|
396
|
-
- lib/rhoconnect/console/
|
397
|
-
- lib/rhoconnect/console/
|
398
|
-
- lib/rhoconnect/console/
|
399
|
-
- lib/rhoconnect/console/
|
400
|
-
- lib/rhoconnect/console/
|
401
|
-
- lib/rhoconnect/console/
|
402
|
-
- lib/rhoconnect/console/
|
403
|
-
- lib/rhoconnect/console/
|
404
|
-
- lib/rhoconnect/console/
|
405
|
-
- lib/rhoconnect/console/
|
406
|
-
- lib/rhoconnect/console/
|
407
|
-
- lib/rhoconnect/console/
|
408
|
-
- lib/rhoconnect/console/
|
409
|
-
- lib/rhoconnect/console/
|
410
|
-
- lib/rhoconnect/console/
|
411
|
-
- lib/rhoconnect/console/
|
412
|
-
- lib/rhoconnect/console/
|
413
|
-
- lib/rhoconnect/console/
|
414
|
-
- lib/rhoconnect/console/
|
415
|
-
- lib/rhoconnect/console/
|
416
|
-
- lib/rhoconnect/console/
|
417
|
-
- lib/rhoconnect/console/
|
418
|
-
- lib/rhoconnect/console/
|
419
|
-
- lib/rhoconnect/console/
|
420
|
-
- lib/rhoconnect/console/app/public/jqplot/jquery.jqplot.min.js
|
421
|
-
- lib/rhoconnect/console/app/public/jqplot/jqplot.dateAxisRenderer.min.js
|
422
|
-
- lib/rhoconnect/console/app/public/jqplot/excanvas.min.js
|
423
|
-
- lib/rhoconnect/console/app/public/jqplot/jqplot.dateAxisRenderer.js
|
424
|
-
- lib/rhoconnect/console/app/public/jqplot/jquery.jqplot.min.css
|
425
|
-
- lib/rhoconnect/console/app/public/jqplot/jquery-1.4.2.min.js
|
426
|
-
- lib/rhoconnect/console/app/public/jqplot/jqplot.canvasTextRenderer.js
|
427
|
-
- lib/rhoconnect/console/app/public/jqplot/jqplot.barRenderer.min.js
|
428
|
-
- lib/rhoconnect/console/app/public/jqplot/jqplot.categoryAxisRenderer.min.js
|
429
|
-
- lib/rhoconnect/console/app/public/main.css
|
430
|
-
- lib/rhoconnect/console/app/public/text.txt
|
431
|
-
- lib/rhoconnect/console/app/public/home.css
|
432
|
-
- lib/rhoconnect/server/views/index.erb
|
437
|
+
- lib/rhoconnect/utilities.rb
|
438
|
+
- lib/rhoconnect/web-console/server.rb
|
439
|
+
- lib/rhoconnect/web-console/views/edit_user.js
|
440
|
+
- lib/rhoconnect/web-console/views/show_user.js
|
441
|
+
- lib/rhoconnect/web-console/views/index.js
|
442
|
+
- lib/rhoconnect/web-console/views/doc.js
|
443
|
+
- lib/rhoconnect/web-console/views/set_adapter.js
|
444
|
+
- lib/rhoconnect/web-console/views/settings.js
|
445
|
+
- lib/rhoconnect/web-console/views/new_user.js
|
446
|
+
- lib/rhoconnect/web-console/views/users.js
|
447
|
+
- lib/rhoconnect/web-console/views/server_doc.js
|
448
|
+
- lib/rhoconnect/web-console/views/show_device.js
|
449
|
+
- lib/rhoconnect/web-console/views/home.js
|
450
|
+
- lib/rhoconnect/web-console/views/stats.js
|
451
|
+
- lib/rhoconnect/web-console/views/api_token.js
|
452
|
+
- lib/rhoconnect/web-console/views/new_ping.js
|
453
|
+
- lib/rhoconnect/web-console/views/source_docs.js
|
454
|
+
- lib/rhoconnect/web-console/models/session.js
|
455
|
+
- lib/rhoconnect/web-console/models/doc.js
|
456
|
+
- lib/rhoconnect/web-console/models/source.js
|
457
|
+
- lib/rhoconnect/web-console/models/user.js
|
458
|
+
- lib/rhoconnect/web-console/models/adapter.js
|
459
|
+
- lib/rhoconnect/web-console/models/client.js
|
460
|
+
- lib/rhoconnect/web-console/models/stats.js
|
461
|
+
- lib/rhoconnect/web-console/public/bootstrap.css
|
462
|
+
- lib/rhoconnect/web-console/public/jquery-1.7.1.min.js
|
463
|
+
- lib/rhoconnect/web-console/public/rhoconnect-web.js
|
464
|
+
- lib/rhoconnect/web-console/public/jqplot/jqplot.cursor.js
|
465
|
+
- lib/rhoconnect/web-console/public/jqplot/jqplot.canvasAxisTickRenderer.js
|
466
|
+
- lib/rhoconnect/web-console/public/jqplot/jqplot.canvasAxisLabelRenderer.js
|
467
|
+
- lib/rhoconnect/web-console/public/jqplot/jqplot.pointLabels.min.js
|
468
|
+
- lib/rhoconnect/web-console/public/jqplot/jquery.jqplot.min.js
|
469
|
+
- lib/rhoconnect/web-console/public/jqplot/jqplot.dateAxisRenderer.min.js
|
470
|
+
- lib/rhoconnect/web-console/public/jqplot/excanvas.min.js
|
471
|
+
- lib/rhoconnect/web-console/public/jqplot/jqplot.dateAxisRenderer.js
|
472
|
+
- lib/rhoconnect/web-console/public/jqplot/jquery.jqplot.min.css
|
473
|
+
- lib/rhoconnect/web-console/public/jqplot/jquery-1.4.2.min.js
|
474
|
+
- lib/rhoconnect/web-console/public/jqplot/jqplot.canvasTextRenderer.js
|
475
|
+
- lib/rhoconnect/web-console/public/jqplot/jqplot.barRenderer.min.js
|
476
|
+
- lib/rhoconnect/web-console/public/jqplot/jqplot.categoryAxisRenderer.min.js
|
477
|
+
- lib/rhoconnect/web-console/public/backbone.js
|
478
|
+
- lib/rhoconnect/web-console/public/underscore.js
|
479
|
+
- lib/rhoconnect/web-console/controllers/admins.js
|
480
|
+
- lib/rhoconnect/web-console/templates/jqplot.erb
|
481
|
+
- lib/rhoconnect/web-console/templates/index.erb
|
433
482
|
- lib/rhoconnect/api/client/get_client_params.rb
|
434
483
|
- lib/rhoconnect/api/client/list_clients.rb
|
435
484
|
- lib/rhoconnect/api/client/create_client.rb
|
@@ -448,11 +497,15 @@ files:
|
|
448
497
|
- lib/rhoconnect/api/user/list_users.rb
|
449
498
|
- lib/rhoconnect/api/user/delete_user.rb
|
450
499
|
- lib/rhoconnect/api/user/update_user.rb
|
500
|
+
- lib/rhoconnect/api/source/fast_delete.rb
|
451
501
|
- lib/rhoconnect/api/source/upload_file.rb
|
502
|
+
- lib/rhoconnect/api/source/fast_insert.rb
|
452
503
|
- lib/rhoconnect/api/source/set_refresh_time.rb
|
504
|
+
- lib/rhoconnect/api/source/update_source_params.rb
|
453
505
|
- lib/rhoconnect/api/source/save_adapter.rb
|
454
506
|
- lib/rhoconnect/api/source/get_adapter.rb
|
455
507
|
- lib/rhoconnect/api/source/push_objects.rb
|
508
|
+
- lib/rhoconnect/api/source/fast_update.rb
|
456
509
|
- lib/rhoconnect/api/source/get_db_doc.rb
|
457
510
|
- lib/rhoconnect/api/source/push_deletes.rb
|
458
511
|
- lib/rhoconnect/api/source/set_db_doc.rb
|
@@ -464,6 +517,7 @@ files:
|
|
464
517
|
- lib/rhoconnect/api/admin/stats.rb
|
465
518
|
- lib/rhoconnect/api/admin/get_license_info.rb
|
466
519
|
- lib/rhoconnect/api/admin/reset.rb
|
520
|
+
- lib/rhoconnect/graph_helper.rb
|
467
521
|
- lib/rhoconnect/bulk_data/syncdb.index.schema
|
468
522
|
- lib/rhoconnect/bulk_data/bulk_data.rb
|
469
523
|
- lib/rhoconnect/bulk_data/syncdb.schema
|
@@ -521,15 +575,19 @@ files:
|
|
521
575
|
- spec/api/user/create_user_spec.rb
|
522
576
|
- spec/api/user/list_users_spec.rb
|
523
577
|
- spec/api/user/update_user_spec.rb
|
578
|
+
- spec/api/source/update_source_params_spec.rb
|
524
579
|
- spec/api/source/set_db_doc_spec.rb
|
525
580
|
- spec/api/source/set_refresh_time_spec.rb
|
526
581
|
- spec/api/source/upload_file_spec.rb
|
582
|
+
- spec/api/source/fast_delete_spec.rb
|
527
583
|
- spec/api/source/list_sources_spec.rb
|
528
584
|
- spec/api/source/push_objects_spec.rb
|
585
|
+
- spec/api/source/fast_update_spec.rb
|
529
586
|
- spec/api/source/adapter_spec.rb
|
530
587
|
- spec/api/source/list_source_docs_spec.rb
|
531
588
|
- spec/api/source/push_deletes_spec.rb
|
532
589
|
- spec/api/source/get_db_doc_spec.rb
|
590
|
+
- spec/api/source/fast_insert_spec.rb
|
533
591
|
- spec/api/source/get_source_params_spec.rb
|
534
592
|
- spec/api/admin/get_license_info_spec.rb
|
535
593
|
- spec/api/admin/reset_spec.rb
|
@@ -540,6 +598,7 @@ files:
|
|
540
598
|
- spec/bulk_data/bulk_data_spec.rb
|
541
599
|
- spec/api_token_spec.rb
|
542
600
|
- spec/app_spec.rb
|
601
|
+
- spec/async_spec.rb
|
543
602
|
- spec/source_spec.rb
|
544
603
|
- spec/jobs/source_job_spec.rb
|
545
604
|
- spec/jobs/ping_job_spec.rb
|
@@ -558,6 +617,28 @@ files:
|
|
558
617
|
- spec/doc/footer.html
|
559
618
|
- spec/doc/base.html
|
560
619
|
- spec/doc/doc_spec.rb
|
620
|
+
- spec/javascripts/support/jasmine_config.rb
|
621
|
+
- spec/javascripts/support/jasmine.yml
|
622
|
+
- spec/javascripts/support/jasmine_runner.rb
|
623
|
+
- spec/javascripts/edit_user_view_spec.js
|
624
|
+
- spec/javascripts/server_doc_view_spec.js
|
625
|
+
- spec/javascripts/users_view_spec.js
|
626
|
+
- spec/javascripts/PlayerSpec.js
|
627
|
+
- spec/javascripts/admins_routes_spec.js
|
628
|
+
- spec/javascripts/new_ping_view_spec.js
|
629
|
+
- spec/javascripts/show_user_view_spec.js
|
630
|
+
- spec/javascripts/home_view_spec.js
|
631
|
+
- spec/javascripts/helpers/jasmine-sinon.js
|
632
|
+
- spec/javascripts/helpers/SpecHelper.js
|
633
|
+
- spec/javascripts/helpers/jasmine-jquery.js
|
634
|
+
- spec/javascripts/helpers/sinon-1.3.2.js
|
635
|
+
- spec/javascripts/show_device_view_spec.js
|
636
|
+
- spec/javascripts/source_docs_view_spec.js
|
637
|
+
- spec/javascripts/doc_view_spec.js
|
638
|
+
- spec/javascripts/set_adapter_view_spec.js
|
639
|
+
- spec/javascripts/index_view_spec.js
|
640
|
+
- spec/javascripts/new_user_view_spec.js
|
641
|
+
- spec/javascripts/admins_spec.js
|
561
642
|
- spec/test_methods_spec.rb
|
562
643
|
- spec/apps/rhotestapp/application.rb
|
563
644
|
- spec/apps/rhotestapp/sources/sub_adapter.rb
|
@@ -647,15 +728,19 @@ test_files:
|
|
647
728
|
- spec/api/user/create_user_spec.rb
|
648
729
|
- spec/api/user/list_users_spec.rb
|
649
730
|
- spec/api/user/update_user_spec.rb
|
731
|
+
- spec/api/source/update_source_params_spec.rb
|
650
732
|
- spec/api/source/set_db_doc_spec.rb
|
651
733
|
- spec/api/source/set_refresh_time_spec.rb
|
652
734
|
- spec/api/source/upload_file_spec.rb
|
735
|
+
- spec/api/source/fast_delete_spec.rb
|
653
736
|
- spec/api/source/list_sources_spec.rb
|
654
737
|
- spec/api/source/push_objects_spec.rb
|
738
|
+
- spec/api/source/fast_update_spec.rb
|
655
739
|
- spec/api/source/adapter_spec.rb
|
656
740
|
- spec/api/source/list_source_docs_spec.rb
|
657
741
|
- spec/api/source/push_deletes_spec.rb
|
658
742
|
- spec/api/source/get_db_doc_spec.rb
|
743
|
+
- spec/api/source/fast_insert_spec.rb
|
659
744
|
- spec/api/source/get_source_params_spec.rb
|
660
745
|
- spec/api/admin/get_license_info_spec.rb
|
661
746
|
- spec/api/admin/reset_spec.rb
|
@@ -666,6 +751,7 @@ test_files:
|
|
666
751
|
- spec/bulk_data/bulk_data_spec.rb
|
667
752
|
- spec/api_token_spec.rb
|
668
753
|
- spec/app_spec.rb
|
754
|
+
- spec/async_spec.rb
|
669
755
|
- spec/source_spec.rb
|
670
756
|
- spec/jobs/source_job_spec.rb
|
671
757
|
- spec/jobs/ping_job_spec.rb
|
@@ -684,6 +770,28 @@ test_files:
|
|
684
770
|
- spec/doc/footer.html
|
685
771
|
- spec/doc/base.html
|
686
772
|
- spec/doc/doc_spec.rb
|
773
|
+
- spec/javascripts/support/jasmine_config.rb
|
774
|
+
- spec/javascripts/support/jasmine.yml
|
775
|
+
- spec/javascripts/support/jasmine_runner.rb
|
776
|
+
- spec/javascripts/edit_user_view_spec.js
|
777
|
+
- spec/javascripts/server_doc_view_spec.js
|
778
|
+
- spec/javascripts/users_view_spec.js
|
779
|
+
- spec/javascripts/PlayerSpec.js
|
780
|
+
- spec/javascripts/admins_routes_spec.js
|
781
|
+
- spec/javascripts/new_ping_view_spec.js
|
782
|
+
- spec/javascripts/show_user_view_spec.js
|
783
|
+
- spec/javascripts/home_view_spec.js
|
784
|
+
- spec/javascripts/helpers/jasmine-sinon.js
|
785
|
+
- spec/javascripts/helpers/SpecHelper.js
|
786
|
+
- spec/javascripts/helpers/jasmine-jquery.js
|
787
|
+
- spec/javascripts/helpers/sinon-1.3.2.js
|
788
|
+
- spec/javascripts/show_device_view_spec.js
|
789
|
+
- spec/javascripts/source_docs_view_spec.js
|
790
|
+
- spec/javascripts/doc_view_spec.js
|
791
|
+
- spec/javascripts/set_adapter_view_spec.js
|
792
|
+
- spec/javascripts/index_view_spec.js
|
793
|
+
- spec/javascripts/new_user_view_spec.js
|
794
|
+
- spec/javascripts/admins_spec.js
|
687
795
|
- spec/test_methods_spec.rb
|
688
796
|
- spec/apps/rhotestapp/application.rb
|
689
797
|
- spec/apps/rhotestapp/sources/sub_adapter.rb
|
data/doc/contributing.txt
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
Contributing to RhoConnect
|
2
|
-
===
|
3
|
-
Want to add features to RhoConnect? Found a bug that you want report or fix? Please follow the steps below to help with the RhoConnect project. Thanks to developers like you, RhoConnect continues to be the best and fastest open-source mobile sync server!
|
4
|
-
|
5
|
-
## Report RhoConnect Issues
|
6
|
-
Please first report bugs/features/enhancements to the [google group](http://groups.google.com/group/rhomobile). Someone may already be working on the issue!
|
7
|
-
|
8
|
-
## Run RhoConnect Specs
|
9
|
-
First run the rhoconnect specs to make sure your environment is up-to-date for development:
|
10
|
-
|
11
|
-
1. [Fork](http://help.github.com/forking/) the [RhoConnect repository](http://github.com/rhomobile/rhoconnect).
|
12
|
-
|
13
|
-
2. Clone your new repo:
|
14
|
-
|
15
|
-
$ git clone git://github.com/<yourhandle>/rhoconnect.git
|
16
|
-
$ cd rhoconnect
|
17
|
-
|
18
|
-
3. Install [Bundler](http://gembundler.com/):
|
19
|
-
|
20
|
-
$ [sudo] gem install bundler
|
21
|
-
|
22
|
-
4. Install all of the required gems. If any of the needed gems are already installed, Bundler will use them:
|
23
|
-
|
24
|
-
$ [sudo] bundle install
|
25
|
-
|
26
|
-
5. Install [hsqldata](http://github.com/rhomobile/hsqldata):
|
27
|
-
|
28
|
-
$ git clone git://github.com/rhomobile/hsqldata.git
|
29
|
-
$ cd hsqldata
|
30
|
-
$ ant
|
31
|
-
$ mkdir -p <path-to-rhoconnect>/vendor/
|
32
|
-
$ cp bin/hsqldata.jar <path-to-rhoconnect>/vendor/
|
33
|
-
|
34
|
-
6. Run the RhoConnect specs:
|
35
|
-
|
36
|
-
$ rake #=> runs all rhoconnect specs by default
|
37
|
-
|
38
|
-
|
39
|
-
If everything passes (pending specs are OK), then your environment is ready for development. If you have trouble installing a particular gem or the specs just won't run properly, please feel free to ping the [rhomobile google group](mailto:rhomobile@googlegroups.com) or [hop on IRC](http://webchat.freenode.net/?channels=rhomobile) to chat with other RhoConnect developers.
|
40
|
-
|
41
|
-
## Contributing your Patch
|
42
|
-
Now that you're environment is ready, make your changes!
|
43
|
-
|
44
|
-
1. Create a topic branch:
|
45
|
-
|
46
|
-
$ git checkout -b cool_new_feature
|
47
|
-
|
48
|
-
2. Write tests ([example](http://github.com/rhomobile/rhoconnect/commit/f95cfdbf3f53d64c3957499906c77d7127b7c3db#diff-2))
|
49
|
-
|
50
|
-
3. Make changes...
|
51
|
-
|
52
|
-
4. Add relevant documentation(RDoc, update the README if relevant)
|
53
|
-
|
54
|
-
5. Push to your branch:
|
55
|
-
|
56
|
-
$ git push origin cool_new_feature
|
57
|
-
|
58
|
-
6. Send a note to the [google group](http://groups.google.com/group/rhomobile)
|
59
|
-
|
60
|
-
That's it! Please follow [these ruby style guidelines](http://github.com/chneukirchen/styleguide/blob/master/RUBY-STYLE) when coding.
|
@@ -1,22 +0,0 @@
|
|
1
|
-
class RhoconnectConsole::Server
|
2
|
-
helpers do
|
3
|
-
|
4
|
-
def login_required
|
5
|
-
session[:token].nil?
|
6
|
-
end
|
7
|
-
|
8
|
-
def report_error(message)
|
9
|
-
session[:errors] = [] if session[:errors].nil?
|
10
|
-
session[:errors] << message
|
11
|
-
end
|
12
|
-
|
13
|
-
def verify_presence_of(param,message)
|
14
|
-
report_error(message) if params[param].nil? or params[param].length == 0
|
15
|
-
end
|
16
|
-
|
17
|
-
def verify_format_of(param,message)
|
18
|
-
report_error(message) if params[param].nil? or params[param] !~ /^(http|https):\/\//
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
class Hash
|
2
|
-
public
|
3
|
-
def symbolize_keys
|
4
|
-
hash = {}
|
5
|
-
self.each do |key, value|
|
6
|
-
hash[(key.to_sym rescue key) || key] = value
|
7
|
-
end
|
8
|
-
hash
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
class String
|
13
|
-
public
|
14
|
-
def ends_with?(str)
|
15
|
-
str = str.to_str
|
16
|
-
tail = self[-str.length, str.length]
|
17
|
-
tail == str
|
18
|
-
end
|
19
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
class RhoconnectConsole::Server
|
2
|
-
helpers do
|
3
|
-
def url_path(*path_parts)
|
4
|
-
[ path_prefix, path_parts ].join("/").squeeze('/')
|
5
|
-
end
|
6
|
-
alias_method :u, :url_path
|
7
|
-
|
8
|
-
def resque_path
|
9
|
-
# Replace 'console' at the end of path by 'resque'
|
10
|
-
url_path("").sub!(/console\/?\Z/, "resque/")
|
11
|
-
end
|
12
|
-
|
13
|
-
def path_prefix
|
14
|
-
request.env['SCRIPT_NAME']
|
15
|
-
end
|
16
|
-
|
17
|
-
def is_errors?
|
18
|
-
session[:errors] and session[:errors].size > 0
|
19
|
-
end
|
20
|
-
|
21
|
-
def show_errors
|
22
|
-
return '' unless session[:errors]
|
23
|
-
res = []
|
24
|
-
session[:errors].each do |error|
|
25
|
-
res << "<p style=\"color:#800\">#{error}</p>"
|
26
|
-
end
|
27
|
-
session[:errors] = nil
|
28
|
-
res.join
|
29
|
-
end
|
30
|
-
|
31
|
-
def handle_api_error(error_message)
|
32
|
-
begin
|
33
|
-
yield
|
34
|
-
rescue RestClient::Exception => re
|
35
|
-
session[:errors] ||= []
|
36
|
-
if re.response.body.nil? or re.response.body.length == 0
|
37
|
-
session[:errors] << "#{error_message}: [#{re.http_code}] #{re.message}"
|
38
|
-
else
|
39
|
-
session[:errors] << "#{error_message}: #{re.response.body}"
|
40
|
-
end
|
41
|
-
rescue Exception => e
|
42
|
-
session[:errors] ||= []
|
43
|
-
session[:errors] << "#{error_message}: #{e.message}"
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
def doc_params
|
48
|
-
doc_params = "source_id=#{CGI.escape(params[:source_id])}&user_id=#{CGI.escape(params[:user_id])}"
|
49
|
-
doc_params += "&device_id=#{CGI.escape(params[:device_id])}" if params[:device_id]
|
50
|
-
doc_params
|
51
|
-
end
|
52
|
-
|
53
|
-
def doc_is_string
|
54
|
-
params[:dbkey].ends_with?('token') or params[:dbkey].ends_with?('size')
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|