Skip to content

Commit

Permalink
change generator
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorcoran committed Jul 17, 2011
1 parent f5db752 commit 1fd2280
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lib/generators/judge/judge_generator.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
class JudgeGenerator < Rails::Generators::Base
source_root File.expand_path("../templates", __FILE__)
argument :path, :type => :string, :default => "public/javascripts"
class_option :example, :type => :boolean, :default => true, :description => "Copy example jQuery element bindings"

desc %Q{
This copies the judge jQuery plugin to your application.
This copies the judge JavaScript file to your application.
The default path is public/javascripts, but you can set your own as follows:
rails g judge my/super/cool/path
Some example element bindings are also copied into this directory.
If you don't want them, use the --skip-example option.
rails generate judge my/super/cool/path
}
def copy_files
copy_file "jquery.judge.js", "#{path}/jquery.judge.js"
copy_file "example.judge.js", "#{path}/example.judge.js" if options.example?
copy_file "judge.js", "#{path}/judge.js"
end
end

0 comments on commit 1fd2280

Please sign in to comment.