App Development Starter Kit
Software Requirements
java (required for jslint support; recommended)
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u30-download-1377139.html
Ensure java is included in the global PATH.
ruby
http://rubyinstaller.org/downloads/ (Windows only- comes with OSX)
The starter kit has been tested against v1.8.7 of ruby.
rake
http://rake.rubyforge.org/
Rake is a build tool for ruby and can be installed from the command line:
Contents
Download and uncompress the starter kit from the link located at the bottom of this page.
The starter kit contains the following items:
- examples: This directory contains example apps that can be built using the toolkit
- lib: This directory contains the new app templates and the jslint4java jar file
- Rakefile: This build file contains targets for building apps
Rakefile Usage
The Rakefile is used to manage all parts of the app development process. The following targets are defined:
rake combine # Merge all css and js into one app html file
rake default # Default task (equivalent to deploy)
rake deploy # Run jslint and combine
rake jslint # Runs JSLint on all app JavaScript files
rake new[app_name] # Create a new app
Create An App
This task creates a new directory with an html, css and js file for app development.Creating directory AppName...
Creating AppName.css...
Creating AppName.js...
Creating AppName.template.html...
Add any app styles to the css file and any app javascript to the newly created js file. The template.html file references both of them so running/debugging/testing your app is as simple as opening the template.html file in Chrome or Firefox.
Note that in order to support running outside of Rally the SDK is included as a fully qualified URL from rally1.rallydev.com. (On-prem users should adjust the template.html file to reference the correct server.) More information on using apps outside of Rally can be found here.
Also note that the SDK is included in debug mode for development (?debug=true). More information on SDK query string parameters can be found here.
JSLint
This task examines your javascript and can help detect common problems like missing semicolons. Note this task requires java.Running jslint...
-------JSLint output for AppName.js--------------
jslint:AppName.js:3:10:Missing semicolon.
Deploy To Rally
Once development/debugging is complete it is time to combine the html, css and js files into one html file which can be easily pasted into a Rally custom tab.
Processing AppName.template.html...
Concatenating AppName.css...
Concatenating AppName.js...
Creating merged app html file AppNameApp.html...
AppNameApp.html successfully created!
Alternatively the deploy target can be invoked. This is the same as combine but also runs jslint.
(This is also the default and can be invoked simply by typing rake).
Running jslint...
-------JSLint output for AppName.js--------------
Processing AppName.template.html...
Concatenating AppName.css...
Concatenating AppName.js...
Creating merged app html file AppNameApp.html...
AppNameApp.html successfully created!
Simply paste the contents of the generated App.html file into a Rally custom tab to begin using it within your Rally workspace.
Note that the generated App.html file no longer references the App SDK using a fully qualified URL (and so can no longer be run outside Rally). Instead the SDK will be loaded from the Rally server in which the app is running.