Sha256: 5f2ad8d437d1ade16524b66c02814478baa7083f35555e1b37dda6255d1f8fc7
Contents?: true
Size: 961 Bytes
Versions: 16
Compression:
Stored size: 961 Bytes
Contents
# External dependencies require 'ruby2_keywords' require 'active_support/all' require 'set' # Schemacop module module Schemacop CONTEXT_THREAD_KEY = :schemacop_schema_context mattr_accessor :load_paths self.load_paths = ['app/schemas'] mattr_accessor :default_schema_version self.default_schema_version = 3 def self.with_context(context) prev_context = Thread.current[CONTEXT_THREAD_KEY] Thread.current[CONTEXT_THREAD_KEY] = context return yield ensure Thread.current[CONTEXT_THREAD_KEY] = prev_context end def self.context Thread.current[CONTEXT_THREAD_KEY] ||= V3::Context.new end end # Load shared require 'schemacop/scoped_env' require 'schemacop/exceptions' require 'schemacop/base_schema' require 'schemacop/schema2' require 'schemacop/schema3' require 'schemacop/schema' # Load individual versions require 'schemacop/v2' require 'schemacop/v3' # Load Railtie require 'schemacop/railtie' if defined?(Rails)
Version data entries
16 entries across 16 versions & 1 rubygems