rhoconnect 3.2.0.beta2 → 3.2.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +9 -0
- data/Gemfile +11 -4
- data/Gemfile.lock +10 -5
- data/commands/commands/rhoconnect/startbg.rb +4 -9
- data/commands/commands/rhoconnect/startdebug.rb +4 -9
- data/doc/adapters-crm.txt +6 -1
- data/doc/deploying.txt +90 -9
- data/doc/heroku-addon.txt +2 -2
- data/doc/install.txt +12 -12
- data/doc/stats-middleware.txt +2 -2
- data/doc/supported-platforms.txt +10 -12
- data/doc/web-console.txt +1 -1
- data/examples/simple/Gemfile.lock +97 -0
- data/examples/simple/dump.rdb +0 -0
- data/generators/rhoconnect.rb +14 -6
- data/generators/templates/application/Gemfile +9 -5
- data/installer/unix-like/create_texts.rb +8 -2
- data/installer/unix-like/rho_connect_install_constants.rb +1 -1
- data/installer/unix-like/rho_connect_install_installers.rb +10 -1
- data/installer/utils/package_upload/repos.rake +15 -18
- data/installer/utils/package_upload/s3_single_file.rb +1 -1
- data/lib/rhoconnect/cors.rb +0 -21
- data/lib/rhoconnect/jobs/bulk_data_job.rb +1 -1
- data/lib/rhoconnect/server.rb +27 -3
- data/lib/rhoconnect/version.rb +1 -1
- data/lib/rhoconnect/web-console/models/client.js +3 -1
- data/lib/rhoconnect/web-console/models/doc.js +2 -1
- data/lib/rhoconnect/web-console/models/source.js +3 -0
- data/lib/rhoconnect/web-console/models/user.js +1 -0
- data/lib/rhoconnect/web-console/views/doc.js +3 -1
- data/lib/rhoconnect/web-console/views/home.js +5 -5
- data/lib/rhoconnect/web-console/views/show_device.js +3 -1
- data/lib/rhoconnect/web-console/views/show_user.js +2 -0
- data/lib/rhoconnect/web-console/views/source_docs.js +2 -0
- data/lib/rhoconnect/web-console/views/users.js +1 -1
- data/rhoconnect.gemspec +0 -1
- data/spec/generator/generator_spec.rb +3 -0
- data/spec/spec_helper.rb +2 -5
- metadata +616 -643
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## 3.2.0.beta3 (2012-05-04)
|
2
|
+
* #28922571 - loading feedback msg console
|
3
|
+
* #28923039 - add pre tags around json values (console)
|
4
|
+
* #28992255 - fixing windows background commands
|
5
|
+
* #29049115 - execute 'bundle install' automatically after the app is generated
|
6
|
+
* #29051271 - verbose incoming headers logging
|
7
|
+
* #29049681 - print warning if 'async-rack' dependency doesn't exist
|
8
|
+
* #29092021 - EventMachine segfaults on Windows with Ruby 1.9.3-p194
|
9
|
+
|
1
10
|
## 3.2.0.beta2 (2012-05-02)
|
2
11
|
* 28571961 fix jasmine tests
|
3
12
|
* #28496779 - remove rhoconnect_api.rb and all of its references
|
data/Gemfile
CHANGED
@@ -1,14 +1,21 @@
|
|
1
|
-
source "
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in rhoconnect.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
gem 'win32-process', :platforms => [:mswin, :mingw]
|
7
7
|
|
8
|
+
# FIXME: At this moment (05/04/2012) 'eventmachine' doesn't work on Windows ruby1.9.3-p194
|
9
|
+
# FIXME: there is a reported issue - for now, we're using our own forked version with the suggested patch
|
10
|
+
# FIXME: See https://github.com/eventmachine/eventmachine/issues/319
|
11
|
+
gem "eventmachine", :git => 'https://github.com/rhomobile/eventmachine.git'
|
12
|
+
|
13
|
+
# using thin by default
|
14
|
+
gem 'thin'
|
15
|
+
|
8
16
|
# for async framework
|
9
17
|
# for Async, Eventful execution
|
10
18
|
platforms :ruby_19, :mingw_19 do
|
11
|
-
gem 'eventmachine'
|
12
19
|
gem 'rack-fiber_pool'
|
13
20
|
gem 'async-rack'
|
14
21
|
end
|
@@ -35,8 +42,8 @@ group :test do
|
|
35
42
|
gem "rcov", '~> 1.0.0', :require => false, :platforms => :ruby_18
|
36
43
|
gem 'simplecov', :require => false, :platforms => [:ruby_19,:jruby]
|
37
44
|
gem 'rack-test', '>= 0.5.3', :require => 'rack/test'
|
38
|
-
gem 'jasmine'
|
39
|
-
gem 'jasmine-headless-webkit'
|
45
|
+
gem 'jasmine', :platforms => :ruby_19
|
46
|
+
gem 'jasmine-headless-webkit', :platforms => :ruby_19
|
40
47
|
end
|
41
48
|
|
42
49
|
group :build do
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
+
GIT
|
2
|
+
remote: https://github.com/rhomobile/eventmachine.git
|
3
|
+
revision: 6858b3b6b6b43fe970d5443117f2ae642ac929d8
|
4
|
+
specs:
|
5
|
+
eventmachine (1.0.0.beta.4)
|
6
|
+
|
1
7
|
PATH
|
2
8
|
remote: .
|
3
9
|
specs:
|
4
|
-
rhoconnect (3.2.0.
|
10
|
+
rhoconnect (3.2.0.beta3)
|
5
11
|
bundler (~> 1.0)
|
6
12
|
json (~> 1.6.0)
|
7
13
|
rake (~> 0.9.2)
|
@@ -11,12 +17,11 @@ PATH
|
|
11
17
|
rubyzip (~> 0.9.4)
|
12
18
|
sinatra (~> 1.3)
|
13
19
|
templater (~> 1.0.0)
|
14
|
-
thin (~> 1.3.1)
|
15
20
|
thor (~> 0.14.6)
|
16
21
|
uuidtools (>= 2.1.1)
|
17
22
|
|
18
23
|
GEM
|
19
|
-
remote:
|
24
|
+
remote: https://rubygems.org/
|
20
25
|
specs:
|
21
26
|
SystemTimer (1.2.3)
|
22
27
|
addressable (2.2.8)
|
@@ -42,7 +47,6 @@ GEM
|
|
42
47
|
crack (0.3.1)
|
43
48
|
daemons (1.1.8)
|
44
49
|
diff-lcs (1.1.3)
|
45
|
-
eventmachine (0.12.10)
|
46
50
|
excon (0.13.4)
|
47
51
|
execjs (1.3.1)
|
48
52
|
multi_json (~> 1.0)
|
@@ -165,7 +169,7 @@ DEPENDENCIES
|
|
165
169
|
aws-s3 (>= 0.6.2)
|
166
170
|
dbd-jdbc (>= 0.1.4)
|
167
171
|
dbi (>= 0.4.5)
|
168
|
-
eventmachine
|
172
|
+
eventmachine!
|
169
173
|
ffaker (~> 1.14.0)
|
170
174
|
fog (>= 1.1.0)
|
171
175
|
fpm (>= 0.4.6)
|
@@ -180,6 +184,7 @@ DEPENDENCIES
|
|
180
184
|
rspec (~> 2.9.0)
|
181
185
|
simplecov
|
182
186
|
sqlite3 (>= 1.3.3)
|
187
|
+
thin
|
183
188
|
warbler
|
184
189
|
webmock (~> 1.8.6)
|
185
190
|
win32-process
|
@@ -1,17 +1,13 @@
|
|
1
|
-
require 'thor/group'
|
2
|
-
|
3
1
|
# NOTE: On Windows Process.fork is implemented in a way
|
4
2
|
# that it re-starts the parent command with an additional "child#0"
|
5
3
|
# argument. Naturally, this leads to Thor rejecting that 2nd invocation
|
6
4
|
# since the original command is not supposed to have arguments.
|
7
5
|
# To overcome this issue all Background commands
|
8
|
-
# should
|
9
|
-
# which declares an additional optional argument (which is not used)
|
6
|
+
# should have an optional fictitious parameter (which is not used)
|
10
7
|
# but exists merely to support Windows Process.fork artificial implementation
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
def startbg
|
8
|
+
Execute.define_task do
|
9
|
+
desc "startbg [CHILDNAME]", "Start rhoconnect server in bg mode (Rhostudio) - this is an internal command", :hide => true
|
10
|
+
def startbg(childname=nil)
|
15
11
|
cmd = (jruby?) ? trinidad? : (thin? || mongrel? || report_missing_server)
|
16
12
|
require 'win32/process' if windows?
|
17
13
|
|
@@ -31,4 +27,3 @@ class StartBg < Thor::Group
|
|
31
27
|
exit
|
32
28
|
end #startbg
|
33
29
|
end
|
34
|
-
Execute.register StartBg, "startbg", "startbg", "Start rhoconnect server in bg mode (Rhostudio) - this is an internal command", :hide => true
|
@@ -1,17 +1,13 @@
|
|
1
|
-
require 'thor/group'
|
2
|
-
|
3
1
|
# NOTE: On Windows Process.fork is implemented in a way
|
4
2
|
# that it re-starts the parent command with an additional "child#0"
|
5
3
|
# argument. Naturally, this leads to Thor rejecting that 2nd invocation
|
6
4
|
# since the original command is not supposed to have arguments.
|
7
5
|
# To overcome this issue all Background commands
|
8
|
-
# should
|
9
|
-
# which declares an additional optional argument (which is not used)
|
6
|
+
# should have an optional fictitious parameter (which is not used)
|
10
7
|
# but exists merely to support Windows Process.fork artificial implementation
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
def startdebug
|
8
|
+
Execute.define_task do
|
9
|
+
desc "startdebug [CHILDNAME]", "Start rhoconnect server in debug mode (Rhostudio) - this is an internal command", :hide => true
|
10
|
+
def startdebug(childname=nil)
|
15
11
|
cmd = (jruby?) ? trinidad? : (thin? || mongrel? || report_missing_server)
|
16
12
|
ENV['DEBUG'] = 'yes'
|
17
13
|
require 'win32/process' if windows?
|
@@ -32,4 +28,3 @@ class StartDebug < Thor::Group
|
|
32
28
|
exit
|
33
29
|
end #startdebug
|
34
30
|
end
|
35
|
-
Execute.register StartDebug, "startdebug", "startdebug", "Start rhoconnect server in debug mode (Rhostudio) - this is an internal command", :hide => true
|
data/doc/adapters-crm.txt
CHANGED
@@ -14,11 +14,16 @@ To create a standard out-of-the-box rhoconnect CRM application use the following
|
|
14
14
|
Here, the \<CRM\-backend\> parameter specifies the CRM backend that your application will use.
|
15
15
|
Currently, the following CRM backends are supported:
|
16
16
|
|
17
|
-
- OracleOnDemand (for [Oracle CRM On Demand](http://crmondemand.oracle.com))
|
18
17
|
- MsDynamics (for [Microsoft Dynamics CRM](http://www.microsoft.com/en-us/dynamics/default.aspx))
|
19
18
|
- Salesforce (for [Salesforce CRM](http://www.salesforce.com/))
|
19
|
+
|
20
|
+
Also, you can generate the application for the following backends but they are not officially supported
|
21
|
+
(initial test and development has been done, but currently there is no on-going test support):
|
22
|
+
|
23
|
+
- OracleOnDemand (for [Oracle CRM On Demand](http://crmondemand.oracle.com))
|
20
24
|
- Sugar (for [Sugar CRM](http://www.sugarcrm.com/crm/))
|
21
25
|
|
26
|
+
|
22
27
|
The generated Rhoconnect CRM application structure will include typical [RhoConnect](http://rhomobile.com/products/rhoconnect/)
|
23
28
|
files (for example, application.rb and settings.yml). It will also create a special vendor directory `vendor/\<CRM\-backend\>`
|
24
29
|
containing all support files specific for the corresponding CRM backend.
|
data/doc/deploying.txt
CHANGED
@@ -12,17 +12,17 @@ for Ubuntu and CentOS respectively. At this moment supported formats are Debian
|
|
12
12
|
|
13
13
|
Every package provides the following components:
|
14
14
|
|
15
|
-
* Ruby 1.
|
15
|
+
* Ruby 1.9.3-p194
|
16
16
|
|
17
|
-
* Nginx HTTP server
|
17
|
+
* Nginx HTTP server, release 1.2.x
|
18
18
|
|
19
|
-
*
|
19
|
+
* Thin application server, release 1.3.1
|
20
20
|
|
21
|
-
* Redis data store
|
21
|
+
* Redis data store, release 2.4.x
|
22
22
|
|
23
|
-
* RhoConnect gem with all required dependencies
|
23
|
+
* Latest RhoConnect gem with all required dependencies
|
24
24
|
|
25
|
-
In addition, RPM package provides latest
|
25
|
+
In addition, RPM package provides latest sqlite3 headers and binaries, because standard Cent OS (5.x) libraries for sqlite3 outdated.
|
26
26
|
|
27
27
|
### Getting the Packages
|
28
28
|
|
@@ -45,7 +45,28 @@ Once that is done, it is time to install RhoConnect:
|
|
45
45
|
$ sudo apt-get install rhoconnect
|
46
46
|
|
47
47
|
#### Steps for RedHat-Based Linux Users
|
48
|
-
|
48
|
+
Vanilla CentOS distribution does not include some packages required by RhoConnect installer. To resolve dependencies you might wanted to use either
|
49
|
+
[RPMForge](http://wiki.centos.org/AdditionalResources/Repositories/RPMForge) or [Extra Packages for Enterprise Linux (EPEL) ](http://fedoraproject.org/wiki/EPEL)
|
50
|
+
repository.
|
51
|
+
|
52
|
+
For example, to add rpmforge repository for CentOS 5.8 release and x86_64 architecture execute this command:
|
53
|
+
|
54
|
+
:::term
|
55
|
+
$ wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm; rpm -Uhv rpmforge*
|
56
|
+
|
57
|
+
For CentOS 6.2 release:
|
58
|
+
|
59
|
+
:::term
|
60
|
+
$ wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm; rpm -Uhv rpmforge*
|
61
|
+
|
62
|
+
If you'd rather prefer EPEL repo, then run one of
|
63
|
+
|
64
|
+
:::term
|
65
|
+
$ wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
|
66
|
+
$ wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm
|
67
|
+
|
68
|
+
|
69
|
+
Now you can create a file named <b>rhoconnect.repo</b> in the <b>/etc/yum.repos.d/</b> directory:
|
49
70
|
|
50
71
|
:::term
|
51
72
|
$ sudo vim /etc/yum.repos.d/rhoconnect.repo
|
@@ -67,15 +88,75 @@ Once that is done, it is time to install RhoConnect:
|
|
67
88
|
|
68
89
|
### Final Steps (After the installer is finished)
|
69
90
|
Installer also created and configured RhoConnect <b>rhoapp</b> application in <b>/opt/nginx/html</b> directory.
|
70
|
-
To test it you need to as a root user start redis and
|
91
|
+
To test it you need to as a root user start redis, nginx, and thin servers:
|
71
92
|
|
72
93
|
:::term
|
73
94
|
$ sudo /etc/init.d/redis start
|
74
95
|
$ sudo /etc/init.d/nginx start
|
96
|
+
$ sudo /etc/init.d/thin start
|
75
97
|
|
76
98
|
And verify that it's up and running by visiting application web console in your browser:
|
77
99
|
|
78
|
-
http://
|
100
|
+
http://servername
|
101
|
+
|
102
|
+
### Web and application servers configuration
|
103
|
+
Installer compiled and configured Nginx as reverse proxy web server (/opt/nginx) with the following settings:
|
104
|
+
|
105
|
+
* Nginx start-up script (/etc/init.d/nginx)
|
106
|
+
|
107
|
+
* Nginx logrotate settings (/etc/logrotate.d/nginx)
|
108
|
+
|
109
|
+
* Nginx configuration file (/opt/nginx/conf/nginx.conf)
|
110
|
+
|
111
|
+
* virtual host template for rhoconnect application (/opt/nginx/conf/conf.d/rhoconnect.conf)
|
112
|
+
|
113
|
+
Installer also configured Thin app server with the following configuration files:
|
114
|
+
|
115
|
+
* Thin start-up script (/etc/init.d/thin)
|
116
|
+
|
117
|
+
* Thin configuration file (/etc/thin/rhoapp.yml)
|
118
|
+
|
119
|
+
Default setup of Nginx server is to deal with back-end servers (called "upstreams") that are running on UNIX domain sockets:
|
120
|
+
|
121
|
+
:::text
|
122
|
+
# /opt/nginx/conf/conf.d/rhoconnect.conf file
|
123
|
+
|
124
|
+
upstream thin_cluster {
|
125
|
+
server unix:/tmp/thin.0.sock;
|
126
|
+
server unix:/tmp/thin.1.sock;
|
127
|
+
#server unix:/tmp/thin.2.sock;
|
128
|
+
#server unix:/tmp/thin.3.sock;
|
129
|
+
}
|
130
|
+
|
131
|
+
server {
|
132
|
+
listen 80;
|
133
|
+
root /opt/nginx/html/rhoapp/public; # <-- be sure to point to 'public' folder of your application!
|
134
|
+
# ...
|
135
|
+
|
136
|
+
}
|
137
|
+
|
138
|
+
Thin application server runs as a cluster with /etc/thin/rhoapp.yml configuration file:
|
139
|
+
|
140
|
+
:::yaml
|
141
|
+
---
|
142
|
+
chdir: /opt/nginx/html/rhoapp
|
143
|
+
environment: production
|
144
|
+
timeout: 30
|
145
|
+
log: /opt/nginx/logs/thin.log
|
146
|
+
pid: /var/run/thin.pid
|
147
|
+
max_conns: 1024
|
148
|
+
max_persistent_conns: 512
|
149
|
+
require: []
|
150
|
+
wait: 30
|
151
|
+
socket: /tmp/thin.sock
|
152
|
+
servers: 2
|
153
|
+
daemonize: true
|
154
|
+
|
155
|
+
Configuration file is generated by this command:
|
156
|
+
|
157
|
+
:::term
|
158
|
+
$ thin config -C /etc/thin/rhoapp.yml -c /opt/nginx/html/rhoapp/ --socket /tmp/thin.sock --servers 2 --log /opt/nginx/logs/thin.log --pid /var/run/thin.pid -e production
|
159
|
+
|
79
160
|
|
80
161
|
## Deploying into J2EE environment
|
81
162
|
In JRuby environment, there is an option to create the WAR container for the RhoConnect app
|
data/doc/heroku-addon.txt
CHANGED
@@ -18,9 +18,9 @@ From inside your heroku account, setup the url to your backend service that RhoC
|
|
18
18
|
First, click the addons drop down and select rhoconnect.
|
19
19
|
<p><img src='https://s3.amazonaws.com/rhodocs/rhoconnect-service/addon_rhoconnect.png' width="479" height="319"/></p>
|
20
20
|
|
21
|
-
You will be redirected to the admin console of your RhoConnect instance where you can set the backend app url.
|
22
|
-
<p><img src='https://s3.amazonaws.com/rhodocs/rhoconnect-service/console.png' width="800" height="280"/></p>
|
21
|
+
You will be redirected to the admin console of your RhoConnect instance where you can set the backend app url. Select the Settings tab, then select Plugin Settings from the left menu.
|
23
22
|
|
23
|
+
<img src="http://rhodocs.s3.amazonaws.com/rhoconnect/plugin-settings-console.png"/>
|
24
24
|
|
25
25
|
From here you can enter a url to your backend service. Enter a url (for example http://myrailsapp.com), and click the add link to save the url.
|
26
26
|
|
data/doc/install.txt
CHANGED
@@ -16,9 +16,7 @@ Click on the RhoStudioInstaller for Mac download file to open it. You will get a
|
|
16
16
|
|
17
17
|
Run the install gems script appropriate for you. You can run "Install gems." If you have Ruby Version Manager, you can run "Install gems on rvm." A terminal window will open; wait for the gems install process to complete.
|
18
18
|
|
19
|
-
Then drag RhoStudio to the Applications folder.
|
20
|
-
|
21
|
-
You can also install RhoConnect without RhoStudio by [installing Ruby and the RhoConnect gem](/rhoconnect/install#rhoconnect-gem-for-linux-and-non-rhostudio).
|
19
|
+
Then drag RhoStudio to the Applications folder.
|
22
20
|
|
23
21
|
## Windows
|
24
22
|
|
@@ -44,21 +42,19 @@ On Windows installs for RhoMobile, go to RhoStudio Preferences (Windows -> Prefe
|
|
44
42
|
|
45
43
|
On Mac OS, the path to the JDK is automatically set once Java is installed.
|
46
44
|
|
47
|
-
For
|
48
|
-
|
49
|
-
## Rhoconnect Gem for Linux and non-RhoStudio
|
45
|
+
For Linux and for RhoConnect installs from the command line, set the JDK path in JAVA_HOME and PATH.
|
50
46
|
|
51
|
-
|
47
|
+
## Installing RhoConnect from the Command Line
|
52
48
|
|
53
|
-
|
49
|
+
To install RhoConnect on Linux, and to install RhoConnect on Windows or Mac OS using the command line (this does not install RhoStudio), you need to install the Rhodes gem. Download and install:
|
54
50
|
|
55
|
-
|
51
|
+
1. [Ruby v1.9.3](http://www.ruby-lang.org/en/downloads/) (On Windows, [RubyInstaller](http://rubyinstaller.org) is a convenient way to install Ruby.)
|
56
52
|
|
57
|
-
|
53
|
+
2. Ruby Web Server - We tested with [thin](http://code.macournoyer.com/thin/), and [passenger](http://www.modrails.com/). WEBrick, the web server that ships with ruby, is known to cause issues with HTTP headers/cookies and is ***not*** recommended.
|
58
54
|
|
59
|
-
|
55
|
+
3. [Redis](http://redis.io/) - RhoConnect includes a simple [rake task](/rhoconnect/command-line#rake-tasks) `redis:install` to install redis, covered in the [Rake Tasks section](rhoconnect/command-line#rake-tasks). Alternatively, you can [install redis directly](http://redis.io/download).
|
60
56
|
|
61
|
-
|
57
|
+
4. Install the RhoConnect Gem.
|
62
58
|
|
63
59
|
Run this command to install.
|
64
60
|
|
@@ -67,4 +63,8 @@ Run this command to install.
|
|
67
63
|
|
68
64
|
NOTE: If you get any `no such file to load -- something` messages while running the rake tasks or rhodes commands, this can usually be resolved by putting "sudo" in front of the command, as in `sudo gem install something`.
|
69
65
|
|
66
|
+
NOTE: Windows doesn't come with the necessary build tools to install gems ('make', for example). There are various ways to get these tools, but the GnuWin32 project at http://gnuwin32.sourceforge.net/ provides the tools, and can be conveniently installed via the GetGnuWin32 installer at http://sourceforge.net/projects/getgnuwin32/files/.
|
67
|
+
|
68
|
+
You can [install RhoStudio as a plugin for Eclipse](rhostudio-eclipse).
|
69
|
+
|
70
70
|
RhoSimulator, which comes with RhoStudio for Mac and Windows, does not work with Linux.
|
data/doc/stats-middleware.txt
CHANGED
@@ -54,9 +54,9 @@ And navigate to the 'Statistics' tab in your RhoConnect console:
|
|
54
54
|
$ rake rhoconnect:web
|
55
55
|
|
56
56
|
## Stats Console
|
57
|
-
You should see graphs, organized by categories
|
57
|
+
You should see graphs, organized by categories:
|
58
58
|
|
59
|
-
<img src="
|
59
|
+
<img src="http://rhodocs.s3.amazonaws.com/rhoconnect/stats-console.png"/>
|
60
60
|
|
61
61
|
RhoConnect statistics are organized into the following categories:
|
62
62
|
|
data/doc/supported-platforms.txt
CHANGED
@@ -18,8 +18,8 @@ Supported Platforms
|
|
18
18
|
<td> CentOS / RHEL 5 & 6,<br/>Ubuntu 11,<br/>Amazon Linux</td>
|
19
19
|
<td> ruby-1.8.7-p358 </td>
|
20
20
|
<td> ree-1.8.7-2012.02 </td>
|
21
|
-
<td> ruby-1.9.2-
|
22
|
-
<td> ruby-1.9.3-
|
21
|
+
<td> ruby-1.9.2-p320 </td>
|
22
|
+
<td> ruby-1.9.3-p194 </td>
|
23
23
|
<td> jruby-1.6.7 </td>
|
24
24
|
<td>Development &<br/>Production</td>
|
25
25
|
</tr>
|
@@ -28,18 +28,18 @@ Supported Platforms
|
|
28
28
|
<td> Mac OS X 10.6/10.7 </td>
|
29
29
|
<td> ruby-1.8.7-p358 </td>
|
30
30
|
<td> ree-1.8.7-2012.02 </td>
|
31
|
-
<td> ruby-1.9.2-
|
32
|
-
<td> ruby-1.9.3-
|
31
|
+
<td> ruby-1.9.2-p320 </td>
|
32
|
+
<td> ruby-1.9.3-p194 </td>
|
33
33
|
<td> jruby-1.6.7 </td>
|
34
34
|
<td>Development &<br/>Production</td>
|
35
35
|
</tr>
|
36
36
|
<tr>
|
37
37
|
<td class='cap'>Windows</td>
|
38
38
|
<td> Windows 7 </td>
|
39
|
-
<td> ruby-1.8.7-
|
39
|
+
<td> ruby-1.8.7-p358 </td>
|
40
40
|
<td class='tbd'> TBD </td>
|
41
41
|
<td class='tbd'> TBD </td>
|
42
|
-
<td> ruby-1.9.3-
|
42
|
+
<td> ruby-1.9.3-p194 </td>
|
43
43
|
<td class='tbd'> TBD </td>
|
44
44
|
<td>Development</td>
|
45
45
|
</tr>
|
@@ -51,7 +51,7 @@ Other Ruby versions and releases might work with RhoConnect gem, but there are n
|
|
51
51
|
|
52
52
|
RhoConnect for Windows is supported only in development environments. The components you should have for this environment are:
|
53
53
|
|
54
|
-
* Ruby 1.
|
54
|
+
* Ruby 1.9.3
|
55
55
|
* Redis 2.4.x
|
56
56
|
* Latest RhoConnect and Rhodes gems
|
57
57
|
* Eclipse 3.6 with latest RhoStudio plugin, or RhoStudio for Windows 32-bit
|
@@ -60,16 +60,14 @@ RhoConnect for Windows is supported only in development environments. The compon
|
|
60
60
|
|
61
61
|
RhoConnect for Linux and Mac OS X is supported for both development and production environments. The components you should have for this environment are:
|
62
62
|
|
63
|
-
* Ruby 1.
|
64
|
-
* Nginx HTTP server (1.
|
63
|
+
* Ruby 1.9.3-p194
|
64
|
+
* Nginx HTTP server (1.2.x)
|
65
65
|
* Redis data store (2.4.x)
|
66
|
-
*
|
66
|
+
* Thin application server
|
67
67
|
* RhoConnect gem with all required dependencies
|
68
68
|
|
69
69
|
## Known Issues
|
70
70
|
|
71
71
|
* Windows platform: only pre-release (~> 1.0.0.beta) of <b>eventmachine</b> is working on Windows
|
72
|
-
* Examples for <b>RSpec</b> (~> 2.8.0) fail for Ruby 1.8.7, gemset locked to ver. >= 2.6.0. <b>Issue is fixed in v. 3.1.2.</b>
|
73
|
-
* Rack is locked to version 1.3.6 due to issues with RhoConnect applications deployed on Heroku (502 server error if rhoconnect bundled with rake 1.4.1). <b>Fixed in v. 3.1.2.</b>
|
74
72
|
* If you deploy your RhoConnect application deploy on <b>Heroku</b>, then use new [Cedar](http://devcenter.heroku.com/articles/cedar) stack. The Bamboo stack is older than the widespread adoption of bundler,
|
75
73
|
so on Bamboo your application is not invoked in the context of your bundle and might not works properly.
|
data/doc/web-console.txt
CHANGED
@@ -32,4 +32,4 @@ If you want to disable this web interface, you can do so by editing the rackup f
|
|
32
32
|
|
33
33
|
Here is a screenshot of the web console:
|
34
34
|
|
35
|
-
<img src="
|
35
|
+
<img src="http://rhodocs.s3.amazonaws.com/rhoconnect/web-console.png"/>
|
@@ -0,0 +1,97 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../../
|
3
|
+
specs:
|
4
|
+
rhoconnect (3.2.0.beta1)
|
5
|
+
bundler (~> 1.0)
|
6
|
+
json (~> 1.6.0)
|
7
|
+
rake (~> 0.9.2)
|
8
|
+
redis (>= 2.2.0)
|
9
|
+
resque (~> 1.20.0)
|
10
|
+
rest-client (~> 1.6.1)
|
11
|
+
rubyzip (~> 0.9.4)
|
12
|
+
sinatra (~> 1.3)
|
13
|
+
templater (~> 1.0.0)
|
14
|
+
thor (~> 0.14.6)
|
15
|
+
uuidtools (>= 2.1.1)
|
16
|
+
|
17
|
+
GEM
|
18
|
+
remote: http://rubygems.org/
|
19
|
+
specs:
|
20
|
+
SystemTimer (1.2.3)
|
21
|
+
async-rack (0.5.1)
|
22
|
+
rack (~> 1.1)
|
23
|
+
daemons (1.1.8)
|
24
|
+
diff-lcs (1.1.3)
|
25
|
+
eventmachine (0.12.10)
|
26
|
+
extlib (0.9.15)
|
27
|
+
highline (1.6.11)
|
28
|
+
json (1.6.6)
|
29
|
+
mime-types (1.18)
|
30
|
+
multi_json (1.3.2)
|
31
|
+
rack (1.4.1)
|
32
|
+
rack-fiber_pool (0.9.2)
|
33
|
+
rack-protection (1.2.0)
|
34
|
+
rack
|
35
|
+
rack-test (0.6.1)
|
36
|
+
rack (>= 1.0)
|
37
|
+
rake (0.9.2.2)
|
38
|
+
redis (2.2.2)
|
39
|
+
redis-namespace (1.0.3)
|
40
|
+
redis (< 3.0.0)
|
41
|
+
resque (1.20.0)
|
42
|
+
multi_json (~> 1.0)
|
43
|
+
redis-namespace (~> 1.0.2)
|
44
|
+
sinatra (>= 0.9.2)
|
45
|
+
vegas (~> 0.1.2)
|
46
|
+
rest-client (1.6.7)
|
47
|
+
mime-types (>= 1.16)
|
48
|
+
rhomobile-debug (1.0.6)
|
49
|
+
rspec (2.6.0)
|
50
|
+
rspec-core (~> 2.6.0)
|
51
|
+
rspec-expectations (~> 2.6.0)
|
52
|
+
rspec-mocks (~> 2.6.0)
|
53
|
+
rspec-core (2.6.4)
|
54
|
+
rspec-expectations (2.6.0)
|
55
|
+
diff-lcs (~> 1.1.2)
|
56
|
+
rspec-mocks (2.6.0)
|
57
|
+
rubyzip (0.9.7)
|
58
|
+
sinatra (1.3.2)
|
59
|
+
rack (~> 1.3, >= 1.3.6)
|
60
|
+
rack-protection (~> 1.2)
|
61
|
+
tilt (~> 1.3, >= 1.3.3)
|
62
|
+
sqlite3 (1.3.5)
|
63
|
+
templater (1.0.0)
|
64
|
+
diff-lcs (>= 1.1.2)
|
65
|
+
extlib (>= 0.9.5)
|
66
|
+
highline (>= 1.4.0)
|
67
|
+
thin (1.3.1)
|
68
|
+
daemons (>= 1.0.9)
|
69
|
+
eventmachine (>= 0.12.6)
|
70
|
+
rack (>= 1.0.0)
|
71
|
+
thor (0.14.6)
|
72
|
+
tilt (1.3.3)
|
73
|
+
uuidtools (2.1.2)
|
74
|
+
vegas (0.1.11)
|
75
|
+
rack (>= 1.0.0)
|
76
|
+
|
77
|
+
PLATFORMS
|
78
|
+
ruby
|
79
|
+
|
80
|
+
DEPENDENCIES
|
81
|
+
SystemTimer (~> 1.2.3)
|
82
|
+
async-rack
|
83
|
+
dbd-jdbc (>= 0.1.4)
|
84
|
+
dbi (>= 0.4.5)
|
85
|
+
eventmachine (~> 1.0.0.beta)
|
86
|
+
jdbc-sqlite3 (>= 3.7.2)
|
87
|
+
jruby-openssl (>= 0.7.4)
|
88
|
+
rack-fiber_pool
|
89
|
+
rack-test (>= 0.5.3)
|
90
|
+
rhoconnect!
|
91
|
+
rhomobile-debug (>= 1.0.2)
|
92
|
+
rspec (~> 2.6.0)
|
93
|
+
sqlite3 (>= 1.3.3)
|
94
|
+
thin
|
95
|
+
trinidad
|
96
|
+
warbler
|
97
|
+
win32-process
|
Binary file
|
data/generators/rhoconnect.rb
CHANGED
@@ -87,19 +87,27 @@ module Rhoconnect
|
|
87
87
|
|
88
88
|
def after_run
|
89
89
|
install_gems_note = <<_BUNDLE_INSTALL_
|
90
|
-
|
91
|
-
|
90
|
+
|
91
|
+
In the future, to ensure that all the dependencies in your rhoconnect application
|
92
92
|
are available execute these commands:
|
93
|
-
cd #{name}
|
94
|
-
|
93
|
+
cd #{name} && bundle install
|
94
|
+
|
95
95
|
If you're setting up the application in a production environment run the following:
|
96
|
-
cd #{name}
|
96
|
+
cd #{name} && bundle install --without=test development
|
97
97
|
|
98
98
|
_BUNDLE_INSTALL_
|
99
99
|
|
100
|
+
running_bundler_first_time = <<_RUN_BUNDLER
|
101
|
+
|
102
|
+
Executing 'bundle install' for the first time in your freshly baked application!
|
103
|
+
bundle install --gemfile=#{destination_root}/#{name}/Gemfile
|
104
|
+
|
105
|
+
_RUN_BUNDLER
|
106
|
+
|
107
|
+
puts running_bundler_first_time
|
108
|
+
system("bundle install --gemfile=#{destination_root}/#{name}/Gemfile")
|
100
109
|
puts install_gems_note
|
101
110
|
end
|
102
|
-
|
103
111
|
end
|
104
112
|
|
105
113
|
class SourceGenerator < BaseGenerator
|
@@ -6,9 +6,17 @@ gem 'rhoconnect', '<%=gem_version%>'
|
|
6
6
|
gem 'SystemTimer', '~> 1.2.3', :platforms => :ruby_18
|
7
7
|
gem 'win32-process', :platforms => [:mswin, :mingw]
|
8
8
|
|
9
|
+
# FIXME: At this moment (05/04/2012) 'eventmachine' doesn't work on Windows ruby1.9.3-p194
|
10
|
+
# FIXME: there is a reported issue - for now, we're using our own forked version with the suggested patch
|
11
|
+
# FIXME: See https://github.com/eventmachine/eventmachine/issues/319
|
12
|
+
gem "eventmachine", :git => 'https://github.com/rhomobile/eventmachine.git'
|
13
|
+
|
14
|
+
# using thin by default
|
15
|
+
gem 'thin'
|
16
|
+
|
17
|
+
# for async framework
|
9
18
|
# for Async, Eventful execution
|
10
19
|
platforms :ruby_19, :mingw_19 do
|
11
|
-
gem 'thin'
|
12
20
|
gem 'rack-fiber_pool'
|
13
21
|
gem 'async-rack'
|
14
22
|
end
|
@@ -25,10 +33,6 @@ end
|
|
25
33
|
gem 'sqlite3', ">= 1.3.3", :platforms => [:ruby, :mswin, :mingw]
|
26
34
|
|
27
35
|
group :development do
|
28
|
-
# FIXME: At this moment (01/10/2012) only pre release of 'eventmachine' is working on Windows
|
29
|
-
gem 'eventmachine', '~> 1.0.0.beta', :platforms => [:mswin, :mingw]
|
30
|
-
# By default to run application thin web server is used
|
31
|
-
gem 'thin', :platforms => [:ruby, :mswin, :mingw]
|
32
36
|
gem 'rhomobile-debug', ">= 1.0.2"
|
33
37
|
end
|
34
38
|
|
@@ -536,8 +536,14 @@ def config_and_install_thin_scripts(rho_path)
|
|
536
536
|
thin_conf_file = (File.exists?('/etc/init.d/thin')) ? "/etc/init.d/thin" : "/etc/rc.d/thin"
|
537
537
|
File.open("/tmp/thin", 'w') do |f|
|
538
538
|
File.foreach(thin_conf_file) do |line|
|
539
|
-
|
540
|
-
|
539
|
+
if line =~ /^DAEMON/
|
540
|
+
f << "export PATH=/opt/rhoconnect/bin:$PATH" << "\n"
|
541
|
+
f << "DAEMON=\"bundle exec thin\"" << "\n"
|
542
|
+
elsif line =~ /[ -x "$DAEMON" ] || exit 0/
|
543
|
+
# do nothing
|
544
|
+
else
|
545
|
+
f << line
|
546
|
+
end
|
541
547
|
end
|
542
548
|
end
|
543
549
|
File.rename("/tmp/thin", thin_conf_file)
|