Sha256: 9c0740df41a4ca4a33014a4ca32d94e09709d5106764a1162e003143e9123707

Contents?: true

Size: 576 Bytes

Versions: 1

Compression:

Stored size: 576 Bytes

Contents

module GitHistoryRails
  class Engine < ::Rails::Engine
    isolate_namespace GitHistoryRails
    require "git"

  initializer 'git_history_rails.configuration' do |app|
    File.open("tmp/test_config","a").puts(app.config.to_s)
    if app.config.try(:git_history_rails) && app.config.git_history_rails[:mounted_path]
      app.routes.append do
        mount GitHistoryRails::Engine => app.config.git_history_rails[:mounted_path]
      end
     else
       app.routes.append do
          mount GitHistoryRails::Engine => "/git_history"
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
git_history_rails-0.1.0 lib/git_history_rails/engine.rb