Sha256: 70052bc87517ef7314273f7608b2855c855e0cab20b7e50324e8d5ad95dc09e2

Contents?: true

Size: 1.03 KB

Versions: 7

Compression:

Stored size: 1.03 KB

Contents

require 'rubygems'

$:.unshift File.expand_path("..", __FILE__)

require 'json'

require 'benchmark'
require 'sinatra'
require 'haml'
require 'sass'
require 'mongo'
require 'bson'
require 'mongoid'

require 'net/http'
require 'uri'
require 'cgi'

require 'bug_hunter/config'
require 'bug_hunter/middleware'
require 'bug_hunter/ui_helper'
require 'bug_hunter/routes_helper'
require 'bug_hunter/models'
require 'bug_hunter/app'

module BugHunter
  def self.app
    BugHunter::App
  end

  def self.connect
    return unless Mongoid.config.databases.empty?

    ENV["RACK_ENV"] ||= ENV["RAILS_ENV"]
    if !ENV["RACK_ENV"]
      raise ArgumentError, "please define the env var RACK_ENV"
    end

    if File.exist?("/etc/mongoid.yml")
      Mongoid.load("/etc/mongoid.yml")
    elsif File.exist?("config/mongoid.yml")
      Mongoid.load!("config/mongoid.yml")
    elsif File.exist?("mongoid.yml")
      Mongoid.load!("mongoid.yml")
    else
      raise ArgumentError, "/etc/mongoid.yml, ./config/mongoid.yml or ./mongoid.yml were not found"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bug_hunter-0.1.1 lib/bug_hunter.rb
bug_hunter-0.1.0 lib/bug_hunter.rb
bug_hunter-0.0.6 lib/bug_hunter.rb
bug_hunter-0.0.5 lib/bug_hunter.rb
bug_hunter-0.0.4 lib/bug_hunter.rb
bug_hunter-0.0.2 lib/bug_hunter.rb
bug_hunter-0.0.1 lib/bug_hunter.rb