Sha256: e0f0b9cf64d1e01e50c52b2e57eb63f0242d3408e926fe0638f7387660e7be3b

Contents?: true

Size: 1.21 KB

Versions: 30

Compression:

Stored size: 1.21 KB

Contents

# frozen_string_literal: true

# require 'pry'

# Make managing application errors a more pleasant experience.
#
# exe/rag addons/honeybadger
# see: https://honeybadger.wistia.com/medias/l3cmyucx8f

self.local_template_path = File.dirname(__FILE__)

gac 'base rails 7 image created'

add_controller('home', 'index')
route("root 'home#index'")

force_copy

copy_file 'app/views/home/index.html.erb', 'app/views/home/index.html.erb'
copy_file 'app/controllers/application_controller.rb', 'app/controllers/application_controller.rb'
copy_file 'app/controllers/errors_controller.rb', 'app/controllers/errors_controller.rb'

# Test if this is really needed
insert_into_file 'config/application.rb', after: 'class Application < Rails::Application' do
  <<-RUBY
    config.generators.system_tests = nil
  RUBY
end

copy_file 'public/404.html', 'public/404.html'
copy_file 'public/500.html', 'public/500.html'

copy_file 'config/locales/en.yml', 'config/locales/en.yml'

move_file('config/honeybadger.sample.yml', 'config/honeybadger.yml')

after_bundle do
  setup_db
end

def setup_db
  add_scaffold('product', 'name', 'price:integer')
  copy_file 'app/controllers/products_controller.rb', 'app/controllers/products_controller.rb'

  db_migrate
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
rails_app_generator-0.2.13 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.12 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.11 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.10 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.9 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.8 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.7 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.6 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.5 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.4 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.3 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.2 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.1 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.2.0 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.1.28 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.1.27 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.1.26 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.1.25 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.1.24 after_templates/addons/honeybadger/_.rb
rails_app_generator-0.1.23 after_templates/addons/honeybadger/_.rb