aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorMarc Florisson2014-02-17 09:53:30 +0100
committerMarc Florisson2014-02-17 09:53:30 +0100
commita2b88b6612435a4a2883c4a378115068df941e5b (patch)
treed59343b49a1968a10ec61798af9cb7f0659a43f1 /README.md
parent0547437de59b2d5626f1c2c28a5a14baf4835f24 (diff)
parentc70672cda56b3db7b2b2ec5bfec06755f36534f0 (diff)
downloadchouette-core-a2b88b6612435a4a2883c4a378115068df941e5b.tar.bz2
Merge branch 'master' of github.com:afimb/chouette2
Diffstat (limited to 'README.md')
-rw-r--r--README.md113
1 files changed, 60 insertions, 53 deletions
diff --git a/README.md b/README.md
index 784b20a7a..31409c0b5 100644
--- a/README.md
+++ b/README.md
@@ -20,94 +20,113 @@ Requirements
------------
This code has been run and tested on [Travis](http://travis-ci.org/afimb/chouette2?branch=master) with :
-* Ruby 1.8.7
-* JRuby 1.6.8 (oraclejdk7, openjdk7, openjdk6)
+* Ruby 1.9.3
+* Postgres 9.x
+* Proj 4.8.0
External Deps
-------------
-On Debian/Ubuntu/Kubuntu OS :
+
+On Debian/Ubuntu/Kubuntu OS : assume depot contains the correct version
```sh
sudo apt-get install postgresql
sudo apt-get install pgadmin3
sudo apt-get install openjdk-7-jdk
sudo apt-get install git
sudo apt-get install unzip
+sudo apt-get install ruby
+sudo apt-get install proj-bin
+sudo apt-get install libproj-dev
+sudo apt-get install make
```
Installation
------------
-
-Install [Postgres] (./doc/install/postgresql.md)
-Install [JRuby] (./doc/install/jruby.md)
-
-Get git code :
+Get git source code :
```sh
cd workspace
-git clone -b V2_1_0 git://github.com/afimb/chouette2
+git clone -b V2_2 git://github.com/afimb/chouette2
cd chouette2
```
-**JRuby**
-
-Install dependencies
-```sh
-sudo apt-get install tomcat7
-sudo apt-get install proj-bin
-sudo apt-get install libproj-dev
-sudo apt-get install make
-```
+The next step assume default path defined by ```Chouette::Command.command``` in file [production.rb](./config/environments/production.rb) is unchanged
-Install chouette-gui-command to import and export transport offer :
+Install chouette-gui-command to import, export and validate transport offer :
```sh
sudo mkdir -p /usr/local/opt/chouette-command/
cd /usr/local/opt/chouette-command/
-wget http://chouette.dryade.net/chouette-cmd_2.1.0.zip
-unzip chouette-cmd_2.1.0.zip
-cd chouette-cmd_2.1.0
+wget http://maven.chouette.cityway.fr/fr/certu/chouette/chouette-gui-command/2.2.0/chouette-gui-command-2.2.0.zip
+unzip chouette-gui-command-2.2.0.zip
+mv chouette-gui-command-2.2.0.zip chouette-cmd_2.2.0
+cd chouette-cmd_2.2.0
sudo chmod a+w .
```
+
+Create [Postgres database user] (./doc/install/postgresql.md)
-Build War ( Use RAILS_ENV production mode and parameters )
+Download gem libraries and create database
```sh
-jgem install bundler --version 1.2.4
-jgem install jruby-openssl
-bundle install --path vendor/bundle
+setenv RAILS_ENV=production
+bundle install
bundle exec rake db:create
-bundle exec rake war
```
-Install war file ( Use RAILS_ENV production mode and parameters )
+The next step assume default path defined by following settings in file [production.rb](./config/environments/production.rb) are unchanged
+* ```ImportTask.root```
+* ```Export.root```
+
+Create directories
```sh
-sudo cp chouette2.war /var/lib/tomcat7/webapp/.
sudo mkdir -p /var/lib/chouette/imports
sudo mkdir -p /var/lib/chouette/exports
sudo mkdir -p /var/lib/chouette/validations
sudo chmod a+x /var/lib/chouette/imports /var/lib/chouette/exports /var/lib/chouette/validations
```
-**Ruby**
-Install chouette-gui-command to import and export transport offer :
+Configuration
+-------------
+
+Configure for Generating URLs in Action Mailer Views.
+* Edit [production.rb](./config/environments/production.rb) and change ```config.action_mailer.default_url_options```
+* see [Action Mailer Configuration documentation](http://guides.rubyonrails.org/action_mailer_basics.html)
+
+Configure SMTP settings.
+* Edit [production.rb](./config/environments/production.rb) and change ```ActionMailer::Base.smtp_settings```
+* see [Action Mailer Configuration documentation](http://guides.rubyonrails.org/action_mailer_basics.html)
+
+Configure IGN Géoportail Key.
+* Edit [production.rb](./config/environments/production.rb) and uncomment and set```config.geoportail_api_key```
+* see [API Géoportail documentation](http://api.ign.fr/accueil)
+
+Configure Google Analytics Key.
+* Edit [production.rb](./config/environments/production.rb) and change```GA.tracker```
+* see [Google Analytics](https://www.google.fr/intl/fr/analytics/)
+
+
+Run
+---
+
+Launch the task to import and export asynchronously
```sh
-sudo mkdir -p tmp/chouette-command/
-cd tmp/chouette-command/
-wget http://chouette.dryade.net/chouette-cmd_2.1.0.zip
-unzip chouette-cmd_2.1.0.zip
-cd chouette-cmd_2.1.0
-sudo chmod a+w .
+RAILS_ENV=production bundle exec rake jobs:work
```
+This task may be added in system start up configuration
-Install
+Launch rails server with [WEBrick](http://guides.rubyonrails.org/command_line.html#server-with-different-backends) ( default RoR web server, note: running on default port 3000)
```sh
-gem install bundler
-bundle install
-bundle exec rake db:create
+RAILS_ENV=production bundle exec rails server
```
+This task may be added in system start up configuration.
+Instead of using WEBrick, Rails application may be deployed on [Pushion Passenger](https://www.phusionpassenger.com/) with an [Apache](http://httpd.apache.org/) or [NGinx](http://nginx.com/) front-end, to make server faster and more robust.
+
Test
----
```sh
+setenv RAILS_ENV=tests
+bundle exec rake db:create
bundle exec rake spec
```
@@ -124,18 +143,6 @@ The description of the restful API is described in :
* [User manual file](./doc/interfaces/Chouette_API_REST_v1.2.pdf)
* [XSD file](./doc/interfaces/api_rest_v1.xsd)
-Example Usage
--------------
-
-Launch the task to import and export asynchronously
-```sh
-bundle exec rake jobs:work
-```
-
-Launch rails server
-```sh
-bundle exec rails server
-```
License
-------