diff options
Diffstat (limited to 'generate.sh')
-rwxr-xr-x | generate.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/generate.sh b/generate.sh index 68504b0..059d3f8 100755 --- a/generate.sh +++ b/generate.sh @@ -9,9 +9,13 @@ set -xe srcdir=$(dirname "$(readlink -f "$0")") cd "$srcdir" +export RAILS_ENV=development + git rm -rf -- app test config/routes.rb db/migrate || true git checkout clean-start -- app test config/routes.rb +bundle install + bundle exec rails generate simple_captcha bundle exec rails generate delayed_job:active_record @@ -37,10 +41,12 @@ bundle exec rails generate scaffold bracket user:references tournament:reference # Just models bundle exec rails generate model server_setting bundle exec rails generate model game_setting game:references stype:integer name:string default:text description:text type_opt:text display_order:integer -bundle exec rails generate model tournament_preference tournament:references vartype:integer name:string value:text +bundle exec rails generate model tournament_setting tournament:references vartype:integer name:string value:text bundle exec rails generate model score user:references match:references value:integer bundle exec rails generate model remote_username game:references user:references json_value:text bundle exec rails generate model bracket_match bracket:references match:references predicted_winner:references +bundle exec rails generate model api_requests api_name:string + # Join tables bundle exec rails generate migration CreateTournamentPlayersJoinTable players tournaments bundle exec rails generate migration CreateTournamentHostsJoinTable hosts tournaments @@ -60,10 +66,10 @@ bundle exec rails generate migration AddHiddenAttrsToUser password_digest:string #for the tournament controller to generate options #bundle exec rails generate scaffold -bundle exec rake db:drop RAILS_ENV=development -bundle exec rake db:migrate RAILS_ENV=development +bundle exec rake db:drop +bundle exec rake db:migrate bundle exec rake db:seed find app -type f -name '*.rb' -exec bin/autoindent {} \; -git add app test config/routes.rb db/migrate db/schema.rb +git add app test config/routes.rb db/migrate db/schema.rb Gemfile.lock |