• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 13 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ruby wrapper for the RubyGems.org API

Gems

Gem Version Build Status Code Climate Coverage Status

Ruby wrapper for the RubyGems.org API.

Installation

gem install gems

Documentation

https://rdoc.info/gems/gems

Usage Examples

require 'rubygems'
require 'gems'

# Return some basic information about rails.
Gems.info 'rails'

# Return an array of active gems that match the query.
Gems.search 'cucumber'

# Return all gems that you own.
Gems.gems

# Return all gems owned by Erik Michaels-Ober.
Gems.gems("sferik")

# Submit a gem to RubyGems.org.
Gems.push File.new 'gemcutter-0.2.1.gem'

# Remove a gem from RubyGems.org's index.
# Defaults to the latest version if no version is specified.
Gems.yank 'bills', '0.0.1'

# Update a previously yanked gem back into RubyGems.org's index.
# Defaults to the latest version if no version is specified.
Gems.unyank 'bills', '0.0.1'

# Return an array of version details for coulda.
Gems.versions 'coulda'

# Return an hash of latest version for coulda.
Gems.latest_version 'coulda'

# Return the total number of downloads for rails_admin 0.0.1.
# (Defaults to the latest version if no version is specified.)
Gems.total_downloads 'rails_admin', '0.0.1'

# Returns an array containing the top 50 downloaded gem versions of all time.
Gems.most_downloaded

# Return the total number of downloads by day for rails_admin 0.0.1.
# (Defaults to the latest version if no version is specified.)
Gems.downloads 'rails_admin', '0.0.1'

# Return the number of downloads by day for coulda 0.6.3 for the past 90 days.
# (Defaults to the latest version if no version is specified.)
Gems.downloads 'coulda', '0.6.3', Date.today - 90, Date.today

# Return the number of downloads by day for coulda 0.6.3 for the past year.
Gems.downloads 'coulda', '0.6.3', Date.today - 365, Date.today

# View all owners of a gem that you own.
Gems.owners 'gemcutter'

# Add an owner to a RubyGem you own, giving that user permission to manage it.
Gems.add_owner '[email protected]', 'gemcutter'

# Remove a user's permission to manage a RubyGem you own.
Gems.remove_owner '[email protected]', 'gemcutter'

# Return all the webhooks registered under your account.
Gems.web_hooks

# Add a webhook.
Gems.add_web_hook 'rails', 'http://example.com'

# Remove a webhook.
Gems.remove_web_hook 'rails', 'http://example.com'

# Test fire a webhook.
Gems.fire_web_hook 'rails', 'http://example.com'

# Returns the 50 gems most recently added to RubyGems.org
Gems.latest

# Returns the 50 most recently updated gems
Gems.just_updated

# Retrieve your API key using HTTP basic authentication.
Gems.configure do |config|
  config.username = '[email protected]'
  config.password = 'schwwwwing'
end
Gems.api_key

# Return an array of gem dependency details for all versions of all the given gems.
Gems.dependencies ['rails', 'thor']

# The following methods require authentication.
# By default, we load your API key from ~/.gem/credentials
# You can override this default by specifying a custom API key.
Gems.configure do |config|
  config.key = '701243f217cdf23b1370c7b66b65ca97'
end

Supported Ruby Versions

This library aims to support and is tested against the following Ruby implementations:

  • Ruby 2.3
  • Ruby 2.4
  • Ruby 2.5
  • Ruby 2.6
  • Ruby 2.7
  • Ruby 3.0
  • Ruby 3.1
  • Ruby 3.2
  • JRuby

If something doesn't work on one of these interpreters, it's a bug.

This library may inadvertently work (or seem to work) on other Ruby implementations, however support will only be provided for the versions listed above.

If you would like this library to support another Ruby version, you may volunteer to be a maintainer. Being a maintainer entails making sure all tests run and pass on that implementation. When something breaks on your implementation, you will be responsible for providing patches in a timely fashion. If critical issues for a particular implementation exist at the time of a major release, support for that Ruby version may be dropped.

Copyright

