Sha256: 35aa2619403c6ee86b483c806200fcbf7b3a0fe8bd75d3f6b64ffb3cb57a9307

Contents?: true

Size: 991 Bytes

Versions: 4

Compression:

Stored size: 991 Bytes

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/core_extensions'
require "rails_connector/errors"

# @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

4 entries across 4 versions & 1 rubygems

Version Path
infopark_fiona_connector-7.0.1 lib/infopark_fiona_connector.rb
infopark_fiona_connector-7.0.1.beta2 lib/infopark_fiona_connector.rb
infopark_fiona_connector-7.0.0 lib/infopark_fiona_connector.rb
infopark_fiona_connector-6.10.0.beta1 lib/infopark_fiona_connector.rb