From b87dffb990828a85e1e9eb14cf550244e68ea5a9 Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Mon, 2 Jan 2012 20:44:54 -0500 Subject: [PATCH] removed merb --- lib/compass/app_integration.rb | 8 --- lib/compass/app_integration/merb.rb | 1 - lib/compass/app_integration/merb/runtime.rb | 63 --------------------- 3 files changed, 72 deletions(-) delete mode 100644 lib/compass/app_integration/merb.rb delete mode 100644 lib/compass/app_integration/merb/runtime.rb diff --git a/lib/compass/app_integration.rb b/lib/compass/app_integration.rb index a8e1beb9..ed650b32 100644 --- a/lib/compass/app_integration.rb +++ b/lib/compass/app_integration.rb @@ -7,7 +7,6 @@ module Compass module Helpers attr_accessor :project_types DEAFULT_PROJECT_TYPES = { - :merb => "Compass::AppIntegration::Merb", :stand_alone => "Compass::AppIntegration::StandAlone" } @@ -27,13 +26,6 @@ module Compass @project_types[type] = klass end - protected - - # Stolen from ActiveSupport - def camelize(s) - s.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase } - end - end extend Helpers init diff --git a/lib/compass/app_integration/merb.rb b/lib/compass/app_integration/merb.rb deleted file mode 100644 index 546ac987..00000000 --- a/lib/compass/app_integration/merb.rb +++ /dev/null @@ -1 +0,0 @@ -require 'compass/app_integration/merb/runtime' if defined?(Merb::Plugins) diff --git a/lib/compass/app_integration/merb/runtime.rb b/lib/compass/app_integration/merb/runtime.rb deleted file mode 100644 index 883c4de7..00000000 --- a/lib/compass/app_integration/merb/runtime.rb +++ /dev/null @@ -1,63 +0,0 @@ -# To configure Merb to use compass do the following: -# -# Add dependencies to config/dependencies.rb -# -# dependency "haml", ">=2.2.0" -# dependency "merb-haml", merb_gems_version -# dependency "chriseppstein-compass", :require_as => 'compass' -# -# -# To use a different sass stylesheets locations as is recommended by compass -# add this configuration to your configuration block: -# -# Merb::BootLoader.before_app_loads do -# Merb::Plugins.config[:compass] = { -# :stylesheets => "app/stylesheets", -# :compiled_stylesheets => "public/stylesheets/compiled" -# } -# end -# -module Compass - def self.setup_template_location - # default the compass configuration if they didn't set it up yet. - Merb::Plugins.config[:compass] ||= {} - - # default sass stylesheet location unless configured to something else - Merb::Plugins.config[:compass][:stylesheets] ||= Merb.dir_for(:stylesheet) / "sass" - - # default sass css location unless configured to something else - Merb::Plugins.config[:compass][:compiled_stylesheets] ||= Merb.dir_for(:stylesheet) - - #define the template hash for the project stylesheets as well as the framework stylesheets. - template_location = { - Merb::Plugins.config[:compass][:stylesheets] => Merb::Plugins.config[:compass][:compiled_stylesheets] - } - Compass::Frameworks::ALL.each do |framework| - template_location[framework.stylesheets_directory] = Merb::Plugins.config[:compass][:compiled_stylesheets] - end - - # merge existing template locations if present - if Merb::Plugins.config[:sass][:template_location].is_a?(Hash) - template_location.merge!(Merb::Plugins.config[:sass][:template_location]) - Merb::Plugins.config[:sass][:template_location] = template_location - end - - #configure Sass to know about all these sass locations. - Sass::Plugin.options[:template_location] = template_location - end -end - -Merb::BootLoader.after_app_loads do - #set up sass if haml load didn't do it -- this happens when using a non-default stylesheet location. - unless defined?(Sass::Plugin) - require "sass/plugin" - if Merb::Plugins.config[:sass] - Sass::Plugin.options = Merb::Plugins.config[:sass] - # support old (deprecatd Merb::Config[:sass] option) - elsif Merb::Config[:sass] - Sass::Plugin.options = Merb::Config[:sass] - end - end - - Compass.setup_template_location -end