mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-19 08:40:12 +01:00
Removed superfluous 'tracks' directory at the root of the repository.
Testing commits to github.
This commit is contained in:
parent
6a42901514
commit
4cbf5a34d3
2269 changed files with 0 additions and 0 deletions
20
vendor/plugins/selenium-on-rails/switch_environment/init.rb
vendored
Normal file
20
vendor/plugins/selenium-on-rails/switch_environment/init.rb
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#make sure the controller is accessible
|
||||
$LOAD_PATH << File.dirname(__FILE__)
|
||||
require 'switch_environment_controller'
|
||||
|
||||
#hijack /selenium
|
||||
module ActionController
|
||||
module Routing #:nodoc:
|
||||
class RouteSet #:nodoc:
|
||||
alias_method :draw_without_selenium_routes, :draw
|
||||
def draw
|
||||
draw_without_selenium_routes do |map|
|
||||
map.connect 'selenium/*filename',
|
||||
:controller => 'switch_environment', :action => 'index'
|
||||
|
||||
yield map
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
16
vendor/plugins/selenium-on-rails/switch_environment/switch_environment_controller.rb
vendored
Normal file
16
vendor/plugins/selenium-on-rails/switch_environment/switch_environment_controller.rb
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
class SwitchEnvironmentController < ActionController::Base
|
||||
def index
|
||||
readme_path = File.expand_path File.join(File.dirname(__FILE__), '..', 'README')
|
||||
render :status => 500, :locals => {:readme_path => readme_path }, :inline => <<END
|
||||
<p>
|
||||
Selenium on Rails is only activated for <%= SeleniumOnRailsConfig.get(:environments).join ', ' %>
|
||||
environment<%= SeleniumOnRailsConfig.get(:environments).size > 1 ? 's' : '' %> (you're running
|
||||
<%= RAILS_ENV %>).
|
||||
</p>
|
||||
<p>
|
||||
Start your server in a different environment or see <tt><%= readme_path %></tt>
|
||||
for information regarding how to change this behavior.
|
||||
</p>
|
||||
END
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue