lib/ts_schema.rb in ts_schema-0.2.1 vs lib/ts_schema.rb in ts_schema-1.0.0
- old
+ new
@@ -1,12 +1,13 @@
+# frozen_string_literal: true
+
require "ts_schema/version"
require "ts_schema/railtie"
require "ts_schema/configuration"
require "ts_schema/schema_generator"
-
module TsSchema
class << self
def setup(&block)
configuration.assign(&block)
end
@@ -16,21 +17,21 @@
end
def generate
if ActiveRecord::Base.connection.migration_context.needs_migration?
puts "Aborting: There are pending migrations"
- else
+ else
SchemaGenerator.new(@configuration).generate
end
end
- def output_file
+ def output_file
if ActiveRecord::Base.connection.migration_context.needs_migration?
puts "Aborting: There are pending migrations"
- else
+ else
SchemaGenerator.new(@configuration).output_file
end
- end
+ end
end
end
require "generators/install_generator"