Class: Flowplayer::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/flowplayer/install/install_generator.rb,
lib/generators/flowplayer/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_flashObject



17
18
19
20
21
# File 'lib/generators/flowplayer/install/install_generator.rb', line 17

def copy_flash
  say_status("copying", "flowplayer (#{Flowplayer::Rails::FLOWPLAYER_VERSION}) flash assets", :green)
  copy_file "flash/flowplayer-3.2.18.swf", "public/flash/flowplayer-3.2.18.swf"
  copy_file "flash/flowplayer.controls-3.2.16.swf", "public/flash/flowplayer.controls-3.2.16.swf"
end

#copy_jsObject



12
13
14
15
# File 'lib/generators/flowplayer/install/install_generator.rb', line 12

def copy_js
  say_status("copying", "flowplayer (#{Flowplayer::Rails::FLOWPLAYER_VERSION})", :green)
  copy_file "javascripts/flowplayer.min.js", "public/javascripts/flowplayer.min.js"
end

#do_nothingObject



32
33
34
35
36
37
38
39
# File 'lib/generators/flowplayer/install/install_generator.rb', line 32

def do_nothing
  say_status("deprecated", "You are using Rails 3.1 with the asset pipeline enabled, so this generator is not needed.")
  say_status("", "The necessary files are already in your asset pipeline.")
  say_status("", "Just add `//= require jquery` and `//= require jquery_ujs` to your app/assets/javascripts/application.js")
  say_status("", "If you upgraded your app from Rails 3.0 and still have jquery.js, rails.js, or jquery_ujs.js in your javascripts, be sure to remove them.")
  say_status("", "If you do not want the asset pipeline enabled, you may turn it off in application.rb and re-run this generator.")
  # ok, nothing
end