This is a solution for https://gist.github.com/CansaSCityShuffle/7102473 written in Ruby and used Torquebox with Sinatra and DataMapper
-
rbenv install jruby-1.7.3
-
if this does not work, update your ruby-build by
cd [RBENVPATH]/plugins/ruby-build && git pull
-
rbenv local jruby-1.7.3
-
gem install bundler
-
bundle install
-
./deploy
-
bundle exec torquebox run
export JAVA\_OPTS="-d32"
- more things can be found here: http://blog.headius.com/2010/03/jruby-startup-time-tips.html
you can run tests with:
- All Tests:
be rspec
orbe rake spec
- Only unit tests:
be rspec spec/unit
orbe rake spec unit
- Only integration tests:
be rspec spec/integration
orbe rake spec integration
- only one test:
be rspec [PATH OF YOUR TESTFILE]
!Note! You find outPUTS from remote_describes in your torquebox/jboss logs. To find out the path you can deploy an app.
run Guard with be guard
.
- show all companies:
GET http://localhost:8080/companies/
- create a company:
POST http://localhost:8080/companies/?name=[yourname]&credit_card_number=[number with a even last digit are valid]
- delete a company:
DELETE http://localhost:8080/companies/[id]
- delete all companies:
DELETE http://localhost:8080/companies/all
- replay (is used to sync data between cosumers and companies):
GET http://localhost:8080/companies/replay
- show all:
GET http://localhost:8080/[demo|live]_clouds/
- [] writing Tests for live_clouds
- [] writing Tests for demo_clouds
- [] better file structure for the apps. (Without any configuration every Background job and Message listener has to be in the application Root)