lib/rsg.rb in rsg-0.0.1 vs lib/rsg.rb in rsg-0.1.0

- old
+ new

@@ -1,22 +1,10 @@ -require_relative "rsg/version" +require "zeitwerk" -require_relative "rsg/generators/actions" -require_relative "rsg/generators/options" -require_relative "rsg/generators/base" +loader = Zeitwerk::Loader.for_gem +loader.setup -require_relative "rsg/generators/app/app_generator" -require_relative "rsg/generators/dotenv/install_generator" -require_relative "rsg/generators/gemfile/cleanup_generator" -require_relative "rsg/generators/install/install_generator" -require_relative "rsg/generators/logging/common_generator" -require_relative "rsg/generators/logging/lograge_generator" -require_relative "rsg/generators/misc/misc_generator" -require_relative "rsg/generators/orm/active_record_generator" -require_relative "rsg/generators/testing/rspec_generator" -require_relative "rsg/generators/webpacker/install_generator" - module Rsg def self.app_templates_sources @app_templates_sources ||= [ Pathname.new(__FILE__).dirname.join("../templates").expand_path ] @@ -32,5 +20,8 @@ end return nil end end + +# Required, or the classes for the generators won't be defined +loader.eager_load