rhoconnect 3.0.4 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 3.0.5 (not released)
2
+ * use redis 2.4 by default
3
+ * #17447481 - auto-renewal of expired C2DM tokens
4
+ * #19723593 - re-creating Client if clientregister call is made with unknown client id
5
+
1
6
  ## 3.0.4 (2011-10-13)
2
7
  * #19675957 - fixing broken task :set_admin_password
3
8
 
data/Gemfile CHANGED
@@ -14,6 +14,7 @@ end
14
14
  gem 'sqlite3', ">= 1.3.3", :platforms => [:ruby, :mswin, :mingw]
15
15
 
16
16
  group :development do
17
+ gem 'aws-s3', '>= 0.6.2', :require => 'aws/s3'
17
18
  gem 'fpm', '>= 0.3.8'
18
19
  gem 'fog', '>= 1.0.0'
19
20
  gem 'ffaker', '~> 1.8.0'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rhoconnect (3.0.4)
4
+ rhoconnect (3.0.5)
5
5
  bundler (~> 1.0)
6
6
  json (~> 1.5.0)
7
7
  rake (= 0.9.2)
@@ -17,6 +17,10 @@ GEM
17
17
  remote: http://rubygems.org/
18
18
  specs:
19
19
  addressable (2.2.6)
20
+ aws-s3 (0.6.2)
21
+ builder
22
+ mime-types
23
+ xml-simple
20
24
  builder (3.0.0)
21
25
  crack (0.3.1)
22
26
  diff-lcs (1.1.3)
@@ -88,11 +92,13 @@ GEM
88
92
  webmock (1.6.4)
89
93
  addressable (~> 2.2, > 2.2.5)
90
94
  crack (>= 0.1.7)
95
+ xml-simple (1.1.1)
91
96
 
92
97
  PLATFORMS
93
98
  ruby
94
99
 
95
100
  DEPENDENCIES
101
+ aws-s3 (>= 0.6.2)
96
102
  dbd-jdbc (>= 0.1.4)
97
103
  dbi (>= 0.4.5)
98
104
  ffaker (~> 1.8.0)
data/Rakefile CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'rubygems'
2
2
  load 'tasks/redis.rake'
3
3
  load 'installer/utils/nix_installation.rake'
4
+ load 'installer/utils/package_upload/repos.rake'
4
5
 
5
6
  require 'bundler'
6
7
  Bundler.setup(:default, :development, :test)
data/doc/blob-sync.txt CHANGED
@@ -40,7 +40,7 @@ The following example stores the `:filename` argument as another object attribut
40
40
  The following example takes the blob and stores it in S3:
41
41
 
42
42
  :::ruby
43
- def create(create_hash,blob)
43
+ def create(create_hash)
44
44
  # this would be a blob attribute, points to a tempfile
45
45
  # containing the raw post data
46
46
  name = create_hash["image_uri"]
@@ -72,12 +72,19 @@ In your query call, you should store the URL to images in the blob attribute so
72
72
  @result[entry.key] = new_item
73
73
  end
74
74
  @result
75
- end
75
+ end
76
76
 
77
77
  Here we save the image URL to an attribute `image_uri-rhoblob`. This will correspond to the `image_uri` attribute in our Rhom model above.
78
78
 
79
79
  **NOTE: In order for Rhodes to automatically recognize a blob attribute, the attribute name must end with "-rhoblob". In the above example, `image_uri` was our Rhom attribute, so our source adapter assigned `image_uri-rhoblob` with the blob URL.**
80
80
 
81
+ ### Blob file name and extension on client
82
+ File name is generated on client when downloading. File extension is determine by:
83
+
84
+ * To specify blob file extension add extension parameter to the blob URL. For example: '&extension=jpg'
85
+ * If no extension parameter the blob URL then extension is extracted from blob URL itself(looking for '.' from the end of the URL)
86
+ * If still no file extension found, then '.bin' is used
87
+
81
88
  A complete image source adapter that stores files in S3 might look like:
