Sha256: 0115b77cdf18bec67d805f4934010d2002562768bc93512eccbf82d3769ecbd1

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

# @api public
module ::RailsConnector
  PLATFORM_CLOUD = :cloud.freeze
  PLATFORM_FIONA = :fiona.freeze

  # return either <tt>:fiona</tt> or <tt>:cloud</tt> depending on the app's configuration.
  # @return [Symbol]
  def self.platform
    PLATFORM_FIONA
  end

  def self.platform_cloud?
    false
  end

  def self.platform_fiona?
    true
  end
end

require 'rails_connector/core_extensions'
require 'rails_connector/rack_middlewares'
require 'rails_connector/errors'
require 'rails_connector/fiona_datetime'
ActiveRecord::Type.register(:fiona_datetime, ::FionaDateTime)

# @api public
module RailsConnector
  def self.autoload_all_sources
    source_files = Dir.glob(File.expand_path("../rails_connector/*.rb", __FILE__)).map do |file|
      File.basename(file)
    end

    source_files.each do |file|
      name = file.gsub(".rb", "")
      autoload name.camelcase, "rails_connector/#{name}"
    end
  end

  autoload_all_sources
end

require 'rails_connector/engine' if defined?(Rails)
require 'rails_connector/fiona_engine' if defined?(Rails)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
infopark_fiona_connector-7.0.1.5.2.3.rc4 lib/infopark_fiona_connector.rb