Skip to content

Commit

Permalink
Remove keyword arguments.
Browse files Browse the repository at this point in the history
To restore ruby 1.9.3 compatibility.
  • Loading branch information
oneiros committed Apr 10, 2014
1 parent 541361e commit 58aec01
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/jobs/static_program_export_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def perform(conference, locale='en')
ENV['RAILS_ENV'] = Rails.env
`rake frab:static_program_export`

exporter = StaticProgramExport.new(conference, locale: locale, destination: dir)
exporter = StaticProgramExport.new(conference, locale, dir)
file = exporter.create_tarball

Rails.logger.info "Attach static export tarball #{file}"
Expand Down
2 changes: 1 addition & 1 deletion lib/static_program_export.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class StaticProgramExport
# @param conference [Conference] conference to export
# @param locale [String] export conference in supported locale
# @param destination [String] export into this directory
def initialize(conference, locale: 'en', destination: EXPORT_PATH)
def initialize(conference, locale = 'en', destination = EXPORT_PATH)
@conference = conference
@locale = locale
@destination = destination || EXPORT_PATH
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/static_program_export.rake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace :frab do
conference_dir ||= ENV['CONFERENCE_DIR']

require 'static_program_export'
StaticProgramExport.new(conference, locale: locale, destination: conference_dir).run_export
StaticProgramExport.new(conference, locale, conference_dir).run_export
end

end
4 changes: 2 additions & 2 deletions test/unit/static_program_export_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ class StaticProgramExportTest < ActiveSupport::TestCase

test "static exporter can create a tarball" do
FileUtils.mkdir_p File.join(@target_dir, @conference.acronym)
exporter = StaticProgramExport.new(@conference, locale: @locale, destination: @target_dir)
exporter = StaticProgramExport.new(@conference, @locale, @target_dir)
assert_equal exporter.create_tarball, File.join(@target_dir, @conference.acronym + '-en.tar.gz')
end

test "static exporter can run export" do
exporter = StaticProgramExport.new(@conference, locale: @locale, destination: @target_dir)
exporter = StaticProgramExport.new(@conference, @locale, @target_dir)
exporter.run_export
assert File.directory? File.join(@target_dir, @conference.acronym)
end
Expand Down

0 comments on commit 58aec01

Please sign in to comment.