GithubHelp home page GithubHelp logo

blork / cocoapod-badges Goto Github PK

View Code? Open in Web Editor NEW

This project forked from badges/cocoapod-badges

0.0 3.0 0.0 1.15 MB

Status badges to inform a pod's latest version and platform released on Cocoapods!

Home Page: http://badges.github.io/cocoapod-badges/

cocoapod-badges's Introduction

Cocoapod Badges License MIT

Badge w/ Version Badge w/ Platform

Cocoapod Badges are status badges to inform a pod's latest version deployed to Cocoapods through their search API.

The badges are created thanks to jbowes/buckler that provides "shields-as-a-service".

The "badge service" is hosted at Heroku

Usage

Just replace the $PODNAME on the URLs and the badge will automatically fetch the info.

ATTENTION: The $PODNAME is case sensitive, since Cocoapods has differentiation! In case of unexpected issues, the badges will display "error".

Since the badge generation was "outsourced", for now, they can only be displayed as PNG images. However, the URL's .svg extension is still available for backwards compatibility, and there's no difference on the output for either extensions.

Version Badge

Displays the pod's latest version available.

https://cocoapod-badges.herokuapp.com/v/$PODNAME/badge.png

NSStringMask

Some folks were having trouble with Github's cache for the README file, so I enabled a URL parameter to set the version manually.

https://cocoapod-badges.herokuapp.com/v/$PODNAME/$VERSION/badge.png

NSStringMask

1.0 1.1.2 1.0-RC1 error
ios osx ios/osx error

Platforms Badge

The Platform info is optional and it may not be set in the pod's Podspec. Be sure to correctly provide this information or the badge will not work! If there's no platform info, the badge will display "error", even though $PODNAME may be correct!

https://cocoapod-badges.herokuapp.com/p/$PODNAME/badge.png
iOS OSX iOS/OSX error
ios osx ios/osx error

Github Caching Issue

Github has a caching policy for images in README files, you may have noticed that sometimes Travis-CI's badge may be wrong in some repositories. It happens quite often.

When you create/update a pod, it may take sometime to be accepted by Cocoapods, and only then, the pod's badge will be updated to the new version. In the meantime, any pushes you make to your README will be cached by Github with the previous version of the badge. Therefore, even after the pod has been accepted by Cocoapods your README may still show an outdated badge since it may be cached..

The usual way of fixing this is pushing another update to the README file after the pod's release. BUT, thanks to @rivera-ernesto in this issue, Github's caching policy may be bypassed using https instead of http on the images' URL. So we strongly recommend using https on any badge image you may be using, not only cocoapod-badges!

License

betabadges is licensed under the MIT License:

Copyright (c) 2013 Flávio Caetano (http://flaviocaetano.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cocoapod-badges's People

Contributors

fjcaetano avatar

Watchers

 avatar  avatar  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.