Sha256: 86311db9fe4bce345d9a781e4c25ec69fd6414af9026c7fa4743c60630bf15ea

Contents?: true

Size: 680 Bytes

Versions: 222

Compression:

Stored size: 680 Bytes

Contents

module Puppet::ModuleTool
  module Applications
    class Searcher < Application
      include Puppet::Forge::Errors

      def initialize(term, forge, options = {})
        @term = term
        @forge = forge
        super(options)
      end

      def run
        results = {}
        begin
          Puppet.notice "Searching #{@forge.host} ..."
          results[:answers] = @forge.search(@term)
          results[:result] = :success
        rescue ForgeError => e
          results[:result] = :failure
          results[:error] = {
            :oneline   => e.message,
            :multiline => e.multiline,
          }
        end
        results
      end
    end
  end
end

Version data entries

222 entries across 222 versions & 2 rubygems

Version Path
puppet-4.2.3-x64-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-retrospec-0.11.0 vendor/gems/puppet-3.7.3/lib/puppet/module_tool/applications/searcher.rb
puppet-retrospec-0.10.0 vendor/gems/puppet-3.7.3/lib/puppet/module_tool/applications/searcher.rb
puppet-retrospec-0.9.1 vendor/gems/puppet-3.7.3/lib/puppet/module_tool/applications/searcher.rb
puppet-retrospec-0.9.0 vendor/gems/puppet-3.7.3/lib/puppet/module_tool/applications/searcher.rb
puppet-retrospec-0.8.1 vendor/gems/puppet-3.7.3/lib/puppet/module_tool/applications/searcher.rb
puppet-3.8.3 lib/puppet/module_tool/applications/searcher.rb
puppet-3.8.3-x86-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-3.8.3-x64-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-4.2.2 lib/puppet/module_tool/applications/searcher.rb
puppet-4.2.2-x86-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-4.2.2-x64-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-retrospec-0.8.0 vendor/gems/puppet-3.7.3/lib/puppet/module_tool/applications/searcher.rb
puppet-3.8.2 lib/puppet/module_tool/applications/searcher.rb
puppet-3.8.2-x86-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-3.8.2-x64-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-retrospec-0.7.3 vendor/gems/puppet-3.7.3/lib/puppet/module_tool/applications/searcher.rb
puppet-4.2.1 lib/puppet/module_tool/applications/searcher.rb
puppet-4.2.1-x86-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-4.2.1-x64-mingw32 lib/puppet/module_tool/applications/searcher.rb