lib/generators/svelte/install_generator.rb in actionview-svelte-handler-0.5.2 vs lib/generators/svelte/install_generator.rb in actionview-svelte-handler-0.5.3

- old
+ new

@@ -1,15 +1,13 @@ -module Svelte - class InstallGenerator < Rails::Generators::Base - desc "This generator installs actionview-svelte-handler" - - source_root File.expand_path("templates/install", __dir__) - - def install - copy_file "initializer.rb", "config/initializers/svelte.rb" - insert_into_file "app/views/layouts/application.html.erb", - "\n <%= svelte_tags %>", - after: "<head>" - `npm install #{Svelte.gem_dir} --install-links --save=false` - end +class InstallGenerator < Rails::Generators::Base + desc "This generator installs actionview-svelte-handler" + + source_root File.expand_path("templates/install", __dir__) + + def install + copy_file "initializer.rb", "config/initializers/svelte.rb" + insert_into_file "app/views/layouts/application.html.erb", + "\n <%= svelte_tags %>", + after: "<head>" + `npm install #{Gem::Specification.find_by_name("actionview-svelte-handler").gem_dir} --install-links --save=false` end -end \ No newline at end of file +end