82
89
 
83
90
  :::ruby
data/doc/client-objc.txt CHANGED
@@ -41,7 +41,7 @@ Do the following steps to add `<rhoconnect-client>/objectivec/RhoConnectClient.x
41
41
 
42
42
  1. Drag and drop `<rhoconnect-client>/ObjectiveC/RhoConnectClient.xcodeproj` from the Finder into Groups & Files for your Xcode project. RhoConnectClient.xcodeproj should now appear in Groups & Files.
43
43
 
44
- <img src="rhoconnect-objc-client-tutorial/rhoconnectclient-groupfile.png" alt="RhoConnectClient in Groups & Files" />
44
+ <img src="http://rhodocs.s3.amazonaws.com/rhoconnect-objc-client-tutorial/rhoconnectclient-groupfile.png" alt="RhoConnectClient in Groups & Files" />
45
45
 
46
46
  2. Under Groups and Files, open the Targets icon.
47
47
  3. Right-click on your project-named target.
@@ -49,7 +49,7 @@ Do the following steps to add `<rhoconnect-client>/objectivec/RhoConnectClient.x
49
49
  5. In Direct Dependencies, click the + button.
50
50
  6. Choose the dependency from RhoConnectClient.xcodeproj.
51
51
 
52
- <img src="rhoconnect-objc-client-tutorial/direct-dependency.png" alt="RhoConnectClient Direct Dependency" />
52
+ <img src="http://rhodocs.s3.amazonaws.com/rhoconnect-objc-client-tutorial/direct-dependency.png" alt="RhoConnectClient Direct Dependency" />
53
53
 
54
54
  ### Adding Xcode Libraries
55
55
 
@@ -59,7 +59,7 @@ Do the following steps to add libraries:
59
59
  2. Select Add->Existing Frameworks from the popup menu.
60
60
  3. Add the following to your project: `libstdc++6.dylib, libsqlite3.dylib, libz.dylib, CFNetwork.framework`.
61
61
 
62
- <img src="rhoconnect-objc-client-tutorial/add-frameworks.png" alt="Add Frameworks" />
62
+ <img src="http://rhodocs.s3.amazonaws.com/rhoconnect-objc-client-tutorial/add-frameworks.png" alt="Add Frameworks" />
63
63
 
64
64
  ### Adding Schema Files
65
65
 
@@ -99,10 +99,10 @@ Call init for RhoConnectClient to initialize your client.
99
99
  :::cplusplus
100
100
  sclient = [[RhoConnectClient alloc] init];
101
101
 
102
- Set up an NSArray containing the models for your client.
102
+ Set up an NSMutableArray containing the models for your client.
103
103
 
104
104
  :::cplusplus
105
- NSArray* models = [NSArray arrayWithObjects:customer, product, nil];
105
+ NSMutableArray* models = [NSMutableArray arrayWithObjects:customer, product, nil];
106
106
 
107
107
  Call the RhoConnectClient method addModels to add those models to your client.
108
108
 
@@ -251,37 +251,56 @@ Here is the Store code for the find process, contained in RootViewController.m.
251
251
 
252
252
  ## RhoConnectClient Class API
253
253
 
