This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
61 changed files
with
4,127 additions
and
2,437 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
source 'http://rubygems.org' | ||
|
||
group :torquebox do | ||
gem "org.torquebox.rake-support" | ||
gem "org.torquebox.torquebox-messaging-client" | ||
gem "org.torquebox.vfs" | ||
end | ||
|
||
gem 'rails', '3.0.3' | ||
gem 'jdbc-sqlite3' | ||
gem "activerecord-jdbcpostgresql-adapter" | ||
gem "boxgrinder-core" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
abstract (1.0.0) | ||
actionmailer (3.0.3) | ||
actionpack (= 3.0.3) | ||
mail (~> 2.2.9) | ||
actionpack (3.0.3) | ||
activemodel (= 3.0.3) | ||
activesupport (= 3.0.3) | ||
builder (~> 2.1.2) | ||
erubis (~> 2.6.6) | ||
i18n (~> 0.4) | ||
rack (~> 1.2.1) | ||
rack-mount (~> 0.6.13) | ||
rack-test (~> 0.5.6) | ||
tzinfo (~> 0.3.23) | ||
activemodel (3.0.3) | ||
activesupport (= 3.0.3) | ||
builder (~> 2.1.2) | ||
i18n (~> 0.4) | ||
activerecord (3.0.3) | ||
activemodel (= 3.0.3) | ||
activesupport (= 3.0.3) | ||
arel (~> 2.0.2) | ||
tzinfo (~> 0.3.23) | ||
activerecord-jdbc-adapter (1.0.3-java) | ||
activerecord-jdbcpostgresql-adapter (1.0.3-java) | ||
activerecord-jdbc-adapter (= 1.0.3) | ||
jdbc-postgres (~> 8.4.0) | ||
activeresource (3.0.3) | ||
activemodel (= 3.0.3) | ||
activesupport (= 3.0.3) | ||
activesupport (3.0.3) | ||
arel (2.0.5) | ||
boxgrinder-core (0.1.3) | ||
hashery (>= 1.3.0) | ||
open4 (>= 1.0.0) | ||
builder (2.1.2) | ||
erubis (2.6.6) | ||
abstract (>= 1.0.0) | ||
hashery (1.3.0) | ||
i18n (0.5.0) | ||
jdbc-postgres (8.4.702-java) | ||
jdbc-sqlite3 (3.6.14.2.056-java) | ||
mail (2.2.11) | ||
activesupport (>= 2.3.6) | ||
i18n (~> 0.5.0) | ||
mime-types (~> 1.16) | ||
treetop (~> 1.4.8) | ||
mime-types (1.16) | ||
open4 (1.0.1) | ||
org.torquebox.rake-support (1.0.0.Beta23) | ||
org.torquebox.torquebox-messaging-client (1.0.0.Beta23-java) | ||
org.torquebox.torquebox-naming-client (= 1.0.0.Beta23) | ||
org.torquebox.torquebox-naming-client (1.0.0.Beta23-java) | ||
org.torquebox.vfs (1.0.0.Beta23) | ||
polyglot (0.3.1) | ||
rack (1.2.1) | ||
rack-mount (0.6.13) | ||
rack (>= 1.0.0) | ||
rack-test (0.5.6) | ||
rack (>= 1.0) | ||
rails (3.0.3) | ||
actionmailer (= 3.0.3) | ||
actionpack (= 3.0.3) | ||
activerecord (= 3.0.3) | ||
activeresource (= 3.0.3) | ||
activesupport (= 3.0.3) | ||
bundler (~> 1.0) | ||
railties (= 3.0.3) | ||
railties (3.0.3) | ||
actionpack (= 3.0.3) | ||
activesupport (= 3.0.3) | ||
rake (>= 0.8.7) | ||
thor (~> 0.14.4) | ||
rake (0.8.7) | ||
thor (0.14.6) | ||
treetop (1.4.9) | ||
polyglot (>= 0.3.1) | ||
tzinfo (0.3.23) | ||
|
||
PLATFORMS | ||
java | ||
|
||
DEPENDENCIES | ||
activerecord-jdbcpostgresql-adapter | ||
boxgrinder-core | ||
jdbc-sqlite3 | ||
org.torquebox.rake-support | ||
org.torquebox.torquebox-messaging-client | ||
org.torquebox.vfs | ||
rails (= 3.0.3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
Homepage: | ||
|
||
http://www.jboss.org/boxgrinder/rest.html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
# Add your own tasks in files placed in lib/tasks ending in .rake, | ||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | ||
|
||
require(File.join(File.dirname(__FILE__), 'config', 'boot')) | ||
|
||
require File.expand_path('../config/application', __FILE__) | ||
require 'rake' | ||
require 'rake/testtask' | ||
require 'rake/rdoctask' | ||
|
||
require 'tasks/rails' | ||
|
||
require 'torquebox/tasks' | ||
BoxgrinderRest::Application.load_tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
|
||
SU_CMD=$(which su) | ||
|
||
BOXGRINDER_REST_DEPLOYMENT="/opt/jboss-as/server/all/deploy/boxgrinder-rest-rails.yml" | ||
if [ ! -e $BOXGRINDER_REST_DEPLOYMENT ]; then | ||
echo "Creating BoxGrinder REST deployment file..." | ||
echo -e '---\napplication:\n RAILS_ROOT: /opt/boxgrinder-rest\n RAILS_ENV: production\nweb:\n context: /\n' > $BOXGRINDER_REST_DEPLOYMENT | ||
fi | ||
|
||
BOXGRINDER_DB_USER=$(echo '\du' | $SU_CMD postgres -c psql | grep boxgrinder | cut -d' ' -f2) | ||
if [ $BOXGRINDER_DB_USER. != 'boxgrinder.' ]; then | ||
echo "Creating BoxGrinder database user..." | ||
$SU_CMD postgres -c "/usr/bin/createuser -SDR boxgrinder" | ||
echo "ALTER USER boxgrinder WITH PASSWORD 'boxgrinder';" | $SU_CMD postgres -c /usr/bin/psql | ||
fi | ||
|
||
BOXGRINDER_DB_NAME=$(echo '\l' | $SU_CMD postgres -c psql | grep boxgrinder_production | cut -d' ' -f2) | ||
if [ $BOXGRINDER_DB_NAME. != 'boxgrinder_production.' ]; then | ||
echo "Creating BoxGrinder database..." | ||
$SU_CMD postgres -c "/usr/bin/createdb boxgrinder_production -O boxgrinder" | ||
echo "GRANT ALL ON DATABASE boxgrinder_production TO boxgrinder" | $SU_CMD postgres -c /usr/bin/psql | ||
fi | ||
|
||
STEAMCANNON_SCHEMA=$(echo '\dt' | $SU_CMD postgres -c 'psql boxgrinder_production' | grep schema_migrations | cut -d' ' -f4) | ||
if [ $STEAMCANNON_SCHEMA. != 'schema_migrations.' ]; then | ||
echo "Initializing and seeding BoxGrinder database schema..." | ||
cd /opt/boxgrinder | ||
export RAILS_ENV=production | ||
$SU_CMD jboss-as6 -c '/opt/jruby/bin/jruby -S rake db:setup' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This file is used by Rack-based servers to start the application. | ||
|
||
require ::File.expand_path('../config/environment', __FILE__) | ||
run BoxgrinderRest::Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
require File.expand_path('../boot', __FILE__) | ||
|
||
require 'rails/all' | ||
|
||
# If you have a Gemfile, require the gems listed there, including any gems | ||
# you've limited to :test, :development, or :production. | ||
Bundler.require(:default, Rails.env) if defined?(Bundler) | ||
|
||
module BoxgrinderRest | ||
class Application < Rails::Application | ||
# Settings in config/environments/* take precedence over those specified here. | ||
# Application configuration should go into files in config/initializers | ||
# -- all .rb files in that directory are automatically loaded. | ||
|
||
# Custom directories with classes and modules you want to be autoloadable. | ||
# config.autoload_paths += %W(#{config.root}/extras) | ||
|
||
# Only load the plugins named here, in the order given (default is alphabetical). | ||
# :all can be used as a placeholder for all plugins not explicitly named. | ||
# config.plugins = [ :exception_notification, :ssl_requirement, :all ] | ||
|
||
# Activate observers that should always be running. | ||
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer | ||
|
||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. | ||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. | ||
# config.time_zone = 'Central Time (US & Canada)' | ||
|
||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. | ||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] | ||
# config.i18n.default_locale = :de | ||
|
||
# JavaScript files you want as :defaults (application.js is always included). | ||
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails) | ||
|
||
# Configure the default encoding used in templates for Ruby 1.9. | ||
config.encoding = "utf-8" | ||
|
||
# Configure sensitive parameters which will be filtered from the log file. | ||
config.filter_parameters += [:password] | ||
end | ||
end |
Oops, something went wrong.