class SamveraHls::InstallGenerator

Public Instance Methods

copy_file_sets_controller() click to toggle source
# File lib/generators/samvera_hls/install/install_generator.rb, line 28
def copy_file_sets_controller
  copy_file "controllers/file_sets_controller.rb", "app/controllers/file_sets_controller.rb"
end
copy_transcoding_config() click to toggle source
# File lib/generators/samvera_hls/install/install_generator.rb, line 24
def copy_transcoding_config
  copy_file "config/hls.yml.example", "config/hls.yml"
end
inject_compile_assets() click to toggle source
# File lib/generators/samvera_hls/install/install_generator.rb, line 11
def inject_compile_assets
  insert_into_file "config/initializers/assets.rb", :before => /^end/ do
    %{\nRails.application.config.assets.precompile += %w( include_player.js )\nRails.application.config.assets.precompile += %w( embed.js )\nRails.application.config.assets.precompile += %w( embed.css )\n}
  end
end
inject_file_set_behavior() click to toggle source
# File lib/generators/samvera_hls/install/install_generator.rb, line 17
def inject_file_set_behavior
  insert_into_file "app/models/file_set.rb", 
                   :after => "Hyrax::FileSetBehavior" do
    %{\n  include HydraHls::FileSetBehavior\n}
  end
end
inject_routes() click to toggle source
# File lib/generators/samvera_hls/install/install_generator.rb, line 5
def inject_routes
  insert_into_file "config/routes.rb", :after => ".draw do" do
    %{\n  mount SamveraHls::Engine => '/'\n}
  end
end