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
|
# 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"
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
22
Rakefile
22
Rakefile
@ -12,16 +12,20 @@ require File.expand_path('../config/application', __FILE__)
|
|||||||
|
|
||||||
Velocipede::Application.load_tasks
|
Velocipede::Application.load_tasks
|
||||||
|
|
||||||
namespace :spec do
|
unless Rails.env.production?
|
||||||
desc 'Run all acceptance specs'
|
|
||||||
RSpec::Core::RakeTask.new(:acceptance => 'db:test:prepare') do |t|
|
namespace :spec do
|
||||||
t.pattern = '**/*.feature'
|
desc 'Run all acceptance specs'
|
||||||
|
RSpec::Core::RakeTask.new(:acceptance => 'db:test:prepare') do |t|
|
||||||
|
t.pattern = '**/*.feature'
|
||||||
|
end
|
||||||
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
|
end
|
||||||
|
13
db/seeds.rb
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…
x
Reference in New Issue
Block a user