npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

semantic-release-rubygem-with-pkg-root

v0.0.12

Published

A semantic-release plugin for publishing Ruby gems

Downloads

18

Readme

semantic-release-rubygem

semantic-release plugin for publishing Ruby gems.

| Step | Description | | |--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------| | verifyConditions | Locate and validate a .gemspec file, locate and validate a lib/**/version.rb file, verify the presence of the GEM_HOST_API_KEY environment variable, and create a credentials file with the API key.| | | prepare | Update the version in the lib/**/version.rb version file and build the gem. | | | publish | Push the gem to the gem server. | |

Install

$ npm install semantic-release-rubygem -D

Usage

Add the plugin to the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "semantic-release-rubygem",
  ]
}

Configuration

Gem server authentication

The gem server authentication configuration is required.

The API key must be set using the GEM_HOST_API_KEY environment variable. To retrieve the key, you can:

  1. Login to RubyGems.org and click on 'Edit Profile'. You'll find the key in the 'API Access' section of the page.
  2. Sign into your gem host using the gem signin command. After you enter your credentials, your API key will be stored as a YAML value in the ~/.gem/credentials file under the rubygems_api_key key (or the hostname of your gem server).

gemspec file

This plugin requires exactly one valid .gemspec file to be present in the CWD.

lib/**/version.rb file

This plugin requires the version of the published gem to be defined in a version.rb file somewhere in the lib folder (e.g. lib/my/gem/version.rb). The version itself must be defined as a constant named VERSION inside the file:

module My
  module Gem
    VERSION = '0.0.0'
  end
end

Options

| Options | Description | Default | |--------------|---------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------| | gemHost | The gem server to push the gem to. | 'https//rubygems.org' | | updateGemfileLock | Whether to update the version of the gem to publish in the Gemfile.lock. This is useful if you are using the @semantic-release/git plugin to keep the version up to date in your git repo. When set to true the plugin will run bundle install to update the version. If another command is desired, it can be set by passing a string (e.g. bundle appraisal install). | false | | gemPublish | Whether to publish your gem to the gem server. | true | | gemFileDir | Directory path in which to write the the built .gem file. If false, the .gem file will not be kept on the file system. | false | | pkgRoot | Directory path to publish. | . |

Note: The pkgRoot directory must contain a *.gemspec file.