Commit 9cf6e0d0 by Cuong Tran

Merge pull request #283 from kamilbielawski/accept-wrapper-default-params

Accept wrapper default params
parents 2e555f05 2c01787d
......@@ -29,7 +29,7 @@ module Annotate
:timestamp, :exclude_serializers, :classified_sort, :show_foreign_keys,
]
OTHER_OPTIONS=[
:ignore_columns, :skip_on_db_migrate
:ignore_columns, :skip_on_db_migrate, :wrapper_open, :wrapper_close
]
PATH_OPTIONS=[
:require, :model_dir
......@@ -78,6 +78,12 @@ module Annotate
return options
end
def self.reset_options
[POSITION_OPTIONS, FLAG_OPTIONS, PATH_OPTIONS, OTHER_OPTIONS].flatten.each do |key|
ENV[key.to_s] = nil
end
end
def self.skip_on_migration?
ENV['skip_on_db_migrate'] =~ TRUE_RE
end
......
......@@ -30,6 +30,8 @@ if Rails.env.development?
'sort' => "false",
'force' => "false",
'trace' => "false",
'wrapper_open' => nil,
'wrapper_close' => nil,
})
end
......
......@@ -479,6 +479,7 @@ end
mock_column(:name, :string, :limit => 50)
])
@schema_info = AnnotateModels.get_schema_info(@klass, "== Schema Info")
Annotate.reset_options
end
def write_model file_name, file_content
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment