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-retrospec-1.8.0 vendor/pup410/lib/puppet/module_tool/applications/searcher.rb
puppet-retrospec-1.7.0 vendor/pup410/lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.12 lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.12-x86-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.12-x64-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.12-universal-darwin lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.11 lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.11-x86-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.11-x64-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.11-universal-darwin lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.10 lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.10-x86-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.10-x64-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.10-universal-darwin lib/puppet/module_tool/applications/searcher.rb
puppet-retrospec-1.6.1 vendor/pup410/lib/puppet/module_tool/applications/searcher.rb
puppet-retrospec-1.6.0 vendor/pup410/lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.9 lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.9-x86-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.9-x64-mingw32 lib/puppet/module_tool/applications/searcher.rb
puppet-4.10.9-universal-darwin lib/puppet/module_tool/applications/searcher.rb