Commit b6f156e01e3beadd005aaf1d62873c64783e8a64

Authored by Ross Reinhardt
1 parent 7ab92ade
Exists in master

Fix tasks and commands so they can be run from the root directory

fixes lessonly/scim_rails#25
fixes lessonly/scim_rails#26

Why
Since we are using the spec/ director instead of the default test/ we
need to specify the locations of the dummy application and it's rake
file. With out this, you cannot run things like db:migrate from the root
of the engine as you should. This goes for any rake task you would
usually call from the root. Additionally, commands like rails console
would not work because it would not be able to find the dummy
application to load it.
Showing 2 changed files with 2 additions and 1 deletions   Show diff stats
Rakefile
... ... @@ -14,7 +14,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
14 14 rdoc.rdoc_files.include('lib/**/*.rb')
15 15 end
16 16  
17   -APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
  17 +APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
18 18 load 'rails/tasks/engine.rake'
19 19  
20 20  
... ...
bin/rails
... ... @@ -4,6 +4,7 @@
4 4  
5 5 ENGINE_ROOT = File.expand_path('../..', __FILE__)
6 6 ENGINE_PATH = File.expand_path('../../lib/scim_rails/engine', __FILE__)
  7 +APP_PATH = File.expand_path('../../spec/dummy/config/application', __FILE__)
7 8  
8 9 # Set up gems listed in the Gemfile.
9 10 ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
... ...