Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gem-patch

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gem-patch

  • 0.1.6
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

gem-patch

A RubyGems plugin that patches gems.

Description

gem-patch is a RubyGems plugin that helps to patch gems without manually opening and rebuilding them. It opens a given .gem file, extracts it, patches it with system patch command, clones its spec, updates the file list and builds the patched gem.

Installation

Run gem install gem-patch and you are done.

Fedora

On Fedora you can use YUM:

sudo yum install rubygem-gem-patch

Usage

gem patch [options] name-version.gem PATCH [PATCH ...]

Supported options

optionalternative syntaxdescription
-pNUMBER--strip-numberNUMBERSets the file name strip count to NUMBER.
-FNUMBER--fuzz=NUMBERSet NUMBER of lines to ignore in looking for places to install a hunk.
-oFILE--output=FILESet output FILE.
--patch-options=OPTIONSPass additional patch command options.
-cPATHS--copy-in=PATHSCopy in files or folders (separated by comma)
-rPATHS--remove=PATHSRemove files or folders before rebuild (separated by comma)
--dry-runPrint the results from patching, but do not change any files.
--verbosePrint additional info and STDOUT from patch command.

For versions higher than 0.1.4 --dry-run switch behaviour has been changed and it's not the same as in original patch command. Instead, gem-patch lets patch command modify files, but doesn't override the gem to be patched nor the output file at the end. This way we can easily use dry run also for patches involving more diffs changing each other.

If you need to check patching files that are not part of .gem release (such as a separate test suite), you can do it with --copy-in=test,folders option. If you don't want to include those additional files then delete them with --remove=test,folders.

Requirements

This version is build for both RubyGems 1.8 and RubyGems 2.0.

Released under the MIT license. Feel free to contribute!

FAQs

Package last updated on 22 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc