mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-02-28 08:43:23 -05:00
Changes needed to run in produciton
This commit is contained in:
parent
2c548ff63c
commit
7c85e2901f
1
Gemfile
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"
|
||||
|
||||
|
@ -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
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
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…
x
Reference in New Issue
Block a user