Sha256: 4ae3a98e7aba49a0b33ccf4f40ddd7dfa6a6c1d24e563365cb9579d00af77cbb

Contents?: true

Size: 1.12 KB

Versions: 12

Compression:

Stored size: 1.12 KB

Contents

Puppet::Type.newtype(:rbenvgem) do
  desc 'A Ruby Gem installed inside an rbenv-installed Ruby'

  ensurable do
    newvalue(:present) { provider.install   }
    newvalue(:absent ) { provider.uninstall }

    newvalue(:latest) {
      provider.uninstall if provider.current
      provider.install
    }

    newvalue(/./)  do
      provider.uninstall if provider.current
      provider.install
    end

    aliasvalue :installed, :present

    defaultto :present

    def retrieve
      provider.current || :absent
    end

    def insync?(current)
      requested = @should.first

      case requested
      when :present, :installed
        current != :absent
      when :latest
        current == provider.latest
      when :absent
        current == :absent
      else
        current == [requested]
      end
    end
  end

  newparam(:name) do
    desc 'Gem qualified name within an rbenv repository'
  end

  newparam(:gemname) do
    desc 'The Gem name'
  end

  newparam(:ruby) do
    desc 'The ruby interpreter version'
  end

  newparam(:rbenv) do
    desc 'The rbenv root'
  end

  newparam(:user) do
    desc 'The rbenv owner'
  end

end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
bebox-0.0.1 lib/templates/puppet/step-0/modules/rbenv/lib/puppet/type/rbenvgem.rb
freighthop-0.6.1 modules/rbenv/lib/puppet/type/rbenvgem.rb
freighthop-0.6.0 modules/rbenv/lib/puppet/type/rbenvgem.rb
freighthop-0.5.2 modules/rbenv/lib/puppet/type/rbenvgem.rb
freighthop-0.5.1 modules/rbenv/lib/puppet/type/rbenvgem.rb
freighthop-0.5.0 modules/rbenv/lib/puppet/type/rbenvgem.rb
freighthop-0.4.1 modules/rbenv/lib/puppet/type/rbenvgem.rb
freighthop-0.4.0 modules/rbenv/lib/puppet/type/rbenvgem.rb
freighthop-0.3.3 modules/rbenv/lib/puppet/type/rbenvgem.rb
freighthop-0.3.2 modules/rbenv/lib/puppet/type/rbenvgem.rb
freighthop-0.3.1 modules/rbenv/lib/puppet/type/rbenvgem.rb
freighthop-0.3.0 modules/rbenv/lib/puppet/type/rbenvgem.rb