Skip to content

Commit

Permalink
Remove obsolete Rails-guesswork from jasmine init
Browse files Browse the repository at this point in the history
- Rails generators should be used for Rails installs.
  • Loading branch information
ragaskar committed Dec 7, 2012
1 parent 442135f commit 5d1d500
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions lib/jasmine/command_line_tool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,17 @@ def process(argv)
copy_unless_exists('jasmine-example/spec/PlayerSpec.js', 'spec/javascripts/PlayerSpec.js')
copy_unless_exists('jasmine-example/spec/SpecHelper.js', 'spec/javascripts/helpers/SpecHelper.js')

rails_tasks_dir = dest_path('lib/tasks')
if File.exist?(rails_tasks_dir)
copy_unless_exists('lib/tasks/jasmine.rake')
copy_unless_exists('spec/javascripts/support/jasmine-rails.yml', 'spec/javascripts/support/jasmine.yml')
else
copy_unless_exists('spec/javascripts/support/jasmine.yml')
require 'rake'
write_mode = 'w'
if File.exist?(dest_path('Rakefile'))
load dest_path('Rakefile')
write_mode = 'a'
end
copy_unless_exists('spec/javascripts/support/jasmine.yml')
require 'rake'
write_mode = 'w'
if File.exist?(dest_path('Rakefile'))
load dest_path('Rakefile')
write_mode = 'a'
end

unless Rake::Task.task_defined?('jasmine')
File.open(dest_path('Rakefile'), write_mode) do |f|
f.write("\n" + File.read(template_path('lib/tasks/jasmine.rake')))
end
unless Rake::Task.task_defined?('jasmine')
File.open(dest_path('Rakefile'), write_mode) do |f|
f.write("\n" + File.read(template_path('lib/tasks/jasmine.rake')))
end
end
File.open(template_path('INSTALL'), 'r').each_line do |line|
Expand Down

0 comments on commit 5d1d500

Please sign in to comment.