254
- The RhoConnectClient class contains properties and methods to build an Objective C RhoConnect client and connect it with a RhoConnect server.
255
-
256
- ## threaded\_mode (RhoConnectClient property)
254
+ The RhoConnectClient class contains the following properties and methods to build an Objective C RhoConnect client and connect it with a RhoConnect server.
255
+
256
+ * <a href="#threaded_mode">threaded_mode property</a>
257
+ * <a href="#poll_interval">poll_interval property</a>
258
+ * <a href="#sync_server">sync_server property</a>
259
+ * <a href="#initDatabase">initDatabase</a>
260
+ * <a href="#addModels">addModels</a>
261
+ * <a href="#database_full_reset_and_logout">database\_full\_reset\_and\_logout</a>
262
+ * <a href="#database_client_reset">database\_client\_reset</a>
263
+ * <a href="#initDatabase">initDatabase</a>
264
+ * <a href="#loginWithUser">loginWithUser</a>
265
+ * <a href="#loginWithUser (with callback)">loginWithUser (with callback)</a>
266
+ * <a href="#setNotification">setNotification</a>
267
+ * <a href="#clearNotification">clearNotification</a>
268
+ * <a href="#is_logged_in">is\_logged\_in</a>
269
+ * <a href="#syncAll">syncAll</a>
270
+ * <a href="#search">search</a>
271
+ * <a href="#setObjectNotification">setObjectNotification</a>
272
+ * <a href="#clearObjectNotification">clearObjectNotification</a>
273
+ * <a href="#addObjectNotify">addObjectNotify</a>
274
+
275
+ ### <a id="threaded_mode"></a>threaded\_mode property
257
276
 
258
277
  BOOL. Set to false to get the result of operations as a return value. (Set to true to get notifications - not supported yet.) Default = false.
259
278
 
260
279
  :::cplusplus
261
280
  @property(setter=setThreadedMode) BOOL threaded_mode;
262
281
 
263
- ## poll\_interval (RhoConnectClient property)
282
+ ### <a id="poll_interval"></a>poll\_interval property
264
283
 
265
284
  int. Not yet supported. Default = 0.
266
285
 
267
286
  :::cplusplus
268
287
  @property(setter=setPollInterval) int poll_interval;
269
288
 
270
- ## sync\_server (RhoConnectClient property)
289
+ ### <a id="sync_server"></a>sync\_server property
271
290
 
272
291
  NSString. Sets the RhoConnect server url, for example: "`http://<ip>:<port>/application`"
273
292
 
274
293
  :::cplusplus
275
294
  @property(assign, setter=setSyncServer) NSString* sync_server;
276
295
 
277
- ## initDatabase (RhoConnectClient method)
296
+ ### <a id="initDatabase"></a>initDatabase
278
297
 
279
298
  Initializes your client database. Call this method before you create and use a client.
280
299
 
281
300
  ::::cplusplus
282
301
  + (void) initDatabase;
283
302
 
284
- ## addModels (RhoConnectClient method)
303
+ ### <a id="addModels"></a>addModels
285
304
 
286
305
  Adds your model objects to your client database, allowing them to sync with the RhoConnect server.
287
306
 
@@ -295,14 +314,21 @@ Adds your model objects to your client database, allowing them to sync with the
295
314
  </tr>
296
315
  </table>
297
316
 
298
- ## database\_full\_reset\_and\_logout (RhoConnectClient method)
317
+ ### <a id="database_full_reset_and_logout"></a>database\_full\_reset\_and\_logout
299
318
 
300
319
  Resets all data for all models in your local database, and then performs logout.
301
320
 
302
321
  :::cplusplus
303
322
  - (void) database_full_reset_and_logout;
304
323
 
305
- ## loginWithUser (RhoConnectClient method)
324
+ ### <a id="database_client_reset"></a>database\_client\_reset
325
+
326
+ Resets all data for all models in your local database and delete client ID. Use this method for 'unknown client' error
327
+
328
+ :::cplusplus
329
+ - (void) database_client_reset;
330
+
331
+ ### <a id="loginWithUser">loginWithUser
306
332
 
307
333
  Returns a RhoConnectNotify object containing login data after logging your client database into the RhoConnect server.
308
334
 
@@ -320,7 +346,7 @@ Returns a RhoConnectNotify object containing login data after logging your clien
320
346
  </tr>
321
347
  </table>
322
348
 
323
- ## loginWithUser (RhoConnectClient method)
349
+ ### <a id="loginWithUser (with callback)">loginWithUser (with callback)
324
350
 
325
351
  Logs your client database into the RhoConnect server and calls a selector callback target method when the login process is finished.
326
352
 
