Permalink
Browse files

Adding script to populate database. Closes #33

  • Loading branch information...
1 parent ea617a7 commit a616fe664f0bff331248828040a64c6321444b10 hurrycane committed Aug 29, 2010
Showing with 10 additions and 0 deletions.
  1. +2 −0 Gemfile
  2. +7 −0 lib/rails_admin/railties/tasks.rake
  3. +1 −0 spec/dummy/Gemfile
View
@@ -7,6 +7,8 @@ gem 'builder'
gem 'jeweler'
gem 'devise'
+gem 'dummy_data'
+
gem "launchy", ">= 0.3.0"
gem "rspec-rails", ">= 2.0.0.beta.20"
gem "webrat", :git => "git://github.com/kalv/webrat.git"
@@ -5,4 +5,11 @@ namespace :admin do
task :populate_history do
RailsAdmin::ExtraTasks.populateDatabase
end
+
+ desc "Populate history tabel with a year of data"
+ task :populate_database do
+ system("rails generate dummy:data --base-amount 60 --growth-ratio 1.5")
+ Rake::Task["dummy:data:import"].reenable
+ Rake::Task["dummy:data:import"].invoke
+ end
end
View
@@ -28,4 +28,5 @@ group :development, :test do
gem "launchy", ">= 0.3.0"
gem "rspec-rails", ">= 2.0.0.beta.20"
gem "webrat", :git => "git://github.com/kalv/webrat.git"
+ gem "dummy_data"
end

0 comments on commit a616fe6

Please sign in to comment.