Class: HydraHls::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_file_sets_controllerObject



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_configObject



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_behaviorObject



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_routesObject



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