Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure order of globbed files in task helpers #205

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tasks/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
def core_sources
first_sources = JSON.parse(File.read('./src/SourcesList.json')).collect { |f| "./src/core/#{f}" }

remaining_sources = Dir.glob('./src/core/*.js').reject { |f| first_sources.include?(f) }.sort
remaining_sources = Dir.glob('./src/core/*.js').sort.reject { |f| first_sources.include?(f) }.sort

first_sources + remaining_sources
end

def html_sources
['./src/html/HtmlReporterHelpers.js'] + Dir.glob('./src/html/*.js')
['./src/html/HtmlReporterHelpers.js'] + Dir.glob('./src/html/*.js').sort
end

def console_sources
Dir.glob('./src/console/*.js')
Dir.glob('./src/console/*.js').sort
end

def core_specfiles
Dir.glob('./spec/core/*.js')
Dir.glob('./spec/core/*.js').sort
end

def html_specfiles
Dir.glob('./spec/html/*.js')
Dir.glob('./spec/html/*.js').sort
end

def console_specfiles
Dir.glob('./spec/console/*.js')
Dir.glob('./spec/console/*.js').sort
end

def version_string
Expand Down