lib/sprout/ruby_feature.rb in sprout-1.0.9.pre vs lib/sprout/ruby_feature.rb in sprout-1.0.11.pre

- old
+ new

@@ -101,16 +101,17 @@ #puts "+++++++++++++++++++++++++++" #puts ">> entity_for #{name} pkg_name: #{pkg_name} version: #{version_requirement}" #registered_entities.each do |entity| #puts ">> entity: #{entity.name} pkg_name: #{entity.pkg_name} version: #{entity.pkg_version}" #end - registered_entities.select do |entity| + registered_entities.reverse.select do |entity| satisfies_name?(entity, name_or_names) && satisfies_platform?(entity) && satisfies_pkg_name?(entity, pkg_name) && satisfies_version?(entity, version_requirement) end.first end + def satisfies_environment? entity, environment #puts ">> env: #{entity.environment} vs. #{environment}" environment.nil? || !entity.respond_to?(:environment) || entity.environment.to_s == environment.to_s end