Sha256: 6d2837d7e078ad7d08620c4354a667c3cecf2a5b33ee168a0d3892e89a3df694

Contents?: true

Size: 671 Bytes

Versions: 5

Compression:

Stored size: 671 Bytes

Contents

# Polisher Upstream Operations
#
# Licensed under the MIT license
# Copyright (C) 2013-2014 Red Hat, Inc.

require 'polisher/gem'
require 'polisher/gemfile'

module Polisher
  class Upstream
    # Parse the specified upstream source, automatically
    # dispatches to correct upstream parser depending on
    # format of specified source
    #
    # @returns instance of class representing parsed source
    def self.parse(source)
      if source.gem?
        Polisher::Gem.parse(:gem => source)

      elsif source.gemspec?
        Polisher::Gem.parse(:gemspec => source)

      elsif source.gemfile?
        Polisher::Gemfile.parse(source)

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
polisher-0.10.2 lib/polisher/upstream.rb
polisher-0.10.1 lib/polisher/upstream.rb
polisher-0.9.1 lib/polisher/upstream.rb
polisher-0.8.1 lib/polisher/upstream.rb
polisher-0.7.1 lib/polisher/upstream.rb