@@ -342,7 +368,7 @@ Logs your client database into the RhoConnect server and calls a selector callba
342
368
  </tr>
343
369
  </table>
344
370
 
345
- ## setNotification (RhoConnectClient method)
371
+ ### <a id="setNotification">setNotification
346
372
 
347
373
  Set the sync notification callback method.
348
374
 
@@ -356,28 +382,28 @@ Set the sync notification callback method.
356
382
  </tr>
357
383
  </table>
358
384
 
359
- ## clearNotification (RhoConnectClient method)
385
+ ### <a id="clearNotification">clearNotification
360
386
 
361
387
  Instance method. Clear the sync notification callback.
362
388
 
363
389
  :::cplusplus
364
390
  - (void) clearNotification;
365
391
 
366
- ## is\_logged\_in (RhoConnectClient method)
392
+ ### <a id="is_logged_in">is\_logged\_in
367
393
 
368
394
  Instance method. Returns true if your RhoConnect session is logged in (if the login session exists in the database), false otherwise.
369
395
 
370
396
  :::cplusplus
371
397
  - (BOOL) is_logged_in;
372
398
 
373
- ## syncAll (RhoConnectClient method)
399
+ ### <a id="syncAll">syncAll
374
400
 
375
401
  Instance method. Returns a RhoConnectNotify object after running a sync on all the models for your RhoConnect client.
376
402
 
377
403
  :::cplusplus
378
404
  - (RhoConnectNotify*) syncAll;
379
405
 
380
- ## search (RhoConnectClient method)
406
+ ### <a id="search">search
381
407
 
382
408
  Instance method. Returns a RhoConnectNotify object after sending a search request to the RhoConnect server.
383
409
 
@@ -408,7 +434,7 @@ Instance method. Returns a RhoConnectNotify object after sending a search reques
408
434
  </tr>
409
435
  </table>
410
436
 
411
- ## setObjectNotification (RhoConnectClient method)
437
+ ### <a id="setObjectNotification">setObjectNotification
412
438
 
413
439
  Instance method. Sets the callback method for object notification. The callback receives a RhoConnectObjectNotify object as a parameter. This RhoConnectObjectNotify object contains three arrays of hashes for the objects and their source ids that have been updated, created, and deleted, allowing you to display which records were changed.
414
440
 
@@ -421,13 +447,13 @@ Instance method. Sets the callback method for object notification. The callback
421
447
  </tr>
422
448
  </table>
423
449
 
424
- ## clearObjectNotification (RhoConnectClient method)
450
+ ### <a id="clearObjectNotification"></a>clearObjectNotification
425
451
 
426
452
  - (void) clearObjectNotification;
427
453
 
428
454
  Instance method. Clears the callback method for object notification.
429
455
 
430
- ## addObjectNotify (RhoConnectClient method)
456
+ ### <a id="addObjectNotify"></a>addObjectNotify
431
457
 
432
458
  Instance method. Add an object to track changes: create, update, delete.
433
459
 
@@ -454,30 +480,48 @@ Sample call:
454
480
 
455
481
  ## RhomModel Class API
456
482
 
457
- The RhomModel class contains properties and methods for setting and using RhomModel objects; those objects are RhoConnect models and their attributes.
458
-
459
- ## name (RhomModel property)
483
+ The RhomModel class contains the following properties and methods for setting and using RhomModel objects; RhomModel objects are RhoConnect models and their attributes.
484
+
485
+ * <a href="#name">name property</a>
486
+ * <a href="#sync_type">sync_type property</a>
487
+ * <a href="#model_type">model_type property</a>
488
+ * <a href="#associations">associations property</a>
489
+ * <a href="#init">init</a>
490
+ * <a href="#sync">sync</a>
491
+ * <a href="#sync (with callback)">sync (with callback)</a>
492
+ * <a href="#setNotification">setNotification</a>
493
+ * <a href="#clearNotification">clearNotification</a>
494
+ * <a href="#create">create</a>
495
+ * <a href="#find">find</a>
496
+ * <a href="#find_first">find_first</a>
497
+ * <a href="#find_all">find_all</a>
498
+ * <a href="#save">save</a>
499
+ * <a href="#destroy">destroy</a>
500
+ * <a href="#startBulkUpdate">startBulkUpdate</a>
501
+ * <a href="#stopBulkUpdate">stopBulkUpdate</a>
502
+
503
+ ### <a id="name"></a>name property
460
504
 
