Skip to content

Commit

Permalink
fixed bug where application integrations would not load if there was …
Browse files Browse the repository at this point in the history
…a config file
  • Loading branch information
scottdavis committed Jan 31, 2012
1 parent e4681e2 commit 11cf736
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 9 additions & 1 deletion lib/compass/app_integration.rb
Expand Up @@ -3,7 +3,7 @@
module Compass
module AppIntegration
module Helpers
attr_accessor :project_types
#attr_accessor :project_types
DEAFULT_PROJECT_TYPES = {
:stand_alone => "Compass::AppIntegration::StandAlone"
}
Expand All @@ -12,6 +12,14 @@ def init
@project_types ||= DEAFULT_PROJECT_TYPES
end

def project_types
@project_types
end

def any?
@project_types == DEAFULT_PROJECT_TYPES
end

def lookup(type)
unless @project_types[type].nil?
eval @project_types[type]
Expand Down
8 changes: 5 additions & 3 deletions lib/compass/configuration/helpers.rb
Expand Up @@ -92,7 +92,7 @@ def sass_engine_options
def add_project_configuration(*args)
options = args.last.is_a?(Hash) ? args.pop : {}
configuration_file_path = args.shift || detect_configuration_file

raise ArgumentError, "Too many arguments" if args.any?
if data = configuration_for(configuration_file_path, nil, configuration_for(options[:defaults]))
if data.raw_project_type
Expand All @@ -103,9 +103,11 @@ def add_project_configuration(*args)
add_configuration(:stand_alone)
end

add_configuration(data)
unless AppIntegration.any?
add_configuration(data)
end
else
add_configuration(options[:project_type] || configuration.project_type_without_default || (yield if block_given?) || :stand_alone)
add_configuration(options[:project_type] || configuration.project_type_without_default || (yield if block_given?) || :stand_alone)
end
end

Expand Down

0 comments on commit 11cf736

Please sign in to comment.