Sha256: ff7400ca44d1cb4028fb974dd648b8529bb5970ba58d45b9df016981f0af080b

Contents?: true

Size: 481 Bytes

Versions: 68

Compression:

Stored size: 481 Bytes

Contents

require 'puppet/util/feature'

# See if we have rack available, an HTTP Application Stack
# Explicitly depend on rack library version >= 1.0.0
Puppet.features.add(:rack) do
  begin
    require 'rack'
  rescue LoadError => detail
    require 'rubygems'
    require 'rack'
  end

  if ! (defined?(::Rack) and defined?(::Rack.release))
    false
  else
    major_version = ::Rack.release.split('.')[0].to_i
    if major_version >= 1
      true
    else
      false
    end
  end
end

Version data entries

68 entries across 68 versions & 4 rubygems

Version Path
puppet-parse-0.1.4 lib/vendor/puppet/feature/rack.rb
puppet-parse-0.1.3 lib/vendor/puppet/feature/rack.rb
puppet-parse-0.1.2 lib/vendor/puppet/feature/rack.rb
puppet-parse-0.1.1 lib/vendor/puppet/feature/rack.rb
puppet-2.7.26 lib/puppet/feature/rack.rb
puppet-2.7.25 lib/puppet/feature/rack.rb
puppet-2.7.24 lib/puppet/feature/rack.rb
puppet-2.7.23 lib/puppet/feature/rack.rb
puppet-2.7.22 lib/puppet/feature/rack.rb
puppet-parse-0.1.0 lib/vendor/puppet/feature/rack.rb
puppet-parse-0.0.6 lib/vendor/puppet/feature/rack.rb
puppet-2.7.21 lib/puppet/feature/rack.rb
puppet-2.6.18 lib/puppet/feature/rack.rb
puppet-parse-0.0.5 lib/vendor/puppet/feature/rack.rb
puppet-parse-0.0.4 lib/vendor/puppet/feature/rack.rb
puppet-parse-0.0.2 lib/vendor/puppet/feature/rack.rb
puppet-2.7.20 lib/puppet/feature/rack.rb
puppet-2.7.20.rc1 lib/puppet/feature/rack.rb
puppet-3.0.0 lib/puppet/feature/rack.rb
puppet-3.0.0.rc8 lib/puppet/feature/rack.rb