Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EPF Wiki Development Guide

Revision as of 02:53, 22 April 2008 by Onno.van.der.straaten.logicacmg.com (Talk | contribs) (Create a Development and Test Database)

Welcome to the EPF Wiki Development Guide. This guide covers the steps necessary to begin development on EPF Wiki using Aptana Studio, CVS, and Bugzilla.

Development Environment Setup

Minimum Requirements

  • Ruby 1.8.4
  • Ruby Gems 0.9.4 or higher
  • Rails 2.0.2
  • MySQL 5.0.15 or higher
  • Windows UnxUtils (for Windows)
  • TinyMCE (TODO replace this with a EPL compliant HTML Editor)

You can use another database, in fact you can use any of supported databases by Rails migrations. UnxUtils is included with the requirements because the current documentation of EPF Wiki assumes the development environment will run on Windows (XP) and the production environment on Linux.

Ruby is shipped with SCIntilla based Text Editor so this minimum setup is already very complete. But for more serious development work the following extra components come highly recommended.

  • XAMPP
  • Aptana Studio

XAMPP includes MySQL so this replaces the MySQL database listed with the minimum requirements. On top of that XAMPP includes many other usefull components for development.

Install Ruby and Ruby Gems

Download and install Ruby from www2.ruby-lang.org. Download and install Ruby Gems from rubygems.org

The following gems need te be installed

These can be installed with the following commands:

gem install tidy
gem install mysql
gem install rails -v=2.0.2
gem install xhtmldiff

Ruby Gems can be installed using command gem install or can be installed manually by downloading the gems from gems.rubyforge.org. Your proxy server can be specified using p switch, for more information type gem help install

The version of Ruby on Rails to install depends on the version EPF Wiki is currently using. You can check the version online in environment.rb in the EPF Wiki CVS Repository.

The Tidy Gem is just a wrapper, the dll needs is a separate download. Download from tidy.sf.net and unzip to lib\tidy. The tidy folder should now contain three folders bin, include, lib. This location is specified by the environment variable EPFWIK_TIDY_PATH. [[TODO check if this is still true ]]

Aptana Studio

  1. Download Aptana Studio
  2. Add RadRails to Aptana Studio by following the Start Page instructions (Help > Aptana Studio Start Page...).

See the screencast for more information.

Checkout project from CVS

Start Aptana Studio and switch to the CVS repository perspective. Add a repository location with the following properties

Connection type: extssh
Host: dev.eclipse.org
Repository path: /cvsroot/technology

See also CVS Repository Setup in the EPF Composer Development Guide.

From the menu bar select File > New > Project > CVS > Project from CVS.

In the wizard check Use and existing repository location and select the newly created repository. Select Use an existing module and then browse to and select the module name org.eclipse.epf/epfwiki/source


CVS does not version folders so after the previous step we need to run rails source to create the folders that are missing. Of cource non of the files that we checked out need to be overwritten.


TinyMCE

This commercial editor can be integrated with EPF Wiki. This is a more a advanced editor than the one that ships with EPF Wiki: Richtext Editor: Fork (RTEF) (Is awaiting approval from Eclipse Legal, see IPZilla reference below)

  1. Download TinyMCE from tinymce.moxiecode.com
  2. Extract the contents and copy the folder tinymce\jscripts\tiny_mce to [application install dir]\public\javascripts. The folder javascripts\tinymce should now contain Javascript library tiny_mce.js

Create a Development and Test Database

Edit the database configuration file config/database.yml file, specify the information for your databases or accept the defaults. It is recommended to specify a MySQL user with enough privileges to create and drop databases. With such a setup you can (re)create the database, create some test accounts with a single command executed from the application root:

rake db:drop db:create db:migrate db:fixtures:load

Of course you can split up this command and do it step by step.

  1. Drop the database: rake db:drop
  2. Create the database: rake db:create
  3. Create the database schema: rake db:migrate

The default environment this works on is the development environment

Load some test data (optional)

Navigate to the application root and specify to environment

set RAILS_ENV=development

Create some users

rake db:fixtures:load

This command creates the following users:

  1. Administrator andy.kaufman@epf.eclipse.org with password Andy Kaufman.
  2. User cash.oshman@epf.eclipse.org with password Cash Oshman
  3. Central administrator george.shapiro@epf.eclipse.org with password George Shapiro

Create a Wiki using OpenUP

ruby script/console -e development 'create_oup_wiki'

Run Unit, Functional, Integration Tests

Build Process

The EPF Wiki build process performs the following steps automatically each day:

  1. extracts source from CVS;
  2. generates statistics;
  3. creates a database;
  4. runs tests (unit, functional, integration);
  5. generates documentation;
  6. creates a release and download;
  7. deploy the release to a test server.

Links to the results:

This process can send you an email with the results. If you want to be added (or removed) from the distribution list add (or remove) yourself to (or from) the CC list of Bug 226656 - Setup and maintain daily build process


Know Issues

undefined method `require_gem'

After upgrade of Ruby Gems things are not working as expected. For instance when you run a rake tasks you get a message similar to

c:/ruby/bin/rake.bat:24: undefined method `require_gem' for main:Object (NoMethodError)

You fix this by reinstalling gems. You can find out what to reinstall by doing a search for require_gem in c:\ruby\bin. You can also replace manually all instance of of require_gem with gem.

Bugzilla Setup

See EPF Composer Development Guide

References

  1. Wikipedia Cheatsheet
  2. EPF Composer Development Guide
  3. Welcome to RadRails, the Ruby on Rails authoring environment for Aptana Studio and Eclipse
  4. CQ2254 IPZilla for HTML editor

Back to the top