Rakefile 413 B

1234567891011121314151617
  1. # -*- coding: utf-8 -*-
  2. tasks = -> environment, default_task {
  3. FileList["tasks/#{environment}/**/*.rake"].each(&method(:import))
  4. task :default => default_task
  5. }
  6. case ENV['DATA_STRUCTURES_RB_ENV']
  7. when "development", nil then tasks.call "development", "test"
  8. when "production" then tasks.call "production", "production:run"
  9. else
  10. $stderr.puts "ERROR: there are no tasks for that environment"
  11. exit 1
  12. end