Sha256: 2aeaed3fd33ee56b3684f3849f12680a87073483b1bb7143c883d8c2419c6720

Contents?: true

Size: 943 Bytes

Versions: 10

Compression:

Stored size: 943 Bytes

Contents

module Khronos
  class Storage
    module Adapter

      module ActiveRecord
        autoload :Schedule,     'khronos/storage/adapter/activerecord/schedule'
        autoload :ScheduleLog,  'khronos/storage/adapter/activerecord/schedule_log'

        def self.connect!(url)
          require 'active_record'

          #if File.exists?("config/database.yml")
            #::ActiveRecord::Base.establish_connection(YAML.load_file("config/database.yml")[ENV['RACK_ENV']])
          #else
            ::ActiveRecord::Base.establish_connection(url)
            ::ActiveRecord::Base.include_root_in_json = false
          #end

          #
          # ::ActiveRecord::Base.logger = ::Logger.new(STDOUT)
          #
          self
        end

        def self.included(base)
          #puts "included in #{base}"
        end

        def self.extended(base)
          #puts "extended in #{base.inspect}"
        end

      end

    end
  end
end


Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
khronos-0.1.3 lib/khronos/storage/adapter/activerecord.rb
khronos-0.1.2 lib/khronos/storage/adapter/activerecord.rb
khronos-0.1.1 lib/khronos/storage/adapter/activerecord.rb
khronos-0.1.0 lib/khronos/storage/adapter/activerecord.rb
khronos-0.0.3.pre4 lib/khronos/storage/adapter/activerecord.rb
khronos-0.0.3.pre3 lib/khronos/storage/adapter/activerecord.rb
khronos-0.0.3.pre2 lib/khronos/storage/adapter/activerecord.rb
khronos-0.0.3.pre1 lib/khronos/storage/adapter/activerecord.rb
khronos-0.0.2 lib/khronos/storage/adapter/activerecord.rb
khronos-0.0.2.pre1 lib/khronos/storage/adapter/activerecord.rb