Sha256: 1890c65ee0b470f4312a2f2b0f947e3f496dedd0c22ff4b195013e63bf46eda2

Contents?: true

Size: 574 Bytes

Versions: 1

Compression:

Stored size: 574 Bytes

Contents

::Rails.application.routes.draw do

  enabled = !!(::Rails.application.config.enable_code_sync_server == true) rescue false

  if enabled == true
    root = ::Rails.root

    adapter = CodeSync::SprocketsAdapter.new(root: root)

    server_info = CodeSync::Server::ServerInfo.new({
      sprockets: adapter,
      root: root
    })

    source_provider = CodeSync::Server::SourceProvider.new({
      sprockets: adapter,
      root: root
    })

    scope "/code-sync" do
      get "/info", :to => server_info
      match "/source", :to => source_provider
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
code_sync-0.6.7 config/routes.rb