
Security News
Rspack Introduces Rslint, a TypeScript-First Linter Written in Go
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
Use shorthand instead of full Github repository URIs in your Gemfile
.
Oh, yes... syntactic sugars!
gem install bundler-github
Note: Currently, this gem must always be installed after Bundler. If you update or re-install Bundler, you'll need to re-install this gem. See the caveat below for details.
In your Gemfile
you can now replace:
gem 'recaptcha', git: 'https://github.com/ambethia/recaptcha.git'
with:
gem 'recaptcha', github: 'ambethia/recaptcha'
But wait! That sugar only gets sweeter! If the repository's name is the same as the gem's name (and it usally is), you can leave out the repo name and just include the repository owner.
gem 'recaptcha', github: 'ambethia'
How you like them apples!?
One inconvenience I haven't figured a work around for is that you'll need to explicitly bundler/github
before you require bundler/setup
. In a Rails app
you might change your boot.rb
(oh, the humanity!) from:
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
to look like:
if File.exists?(ENV['BUNDLE_GEMFILE'])
require 'bundler/github'
require 'bundler/setup'
end
However, you don't need to require bundler-github
from your Gemfile
, it's already loaded by the time your application's Gemfile
is read anyways.
By default HTTP transport is used, but you can switch to an authenticated url scheme (ssh) by prepending a :
to the account name, like:
gem 'has_secrets', github: ':ambethia'
bundler-github
just expands and swaps the :github
option out for :git
, other options, like :branch
, :ref
, etc. will be left untouched.You coveteth my ice cream bar...
I have no idea if this is going to work for you, in your environment. It's beta-quality software, and as such should not be considered production ready.
The only way I could find to hook in and add the :github
option was to make my own bundle
command which replaces the executable generated by Rubygems in your $PATH
. The new command includes our patch then loads Bunder's original bundle
command. For a hack, I think it's pretty elegant.
The unique way bundler is used makes it challenging to extend without any kind of plugin API. If you can suggest a better way to hook it without needing to modify the original gem, I'd love to hear it.
Copyright © 2011 Jason L Perry. See MIT-LICENSE for the rights reserved.
FAQs
Unknown package
We found that bundler-github demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.