lib/generators/uploadcare_config_generator.rb in uploadcare-rails-1.2.1 vs lib/generators/uploadcare_config_generator.rb in uploadcare-rails-2.0.0

- old
+ new

@@ -1,9 +1,12 @@ +# frozen_string_literal: true + +# A generator that copies the config template to config directory class UploadcareConfigGenerator < Rails::Generators::Base - desc "This generator creates an uploadcare config file your_app/config/uploadcare.yml" + desc 'This generator creates an uploadcare config file your_app/config/initializers/uploadcare.rb' - source_root File.expand_path("../templates", __FILE__) + source_root File.expand_path('templates', __dir__) def create_config_file - copy_file "uploadcare_config_template.yml", "config/uploadcare.yml"#create_file "config/uploadcare.yml", config_template + copy_file 'uploadcare_config_template.erb', 'config/initializers/uploadcare.rb' end -end \ No newline at end of file +end