Sha256: 2ff351a546904c42040814004257f3af57e5113c5407af00e58a76c070342d33

Contents?: true

Size: 422 Bytes

Versions: 3

Compression:

Stored size: 422 Bytes

Contents

module StatusCat
  module Checkers
    class ActiveRecord < Base

      def initialize
        config = ::ActiveRecord::Base.connection_config
        @value = "#{config[ :adapter ]}:#{config[ :username ]}@#{config[ :database ]}"

        @status = fail_on_exception do
          ::ActiveRecord::Base.connection.execute( "select max(version) from schema_migrations" )
          nil
        end
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
status_cat-0.1.1 lib/status_cat/checkers/active_record.rb
status_cat-0.1.0 lib/status_cat/checkers/active_record.rb
status_cat-0.0.9 lib/status_cat/checkers/active_record.rb