Sha256: 9aa257e4e5d0e99e3cb45c9c54ff7ed5bf25dac3079e6880472c3b2f2fecf98c
Contents?: true
Size: 952 Bytes
Versions: 1
Compression:
Stored size: 952 Bytes
Contents
namespace :succotash do desc "Create 'db/seeds/static.rb' and 'db/seeds/sample.rb'" task :install do spec = Gem::Specification.find_by_name 'succotash' puts "*** Creating seed dirs ***".green system("mkdir -p #{Rails.root}/db/seeds/static") unless Dir.exist?("#{Rails.root}/db/seeds/static") system("mkdir -p #{Rails.root}/db/seeds/sample") unless Dir.exist?("#{Rails.root}/db/seeds/sample") unless File.exist?("#{Rails.root}/db/seeds/static.yml") system("cp #{spec.gem_dir}/lib/templates/static.yml #{Rails.root}/db/seeds/") puts "*** Settings up static.rb ***".green else puts "*** static.rb already exists ***".yellow end unless File.exist?("#{Rails.root}/db/seeds/sample.yml") system("cp #{spec.gem_dir}/lib/templates/sample.yml #{Rails.root}/db/seeds/") puts "*** Settings up sample.rb ***".green else puts "*** sample.rb already exists ***".yellow end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
succotash-1.0.2 | lib/tasks/succotash.rake |