Sha256: f55e393af57f4f93ef3238b0352d7b3c4b8c206e8aa0835b7aa3bc0ac514d2b3

Contents?: true

Size: 584 Bytes

Versions: 29

Compression:

Stored size: 584 Bytes

Contents

require 'open-uri'

module Bozo::Tools
  class Nuget

    # Creates a new instance.
    def initialize
      @url = 'https://nuget.org/nuget.exe'
    end

    # Sets the source url for the nuget tool to be retreived from
    #
    # @param [String] url
    #     A web server hosting the nuget tool
    def source(url)
      @url = url
    end

    # Retreives the nuget tool exe from the path
    def retrieve(destination_path)
      open(File.join(destination_path, 'nuget.exe'), 'wb') do |file|
        file << open(@url).read
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
bozo-scripts-0.18.5 lib/bozo/tools/nuget.rb
bozo-scripts-0.18.4 lib/bozo/tools/nuget.rb
bozo-scripts-0.18.3 lib/bozo/tools/nuget.rb
bozo-scripts-0.18.2 lib/bozo/tools/nuget.rb
bozo-scripts-0.18.1 lib/bozo/tools/nuget.rb
bozo-scripts-0.18.0 lib/bozo/tools/nuget.rb
bozo-scripts-0.17.0 lib/bozo/tools/nuget.rb
bozo-scripts-0.16.3 lib/bozo/tools/nuget.rb
bozo-scripts-0.16.2 lib/bozo/tools/nuget.rb
bozo-scripts-0.16.1 lib/bozo/tools/nuget.rb
bozo-scripts-0.16.0 lib/bozo/tools/nuget.rb
bozo-scripts-0.15.0 lib/bozo/tools/nuget.rb
bozo-scripts-0.14.0 lib/bozo/tools/nuget.rb
bozo-scripts-0.13.0 lib/bozo/tools/nuget.rb
bozo-scripts-0.12.0 lib/bozo/tools/nuget.rb
bozo-scripts-0.11.0 lib/bozo/tools/nuget.rb
bozo-scripts-0.10.6 lib/bozo/tools/nuget.rb
bozo-scripts-0.10.5 lib/bozo/tools/nuget.rb
bozo-scripts-0.10.4 lib/bozo/tools/nuget.rb
bozo-scripts-0.10.3 lib/bozo/tools/nuget.rb