Skip to content

Commit

Permalink
change method name NUBIC#429
Browse files Browse the repository at this point in the history
  • Loading branch information
flockom committed Mar 26, 2013
1 parent b1933de commit c08c047
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/surveyor/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class << self; attr_accessor :options, :log end
attr_accessor :context

# Class methods
def self.parsef(f, options={})
self.parse(File.read(f),{:source => f}.merge(options))
def self.parse_file(filename, options={})
self.parse(File.read(filename),{:source => filename}.merge(options))
end
def self.parse(str, options={})
self.ensure_attrs
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/surveyor_tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace :surveyor do
file = File.join(Rails.root, ENV["FILE"])
raise "File does not exist: #{file}" unless FileTest.exists?(file)
puts "--- Parsing #{file} ---"
Surveyor::Parser.parsef(file, {:trace => Rake.application.options.trace})
Surveyor::Parser.parse_file(file, {:trace => Rake.application.options.trace})
puts "--- Done #{file} ---"
end
desc "generate and load survey from REDCap Data Dictionary (specify FILE=surveys/redcap.csv)"
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
END

sf = Tempfile.new('surveyor:parser_spec.rb',dir);sf.write(s);sf.flush
Surveyor::Parser.parsef(sf)
Surveyor::Parser.parse_file(sf)
survey = Survey.where(:title=>'One language is never enough').first
survey.nil?.should == false
survey.translation(:es)['title'].should == "Un idioma nunca es suficiente"
Expand Down

0 comments on commit c08c047

Please sign in to comment.