Sha256: 8ea18d0d4638f41f560427f5713ffec764a832ba505a82d2f3eacedbf06bad47

Contents?: true

Size: 366 Bytes

Versions: 14

Compression:

Stored size: 366 Bytes

Contents

module Masheri

  def self.load_rails_config!
    if File.exists? rails_config
      load_config! rails_config
    else
      raise MissingConfig.new
    end
  end

  def self.rails_config
    Rails.root.join("config", "masheri.yml")
  end

  class Engine < ::Rails::Engine
    initializer "load_masheri_config" do
      Masheri.load_rails_config!
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
masheri-0.6.1 lib/masheri/rails.rb
masheri-0.6.0 lib/masheri/rails.rb
masheri-0.5.6 lib/masheri/rails.rb
masheri-0.5.5 lib/masheri/rails.rb
masheri-0.5.2 lib/masheri/rails.rb
masheri-0.5.1 lib/masheri/rails.rb
masheri-0.5.0 lib/masheri/rails.rb
masheri-0.4.0 lib/masheri/rails.rb
masheri-0.3.10 lib/masheri/rails.rb
masheri-0.3.8 lib/masheri/rails.rb
masheri-0.3.7 lib/masheri/rails.rb
masheri-0.3.6 lib/masheri/rails.rb
masheri-0.3.5 lib/masheri/rails.rb
masheri-0.3.4 lib/masheri/rails.rb