lib/fulmar/domain/service/configuration_service.rb in fulmar-1.8.2 vs lib/fulmar/domain/service/configuration_service.rb in fulmar-1.8.3
- old
+ new
@@ -180,10 +180,11 @@
prepare_environments
prepare_dependencies
# Iterate over all environments and targets to prepare them
@config[:environments].delete(:all)
+ check_version
@config
end
def prepare_environments
@config[:environments].each_key do |env|
@@ -208,9 +209,16 @@
def check_path(env, target)
path = @config[:environments][env][target][:local_path]
return if path.blank?
return if path[0,1] == '/'
@config[:environments][env][target][:local_path] = File.expand_path("#{base_path}/#{path}")
+ end
+
+ def check_version
+ return if @config[:project][:fulmar_version].nil?
+ unless Gem::Dependency.new('', @config[:project][:fulmar_version]).match?('', Fulmar::VERSION)
+ fail "Project requires a newer version of fulmar: #{@config[:project][:fulmar_version]}"
+ end
end
end
end
end
end