Browse Source

Changes needed to run in produciton

eperez-timeinput
Jason Denney 12 years ago
parent
commit
7c85e2901f
  1. 1
      Gemfile
  2. 8
      Gemfile.lock
  3. 4
      Rakefile
  4. 13
      db/seeds.rb

1
Gemfile

@ -20,7 +20,6 @@ gem 'will_paginate', '~> 3.0.3'
# Gems used only for assets and not required # Gems used only for assets and not required
# in production environments by default. # in production environments by default.
group :assets do group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1' gem 'coffee-rails', '~> 3.2.1'
gem "twitter-bootstrap-rails", "~> 2.0.3" gem "twitter-bootstrap-rails", "~> 2.0.3"

8
Gemfile.lock

@ -1,6 +1,6 @@
GIT GIT
remote: https://github.com/spacemunkay/acts_as_loggable.git remote: https://github.com/spacemunkay/acts_as_loggable.git
revision: 6033fe5a44878bb374f73fe473fed9a3396ddc74 revision: 49e264849ed9018445fb999cacfc55e1e28d7faa
specs: specs:
acts_as_loggable (0.0.7) acts_as_loggable (0.0.7)
activerecord (>= 3.0) activerecord (>= 3.0)
@ -178,11 +178,6 @@ GEM
railties (>= 3.0) railties (>= 3.0)
rspec (~> 2.8.0) rspec (~> 2.8.0)
rubyzip (0.9.9) rubyzip (0.9.9)
sass (3.2.7)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
selenium-webdriver (2.31.0) selenium-webdriver (2.31.0)
childprocess (>= 0.2.5) childprocess (>= 0.2.5)
multi_json (~> 1.0) multi_json (~> 1.0)
@ -248,7 +243,6 @@ DEPENDENCIES
rails (= 3.2.13) rails (= 3.2.13)
rb-fsevent rb-fsevent
rspec-rails (~> 2.8.1) rspec-rails (~> 2.8.1)
sass-rails (~> 3.2.3)
shoulda-matchers (~> 1.0.0) shoulda-matchers (~> 1.0.0)
spork spork
sqlite3 (~> 1.3.5) sqlite3 (~> 1.3.5)

4
Rakefile

@ -12,6 +12,8 @@ require File.expand_path('../config/application', __FILE__)
Velocipede::Application.load_tasks Velocipede::Application.load_tasks
unless Rails.env.production?
namespace :spec do namespace :spec do
desc 'Run all acceptance specs' desc 'Run all acceptance specs'
RSpec::Core::RakeTask.new(:acceptance => 'db:test:prepare') do |t| RSpec::Core::RakeTask.new(:acceptance => 'db:test:prepare') do |t|
@ -25,3 +27,5 @@ desc 'Run all specs'
RSpec::Core::RakeTask.new(:spec => 'db:test:prepare') do |t| RSpec::Core::RakeTask.new(:spec => 'db:test:prepare') do |t|
t.pattern = '**/*{_spec.rb,.feature}' t.pattern = '**/*{_spec.rb,.feature}'
end end
end

13
db/seeds.rb

@ -24,7 +24,6 @@ if Rails.env.development?
if User.all.empty? if User.all.empty?
FactoryGirl.create(:user) FactoryGirl.create(:user)
FactoryGirl.create(:staff) FactoryGirl.create(:staff)
FactoryGirl.create(:admin)
FactoryGirl.create(:bike_admin) FactoryGirl.create(:bike_admin)
FactoryGirl.create(:user_profile) FactoryGirl.create(:user_profile)
end end
@ -35,4 +34,16 @@ if Rails.env.development?
FactoryGirl.create(:bike) FactoryGirl.create(:bike)
end end
end end
elsif Rails.env.production?
if User.all.empty?
#create an admin
admin = User.create!( :username => 'admin',
:first_name => 'admin',
:last_name => 'admin',
:email=>'admin@example.com',
:password=>'password')
admin.roles << Role.find_by_role('admin')
end
end end

Loading…
Cancel
Save