461
505
  NSString. Sets the model name.
462
506
 
463
507
  :::cplusplus
464
508
  @property(assign) NSString* name;
465
509
 
466
- ## sync\_type (RhomModel property)
510
+ ### <a id="sync_type"></a>sync\_type property
467
511
 
468
512
  int. Sets the synchronization type: RST\_INCREMENTAL or RST\_BULK\_ONLY.
469
513
 
470
514
  :::cplusplus
471
515
  @property(assign) int sync_type;
472
516
 
473
- ## model\_type (RhomModel property)
517
+ ### <a id="model_type">model\_type property
474
518
 
475
519
  int. Sets the model type: RMT\_PROPERTY\_BAG (default) or RMT\_PROPERTY\_FIXEDSCHEMA.
476
520
 
477
521
  :::cplusplus
478
522
  @property(assign) int model_type;
479
523
 
480
- ## associations (RhomModel property)
524
+ ### <a id="associations">associations property
481
525
 
482
526
  The associations dictionary is a property of the model that controls its synchronization process. When one model (model A) has an association with another model (model B), this forces the other model (model B) synchronized along with the model (model A).
483
527
 
@@ -495,21 +539,21 @@ Example of associating two models, customer and product:
495
539
  order.name = @"Order";
496
540
  order.associations = [NSDictionary dictionaryWithObjectsAndKeys: @"Customer", @"customer", @"Product", @"product", nil];
497
541
 
498
- ## init (RhomModel method)
542
+ ### <a id="init">init
499
543
 
500
544
  Initializes a model object.
501
545
 
502
546
  :::cplusplus
503
547
  - (id) init;
504
548
 
505
- ## sync (RhomModel method)
549
+ ### <a id="sync">sync
506
550
 
507
551
  Returns a RhoConnectNotify object containing sync information, after running a sync on this model.
508
552
 
509
553
  :::cplusplus
510
554
  - (RhoConnectNotify*) sync;
511
555
 
512
- ## sync with callback (RhomModel method)
556
+ ### <a id="sync (with callback)">sync (with callback)
513
557
 
514
558
  Runs a sync on this model, and calls a callback, passing the callback the RhoConnectNotify status parameter for the synchronization: "in\_progress", "ok", "error", "complete".
515
559
 
@@ -531,7 +575,29 @@ Example:
531
575
  return 1;
532
576
  }
533
577
 
534
- ## create (RhomModel method)
578
+ ### <a id="setNotification">setNotification
579
+
580
+ Set the sync notification callback method for the Model.
581
+
582
+ :::cplusplus
583
+ - (void) setNotification: (SEL) callback target:(id)target;
584
+
585
+ <table border="1">
586
+ <tr>
587
+ <td><code>callback:(SEL) target:(id)target</code></td>
588
+ <td>The reference to the callback method that performs actions upon a sync notification.</td>
589
+ </tr>
590
+ </table>
591
+
592
+ ### <a id="clearNotification">clearNotification
593
+
594
+ Instance method. Clear the sync notification callback for the Model.
595
+
596
+ :::cplusplus
597
+ - (void) clearNotification;
598
+
599
+
600
+ ### <a id="create">create
535
601
 
536
602
  Create a model object with attributes and save it to the database, the object id will be generated automatically if not set.
537
603
 
@@ -545,7 +611,7 @@ Create a model object with attributes and save it to the database, the object id
545
611
  </tr>
546
612
  </table>
547
613
 
548
- ## find (RhomModel method)
614
+ ### <a id="find">find
549
615
 
