Class: HydraHls::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- HydraHls::InstallGenerator
- Defined in:
- lib/generators/hydra_hls/install/install_generator.rb
Instance Method Summary collapse
- #copy_file_sets_controller ⇒ Object
- #copy_transcoding_config ⇒ Object
- #inject_file_set_behavior ⇒ Object
- #inject_routes ⇒ Object
Instance Method Details
#copy_file_sets_controller ⇒ Object
22 23 24 |
# File 'lib/generators/hydra_hls/install/install_generator.rb', line 22 def copy_file_sets_controller copy_file "controllers/file_sets_controller.rb", "app/controllers/file_sets_controller.rb" end |
#copy_transcoding_config ⇒ Object
18 19 20 |
# File 'lib/generators/hydra_hls/install/install_generator.rb', line 18 def copy_transcoding_config copy_file "config/hls.yml.example", "config/hls.yml" end |
#inject_file_set_behavior ⇒ Object
11 12 13 14 15 16 |
# File 'lib/generators/hydra_hls/install/install_generator.rb', line 11 def inject_file_set_behavior insert_into_file "app/models/file_set.rb", :after => "Sufia::FileSetBehavior" do %{\n include HydraHls::FileSetBehavior\n} end end |
#inject_routes ⇒ Object
5 6 7 8 9 |
# File 'lib/generators/hydra_hls/install/install_generator.rb', line 5 def inject_routes insert_into_file "config/routes.rb", :after => ".draw do" do %{\n mount HydraHls::Engine => '/'\n} end end |