lib/generators/schemable/install_generator.rb in schemable-0.1.4 vs lib/generators/schemable/install_generator.rb in schemable-1.0.0
- old
+ new
@@ -1,29 +1,19 @@
module Schemable
class InstallGenerator < Rails::Generators::Base
-
source_root File.expand_path('../../templates', __dir__)
- class_option :model_name, type: :string, default: 'Model', desc: 'Name of the model'
def initialize(*args)
super(*args)
end
def copy_initializer
- target_path = 'spec/swagger/common_definitions.rb'
+ target_path = 'config/initializers/schemable.rb'
if Rails.root.join(target_path).exist?
- say_status('skipped', 'Common definitions already exists')
+ say_status('skipped', 'Schemable initializer already exists')
else
- copy_file('common_definitions.rb', target_path)
- end
-
- target_path = 'app/helpers/serializers_helper.rb'
-
- if Rails.root.join(target_path).exist?
- say_status('skipped', 'Serializers helper already exists')
- else
- copy_file('serializers_helper.rb', target_path)
+ copy_file('schemable.rb', target_path)
end
end
end
end