Skip to content

Commit

Permalink
Use sass
Browse files Browse the repository at this point in the history
  • Loading branch information
brauliobo committed May 1, 2013
1 parent 3122b15 commit 315d96d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Expand Up @@ -3,6 +3,8 @@ source "https://rubygems.org"
gem 'exception_notification', '1.0.20090728'
gem 'system_timer'

gem 'sass'

group :test do
gem 'rspec', '1.2.9'
gem 'rspec-rails', '1.2.9'
Expand Down
20 changes: 12 additions & 8 deletions config/environment.rb
@@ -1,13 +1,13 @@
# Be sure to restart your web server when you modify this file.

# Uncomment below to force Rails into production mode when
# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
#ENV['RAILS_ENV'] ||= 'production'

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')

# extra directories for controllers organization
# extra directories for controllers organization
extra_controller_dirs = %w[
app/controllers/my_profile
app/controllers/admin
Expand All @@ -31,15 +31,15 @@ def noosfero_session_secret

Rails::Initializer.run do |config|
# Settings in config/environments/* take precedence those specified here

# Skip frameworks you're not going to use (only works if using vendor/rails)
# config.frameworks -= [ :action_web_service, :action_mailer ]

# Add additional load paths for your own custom dirs
# config.load_paths += %W( #{RAILS_ROOT}/extras )
config.load_paths += %W( #{RAILS_ROOT}/app/sweepers )

# Force all environments to use the same logger level
# Force all environments to use the same logger level
# (by default production uses :info, the others :debug)
# config.log_level = :debug

Expand All @@ -48,7 +48,7 @@ def noosfero_session_secret
# config.action_controller.session_store = :active_record_store

# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql

Expand All @@ -74,7 +74,7 @@ def noosfero_session_secret

# Your secret key for verifying cookie session data integrity.
# If you change this key, all old sessions will become invalid!
# Make sure the secret is at least 30 characters and all random,
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
config.action_controller.session = {
:session_key => '_noosfero_session',
Expand All @@ -83,7 +83,7 @@ def noosfero_session_secret

# Adds custom attributes to the Set of allowed html attributes for the #sanitize helper
config.action_view.sanitized_allowed_attributes = 'align', 'border', 'alt', 'vspace', 'hspace', 'width', 'heigth', 'value', 'type', 'data', 'style', 'target', 'codebase', 'archive', 'classid', 'code', 'flashvars', 'scrolling', 'frameborder'

# Adds custom tags to the Set of allowed html tags for the #sanitize helper
config.action_view.sanitized_allowed_tags = 'object', 'embed', 'param', 'table', 'tr', 'th', 'td', 'applet', 'comment', 'iframe'

Expand All @@ -93,12 +93,16 @@ def noosfero_session_secret
$LOAD_PATH << item
config.controller_paths << item
end

require 'sass/plugin/rack'
config.middleware.use Sass::Plugin::Rack
Sass::Plugin.add_template_location "#{RAILS_ROOT}/public/designs/themes/escambo", "#{RAILS_ROOT}/public/designs/themes/escambo"
end
extra_controller_dirs.each do |item|
(ActiveSupport.const_defined?('Dependencies') ? ActiveSupport::Dependencies : ::Dependencies).load_paths << item
end

# Add new inflection rules using the following format
# Add new inflection rules using the following format
# (all these examples are active by default):
# Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
Expand Down

0 comments on commit 315d96d

Please sign in to comment.