550
616
  Returns an NSMutableDictionary object containing a model with the given object id.
551
617
 
@@ -559,7 +625,7 @@ Returns an NSMutableDictionary object containing a model with the given object i
559
625
  </tr>
560
626
  </table>
561
627
 
562
- ## find\_first (RhomModel method)
628
+ ### <a id="find_first">find\_first
563
629
 
564
630
  Returns an NSMutableDictionary object containing the first model object found with the given set of model attributes.
565
631
 
@@ -584,7 +650,7 @@ Example call:
584
650
  // not found
585
651
  }
586
652
 
587
- ## find\_all (RhomModel method)
653
+ ### <a id="find_all">find\_all
588
654
 
589
655
  Returns a NSMutableArray containing all the model objects that match the given set of attributes.
590
656
 
@@ -598,7 +664,7 @@ Returns a NSMutableArray containing all the model objects that match the given s
598
664
  </tr>
599
665
  </table>
600
666
 
601
- ## save (RhomModel method)
667
+ ### <a id="save">save
602
668
 
603
669
  Saves a model object with the given data to the database.
604
670
 
@@ -612,7 +678,7 @@ Saves a model object with the given data to the database.
612
678
  </tr>
613
679
  </table>
614
680
 
615
- ## destroy (RhomModel method)
681
+ ### <a id="destroy">destroy
616
682
 
617
683
  Delete model objects from the database that contain the given data.
618
684
 
@@ -626,14 +692,14 @@ Delete model objects from the database that contain the given data.
626
692
  </tr>
627
693
  </table>
628
694
 
629
- ## startBulkUpdate (RhomModel method)
695
+ ### <a id="startBulkUpdate">startBulkUpdate
630
696
 
631
697
  Run this method when you start to create or update a bunch of models; it will optimize database access. Equal to start transaction.
632
698
 
633
699
  :::cplusplus
634
700
  - (void) startBulkUpdate;
635
701
 
636
- ## stopBulkUpdate (RhomModel method)
702
+ ### <a id="stopBulkUpdate">stopBulkUpdate
637
703
 
638
704
  Run this method when you start to create or update a bunch of models; it will optimize database access. Equal to commit transaction.
639
705
 
