Sha256: 6d3488e41e58749e7008b041a69a516998a909da5dceddc6adcf602463bbad07

Contents?: true

Size: 1.24 KB

Versions: 11

Compression:

Stored size: 1.24 KB

Contents

require "bullet_train/api/version"
require "bullet_train/api/engine"
require "bullet_train/api/strong_parameters_reporter"
require "bullet_train/api/example_bot"
require "bullet_train/platform/connection_workflow"

# require "wine_bouncer"
require "pagy"
require "pagy_cursor"
require "rack/cors"
require "doorkeeper"
require "scaffolding"
require "scaffolding/block_manipulator"
require "scaffolding/transformer"
require "jbuilder/schema"

module BulletTrain
  module Api
    mattr_accessor :base_class, default: "ApplicationRecord"
    mattr_accessor :endpoints, default: []
    mattr_accessor :current_version, default: "v1"
    mattr_accessor :initial_version, default: "v1"

    def self.current_version_numeric
      current_version.split("v").last.to_i
    end

    def self.initial_version_numeric
      initial_version.split("v").last.to_i
    end

    def self.all_versions
      (initial_version_numeric..current_version_numeric).map { |version| "v#{version}".to_sym }
    end

    def self.set_configuration(application_class)
      application_class.config.to_prepare do
        Doorkeeper::ApplicationController.layout "devise"

        if Doorkeeper::TokensController
          require_relative "../tokens_controller"
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bullet_train-api-1.3.9 lib/bullet_train/api.rb
bullet_train-api-1.3.8 lib/bullet_train/api.rb
bullet_train-api-1.3.7 lib/bullet_train/api.rb
bullet_train-api-1.3.6 lib/bullet_train/api.rb
bullet_train-api-1.3.5 lib/bullet_train/api.rb
bullet_train-api-1.3.4 lib/bullet_train/api.rb
bullet_train-api-1.3.3 lib/bullet_train/api.rb
bullet_train-api-1.3.2 lib/bullet_train/api.rb
bullet_train-api-1.3.1 lib/bullet_train/api.rb
bullet_train-api-1.3.0 lib/bullet_train/api.rb
bullet_train-api-1.2.26.1 lib/bullet_train/api.rb