Giter VIP home page Giter VIP logo

cocoapods-downloader's Introduction

Downloader

A small library for downloading files from remotes in a folder.

Build Status Coverage Code Climate

Install

$ [sudo] gem install cocoapods-downloader

Usage

require 'cocoapods-downloader'

target_path = './Downloads/MyDownload'
options = { :git => 'example.com' }
options = Pod::Downloader.preprocess_options(options)
downloader = Pod::Downloader.for_target(target_path, options)
downloader.cache_root = '~/Library/Caches/APPNAME'
downloader.max_cache_size = 500
downloader.download
downloader.checkout_options #=> { :git => 'example.com', :commit => 'd7f410490dabf7a6bde665ba22da102c3acf1bd9' }

The downloader class supports the following option keys:

  • git: commit, tag, branch, submodules
  • svn: revision, tag, folder, externals
  • hg: revision, tag, branch
  • http: type, flatten
  • scp: type, flatten
  • bzr: revision, tag

The downloader also provides hooks which allow to customize its output or the way in which the commands are executed

require 'cocoapods-downloader'

module Pod
  module Downloader
    class Base

      override_api do
        def self.execute_command(executable, command, raise_on_failure = false)
          puts "Will download"
          super
        end

        def self.ui_action(ui_message)
          puts ui_message.green
          yield
        end
      end

    end
  end
end

Extraction

This gem was extracted from CocoaPods. Refer to also that repository for the history and the contributors.

Collaborate

All CocoaPods development happens on GitHub, there is a repository for CocoaPods and one for the CocoaPods specs. Contributing patches or Pods is really easy and gratifying and for a lot of people is their first time.

Follow @CocoaPods to get up to date information about what's going on in the CocoaPods world.

License

This gem and CocoaPods are available under the MIT license.

cocoapods-downloader's People

Contributors

fabiopelosin avatar segiddins avatar manicmaniac avatar kylef avatar dnkoutso avatar endocrimes avatar seanreinhardtapps avatar alloy avatar champo avatar mbishop-fiksu avatar fmccann avatar orta avatar banjun avatar amorde avatar lazerwalker avatar neonichu avatar alisoftware avatar chipp avatar dependabot[bot] avatar gfontenot avatar nevyn avatar marcc-orange avatar mrackwitz avatar dlackty avatar wilmarvh avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.