Sha256: 7b69983cfa828d8bd46fb0db69c7f5641490b2c543d1121ba1d076d8c01e36a6

Contents?: true

Size: 525 Bytes

Versions: 18

Compression:

Stored size: 525 Bytes

Contents

require 'json'

class Puppet::Network::HTTP::API::V2::Environments
  def initialize(env_loader)
    @env_loader = env_loader
  end

  def call(request, response)
    response.respond_with(200, "application/json", JSON.dump({
      "search_paths" => @env_loader.search_paths,
      "environments" => Hash[@env_loader.list.collect do |env|
        [env.name, {
          "settings" => {
            "modulepath" => env.full_modulepath,
            "manifest" => env.manifest
          }
        }]
      end]
    }))
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
puppet-3.6.2 lib/puppet/network/http/api/v2/environments.rb
puppet-3.6.2-x86-mingw32 lib/puppet/network/http/api/v2/environments.rb
puppet-3.6.1 lib/puppet/network/http/api/v2/environments.rb
puppet-3.6.1-x86-mingw32 lib/puppet/network/http/api/v2/environments.rb
puppet-3.6.0 lib/puppet/network/http/api/v2/environments.rb
puppet-3.6.0-x86-mingw32 lib/puppet/network/http/api/v2/environments.rb
puppet-3.6.0.rc1 lib/puppet/network/http/api/v2/environments.rb
puppet-3.6.0.rc1-x86-mingw32 lib/puppet/network/http/api/v2/environments.rb
puppet-3.5.1 lib/puppet/network/http/api/v2/environments.rb
puppet-3.5.1-x86-mingw32 lib/puppet/network/http/api/v2/environments.rb
puppet-3.5.1.rc1 lib/puppet/network/http/api/v2/environments.rb
puppet-3.5.1.rc1-x86-mingw32 lib/puppet/network/http/api/v2/environments.rb
puppet-3.5.0.rc3 lib/puppet/network/http/api/v2/environments.rb
puppet-3.5.0.rc3-x86-mingw32 lib/puppet/network/http/api/v2/environments.rb
puppet-3.5.0.rc2 lib/puppet/network/http/api/v2/environments.rb
puppet-3.5.0.rc2-x86-mingw32 lib/puppet/network/http/api/v2/environments.rb
puppet-3.5.0.rc1 lib/puppet/network/http/api/v2/environments.rb
puppet-3.5.0.rc1-x86-mingw32 lib/puppet/network/http/api/v2/environments.rb