Sha256: eacc7a8a4ea020ea67696eb994d6a82831bdfb82c2e165ddb61061837d51d697

Contents?: true

Size: 664 Bytes

Versions: 23

Compression:

Stored size: 664 Bytes

Contents

module Berkshelf
  class GithubLocation < GitLocation
    HOST = "github.com"
    def initialize(dependency, options = {})
      protocol = Berkshelf::Config.instance.github_protocol || :https
      case protocol
      when :ssh
        options[:git] = "git@#{HOST}:#{options.delete(:github)}.git"
      when :https
        options[:git] = "https://#{HOST}/#{options.delete(:github)}.git"
      when :git
        options[:git] = "git://#{HOST}/#{options.delete(:github)}.git"
      else
        # if some bizarre value is provided, treat it as :https
        options[:git] = "https://#{HOST}/#{options.delete(:github)}.git"
      end
      super
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
berkshelf-6.3.4 lib/berkshelf/locations/github.rb
berkshelf-6.3.3 lib/berkshelf/locations/github.rb
berkshelf-7.0.4 lib/berkshelf/locations/github.rb
berkshelf-7.0.3 lib/berkshelf/locations/github.rb
berkshelf-7.0.2 lib/berkshelf/locations/github.rb
berkshelf-7.0.1 lib/berkshelf/locations/github.rb
berkshelf-7.0.0 lib/berkshelf/locations/github.rb
berkshelf-6.3.2 lib/berkshelf/locations/github.rb
berkshelf-6.3.1 lib/berkshelf/locations/github.rb
berkshelf-6.3.0 lib/berkshelf/locations/github.rb
berkshelf-6.2.2 lib/berkshelf/locations/github.rb
berkshelf-6.2.1 lib/berkshelf/locations/github.rb
berkshelf-6.2.0 lib/berkshelf/locations/github.rb
berkshelf-6.1.1 lib/berkshelf/locations/github.rb
berkshelf-6.1.0 lib/berkshelf/locations/github.rb
berkshelf-6.0.1 lib/berkshelf/locations/github.rb
berkshelf-6.0.0 lib/berkshelf/locations/github.rb
berkshelf-5.6.5 lib/berkshelf/locations/github.rb
berkshelf-5.6.4 lib/berkshelf/locations/github.rb
berkshelf-5.6.3 lib/berkshelf/locations/github.rb