Browse Source

Changes needed to run in produciton

eperez-timeinput
Jason Denney 11 years ago
parent
commit
7c85e2901f
  1. 1
      Gemfile
  2. 8
      Gemfile.lock
  3. 22
      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
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem "twitter-bootstrap-rails", "~> 2.0.3"

8
Gemfile.lock

@ -1,6 +1,6 @@
GIT
remote: https://github.com/spacemunkay/acts_as_loggable.git
revision: 6033fe5a44878bb374f73fe473fed9a3396ddc74
revision: 49e264849ed9018445fb999cacfc55e1e28d7faa
specs:
acts_as_loggable (0.0.7)
activerecord (>= 3.0)
@ -178,11 +178,6 @@ GEM
railties (>= 3.0)
rspec (~> 2.8.0)
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)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
@ -248,7 +243,6 @@ DEPENDENCIES
rails (= 3.2.13)
rb-fsevent
rspec-rails (~> 2.8.1)
sass-rails (~> 3.2.3)
shoulda-matchers (~> 1.0.0)
spork
sqlite3 (~> 1.3.5)

22
Rakefile

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

13
db/seeds.rb

@ -24,7 +24,6 @@ if Rails.env.development?
if User.all.empty?
FactoryGirl.create(:user)
FactoryGirl.create(:staff)
FactoryGirl.create(:admin)
FactoryGirl.create(:bike_admin)
FactoryGirl.create(:user_profile)
end
@ -35,4 +34,16 @@ if Rails.env.development?
FactoryGirl.create(:bike)
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

Loading…
Cancel
Save