Giter Site home page Giter Site logo

pkgwat's Introduction

pkgwat Build Status

Pkgwat is a ruby gem for querying gem versions from RPM repos. It's based off of pkgwat.cli and it uses apps.fedoraproject.org/packages.

Installing pkgwat

gem install pkgwat

Alternatively, if you're using a Gemfile, just add this:

gem 'pkgwat'

Using pkgwat

Inside your code, simply require rubygems and pkgwat. Then you use it like so:

Pkgwat.get_versions("rails")

# this will return true or false if the package exists
Pkgwat.check_gem("pry", "0.9.10", ["Fedora EPEL 6", "Fedora 19", "Rawhide"])

Rake Tasks

To check your gems in bundler against Fedora repos, run:

rake pkgwat:check

Developing pkgwat

Requirements

  • ruby 2.0 (or greater)
  • rvm (optional but recommended)
  • rubygems
  • bundler (gem install bundler)

Getting started

To develop pkgwat, check out the git repo and bundle:

git clone [email protected]:daviddavis/pkgwat.git pkgwat
cd pkgwat # accept the rvmrc file
bundle install # run bundler

Then just fire up irb:

irb -Ilib -rpkgwat
>> Pkgwat.get_versions("runcible")
=> [{"release"=>"Rawhide", ...

Testing

To run the pkgwat test suite execute via rake:

rake test

Also you can run an individual test:

ruby -Itest test/pkgwat_test.rb

To record your interactions via VCR and use the actual web APIs:

rake test mode=all

pkgwat's People

Contributors

axilleas avatar indigosquirrelio avatar kendhia avatar ktdreyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pkgwat's Issues

push tags to github

When you tag releases, would you mind pushing the tags to GitHub? For example the v0.1.2 tag is missing from 7627b81

Include update links?

Hi, I am getting the following for rubygem-activesupport gem when requesting updates:

> Pkgwat.get_updates("rubygem-activesupport", 'all', 'all')
=> [{"release"=>"Rawhide", "testing_version"=>"None", "stable_version"=>"4.1.4-1.fc21"}, {"release"=>"Fedora 21", "testing_version"=>"None", "stable_version"=>"4.1.4-1.fc21"}, {"release"=>"Fedora 20", "testing_version"=>"None", "stable_version"=>"4.0.0-2.fc20"}, {"release"=>"Fedora 19", "testing_version"=>"None", "stable_version"=>"<a href=\"https://admin.fedoraproject.org/updates/rubygem-activesupport-3.2.13-2.fc19\">3.2.13-2.fc19</a>"}, {"release"=>"Fedora EPEL 7", "testing_version"=>"None", "stable_version"=>"None"}, {"release"=>"Fedora EPEL 6", "testing_version"=>"None", "stable_version"=>"2.3.8-2.el6"}, {"release"=>"Fedora EPEL 5", "testing_version"=>"None", "stable_version"=>"2.1.1-2.el5"}]

It's what Polisher gem needs to know about available package builds. Now the question is whether is a feature or a bug that the URL to the concrete update showed up within "stable_version"?

Thanks for clarification.

rake build failed

Hi,

rake build doesn't work until i git rm lib/tasks, that file is an invalid symlink that breaks the build.

get_versions returns None at all releases

Example:

Pkgwat.get_versions('rubygem-charlock_holmes')
=> [
  [0] {
            "release" => "Rawhide",
    "testing_version" => "None",
     "stable_version" => "None"
  },
  [1] {
            "release" => "Fedora 20",
    "testing_version" => "None",
     "stable_version" => "None"
  },
  [2] {
            "release" => "Fedora 19",
    "testing_version" => "None",
     "stable_version" => "None"
  },
  [3] {
            "release" => "Fedora EPEL 7",
    "testing_version" => "None",
     "stable_version" => "None"
  },
  [4] {
            "release" => "Fedora EPEL 6",
    "testing_version" => "None",
     "stable_version" => "None"
  },
  [5] {
            "release" => "Fedora EPEL 5",
    "testing_version" => "None",
     "stable_version" => "None"
  }
]

whereas

Pkgwat.get_releases('rubygem-charlock_holmes')

=> [
  [0] {
            "release" => "Rawhide",
    "testing_version" => "None",
     "stable_version" => "0.7.3-1.fc21"
  },
  [1] {
            "release" => "Fedora 20",
    "testing_version" => "None",
     "stable_version" => "<a href=\"https://admin.fedoraproject.org/updates/rubygem-charlock_holmes-0.6.9.4-4.fc20\">0.6.9.4-4.fc20</a>"
  },
  [2] {
            "release" => "Fedora 19",
    "testing_version" => "None",
     "stable_version" => "<a href=\"https://admin.fedoraproject.org/updates/rubygem-charlock_holmes-0.6.9.4-3.fc19\">0.6.9.4-3.fc19</a>"
  },
  [3] {
            "release" => "Fedora EPEL 7",
    "testing_version" => "None",
     "stable_version" => "None"
  },
  [4] {
            "release" => "Fedora EPEL 6",
    "testing_version" => "None",
     "stable_version" => "None"
  },
  [5] {
            "release" => "Fedora EPEL 5",
    "testing_version" => "None",
     "stable_version" => "None"
  }
]

Is there any way to fetch the owner's email?

At the moment, the only option for checking an email is through Pkgwat#get_changelog but there is no way to distinct which mail is the owner's since a package could have a co-maintainer or be rebuilt by rel-eng.

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.