fixed bug where application integrations would not load if there was a config file
This commit is contained in:
parent
e4681e2672
commit
11cf736066
@ -3,7 +3,7 @@ require "compass/app_integration/stand_alone"
|
|||||||
module Compass
|
module Compass
|
||||||
module AppIntegration
|
module AppIntegration
|
||||||
module Helpers
|
module Helpers
|
||||||
attr_accessor :project_types
|
#attr_accessor :project_types
|
||||||
DEAFULT_PROJECT_TYPES = {
|
DEAFULT_PROJECT_TYPES = {
|
||||||
:stand_alone => "Compass::AppIntegration::StandAlone"
|
:stand_alone => "Compass::AppIntegration::StandAlone"
|
||||||
}
|
}
|
||||||
@ -12,6 +12,14 @@ module Compass
|
|||||||
@project_types ||= DEAFULT_PROJECT_TYPES
|
@project_types ||= DEAFULT_PROJECT_TYPES
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def project_types
|
||||||
|
@project_types
|
||||||
|
end
|
||||||
|
|
||||||
|
def any?
|
||||||
|
@project_types == DEAFULT_PROJECT_TYPES
|
||||||
|
end
|
||||||
|
|
||||||
def lookup(type)
|
def lookup(type)
|
||||||
unless @project_types[type].nil?
|
unless @project_types[type].nil?
|
||||||
eval @project_types[type]
|
eval @project_types[type]
|
||||||
|
@ -103,7 +103,9 @@ module Compass
|
|||||||
add_configuration(:stand_alone)
|
add_configuration(:stand_alone)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
unless AppIntegration.any?
|
||||||
add_configuration(data)
|
add_configuration(data)
|
||||||
|
end
|
||||||
else
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user