rhoconnect 4.0.1 → 4.0.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.
- checksums.yaml +15 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +18 -15
- data/commands/redis/redis_download.rb +1 -1
- data/generators/rhoconnect.rb +1 -4
- data/install.sh +2 -2
- data/installer/unix-like/rho_connect_install_constants.rb +4 -4
- data/installer/unix-like/rho_connect_install_dnd.rb +3 -2
- data/installer/utils/constants.rb +1 -1
- data/lib/rhoconnect/version.rb +1 -1
- data/lib/rhoconnect.rb +10 -9
- data/spec/api/source/list_sources_spec.rb +4 -4
- data/spec/app_spec.rb +4 -4
- data/spec/apps/rhotestapp/settings/settings.yml +2 -0
- data/spec/bulk_data/bulk_data_spec.rb +9 -9
- data/spec/controllers/js_base_spec.rb +7 -3
- data/spec/models/js_base_spec.rb +5 -0
- data/spec/server/server_spec.rb +1 -0
- data/tasks/redis.rake +1 -1
- metadata +5 -34
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
MGVhZjA5YWI2N2I0ZGJkY2FmZWI4ZGU3NTIzYWRjM2EwYTJlNWJjNA==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
ZmY5Zjc1NjVlZTkwMDg0MTZmMDA1OGI3YWYwNWFmYzc3YTg0Yzg5OQ==
|
|
7
|
+
SHA512:
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
NTk2NzIwNjQ0ZDg1NmUyZjYyMzVhNTRkZGJjZWY3Mzg2MmE5ODhmNWIzNTM4
|
|
10
|
+
OWEyZjgzNTYzODQyN2NlNzRjNGJmYjYwNDk4Zjg4MDRhODY2MmY4MDY5ZDll
|
|
11
|
+
MDdjZDBhMzhlZWE3MTY0NTcxYjQwOTk3N2U2MDE3MzgzNjBjNzY=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
MzJlYzVkY2QzYjU3NGFjYWIyMDZiYWJiYmVkN2VjMjczNWU3OGY1MGI1NjNh
|
|
14
|
+
OGJlZDQ4ZjJhZWVhNzhhYjRjYjg2ZjczYzQyMmM0MzY4MjBhZTAwYTdhOTk1
|
|
15
|
+
MjBlMGNlODAzOGY5ZWRlYjVhM2EzNzEzZDRiYTM5ZGYwMjg1N2Y=
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## 4.0.2 (2013-12-06)
|
|
2
|
+
* Fixed npm installation failure in rhoconnect generator for js apps with JRuby
|
|
3
|
+
* Per-source settings for JS adapters (#60477032)
|
|
4
|
+
* Update production stack to ruby-1.9.3-p484, redis-2.6.16, node v0.10.22, and nginx-1.4.4.
|
|
5
|
+
|
|
1
6
|
## 4.0.1 (2013-10-29)
|
|
2
7
|
* fixed issue with loading JS Store api from controller context
|
|
3
8
|
* spelling mistakes in docs
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rhoconnect (4.0.
|
|
4
|
+
rhoconnect (4.0.2)
|
|
5
5
|
bundler (~> 1.0)
|
|
6
6
|
connection_pool (~> 1.0.0)
|
|
7
7
|
json (~> 1.7.7)
|
|
@@ -32,7 +32,7 @@ GEM
|
|
|
32
32
|
cabin (0.6.1)
|
|
33
33
|
childprocess (0.3.9)
|
|
34
34
|
ffi (~> 1.0, >= 1.0.11)
|
|
35
|
-
clamp (0.6.
|
|
35
|
+
clamp (0.6.3)
|
|
36
36
|
coffee-script (2.2.0)
|
|
37
37
|
coffee-script-source
|
|
38
38
|
execjs
|
|
@@ -42,12 +42,13 @@ GEM
|
|
|
42
42
|
safe_yaml (~> 0.9.0)
|
|
43
43
|
daemons (1.1.9)
|
|
44
44
|
diff-lcs (1.1.3)
|
|
45
|
+
docile (1.1.1)
|
|
45
46
|
eventmachine (1.0.3)
|
|
46
47
|
excon (0.22.1)
|
|
47
48
|
execjs (2.0.2)
|
|
48
49
|
extlib (0.9.16)
|
|
49
50
|
ffaker (1.14.0)
|
|
50
|
-
ffi (1.9.
|
|
51
|
+
ffi (1.9.3)
|
|
51
52
|
fog (1.11.1)
|
|
52
53
|
builder
|
|
53
54
|
excon (~> 0.20)
|
|
@@ -59,15 +60,16 @@ GEM
|
|
|
59
60
|
nokogiri (~> 1.5.0)
|
|
60
61
|
ruby-hmac
|
|
61
62
|
formatador (0.2.4)
|
|
62
|
-
fpm (0.
|
|
63
|
+
fpm (1.0.0)
|
|
63
64
|
arr-pm (~> 0.0.8)
|
|
64
65
|
backports (>= 2.6.2)
|
|
65
66
|
cabin (>= 0.6.0)
|
|
66
67
|
childprocess
|
|
67
68
|
clamp (~> 0.6)
|
|
69
|
+
ffi
|
|
68
70
|
ftw (~> 0.0.30)
|
|
69
71
|
json (>= 1.7.7)
|
|
70
|
-
ftw (0.0.
|
|
72
|
+
ftw (0.0.37)
|
|
71
73
|
addressable
|
|
72
74
|
backports (>= 2.6.2)
|
|
73
75
|
cabin (> 0)
|
|
@@ -103,9 +105,9 @@ GEM
|
|
|
103
105
|
rack (>= 1.0)
|
|
104
106
|
rainbow (1.1.4)
|
|
105
107
|
rake (10.0.4)
|
|
106
|
-
redis (3.0.
|
|
107
|
-
redis-namespace (1.
|
|
108
|
-
redis (~> 3.0.
|
|
108
|
+
redis (3.0.6)
|
|
109
|
+
redis-namespace (1.4.1)
|
|
110
|
+
redis (~> 3.0.4)
|
|
109
111
|
resque (1.25.1)
|
|
110
112
|
mono_logger (~> 1.0)
|
|
111
113
|
multi_json (~> 1.0)
|
|
@@ -130,17 +132,18 @@ GEM
|
|
|
130
132
|
multi_json (~> 1.0)
|
|
131
133
|
rubyzip (< 1.0.0)
|
|
132
134
|
websocket (~> 1.0.4)
|
|
133
|
-
simplecov (0.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
simplecov (0.8.2)
|
|
136
|
+
docile (~> 1.1.0)
|
|
137
|
+
multi_json
|
|
138
|
+
simplecov-html (~> 0.8.0)
|
|
139
|
+
simplecov-html (0.8.0)
|
|
137
140
|
simplecov-rcov (0.2.3)
|
|
138
141
|
simplecov (>= 0.4.1)
|
|
139
142
|
sinatra (1.4.4)
|
|
140
143
|
rack (~> 1.4)
|
|
141
144
|
rack-protection (~> 1.4)
|
|
142
145
|
tilt (~> 1.3, >= 1.3.4)
|
|
143
|
-
sprockets (2.10.
|
|
146
|
+
sprockets (2.10.1)
|
|
144
147
|
hike (~> 1.2)
|
|
145
148
|
multi_json (~> 1.0)
|
|
146
149
|
rack (~> 1.0)
|
|
@@ -150,10 +153,10 @@ GEM
|
|
|
150
153
|
diff-lcs (>= 1.1.2)
|
|
151
154
|
extlib (>= 0.9.5)
|
|
152
155
|
highline (>= 1.4.0)
|
|
153
|
-
thin (1.6.
|
|
156
|
+
thin (1.6.1)
|
|
154
157
|
daemons (>= 1.0.9)
|
|
155
158
|
eventmachine (>= 1.0.0)
|
|
156
|
-
rack (>= 1.
|
|
159
|
+
rack (>= 1.0.0)
|
|
157
160
|
thor (0.18.1)
|
|
158
161
|
tilt (1.4.1)
|
|
159
162
|
vegas (0.1.11)
|
data/generators/rhoconnect.rb
CHANGED
|
@@ -126,7 +126,6 @@ _RUN_BUNDLER
|
|
|
126
126
|
|
|
127
127
|
gem_name, gem_ver_reqs = 'rhoconnect', gem_version
|
|
128
128
|
found_gspec = Gem::Specification.find_by_name(gem_name, gem_ver_reqs)
|
|
129
|
-
puts found_gspec
|
|
130
129
|
if found_gspec
|
|
131
130
|
puts running_bundler_first_time
|
|
132
131
|
system("bundle install --gemfile=#{destination_root}/#{name}/Gemfile")
|
|
@@ -183,9 +182,7 @@ rhoconnect application are available execute these commands:
|
|
|
183
182
|
|
|
184
183
|
_NPM_INSTALL_
|
|
185
184
|
puts npm_install_note
|
|
186
|
-
|
|
187
|
-
system("npm install")
|
|
188
|
-
FileUtils.chdir('..')
|
|
185
|
+
Dir.chdir(name) { system("npm install") }
|
|
189
186
|
end
|
|
190
187
|
end
|
|
191
188
|
|
data/install.sh
CHANGED
|
@@ -263,10 +263,10 @@ rubyVersion=""
|
|
|
263
263
|
rubyBinDir=""
|
|
264
264
|
|
|
265
265
|
# Define ruby and nodejs versions to be installed ...
|
|
266
|
-
RUBY_PATCH="
|
|
266
|
+
RUBY_PATCH="p484"
|
|
267
267
|
RUBY_VERSION="ruby-1.9.3-${RUBY_PATCH}"
|
|
268
268
|
|
|
269
|
-
NODE_VERSION=v0.10.
|
|
269
|
+
NODE_VERSION=v0.10.22
|
|
270
270
|
NODE_URL=http://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}.tar.gz
|
|
271
271
|
ARCH=$([[ `uname -m` == x86_64 ]] && echo "x64" || echo "x86")
|
|
272
272
|
NODE_BIN_URL=http://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-${ARCH}.tar.gz
|
|
@@ -8,15 +8,15 @@ module Constants
|
|
|
8
8
|
"libaprutil1-dev",
|
|
9
9
|
"dtach"]
|
|
10
10
|
|
|
11
|
-
RUBY = "ruby-1.9.3-
|
|
12
|
-
REDIS = "redis-2.6.
|
|
11
|
+
RUBY = "ruby-1.9.3-p484"
|
|
12
|
+
REDIS = "redis-2.6.16"
|
|
13
13
|
SQLITE3 = "sqlite-autoconf-3071502"
|
|
14
|
-
NGINX = "nginx-1.4.
|
|
14
|
+
NGINX = "nginx-1.4.4"
|
|
15
15
|
PASSENGER_ROOT = "/opt/rhoconnect/lib/ruby/gems/1.9.1/gems/passenger"
|
|
16
16
|
|
|
17
17
|
SOFTWARE = [ REDIS, SQLITE3, RUBY, NGINX ]
|
|
18
18
|
|
|
19
|
-
REDIS_URL = "http://redis.
|
|
19
|
+
REDIS_URL = "http://download.redis.io/releases/#{REDIS}.tar.gz"
|
|
20
20
|
SQLITE3_URL = "http://www.sqlite.org/#{SQLITE3}.tar.gz"
|
|
21
21
|
NGINX_URL = "http://nginx.org/download/#{NGINX}.tar.gz"
|
|
22
22
|
URLS = [ REDIS_URL, SQLITE3_URL, NGINX_URL]
|
|
@@ -14,12 +14,13 @@ module DownloadAndDocompress
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
# wget_download
|
|
17
|
-
# Takes a URL and the name of a tarball and issues a wget command on said
|
|
17
|
+
# Takes a URL and the name of a tarball and issues a wget command on said
|
|
18
18
|
# URL unless the tarball or directory already exists
|
|
19
19
|
def wget_download(prefix, url)
|
|
20
20
|
if !File.exists?("#{ prefix }/#{ get_tarball_name url }") &&
|
|
21
21
|
!File.directory?("#{ prefix }/#{ get_version url }")
|
|
22
22
|
cmd "wget -P #{prefix} #{url} -o /dev/null"
|
|
23
|
+
raise "ERROR: #{url} not found" if $? != 0
|
|
23
24
|
end
|
|
24
25
|
end
|
|
25
26
|
|
|
@@ -31,7 +32,7 @@ module DownloadAndDocompress
|
|
|
31
32
|
dir = get_version(url)
|
|
32
33
|
cmd "tar -xzf #{prefix}/#{tarball} -C #{prefix} > /dev/null 2>&1" unless File.directory? "#{prefix}/#{dir}"
|
|
33
34
|
end #decompress
|
|
34
|
-
|
|
35
|
+
|
|
35
36
|
# get_version
|
|
36
37
|
# This method extracts the untarballed name of files retrieved via wget
|
|
37
38
|
# from their URL
|
|
@@ -17,7 +17,7 @@ module Constants
|
|
|
17
17
|
:key_name => 'jenkinskey',
|
|
18
18
|
:groups => 'load-test',
|
|
19
19
|
:user => 'ubuntu'}
|
|
20
|
-
CENTOS5_STACK = { :image_id => 'ami-
|
|
20
|
+
CENTOS5_STACK = { :image_id => 'ami-1a7d4d5f', # jenkins-centos-5.9-test-image
|
|
21
21
|
:tags => {'Name' => 'CentOS-5.9'},
|
|
22
22
|
:flavor_id => 'c1.xlarge',
|
|
23
23
|
:key_name => 'jenkinskey',
|
data/lib/rhoconnect/version.rb
CHANGED
data/lib/rhoconnect.rb
CHANGED
|
@@ -160,8 +160,17 @@ _MIGRATE_TO_NEW_RHOCONNECT
|
|
|
160
160
|
end
|
|
161
161
|
# load all pre-defined adapters files
|
|
162
162
|
Dir[File.join(File.dirname(__FILE__),'rhoconnect','predefined_adapters','*.rb')].each { |adapter| load adapter }
|
|
163
|
-
# load all Ruby Controller files
|
|
163
|
+
# load all Ruby Controller & Model files
|
|
164
164
|
Dir[File.join(Rhoconnect.app_directory,'controllers','ruby','*.rb')].each { |controller_file| require controller_file }
|
|
165
|
+
Dir[File.join(Rhoconnect.app_directory,'{sources,models}','**','*.rb')].each do |adapter_file|
|
|
166
|
+
base_file = File.basename(adapter_file, '.*')
|
|
167
|
+
klazz = camelize(base_file)
|
|
168
|
+
require adapter_file
|
|
169
|
+
unless Object.const_defined?("#{klazz}Controller")
|
|
170
|
+
# add to url map
|
|
171
|
+
Rhoconnect::Controller::SourceAdapterBase.register_controller(klazz)
|
|
172
|
+
end
|
|
173
|
+
end
|
|
165
174
|
|
|
166
175
|
# TODO: process sources not only from setting.yml file
|
|
167
176
|
if config and config[Rhoconnect.environment]
|
|
@@ -174,14 +183,6 @@ _MIGRATE_TO_NEW_RHOCONNECT
|
|
|
174
183
|
source_config[:name] = source_name
|
|
175
184
|
Source.create(source_config,{:app_id => app.name})
|
|
176
185
|
app.sources << source_name
|
|
177
|
-
# check if RubyController class already exists
|
|
178
|
-
unless Object.const_defined?("#{source_name}Controller")
|
|
179
|
-
# add to url map
|
|
180
|
-
Rhoconnect::Controller::SourceAdapterBase.register_controller(source_name)
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# load ruby file for source adapter to re-load class
|
|
184
|
-
load under_score(source_name+'.rb')
|
|
185
186
|
end
|
|
186
187
|
end
|
|
187
188
|
|
|
@@ -4,8 +4,8 @@ describe "RhoconnectApiListSources" do
|
|
|
4
4
|
it_should_behave_like "ApiHelper" do
|
|
5
5
|
it "should list all application sources using partition_type param" do
|
|
6
6
|
get "/rc/#{Rhoconnect::API_VERSION}/sources/type/all", {}, {Rhoconnect::API_TOKEN_HEADER => @api_token}
|
|
7
|
-
JSON.parse(last_response.body).sort.should == ["SimpleAdapter", "SampleAdapter", "FixedSchemaAdapter", "OtherAdapter"].sort
|
|
8
|
-
|
|
7
|
+
JSON.parse(last_response.body).sort.should == ["SimpleAdapter", "SampleAdapter", "FixedSchemaAdapter", "OtherAdapter", "JsSample"].sort
|
|
8
|
+
end
|
|
9
9
|
|
|
10
10
|
it "should list app partition sources" do
|
|
11
11
|
get "/rc/#{Rhoconnect::API_VERSION}/sources/type/app", {}, {Rhoconnect::API_TOKEN_HEADER => @api_token}
|
|
@@ -14,7 +14,7 @@ describe "RhoconnectApiListSources" do
|
|
|
14
14
|
|
|
15
15
|
it "should list user partition sources" do
|
|
16
16
|
get "/rc/#{Rhoconnect::API_VERSION}/sources/type/user", {}, {Rhoconnect::API_TOKEN_HEADER => @api_token}
|
|
17
|
-
JSON.parse(last_response.body).sort.should == ["SampleAdapter", "FixedSchemaAdapter"].sort
|
|
17
|
+
JSON.parse(last_response.body).sort.should == ["SampleAdapter", "FixedSchemaAdapter", "JsSample"].sort
|
|
18
18
|
end
|
|
19
|
-
end
|
|
19
|
+
end
|
|
20
20
|
end
|
data/spec/app_spec.rb
CHANGED
|
@@ -11,14 +11,14 @@ describe "App" do
|
|
|
11
11
|
|
|
12
12
|
it "should add source adapters" do
|
|
13
13
|
@a1 = App.load(@a_fields[:name])
|
|
14
|
-
@a1.sources.sort.should == ["FixedSchemaAdapter", "OtherAdapter", "SampleAdapter", "SimpleAdapter"]
|
|
14
|
+
@a1.sources.sort.should == ["FixedSchemaAdapter", "JsSample", "OtherAdapter", "SampleAdapter", "SimpleAdapter"]
|
|
15
15
|
end
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
it "should force environment default and override setting" do
|
|
18
18
|
poll_interval_default = Rhoconnect.source_config('OtherAdapter')[:poll_interval]
|
|
19
19
|
poll_interval_default.should == 201
|
|
20
20
|
poll_interval_override = Rhoconnect.source_config('SimpleAdapter')[:poll_interval]
|
|
21
21
|
poll_interval_override.should == 600
|
|
22
|
-
end
|
|
23
|
-
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
24
|
end
|
|
@@ -6,7 +6,7 @@ describe "BulkData" do
|
|
|
6
6
|
@s = Source.load(@s_fields[:name],@s_params)
|
|
7
7
|
@s1 = Source.load(@s1_fields[:name], @s_params)
|
|
8
8
|
end
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
after(:each) do
|
|
11
11
|
delete_data_directory
|
|
12
12
|
end
|
|
@@ -18,7 +18,7 @@ describe "BulkData" do
|
|
|
18
18
|
:app_id => @a.id,
|
|
19
19
|
:user_id => @u.id,
|
|
20
20
|
:sources => [@s_fields[:name]])
|
|
21
|
-
data.dbfile = dbfile
|
|
21
|
+
data.dbfile = dbfile
|
|
22
22
|
data.completed?.should == true
|
|
23
23
|
end
|
|
24
24
|
|
|
@@ -49,7 +49,7 @@ describe "BulkData" do
|
|
|
49
49
|
|
|
50
50
|
it "should enqueue sqlite db type" do
|
|
51
51
|
BulkData.enqueue
|
|
52
|
-
Resque.peek(:bulk_data).should == {"args"=>[{}],
|
|
52
|
+
Resque.peek(:bulk_data).should == {"args"=>[{}],
|
|
53
53
|
"class"=>"Rhoconnect::BulkDataJob"}
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -58,7 +58,7 @@ describe "BulkData" do
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
it "should generate correct bulk data name for app partition" do
|
|
61
|
-
BulkData.get_name(:app,@c.user_id).should ==
|
|
61
|
+
BulkData.get_name(:app,@c.user_id).should ==
|
|
62
62
|
File.join(@a_fields[:name],@a_fields[:name])
|
|
63
63
|
end
|
|
64
64
|
|
|
@@ -68,10 +68,10 @@ describe "BulkData" do
|
|
|
68
68
|
:app_id => @a.id,
|
|
69
69
|
:user_id => @u.id,
|
|
70
70
|
:sources => @a.partition_sources(:user, @u.id))
|
|
71
|
-
|
|
72
|
-
data.sources[0, -1].should == ["SampleAdapter", "FixedSchemaAdapter"]
|
|
73
|
-
p1 = Source.load("SampleAdapter", {:app_id => data.app_id, :user_id => data.user_id}).priority
|
|
74
|
-
p2 = Source.load("
|
|
71
|
+
|
|
72
|
+
data.sources[0, -1].should == ["SampleAdapter", "JsSample", "FixedSchemaAdapter"]
|
|
73
|
+
p1 = Source.load("SampleAdapter", {:app_id => data.app_id, :user_id => data.user_id}).priority
|
|
74
|
+
p2 = Source.load("JsSample", {:app_id => data.app_id, :user_id => data.user_id}).priority
|
|
75
75
|
p1.should < p2
|
|
76
76
|
end
|
|
77
77
|
|
|
@@ -87,7 +87,7 @@ describe "BulkData" do
|
|
|
87
87
|
@s.read_state.refresh_time.should > current + @s_fields[:poll_interval].to_i
|
|
88
88
|
@s1.read_state.refresh_time.should > current + @s1_fields[:poll_interval].to_i
|
|
89
89
|
end
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
it "should process specific sources for bulk data" do
|
|
92
92
|
current = Time.now.to_i
|
|
93
93
|
@s.read_state.refresh_time = current
|
|
@@ -29,9 +29,13 @@ describe "Rhoconnect::Controller::JsBase" do
|
|
|
29
29
|
Rhoconnect.bootstrap(get_testapp_path)
|
|
30
30
|
end
|
|
31
31
|
# reload ruby controllers
|
|
32
|
-
Dir[File.join(Rhoconnect.app_directory,'controllers','ruby','*.rb')].each do |controller_file|
|
|
32
|
+
Dir[File.join(Rhoconnect.app_directory,'controllers','ruby','*.rb')].each do |controller_file|
|
|
33
33
|
load controller_file
|
|
34
34
|
end
|
|
35
|
+
# reload ruby models
|
|
36
|
+
Dir[File.join(Rhoconnect.app_directory,'models','ruby','*.rb')].each do |model_file|
|
|
37
|
+
load model_file
|
|
38
|
+
end
|
|
35
39
|
end
|
|
36
40
|
|
|
37
41
|
describe "ApplicationController" do
|
|
@@ -119,12 +123,12 @@ describe "Rhoconnect::Controller::JsBase" do
|
|
|
119
123
|
:blob_fields => ['txtfile-rhoblob']}.to_json
|
|
120
124
|
post "/app/#{Rhoconnect::API_VERSION}/JsSample",
|
|
121
125
|
{:cud => cud,'txtfile-rhoblob-1' =>
|
|
122
|
-
Rack::Test::UploadedFile.new(File.join(File.dirname(__FILE__),'..','testdata',file1), "application/octet-stream")},
|
|
126
|
+
Rack::Test::UploadedFile.new(File.join(File.dirname(__FILE__),'..','testdata',file1), "application/octet-stream")},
|
|
123
127
|
{Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
|
124
128
|
last_response.should be_ok
|
|
125
129
|
get "/app/#{Rhoconnect::API_VERSION}/JsSample", {}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
|
126
130
|
json = JSON.parse(last_response.body)
|
|
127
|
-
json[5]['links'].should == { "1" => { "l" => "blob_created" } }
|
|
131
|
+
json[5]['links'].should == { "1" => { "l" => "blob_created" } }
|
|
128
132
|
json[5]['delete'].should == { "blob_created" => { "name" => "hello", "txtfile-rhoblob" => "blob_created" } }
|
|
129
133
|
end
|
|
130
134
|
|
data/spec/models/js_base_spec.rb
CHANGED
|
@@ -21,6 +21,11 @@ describe "Rhoconnect::Model::JsBase" do
|
|
|
21
21
|
Source.valid_doctypes.delete('tmpdoc'.to_sym)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
it "should load settings for model" do
|
|
25
|
+
@s = Source.load('JsSample', {:app_id => @a.id, :user_id => @u.id})
|
|
26
|
+
@s.poll_interval.should == 100
|
|
27
|
+
end
|
|
28
|
+
|
|
24
29
|
it "should call js model method explicitly" do
|
|
25
30
|
js = JsSample.new(Source.load('JsSample', {:app_id => @a.id, :user_id => @u.id}))
|
|
26
31
|
res = js.login
|
data/spec/server/server_spec.rb
CHANGED
|
@@ -638,6 +638,7 @@ describe "Server" do
|
|
|
638
638
|
|
|
639
639
|
it "should receive url when bulk data is available" do
|
|
640
640
|
set_state('test_db_storage' => @data)
|
|
641
|
+
@a.sources.delete('JsSample')
|
|
641
642
|
post "/rc/#{Rhoconnect::API_VERSION}/app/bulk_data", {:partition => :user}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
|
642
643
|
do_bulk_data_job("data_name" => bulk_data_docname(@a.id,@u.id))
|
|
643
644
|
post "/rc/#{Rhoconnect::API_VERSION}/app/bulk_data", {:partition => :user}, {Rhoconnect::CLIENT_ID_HEADER => @c.id}
|
data/tasks/redis.rake
CHANGED
metadata
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rhoconnect
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 4.0.2
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Rhomobile
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
11
|
+
date: 2013-12-06 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: bundler
|
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
none: false
|
|
18
16
|
requirements:
|
|
19
17
|
- - ~>
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
@@ -22,7 +20,6 @@ dependencies:
|
|
|
22
20
|
type: :runtime
|
|
23
21
|
prerelease: false
|
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
-
none: false
|
|
26
23
|
requirements:
|
|
27
24
|
- - ~>
|
|
28
25
|
- !ruby/object:Gem::Version
|
|
@@ -30,7 +27,6 @@ dependencies:
|
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
|
31
28
|
name: rack
|
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
|
33
|
-
none: false
|
|
34
30
|
requirements:
|
|
35
31
|
- - ~>
|
|
36
32
|
- !ruby/object:Gem::Version
|
|
@@ -38,7 +34,6 @@ dependencies:
|
|
|
38
34
|
type: :runtime
|
|
39
35
|
prerelease: false
|
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
-
none: false
|
|
42
37
|
requirements:
|
|
43
38
|
- - ~>
|
|
44
39
|
- !ruby/object:Gem::Version
|
|
@@ -46,7 +41,6 @@ dependencies:
|
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
|
47
42
|
name: sinatra
|
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
|
49
|
-
none: false
|
|
50
44
|
requirements:
|
|
51
45
|
- - ~>
|
|
52
46
|
- !ruby/object:Gem::Version
|
|
@@ -54,7 +48,6 @@ dependencies:
|
|
|
54
48
|
type: :runtime
|
|
55
49
|
prerelease: false
|
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
-
none: false
|
|
58
51
|
requirements:
|
|
59
52
|
- - ~>
|
|
60
53
|
- !ruby/object:Gem::Version
|
|
@@ -62,7 +55,6 @@ dependencies:
|
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
|
63
56
|
name: rake
|
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
|
65
|
-
none: false
|
|
66
58
|
requirements:
|
|
67
59
|
- - ~>
|
|
68
60
|
- !ruby/object:Gem::Version
|
|
@@ -70,7 +62,6 @@ dependencies:
|
|
|
70
62
|
type: :runtime
|
|
71
63
|
prerelease: false
|
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
73
|
-
none: false
|
|
74
65
|
requirements:
|
|
75
66
|
- - ~>
|
|
76
67
|
- !ruby/object:Gem::Version
|
|
@@ -78,7 +69,6 @@ dependencies:
|
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
|
79
70
|
name: json
|
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
|
81
|
-
none: false
|
|
82
72
|
requirements:
|
|
83
73
|
- - ~>
|
|
84
74
|
- !ruby/object:Gem::Version
|
|
@@ -86,7 +76,6 @@ dependencies:
|
|
|
86
76
|
type: :runtime
|
|
87
77
|
prerelease: false
|
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
89
|
-
none: false
|
|
90
79
|
requirements:
|
|
91
80
|
- - ~>
|
|
92
81
|
- !ruby/object:Gem::Version
|
|
@@ -94,7 +83,6 @@ dependencies:
|
|
|
94
83
|
- !ruby/object:Gem::Dependency
|
|
95
84
|
name: rubyzip
|
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
|
97
|
-
none: false
|
|
98
86
|
requirements:
|
|
99
87
|
- - ~>
|
|
100
88
|
- !ruby/object:Gem::Version
|
|
@@ -102,7 +90,6 @@ dependencies:
|
|
|
102
90
|
type: :runtime
|
|
103
91
|
prerelease: false
|
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
105
|
-
none: false
|
|
106
93
|
requirements:
|
|
107
94
|
- - ~>
|
|
108
95
|
- !ruby/object:Gem::Version
|
|
@@ -110,7 +97,6 @@ dependencies:
|
|
|
110
97
|
- !ruby/object:Gem::Dependency
|
|
111
98
|
name: connection_pool
|
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
|
113
|
-
none: false
|
|
114
100
|
requirements:
|
|
115
101
|
- - ~>
|
|
116
102
|
- !ruby/object:Gem::Version
|
|
@@ -118,7 +104,6 @@ dependencies:
|
|
|
118
104
|
type: :runtime
|
|
119
105
|
prerelease: false
|
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
none: false
|
|
122
107
|
requirements:
|
|
123
108
|
- - ~>
|
|
124
109
|
- !ruby/object:Gem::Version
|
|
@@ -126,7 +111,6 @@ dependencies:
|
|
|
126
111
|
- !ruby/object:Gem::Dependency
|
|
127
112
|
name: redis
|
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
|
129
|
-
none: false
|
|
130
114
|
requirements:
|
|
131
115
|
- - ! '>='
|
|
132
116
|
- !ruby/object:Gem::Version
|
|
@@ -134,7 +118,6 @@ dependencies:
|
|
|
134
118
|
type: :runtime
|
|
135
119
|
prerelease: false
|
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
137
|
-
none: false
|
|
138
121
|
requirements:
|
|
139
122
|
- - ! '>='
|
|
140
123
|
- !ruby/object:Gem::Version
|
|
@@ -142,7 +125,6 @@ dependencies:
|
|
|
142
125
|
- !ruby/object:Gem::Dependency
|
|
143
126
|
name: resque
|
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
|
145
|
-
none: false
|
|
146
128
|
requirements:
|
|
147
129
|
- - ! '>='
|
|
148
130
|
- !ruby/object:Gem::Version
|
|
@@ -150,7 +132,6 @@ dependencies:
|
|
|
150
132
|
type: :runtime
|
|
151
133
|
prerelease: false
|
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
153
|
-
none: false
|
|
154
135
|
requirements:
|
|
155
136
|
- - ! '>='
|
|
156
137
|
- !ruby/object:Gem::Version
|
|
@@ -158,7 +139,6 @@ dependencies:
|
|
|
158
139
|
- !ruby/object:Gem::Dependency
|
|
159
140
|
name: rest-client
|
|
160
141
|
requirement: !ruby/object:Gem::Requirement
|
|
161
|
-
none: false
|
|
162
142
|
requirements:
|
|
163
143
|
- - ~>
|
|
164
144
|
- !ruby/object:Gem::Version
|
|
@@ -166,7 +146,6 @@ dependencies:
|
|
|
166
146
|
type: :runtime
|
|
167
147
|
prerelease: false
|
|
168
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
169
|
-
none: false
|
|
170
149
|
requirements:
|
|
171
150
|
- - ~>
|
|
172
151
|
- !ruby/object:Gem::Version
|
|
@@ -174,7 +153,6 @@ dependencies:
|
|
|
174
153
|
- !ruby/object:Gem::Dependency
|
|
175
154
|
name: templater
|
|
176
155
|
requirement: !ruby/object:Gem::Requirement
|
|
177
|
-
none: false
|
|
178
156
|
requirements:
|
|
179
157
|
- - ~>
|
|
180
158
|
- !ruby/object:Gem::Version
|
|
@@ -182,7 +160,6 @@ dependencies:
|
|
|
182
160
|
type: :runtime
|
|
183
161
|
prerelease: false
|
|
184
162
|
version_requirements: !ruby/object:Gem::Requirement
|
|
185
|
-
none: false
|
|
186
163
|
requirements:
|
|
187
164
|
- - ~>
|
|
188
165
|
- !ruby/object:Gem::Version
|
|
@@ -190,7 +167,6 @@ dependencies:
|
|
|
190
167
|
- !ruby/object:Gem::Dependency
|
|
191
168
|
name: thor
|
|
192
169
|
requirement: !ruby/object:Gem::Requirement
|
|
193
|
-
none: false
|
|
194
170
|
requirements:
|
|
195
171
|
- - ~>
|
|
196
172
|
- !ruby/object:Gem::Version
|
|
@@ -198,7 +174,6 @@ dependencies:
|
|
|
198
174
|
type: :runtime
|
|
199
175
|
prerelease: false
|
|
200
176
|
version_requirements: !ruby/object:Gem::Requirement
|
|
201
|
-
none: false
|
|
202
177
|
requirements:
|
|
203
178
|
- - ~>
|
|
204
179
|
- !ruby/object:Gem::Version
|
|
@@ -750,30 +725,26 @@ files:
|
|
|
750
725
|
- bin/rhoconnect
|
|
751
726
|
homepage: http://rhomobile.com/products/rhoconnect
|
|
752
727
|
licenses: []
|
|
728
|
+
metadata: {}
|
|
753
729
|
post_install_message:
|
|
754
730
|
rdoc_options: []
|
|
755
731
|
require_paths:
|
|
756
732
|
- lib
|
|
757
733
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
758
|
-
none: false
|
|
759
734
|
requirements:
|
|
760
735
|
- - ! '>='
|
|
761
736
|
- !ruby/object:Gem::Version
|
|
762
737
|
version: '0'
|
|
763
|
-
segments:
|
|
764
|
-
- 0
|
|
765
|
-
hash: -3033428230071358530
|
|
766
738
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
767
|
-
none: false
|
|
768
739
|
requirements:
|
|
769
740
|
- - ! '>='
|
|
770
741
|
- !ruby/object:Gem::Version
|
|
771
742
|
version: '0'
|
|
772
743
|
requirements: []
|
|
773
744
|
rubyforge_project:
|
|
774
|
-
rubygems_version: 1.
|
|
745
|
+
rubygems_version: 2.1.10
|
|
775
746
|
signing_key:
|
|
776
|
-
specification_version:
|
|
747
|
+
specification_version: 4
|
|
777
748
|
summary: RhoConnect App Integration Server
|
|
778
749
|
test_files:
|
|
779
750
|
- spec/jobs/source_job_spec.rb
|