README.md in gemsmith-9.5.0 vs README.md in gemsmith-9.6.0
- old
+ new
@@ -15,10 +15,13 @@
- [Features](#features)
- [Screencasts](#screencasts)
- [Requirements](#requirements)
- [Setup](#setup)
+ - [Install](#install)
+ - [Configuration](#configuration)
+ - [Existing Gems](#existing-gems)
- [Usage](#usage)
- [Command Line Interface (CLI)](#command-line-interface-cli)
- [Rake](#rake)
- [Tests](#tests)
- [Security](#security)
@@ -83,10 +86,12 @@
0. [RubyGems](https://rubygems.org).
0. [Bundler](https://github.com/bundler/bundler).
# Setup
+## Install
+
For a secure install, type the following from the command line (recommended):
gem cert --add <(curl --location --silent https://www.alchemists.io/gem-public.pem)
gem install gemsmith --trust-policy MediumSecurity
@@ -96,10 +101,12 @@
For an insecure install, type the following (not recommended):
gem install gemsmith
+## Configuration
+
You can configure common settings for future gem builds by creating the following file:
~/.gemsmithrc
The following defaults are used when no options are configured:
@@ -143,10 +150,33 @@
While Gemsmith is fully customizable, please keep in mind that these are *global* settings and, once
set, will affect all future gem creations. Further customization is also provided via the CLI for a
customizable experience per gem if necessary.
+## Existing Gems
+
+If you have gems that were not originally crafted by Gemsmith, you can add Gemsmith support to them
+by modifying the following files:
+
+Add the following to your gem's `*.gemspec` file:
+
+ spec.add_development_dependency "gemsmith"
+
+Replace or add a modified version of the following to your gem's `Rakefile`:
+
+ # frozen_string_literal: true
+
+ begin
+ require "gemsmith/rake/setup"
+ rescue LoadError => error
+ puts error.message
+ end
+
+*NOTE: Ensure `require "bundler/gem_tasks"` is removed as Gemsmith replaces Bundler functionality.*
+
+With those changes, you can leverage the benefits of Gemsmith within your existing gem.
+
# Usage
## Command Line Interface (CLI)
From the command line, type: `gemsmith --help`
@@ -184,14 +214,19 @@
## Rake
Once a gem skeleton has been created, the following tasks are available (i.e. `bundle exec rake
-T`):
- rake build # Build gemsmith-8.0.0.gem package
+ rake build # Build gemsmith-9.6.0.gem package
rake clean # Clean gem artifacts
+ rake code_quality # Run code quality checks
rake doc # Update README (table of contents)
- rake install # Install gemsmith-8.0.0.gem package
- rake publish # Build, tag as v8.0.0 (unsigned), and push gemsmith-8.0.0.gem to RubyGems
+ rake install # Install gemsmith-9.6.0.gem package
+ rake publish # Build, tag as v9.6.0 (signed), and push gemsmith-9.6.0.gem to RubyGems
+ rake reek # Check for code smells
+ rake rubocop # Run RuboCop
+ rake rubocop:auto_correct # Auto-correct RuboCop offenses
+ rake spec # Run RSpec code examples
When building/testing your gem locally, a typical workflow is:
0. `bundle exec rake install`
0. Test your gem locally.