Module: SequelRails

Defined in:
lib/sequel_rails.rb,
lib/sequel_rails/railtie.rb,
lib/sequel_rails/storage.rb,
lib/sequel_rails/version.rb,
lib/sequel_rails/db_config.rb,
lib/sequel_rails/migrations.rb,
lib/sequel_rails/shellwords.rb,
lib/sequel_rails/storage/jdbc.rb,
lib/sequel_rails/configuration.rb,
lib/sequel_rails/storage/mysql.rb,
lib/sequel_rails/storage/mysql2.rb,
lib/sequel_rails/storage/sqlite.rb,
lib/sequel_rails/storage/abstract.rb,
lib/sequel_rails/storage/postgres.rb,
lib/sequel_rails/railties/i18n_support.rb,
lib/sequel_rails/railties/log_subscriber.rb,
lib/sequel_rails/railties/controller_runtime.rb

Defined Under Namespace

Modules: I18nSupport, Railties, Storage Classes: Configuration, DbConfig, Migrations, Railtie

Constant Summary collapse

VERSION =
'1.2.3'.freeze

Class Method Summary collapse

Class Method Details

.deep_symbolize_keys(hash) ⇒ Object



11
12
13
# File 'lib/sequel_rails.rb', line 11

def self.deep_symbolize_keys(hash)
  hash.deep_symbolize_keys
end

.deep_symbolize_keys_map(value) ⇒ Object



21
22
23
24
25
26
27
28
29
30
# File 'lib/sequel_rails.rb', line 21

def self.deep_symbolize_keys_map(value)
  case value
  when Hash
    deep_symbolize_keys(value)
  when Array
    value.map { |v| deep_symbolize_keys_map(v) }
  else
    value
  end
end

.jruby?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/sequel_rails.rb', line 6

def self.jruby?
  (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby') || defined?(JRUBY_VERSION)
end

.setup(environment) ⇒ Object



7
8
9
# File 'lib/sequel_rails/configuration.rb', line 7

def self.setup(environment)
  configuration.connect environment
end