GithubHelp home page GithubHelp logo

alepore / yt-url Goto Github PK

View Code? Open in Web Editor NEW

This project forked from claudiob/yt-url

0.0 2.0 0.0 14 KB

A URL extension for the Yt library

Home Page: https://claudiob.github.io/yt/urls.html

License: MIT License

Ruby 98.93% Shell 1.07%

yt-url's Introduction

Yt::URL - a URL extension for the Yt library

Yt::URL helps you identify YouTube resources from their URL.

The source code is available on GitHub and the documentation on RubyDoc.

Build Status Coverage Status Dependency Status Code Climate Online docs Gem Version

After registering your app, you can run commands like:

url = Yt::URL.new "youtu.be/gknzFj_0vvY"
url.kind # => :video
url.id # => "gknzFj_0vvY"
url.resource # => #<Yt::Video @id=gknzFj_0vvY>

The full documentation is available at rubydoc.info.

A comprehensive guide to Yt

All the classes and methods available are detailed on the Yt homepage:

Yt homepage

Please proceed to https://claudiob.github.io/yt/urls.html for more details and examples.

How to install

To install on your system, run

gem install yt-url

To use inside a bundled Ruby project, add this line to the Gemfile:

gem 'yt-url', '~> 0.0.0'

Since the gem follows Semantic Versioning, indicating the full version in your Gemfile (~> major.minor.patch) guarantees that your project won’t occur in any error when you bundle update and a new version of Yt is released.

How to test

To run live-tests against the YouTube API, type:

rspec

This will fail unless you have set up a test YouTube application and some tests YouTube accounts to hit the API. If you cannot run tests locally, you can open PR against the repo and Travis CI will run the tests for you.

These are the environment variables required to run the tests in spec/requests/server:

  • YT_SERVER_API_KEY: API Key of a Google app with access to the YouTube Data API v3 and the YouTube Analytics API

No environment variables are required to run the other tests.

How to release new versions

If you are a manager of this project, remember to upgrade the Yt gem whenever a new feature is added or a bug gets fixed.

Make sure all the tests are passing on Travis CI, document the changes in HISTORY.md and README.md, bump the version, then run

rake release

Remember that the yt gem follows Semantic Versioning. Any new release that is fully backward-compatible should bump the patch version (0.0.x). Any new version that breaks compatibility should bump the minor version (0.x.0)

How to contribute

Contribute to the code by forking the project, adding the missing code, writing the appropriate tests and submitting a pull request.

In order for a PR to be approved, all the tests need to pass and all the public methods need to be documented and listed in the guides. Remember:

  • to run all tests locally: bundle exec rspec
  • to generate the docs locally: bundle exec yard
  • to list undocumented methods: bundle exec yard stats --no-doc

yt-url's People

Contributors

claudiob avatar

Watchers

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