Module: RequestMigrations
- Defined in:
- lib/request_migrations.rb,
lib/request_migrations/gem.rb,
lib/request_migrations/router.rb,
lib/request_migrations/railtie.rb,
lib/request_migrations/version.rb,
lib/request_migrations/migrator.rb,
lib/request_migrations/migration.rb,
lib/request_migrations/controller.rb,
lib/request_migrations/configuration.rb
Defined Under Namespace
Modules: Controller, Router Classes: Configuration, InvalidVersionError, InvalidVersionFormatError, Migration, Migrator, Railtie, UnsupportedMigrationError, UnsupportedVersionError, Version
Constant Summary collapse
- SUPPORTED_VERSION_FORMATS =
SUPPORTED_VERSION_FORMATS is a list of supported version formats.
i[ semver date float integer string ].freeze
- VERSION =
"1.0.2"
Class Method Summary collapse
-
.config ⇒ Object
config returns the current config.
-
.configure {|config| ... } ⇒ Object
configure yields the config.
-
.logger ⇒ Logger
logger returns the configured logger.
-
.supported_versions ⇒ Array<String, Integer, Float>
supported_versions returns an array of supported versions.
Class Method Details
.config ⇒ Object
config returns the current config.
44 |
# File 'lib/request_migrations.rb', line 44 def self.config = @config ||= Configuration.new |
.configure {|config| ... } ⇒ Object
configure yields the config.
62 63 64 |
# File 'lib/request_migrations.rb', line 62 def self.configure yield config end |
.logger ⇒ Logger
logger returns the configured logger.
50 51 52 53 54 55 56 |
# File 'lib/request_migrations.rb', line 50 def self.logger @logger ||= if RequestMigrations.config.logger.respond_to?(:tagged) RequestMigrations.config.logger.tagged(:request_migrations) else RequestMigrations.config.logger end end |
.supported_versions ⇒ Array<String, Integer, Float>
supported_versions returns an array of supported versions.
70 71 72 |
# File 'lib/request_migrations.rb', line 70 def self.supported_versions [RequestMigrations.config.current_version, *RequestMigrations.config.versions.keys].uniq.freeze end |