Sha256: 648a93e26e0bd78303e13394907a6c546c17aaf0dfd119c3104fc81ec641b0e8
Contents?: true
Size: 1.35 KB
Versions: 16
Compression:
Stored size: 1.35 KB
Contents
require 'rails/generators' module Symphonia class SetupGenerator < Rails::Generators::Base source_root File.expand_path('templates', __dir__) def create_settings template 'config/initializers/symphonia.rb' end def copy_static template 'public/404.html' template 'public/500.html' end def copy_assets template 'app/assets/javascripts/application.js' append_to_file 'app/assets/config/manifest.js', '//= link symphonia_manifest.js' copy_file 'design.scss', 'app/assets/stylesheets/general.scss' end def copy_rspec template 'spec/spec_helper.rb' create_file '.rspec' do "--require spec_helper" end end def copy_setup_file copy_file 'base_layout.html.erb', 'app/views/layouts/application.html.erb' append_to_file 'db/seeds.rb', 'Symphonia::Engine.load_seed' append_to_file '.gitignore', 'public/system' inject_into_file 'config/routes.rb', after: "Rails.application.routes.draw do\n" do " mount Symphonia::Engine => '/'" end end def rubocop create_file '.rubocop.yml' do "inherit_gem:\n symphonia: .rubocop.yml" end end def setup_gemfile append_to_file 'Gemfile' do "gem 'symphonia_spec', source: 'https://gems.luk4s.cz', group: %w[development test]" end end end end
Version data entries
16 entries across 16 versions & 1 rubygems