rhoconnect 4.0.4 → 5.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/CHANGELOG.md +54 -5
- data/CREDITS +219 -219
- data/Gemfile +2 -2
- data/Gemfile.lock +68 -79
- data/Rakefile +1 -2
- data/bench/benchapp/spec/models/ruby/mock_adapter_spec.rb +17 -17
- data/bench/benchapp/spec/models/ruby/queue_mock_adapter_spec.rb +17 -17
- data/bench/benchapp/spec/spec_helper.rb +3 -3
- data/bench/blobapp/spec/models/ruby/blob_adapter_spec.rb +17 -17
- data/bench/blobapp/spec/spec_helper.rb +3 -3
- data/bench/lib/bench/runner.rb +1 -69
- data/bench/lib/bench.rb +18 -18
- data/bench/spec/mock_adapter_spec.rb +54 -55
- data/bench/spec/mock_client_spec.rb +47 -48
- data/bench/spec/result_spec.rb +41 -44
- data/bench/spec/utils_spec.rb +24 -25
- data/commands/generators/app.rb +7 -5
- data/commands/generators/controller.rb +7 -5
- data/commands/generators/model.rb +7 -5
- data/commands/generators/source.rb +7 -5
- data/commands/parser.rb +1 -1
- data/commands/redis/redis_download.rb +1 -1
- data/doc/async-jobs.txt +9 -9
- data/doc/supported-platforms.txt +0 -2
- data/generators/rhoconnect.rb +92 -212
- data/generators/templates/application/rcgemfile +3 -3
- data/generators/templates/application/spec/application_controller_spec.rb +14 -16
- data/generators/templates/application/spec/js_spec.rb +20 -20
- data/generators/templates/application/spec/spec_helper.rb +1 -1
- data/generators/templates/source/controllers/ruby/controller_spec.rb +18 -19
- data/generators/templates/source/models/ruby/model_spec.rb +17 -17
- data/install.sh +10 -21
- data/installer/unix-like/rho_connect_install_constants.rb +5 -5
- data/installer/unix-like/rho_connect_install_installers.rb +4 -4
- data/installer/utils/constants.rb +6 -6
- data/installer/utils/nix_install_test.rb +29 -29
- data/installer/utils/package_upload/repos.rake +16 -26
- data/js-adapters/node.rb +4 -4
- data/js-adapters/node_channel.rb +4 -8
- data/lib/rhoconnect/db_adapter.rb +13 -13
- data/lib/rhoconnect/handler/changes/engine.rb +1 -1
- data/lib/rhoconnect/jobs/bulk_data_job.rb +29 -29
- data/lib/rhoconnect/license.rb +7 -7
- data/lib/rhoconnect/model/helpers/find_duplicates_on_update.rb +13 -13
- data/lib/rhoconnect/ping/apple.rb +4 -4
- data/lib/rhoconnect/server.rb +2 -2
- data/lib/rhoconnect/source.rb +2 -2
- data/lib/rhoconnect/store.rb +12 -6
- data/lib/rhoconnect/utilities.rb +2 -2
- data/lib/rhoconnect/version.rb +1 -1
- data/lib/rhoconnect.rb +6 -4
- data/rhoconnect.gemspec +5 -6
- data/spec/api/api_helper.rb +1 -1
- data/spec/api/app/fast_delete_spec.rb +22 -22
- data/spec/api/app/fast_insert_spec.rb +23 -23
- data/spec/api/app/fast_update_spec.rb +63 -63
- data/spec/api/app/push_deletes_spec.rb +11 -13
- data/spec/api/app/push_objects_spec.rb +39 -39
- data/spec/api/client/client_get_db_doc_spec.rb +29 -29
- data/spec/api/client/client_set_db_doc_spec.rb +11 -11
- data/spec/api/client/get_client_params_spec.rb +29 -29
- data/spec/api/client/list_client_docs_spec.rb +32 -34
- data/spec/api/client/reset_spec.rb +30 -30
- data/spec/api/readstate/set_refresh_time_spec.rb +43 -43
- data/spec/api/source/get_source_params_spec.rb +32 -34
- data/spec/api/source/list_sources_spec.rb +13 -13
- data/spec/api/source/update_source_params_spec.rb +19 -19
- data/spec/api/store/get_db_doc_spec.rb +27 -27
- data/spec/api/store/set_db_doc_spec.rb +38 -38
- data/spec/api/system/adapter_spec.rb +27 -29
- data/spec/api/system/get_license_info_spec.rb +11 -11
- data/spec/api/system/login_spec.rb +37 -37
- data/spec/api/system/reset_spec.rb +15 -15
- data/spec/api/system/stats_spec.rb +70 -71
- data/spec/api/user/create_user_spec.rb +37 -37
- data/spec/api/user/delete_client_spec.rb +7 -7
- data/spec/api/user/delete_user_spec.rb +62 -62
- data/spec/api/user/list_clients_spec.rb +24 -24
- data/spec/api/user/list_source_docs_spec.rb +29 -29
- data/spec/api/user/list_users_spec.rb +22 -22
- data/spec/api/user/ping_spec.rb +18 -18
- data/spec/api/user/show_user_spec.rb +10 -10
- data/spec/api/user/update_user_spec.rb +43 -43
- data/spec/api/user/user_get_db_doc_spec.rb +12 -12
- data/spec/api/user/user_set_db_doc_spec.rb +37 -37
- data/spec/api_token_spec.rb +8 -8
- data/spec/app_spec.rb +18 -17
- data/spec/apps/jstestapp/settings/settings.yml +2 -0
- data/spec/async_spec.rb +9 -11
- data/spec/bulk_data/bulk_data_spec.rb +120 -120
- data/spec/cli/cli_spec.rb +50 -53
- data/spec/client_spec.rb +105 -105
- data/spec/client_sync_spec.rb +529 -528
- data/spec/controllers/js_base_spec.rb +147 -141
- data/spec/doc/doc_spec.rb +51 -52
- data/spec/document_spec.rb +58 -58
- data/spec/dynamic_adapter_spec.rb +33 -36
- data/spec/generator/generator_spec.rb +76 -42
- data/spec/jobs/bulk_data_job_spec.rb +101 -102
- data/spec/jobs/ping_job_spec.rb +176 -177
- data/spec/jobs/source_job_spec.rb +24 -25
- data/spec/license_spec.rb +54 -55
- data/spec/models/js_base_spec.rb +121 -120
- data/spec/perf/bulk_data_perf_spec.rb +23 -24
- data/spec/perf/perf_spec_helper.rb +7 -7
- data/spec/perf/store_perf_spec.rb +139 -140
- data/spec/ping/apple_spec.rb +65 -65
- data/spec/ping/gcm_spec.rb +83 -84
- data/spec/ping/rhoconnect_push_spec.rb +52 -53
- data/spec/predefined_adapters/rho_internal_bench_adapter_controller_js_spec.rb +100 -101
- data/spec/predefined_adapters/rho_internal_js_bench_adapter_js_spec.rb +29 -31
- data/spec/read_state_spec.rb +24 -25
- data/spec/rhoconnect_spec.rb +7 -7
- data/spec/server/server_spec.rb +664 -662
- data/spec/server/stats_spec.rb +12 -12
- data/spec/source_adapter_spec.rb +124 -125
- data/spec/source_spec.rb +148 -149
- data/spec/source_sync_spec.rb +736 -736
- data/spec/spec_helper.rb +4 -5
- data/spec/stats/record_spec.rb +22 -21
- data/spec/store_orm_spec.rb +48 -48
- data/spec/store_spec.rb +428 -426
- data/spec/support/shared_examples.rb +5 -7
- data/spec/sync_states_spec.rb +67 -67
- data/spec/test_methods_spec.rb +121 -123
- data/spec/testdata/10000-data.txt +0 -0
- data/spec/testdata/5000-data.txt +0 -0
- data/spec/user_spec.rb +102 -102
- data/tasks/redis.rake +3 -3
- metadata +154 -195
- data/bench/benchapp/tmp/pids/passenger.9292.pid.lock +0 -0
- data/bench/benchapp/tmp/restart.txt +0 -0
- data/bench/blobapp/settings/license.key.bak +0 -2
- data/bench/blobapp/tmp/restart.txt +0 -0
- data/bench/lib/testdata/1-data.txt +0 -0
- data/bench/lib/testdata/10-data.txt +0 -0
- data/bench/lib/testdata/2-data.txt +0 -0
- data/bench/lib/testdata/250-data.txt +0 -0
- data/bench/lib/testdata/5-blob_data.txt +0 -0
- data/bench/lib/testdata/5-data.txt +0 -0
- data/bench/lib/testdata/50-data.txt +0 -0
- data/bench/lib/testdata/500-data.txt +0 -0
- data/doc/protocol.html +0 -1993
- data/spec/coverage/rcov/assets/0.2.3/jquery-1.3.2.min.js +0 -19
- data/spec/coverage/rcov/assets/0.2.3/jquery.tablesorter.min.js +0 -15
- data/spec/coverage/rcov/assets/0.2.3/print.css +0 -12
- data/spec/coverage/rcov/assets/0.2.3/rcov.js +0 -42
- data/spec/coverage/rcov/assets/0.2.3/screen.css +0 -270
- data/spec/coverage/rcov/index.html +0 -88
- data/spec/generator/generator_spec_helper.rb +0 -9
@@ -5,107 +5,106 @@ require File.join(File.dirname(__FILE__),'..','..','lib','rhoconnect','server.rb
|
|
5
5
|
describe "Rhoconnect::RhoInternalJsBenchAdapterController" do
|
6
6
|
include Rack::Test::Methods
|
7
7
|
include Rhoconnect
|
8
|
+
include_examples "SharedRhoconnectHelper", :rhoconnect_data => true
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
body[4]["total_count"].should == 0
|
109
|
-
end
|
10
|
+
def app
|
11
|
+
@app ||= Rack::URLMap.new Rhoconnect.url_map
|
12
|
+
end
|
13
|
+
|
14
|
+
before(:each) do
|
15
|
+
Rhoconnect::Server.set :environment, :test
|
16
|
+
Rhoconnect::Server.set :secret, "secure!"
|
17
|
+
Rhoconnect.use_node = true
|
18
|
+
Rhoconnect.bootstrap(get_testapp_path)
|
19
|
+
do_post "/rc/#{Rhoconnect::API_VERSION}/app/login", "login" => @u.login, "password" => 'testpass'
|
20
|
+
end
|
21
|
+
|
22
|
+
after(:each) do
|
23
|
+
Rhoconnect::Store.flush_all
|
24
|
+
Rhoconnect::Node.kill_process
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should call query method" do
|
28
|
+
get '/app/v1/RhoInternalJsBenchAdapter', {}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
29
|
+
last_response.should be_ok
|
30
|
+
body = JSON.parse(last_response.body)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should call create method" do
|
34
|
+
hsh = {'create'=>{'1'=>{'mockId'=>'1','name'=>'testname','price'=>'$199'}}}
|
35
|
+
post '/app/v1/RhoInternalJsBenchAdapter', hsh,{Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
36
|
+
last_response.should be_ok
|
37
|
+
|
38
|
+
get '/app/v1/RhoInternalJsBenchAdapter', {}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
39
|
+
body = JSON.parse(last_response.body)
|
40
|
+
body[5]["insert"]["mockId"]["mockId"].should == "1"
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should call update method" do
|
44
|
+
get '/app/v1/RhoInternalJsBenchAdapter', {}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
45
|
+
body = JSON.parse(last_response.body)
|
46
|
+
body[4]["total_count"].should == 0
|
47
|
+
|
48
|
+
hsh = {'create'=>{'1'=>{'mockId'=>'1','name'=>'testname','price'=>'$199'}}}
|
49
|
+
post '/app/v1/RhoInternalJsBenchAdapter', hsh,{Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
50
|
+
last_response.should be_ok
|
51
|
+
|
52
|
+
get '/app/v1/RhoInternalJsBenchAdapter', {}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
53
|
+
body = JSON.parse(last_response.body)
|
54
|
+
token = last_response.headers["X-Rhoconnect-PAGE-TOKEN"]
|
55
|
+
count = body[4]["total_count"]
|
56
|
+
count.should == 1
|
57
|
+
|
58
|
+
get '/app/v1/RhoInternalJsBenchAdapter', {:token=>token}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
59
|
+
body = JSON.parse(last_response.body)
|
60
|
+
count = body[4]["total_count"]
|
61
|
+
count.should == 1
|
62
|
+
|
63
|
+
hsh = {'update'=>{'mockId'=>'1','name'=>'updatename'}}
|
64
|
+
put '/app/v1/RhoInternalJsBenchAdapter/mockId',hsh, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
65
|
+
last_response.should be_ok
|
66
|
+
|
67
|
+
get '/app/v1/RhoInternalJsBenchAdapter', {}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
68
|
+
body = JSON.parse(last_response.body)
|
69
|
+
puts "body is #{body}"
|
70
|
+
token = last_response.headers["X-Rhoconnect-PAGE-TOKEN"]
|
71
|
+
#body[5]["insert"]["mockId"]["name"].should == "updatename"
|
72
|
+
|
73
|
+
get '/app/v1/RhoInternalJsBenchAdapter', {:token=>token}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
74
|
+
body = JSON.parse(last_response.body)
|
75
|
+
puts "body is #{body}"
|
76
|
+
last_response.should be_ok
|
77
|
+
end
|
78
|
+
|
79
|
+
it "should call delete method" do
|
80
|
+
get '/app/v1/RhoInternalJsBenchAdapter', {}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
81
|
+
body = JSON.parse(last_response.body)
|
82
|
+
body[4]["total_count"].should == 0
|
83
|
+
|
84
|
+
hsh = {'create'=>{'1'=>{'mockId'=>'1','name'=>'testname','price'=>'$199'}}}
|
85
|
+
post '/app/v1/RhoInternalJsBenchAdapter', hsh,{Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
86
|
+
last_response.should be_ok
|
87
|
+
|
88
|
+
get '/app/v1/RhoInternalJsBenchAdapter', {}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
89
|
+
body = JSON.parse(last_response.body)
|
90
|
+
token = last_response.headers["X-Rhoconnect-PAGE-TOKEN"]
|
91
|
+
count = body[4]["total_count"]
|
92
|
+
count.should == 1
|
93
|
+
|
94
|
+
get '/app/v1/RhoInternalJsBenchAdapter', {:token => token}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
95
|
+
body = JSON.parse(last_response.body)
|
96
|
+
count = body[4]["total_count"]
|
97
|
+
count.should == 1
|
98
|
+
|
99
|
+
delete '/app/v1/RhoInternalJsBenchAdapter/1',{}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
100
|
+
last_response.should be_ok
|
101
|
+
|
102
|
+
get '/app/v1/RhoInternalJsBenchAdapter', {}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
103
|
+
body = JSON.parse(last_response.body)
|
104
|
+
token = last_response.headers["X-Rhoconnect-PAGE-TOKEN"]
|
105
|
+
|
106
|
+
get '/app/v1/RhoInternalJsBenchAdapter', {:token => token}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
107
|
+
body = JSON.parse(last_response.body)
|
108
|
+
body[4]["total_count"].should == 0
|
110
109
|
end
|
111
110
|
end
|
@@ -3,42 +3,40 @@ require File.join(File.dirname(__FILE__),'..','..','lib','rhoconnect','server.rb
|
|
3
3
|
|
4
4
|
describe "Rhoconnect::RhoInternalJsBenchAdapter" do
|
5
5
|
include Rhoconnect
|
6
|
+
include_examples "SharedRhoconnectHelper", :rhoconnect_data => true
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
end
|
14
|
-
|
15
|
-
def app
|
16
|
-
@app ||= Rack::URLMap.new Rhoconnect.url_map
|
17
|
-
end
|
8
|
+
before(:each) do
|
9
|
+
Rhoconnect::Server.set :environment, :test
|
10
|
+
Rhoconnect::Server.set :secret, "secure!"
|
11
|
+
Rhoconnect.use_node = true
|
12
|
+
Rhoconnect.bootstrap(get_testapp_path)
|
13
|
+
end
|
18
14
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
#Source.valid_doctypes.delete('tmpdoc'.to_sym)
|
23
|
-
end
|
15
|
+
def app
|
16
|
+
@app ||= Rack::URLMap.new Rhoconnect.url_map
|
17
|
+
end
|
24
18
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
19
|
+
after(:each) do
|
20
|
+
Rhoconnect::Store.flush_all
|
21
|
+
Rhoconnect::Node.kill_process
|
22
|
+
#Source.valid_doctypes.delete('tmpdoc'.to_sym)
|
23
|
+
end
|
30
24
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
25
|
+
it "should call login method from model" do
|
26
|
+
rho_int = RhoInternalJsBenchAdapter.new(Source.load('RhoInternalJsBenchAdapter', {:app_id => @a.id, :user_id => @u.id}))
|
27
|
+
res = rho_int.login
|
28
|
+
res.should == true
|
29
|
+
end
|
36
30
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
31
|
+
it "should call logoff method from model" do
|
32
|
+
rho_int = RhoInternalJsBenchAdapter.new(Source.load('RhoInternalJsBenchAdapter', {:app_id => @a.id, :user_id => @u.id}))
|
33
|
+
res = rho_int.logoff
|
34
|
+
res.should == true
|
35
|
+
end
|
42
36
|
|
37
|
+
it "should call query method from model" do
|
38
|
+
rho_int = RhoInternalJsBenchAdapter.new(Source.load('RhoInternalJsBenchAdapter', {:app_id => @a.id, :user_id => @u.id}))
|
39
|
+
res = rho_int.query
|
40
|
+
res.should == true
|
43
41
|
end
|
44
42
|
end
|
data/spec/read_state_spec.rb
CHANGED
@@ -1,34 +1,33 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__),'spec_helper')
|
2
2
|
|
3
3
|
describe "ReadState" do
|
4
|
-
|
5
|
-
it "should create refresh with correct id" do
|
6
|
-
@r.id.should == "#{@a_fields[:name]}:#{@u_fields[:login]}:#{@s_fields[:name]}"
|
7
|
-
end
|
4
|
+
include_examples "SharedRhoconnectHelper", :rhoconnect_data => false
|
8
5
|
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
it "should create refresh with correct id" do
|
7
|
+
@r.id.should == "#{@a_fields[:name]}:#{@u_fields[:login]}:#{@s_fields[:name]}"
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should create refresh with default fields" do
|
11
|
+
@r.refresh_time.should <= Time.now.to_i
|
12
|
+
end
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
it "should load refresh with params" do
|
15
|
+
@r1 = ReadState.load(:app_id => @a_fields[:name],
|
16
|
+
:user_id => @u_fields[:login],:source_name => @s_fields[:name])
|
17
|
+
@r1.refresh_time.should <= Time.now.to_i
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should delete read_state from db" do
|
21
|
+
ReadState.delete(@a_fields[:name])
|
22
|
+
Store.keys("read_state*").should == []
|
23
|
+
end
|
18
24
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
it "should delete read_state from source" do
|
25
|
-
time = Time.now.to_i
|
26
|
-
@s.read_state.refresh_time = time
|
27
|
-
@s.load_read_state.refresh_time.should == time
|
25
|
+
it "should delete read_state from source" do
|
26
|
+
time = Time.now.to_i
|
27
|
+
@s.read_state.refresh_time = time
|
28
|
+
@s.load_read_state.refresh_time.should == time
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
end
|
32
|
-
|
30
|
+
@s.delete_user_read_state
|
31
|
+
@s.load_read_state.should == nil
|
33
32
|
end
|
34
33
|
end
|
data/spec/rhoconnect_spec.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__),'spec_helper')
|
2
2
|
|
3
3
|
describe "Rhoconnect" do
|
4
|
-
include TestHelpers
|
5
|
-
let(:test_app_name) { 'application' }
|
4
|
+
include TestHelpers
|
5
|
+
let(:test_app_name) { 'application' }
|
6
6
|
|
7
|
-
before(:each) do
|
7
|
+
before(:each) do
|
8
8
|
Store.create
|
9
9
|
Store.flush_all
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
it "should bootstrap Rhoconnect with block" do
|
13
13
|
Rhoconnect.bootstrap(get_testapp_path) do |rhoconnect|
|
14
14
|
rhoconnect.vendor_directory = 'foo'
|
@@ -31,7 +31,7 @@ describe "Rhoconnect" do
|
|
31
31
|
Rhoconnect.environment.should == :production
|
32
32
|
ENV.delete('RHO_ENV')
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
it "should bootstrap Rhoconnect with RACK_ENV provided" do
|
36
36
|
env = ENV['RACK_ENV'].dup
|
37
37
|
ENV['RACK_ENV'] = 'production'
|
@@ -39,7 +39,7 @@ describe "Rhoconnect" do
|
|
39
39
|
Rhoconnect.environment.should == :production
|
40
40
|
ENV['RACK_ENV'] = env
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
it "should bootstrap with existing app" do
|
44
44
|
app = App.create(:name => test_app_name)
|
45
45
|
App.should_receive(:load).once.with(test_app_name).and_return(app)
|
@@ -57,7 +57,7 @@ describe "Rhoconnect" do
|
|
57
57
|
config[:sources]['FixedSchemaAdapter'].merge!(
|
58
58
|
'schema' => {'property' => 'foo'}
|
59
59
|
)
|
60
|
-
Rhoconnect.stub
|
60
|
+
Rhoconnect.stub(:get_config).and_return(config)
|
61
61
|
Rhoconnect.should_receive(:log).once.with(
|
62
62
|
"ERROR: 'schema' field in settings.yml is not supported anymore, please use source adapter schema method!"
|
63
63
|
)
|