@@ -731,6 +797,6 @@ This will produce a zipfile in the folder called `rhoconnect-client-<someversion
731
797
  ## Release procedure
732
798
  1. Unzip package to some folder
733
799
 
734
- 2. Open project `rhoconnect-client\ObjectiveC\Tests\RhoConnectClientTest` in xcode and run. See log - SUCCESS should be at the end of log
800
+ 2. Open project `rhoconnect-client\ObjectiveC\Tests\RhoConnectClientTest` in xcode and run. See log - SUCCESS should be at the end of log.
735
801
 
736
- 3. Open project `rhoconnect-client\Samples\ObjectiveC\store` in xcode and run. Press Login, you should see several items, click on item, you should see details
802
+ 3. Open project `rhoconnect-client\Samples\ObjectiveC\store` in xcode and run. Press Login, you should see several items, click on item, you should see details.
data/doc/deploying.txt CHANGED
@@ -72,120 +72,86 @@ The [RhoHub](/rhohub/introduction) service offers several [production RhoConnect
72
72
  ## Deploying On-Premise
73
73
  The [sinatra book](http://sinatra-book.gittr.com/) has some great [deployment documentation](http://sinatra-book.gittr.com/#deployment) that you should review before running your RhoConnect application in production.
74
74
 
75
- ## Deploying into J2EE environment
76
- In JRuby environment, there is an option to create the WAR container for the Rhoconnect app
77
- and deploy it into the J2EE App Server.
78
- (see the corresponding 'rake' task for creating the WAR containers).
79
- Deploying the WAR container varies per J2EE App Server, for JBoss it is necessary
80
- to place the WAR file into the server's deploy directory.
81
-
82
75
  We recommend using the [phusion passenger](http://modrails.com/index.html) stack for deploying an on-premise RhoConnect application. Please refer to the [section on rack applications](http://modrails.com/documentation/Users%20guide%20Apache.html#_deploying_a_rack_based_ruby_application) for information on deploying a RhoConnect sinatra application.
83
76
 
84
77
  ## Deploying packaged RhoConnect software on Linux servers
85
78
 
86
79
  You can create RhoConnect production environment on Linux servers by installing software packages
87
- for Ubuntu and Cent OS respectively. At this moment supported formats are Debian (deb) and Red Hat (rpm) packages.
80
+ for Ubuntu and CentOS respectively. At this moment supported formats are Debian (deb) and Red Hat (rpm) packages.
88
81
 
89
82
  Every package provides the following components:
90
83
 
91
84
  * Ruby 1.8.7, Ruby Enterprise Edition 2011.03
92
85
 
93
- * Nginx HTTP server (v. 1.0.6)
86
+ * Nginx HTTP server
94
87
 
95
- * Passenger (v. 3.0.9)
88
+ * Phusion Passenger
96
89
 
97
- * Redis data store (v. 2.2.14)
90
+ * Redis data store
98
91
 
99
- * Rhoconnect gem with all required dependencies
92
+ * RhoConnect gem with all required dependencies
100
93
 
101
94
  In addition, RPM package provides latest Sqlite3 headers and binaries, because standard Cent OS (5.x) libraries for Sqlite3 outdated.
102
95
 
103
- To create Debian package you need to have development version of RhoConnect software on Ubuntu (server, desktop. virtual machine) and execute the following rake task:
104
- <pre>
105
- rake build:deb
106
- </pre>
107
-
108
- To create RPM package you need to have development version of RhoConnect software on Cent OS and execute the following rake task:
109
- <pre>
110
- rake build:rpm
111
- </pre>
112
-
113
- After task is compete, either rhoconnect-x.y.z_all.deb or rhoconnect-x.y.z.noarch.rpm package will be created in the pkg/ directory. In the future, pre-built packages for latest RhoConnect software will be available for direct download.
114
-
115
- To install Deb package on Ununtu server (Ubuntu 11.4 server, Amazon EC2 Ubuntu server), you should run the following command:
116
- <pre>
117
- dpkg -i rhoconnect-x.y.z_all.deb
118
- </pre>
119
-
120
- To install RPM package on Cent OS server (tested for 5.x, 6.x, and basic 64-bit Amazon Linux AMI 2011.09):
121
- <pre>
122
- rpm -i rhoconnect-x.y.z.noarch.rpm
123
- </pre>
124
-
125
- In process of installation many of above components will be downloaded, configured and compiled on target platform.
126
- For practical usage, you should be familiar with and understand some of the provided settings.
127
-
128
- ### Ruby Enterprise Edition
129
- By defaut all ruby binaries, libraries, and gems are installed into <b>/opt/rhoconnect</b> directory.
130
- You may wish to have access to these items by adding to bash configuration files this command:
131
- <pre>
132
- export PATH=/opt/rhoconnect/bin:$PATH
133
- </pre>
134
-
135
- ### Redis
136
- Rhoconnect installer configured redis server with the following settings:
137
-
138
- * Redis configuration file <b>/opt/rhoconnect/etc/redis.conf</b> has the following properties:
139
- <pre>
140
- daemonize yes
141
- pidfile /var/run/redis.pid
142
- logfile /var/log/redis.log
143
- </pre>
144
-
145
- * Redis logrotate settings for <b>/var/log/redis.log</b> files defined in <b>/etc/logrotate.d/redis</b> as:
146
- <pre>
147
- /var/log/redis.log {
148
- rotate 3
149
- missingok
150
- notifempty
151
- size 250k
152
- create 0644 root root
153
- compress
154
- }
155
- </pre>
156
-
157
- * Redis start-up script <b>/etc/init.d/redis</b>. You can start/stop redis server by running the following commands:
158
- <pre>
159
- /etc/init.d/redis {start|stop}
160
- </pre>
161
-
162
- ### Nginx
163
- Installer compiled Nginx web server (to <b>/opt/nginx</b> directory) with the following configuration files:
164
-
165
- * Nginx start-up script (<b>/etc/init.d/nginx</b>)
166
-
167
- * Nginx logrotate settings (<b>/etc/logrotate.d/nginx</b>)
168
-
169
- * Nginx configuration file (<b>/opt/nginx/conf/nginx.conf</b>)
170
-
171
- * Passenger configuration file and virtual host template for RhoConnect application
172
- (<b>/opt/nginx/conf/conf.d/passenger.conf</b> and <b>/opt/nginx/conf/conf.d/rhoconnect.conf</b>)
173
-
174
- * user <b>nginx</b> added to system users list
175
-
176
-
177
- ### As a bonus :-)
96
+ ### Getting the Packages
97
+
98
+ To download the RhoConnect debian package, you first must add our repo to your list of sources.
99
+
100
+ #### Steps for Debian-Based Linux Users
101
+ Add the following line to the end of your <b>/etc/apt/sources.list</b>:
102
+
103
+ :::text
104
+ deb http://rhoconnect.s3.amazonaws.com/packages/deb rhoconnect main
105
+
106
+ Once the repo is added apt-get needs to be updated:
107
+
108
+ :::term
109
+ $ sudo apt-get update
110
+
111
+ Once that is done, it is time to install RhoConnect:
112
+
113
+ :::term
114
+ $ sudo apt-get install rhoconnect
115
+
116
+ #### Steps for RedHat-Based Linux Users
117
+ Create a file named <b>rhoconnect.repo</b> in the <b>/etc/yum.repos.d/</b> directory:
118
+
119
+ :::term
120
+ $ sudo vim /etc/yum.repos.d/rhoconnect.repo
121
+
122
+ Copy and paste these contents into the file.
123
+
124
+ :::text
125
+ [rhoconnect]
126
+ name=Rhoconnect
127
+ baseurl=http://rhoconnect.s3.amazonaws.com/packages/rpm
128
+ enabled=1
129
+ gpgcheck=0
130
+
131
+
132
+ Once that is done, it is time to install RhoConnect:
133
+
134
+ :::term
135
+ $ sudo yum install rhoconnect
136
+
137
+ ### Final Steps (After the installer is finished)
178
138
  Installer also created and configured RhoConnect <b>rhoapp</b> application in <b>/opt/nginx/html</b> directory.
179
139
  To test it you need to as a root user start redis and nginx servers:
180
- <pre>
181
- /etc/init.d/redis start
182
- /etc/init.d/nginx start
183
- </pre>
140
+
141
+ :::term
142
+ $ sudo /etc/init.d/redis start
143
+ $ sudo /etc/init.d/nginx start
184
144
 
185
145
  And verify that it's up and running by visiting application web console in your browser:
186
- <pre>
187
- http://server_ip_address/console/
188
- </pre>
146
+
147
+ http://server_ip_address/console/
148
+
149
+ ## Deploying into J2EE environment
150
+ In JRuby environment, there is an option to create the WAR container for the RhoConnect app
151
+ and deploy it into the J2EE App Server.
152
+ (see the corresponding 'rake' task for creating the WAR containers).
153
+ Deploying the WAR container varies per J2EE App Server, for JBoss it is necessary
154
+ to place the WAR file into the server's deploy directory.
189
155
 
190
156
 
191
157
 
data/doc/install.txt CHANGED
@@ -17,7 +17,7 @@ You can now skip to the [generating a new application instructions](/rhoconnect/
17
17
 
18
18
  3. Ruby Web Server - We test 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.
19
19
 
20
- 4. [Redis 2.2.14+](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).
20
+ 4. [Redis 2.4.1+](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).
21
21
 
22
22
  ### Installing RhoConnect Gem
23
23