Permalink
Browse files

Merge pull request #79 from joliss/glob-order

Make glob order well-defined
  • Loading branch information...
2 parents 9008ba0 + 5e5e34d commit 3465e0e3e134bf52ddf5d138e8c8262412080095 @wycats wycats committed Aug 10, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/rake-pipeline.rb
  2. +1 −1 lib/rake-pipeline/middleware.rb
View
@@ -246,7 +246,7 @@ def input_files
@inputs.each do |root, glob|
expanded_root = File.expand_path(root)
- files = Dir[File.join(expanded_root, glob)].select { |f| File.file?(f) }
+ files = Dir[File.join(expanded_root, glob)].sort.select { |f| File.file?(f) }
files.each do |file|
relative_path = file.sub(%r{^#{Regexp.escape(expanded_root)}/}, '')
@@ -58,7 +58,7 @@ def response_for(file)
def file_for(path)
project.pipelines.each do |pipeline|
- file = Dir[File.join(pipeline.output_root, path)].first
+ file = Dir[File.join(pipeline.output_root, path)].sort.first
return file unless file.nil?
end
nil

0 comments on commit 3465e0e

Please sign in to comment.