lib/jets/generator.rb in jets-1.4.11 vs lib/jets/generator.rb in jets-1.5.0

- old
+ new

@@ -1,7 +1,5 @@ -require "rails/configuration" - # Piggy back off of Rails Generators. class Jets::Generator def self.invoke(generator, *args) new(generator, *args).invoke end @@ -10,9 +8,12 @@ @generator = generator @args = args end def invoke + # lazy require so Rails const is only defined when using generators + require "rails/generators" + require "rails/configuration" Rails::Generators.configure!(config) Rails::Generators.invoke(@generator, @args, behavior: :invoke, destination_root: Jets.root) end def config