Skip to content

Commit

Permalink
Revert "Remove NABRA"
Browse files Browse the repository at this point in the history
This reverts commit bb9a84b.
  • Loading branch information
scottwillson committed Apr 10, 2015
1 parent bb9a84b commit aa0957f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/models/categories/name_normalization.rb
Expand Up @@ -2,7 +2,7 @@ module Categories
module NameNormalization
extend ActiveSupport::Concern

RACING_ASSOCIATIONS = %{ ABA ATRA CBRA GBRA MBRA OBRA WSBA }
RACING_ASSOCIATIONS = %{ ABA ATRA CBRA GBRA MBRA NABRA OBRA WSBA }

included do
def self.find_or_create_by_normalized_name(name)
Expand Down
2 changes: 1 addition & 1 deletion config/deploy.rb
Expand Up @@ -38,7 +38,7 @@

task :registration_engine do
on roles :app do
if fetch(:application) == "obra"
if fetch(:application) == "obra" || fetch(:application) == "nabra"
if test("[ -e \"#{release_path}/lib/registration_engine\" ]")
execute :rm, "-rf \"#{release_path}/lib/registration_engine\""
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20140303223128_add_event_registration_public.rb
@@ -1,6 +1,6 @@
class AddEventRegistrationPublic < ActiveRecord::Migration
def up
if RacingAssociation.current.short_name == "OBRA"
if RacingAssociation.current.short_name == "OBRA" || RacingAssociation.current.short_name == "NABRA"
add_column :events, :registration_public, :boolean, default: true, null: false
end
end
Expand Down
4 changes: 2 additions & 2 deletions db/migrate/20140910213415_widen_refunds_policy.rb
@@ -1,12 +1,12 @@
class WidenRefundsPolicy < ActiveRecord::Migration
def up
if RacingAssociation.current.short_name == "OBRA"
if RacingAssociation.current.short_name == "OBRA" || RacingAssociation.current.short_name == "NABRA"
change_column :events, :refund_policy, :text, size: 512
end
end

def down
if RacingAssociation.current.short_name == "OBRA"
if RacingAssociation.current.short_name == "OBRA" || RacingAssociation.current.short_name == "NABRA"
change_column :events, :refund_policy, :string, size: 256
end
end
Expand Down
4 changes: 2 additions & 2 deletions script/all_associations_test
@@ -1,6 +1,6 @@
#! /usr/bin/env ruby

[ "", "aba", "atra", "mbra", "obra", "wsba" ].shuffle.each do |association|
[ "", "aba", "atra", "mbra", "nabra", "obra", "wsba" ].shuffle.each do |association|
if association.nil?
puts "*************************"
puts "Run racing_on_rails tests"
Expand All @@ -19,7 +19,7 @@
puts `bundle exec rake`
puts `bundle exec rake test:acceptance`

if association == "obra"
if association == "obra" || association == "nabra"
puts `bundle exec rake registration_engine:test`
puts `bundle exec rake registration_engine:test:acceptance`
end
Expand Down
2 changes: 1 addition & 1 deletion script/create_all_dbs
@@ -1,6 +1,6 @@
#! /usr/bin/env ruby

[ "aba", "atra", "mbra", "obra", "wsba" ].each do |association|
[ "aba", "atra", "mbra", "nabra", "obra", "wsba" ].each do |association|
puts association
`./script/local #{association}`
puts "Create databases"
Expand Down
2 changes: 1 addition & 1 deletion script/deploy
@@ -1,6 +1,6 @@
#! /usr/bin/env ruby

%w{ aba atra mbra obra wsba }.each do |association|
%w{ aba atra mbra obra nabra wsba }.each do |association|
puts "Deploy #{association}"
`script/local #{association}`
puts `cap production deploy`
Expand Down
2 changes: 1 addition & 1 deletion script/deploy_staging
@@ -1,6 +1,6 @@
#! /usr/bin/env ruby

%w{ obra }.each do |association|
%w{ nabra obra }.each do |association|
puts "Deploy #{association}"
`script/local #{association}`
puts `cap staging deploy`
Expand Down
2 changes: 1 addition & 1 deletion script/local
Expand Up @@ -23,7 +23,7 @@ if !association.nil?
`ln -s ../../racing_on_rails_local/#{association}/public public/local`
end

if association == "obra"
if association == "obra" || association == "nabra"
if !File.exist?("lib/registration_engine")
`ln -s ../../registration_engine lib/registration_engine`
end
Expand Down

0 comments on commit aa0957f

Please sign in to comment.