Copyright (c) 2011-2013 Erik Michaels-Ober. See LICENSE for details.

More Repositories

1

bundler

Manage your Ruby application's gem dependencies
Ruby
4,865
star
2

rubygems

Library packaging and distribution for Ruby.
Ruby
3,401
star
3

rubygems.org

The Ruby community's gem hosting service.
Ruby
2,209
star
4

gemstash

A RubyGems.org cache and private gem server
Ruby
753
star
5

rubygems-mirror

The `gem mirror` RubyGems command, creates local mirrors of all gems from a remote gem source.
Ruby
270
star
6

guides

An effort to provide awesome documentation for the RubyGems ecosystem.
SCSS
149
star
7

bundler-site

The Bundler documentation website
Haml
110
star
8

rubygems-aws

DEPRECATED: Chef repo for running RubyGems.org on AWS.
Ruby
102
star
9

gemcutter

The gemcutter gem, the rails app has been moved to http://github.com/rubygems/rubygems.org
Ruby
65
star
10

rubygems-test

An attempt to replace the testing facility in rubygems via a test plugin.
Ruby
48
star
11

bundler-api

Bundler 1.1+ API
Ruby
46
star
12

rubygems-chef

The new RubyGems.org infrastructure.
Perl
41
star
13

rfcs

RubyGems + Bundler RFCs
40
star
14

rubygems-status

DEPRECATED 1/7/2016 A simple rails app to show the status of rubygems.org infrastructure
CSS
37
star
15

ruby-ssl-check

Ruby
34
star
16

rubygems.org-configs

The config files used to run rubygems.org
Ruby
30
star
17

bundler-features

Bundler feature requests and discussion
28
star
18

rubygems.github.io

the blog, for rubygems!
SCSS
20
star
19

bundler-compose

A bundler plugin to allow composing new gems into an existing bundle
Ruby
19
star
20

adoption-center

The RubyGems Adoption Center - RGSoC 2015
HTML
17
star
21

gemx

Ruby
15
star
22

bundler-graph

Ruby
14
star
23

new-index

Prototype and documentation of the new gem index format
Ruby
12
star
24

postit

A Bundler Version Manager
Ruby
11
star
25

rubygems-server

Ruby
10
star
26

rubygems-verification

Tools and data used to verify gems on rubygems.org
Ruby
10
star
27

compact_index

implements the response logic for the compact index format and to manage the versions file
Ruby
9
star
28

cacache-rb

Ruby
7
star
29

install

A simple remote eval installer with tarball unpacker (the easy way to install/update RubyGems)
Ruby
7
star
30

shipit

Ruby
6
star
31

stat-update

A very fast libev+libebb+hiredis server to update rubygems stats on the fly
C
6
star
32

meg

Quick commands to help administer and support RubyGems.org.
Shell
6
star
33

contribute

One site to show all related RubyGems ecosystem projects and help developers get involved
Ruby
6
star
34

bundlerbot

A bot that loves to help
JavaScript
5
star
35

bundler.github.io

The Bundler website, generated by https://github.com/rubygems/bundler-site
HTML
5
star
36

docs

RubyGems Manuals.
Ruby
5
star
37

search

DEPRECATED
Ruby
3
star
38

issue-triage

issue triage bot
Ruby
3
star
39

rubygems.org-backup

This is a BACKUP repo for rubygems.org before the history rewrite. Do not use. No pull requests please.
Ruby
3
star
40

rubygems.org-vendor

Submodule cache of gems to make RubyGems.org development easier!
3
star
41

rubygems-lita

A Lita chat bot for RubyGems/Bundler
Ruby
2
star
42

bundler-changelog

Ruby
1
star
43

compact_index_client

Ruby
1
star
44

apt-tools

Scripts for managing the apt repositories used for RubyGems.org machines.
Shell
1
star
45

bundler-gem

The Bundler gem creator
1
star
46

configure-rubygems-credentials

Configure rubygems.org credential environment variables for use in other GitHub Actions.
TypeScript
1
star
47

bundler-slackin

The Bundler Slack inviter
JavaScript
1
star