# File lib/compass/app_integration/rails.rb, line 14 def booted! Compass::AppIntegration::Rails.const_set(:BOOTED, true) end
# File lib/compass/app_integration/rails.rb, line 18 def booted? defined?(Compass::AppIntegration::Rails::BOOTED) && Compass::AppIntegration::Rails::BOOTED end
# File lib/compass/app_integration/rails.rb, line 26 def configuration Compass::Configuration::Data.new('rails'). extend(ConfigurationDefaults) end
# File lib/compass/app_integration/rails.rb, line 31 def env env_production? ? :production : :development end
# File lib/compass/app_integration/rails.rb, line 35 def env_production? if defined?(::Rails) && ::Rails.respond_to?(:env) ::Rails.env.production? elsif defined?(RAILS_ENV) RAILS_ENV == "production" end end
# File lib/compass/app_integration/rails.rb, line 51 def initialize!(config = nil) if booted? Compass::Util.compass_warn("Warning: Compass was booted twice. Compass has a Railtie now; please remove your intializer.") else booted! end config ||= Compass.detect_configuration_file(root) Compass.add_project_configuration(config, :project_type => :rails) Compass.discover_extensions! Compass.configure_sass_plugin! Compass.handle_configuration_change! end
# File lib/compass/app_integration/rails.rb, line 22 def installer(*args) Installer.new(*args) end
# File lib/compass/app_integration/rails.rb, line 43 def root if defined?(::Rails) && ::Rails.respond_to?(:root) ::Rails.root elsif defined?(RAILS_ROOT) RAILS_ROOT end end