All Projects → rubygems → Gemstash

rubygems / Gemstash

Licence: mit
A RubyGems.org cache and private gem server

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Gemstash

jquery-datatables
Jquery datatables ruby gems for assets pipeline
Stars: ✭ 73 (-88.56%)
Mutual labels:  rubygems
Rubygems Mirror
https://gems.ruby-china.com
Stars: ✭ 318 (-50.16%)
Mutual labels:  rubygems
Gem Release
Release your ruby gems with ease.
Stars: ✭ 448 (-29.78%)
Mutual labels:  rubygems
termichunk
Organize chunks of text within terminals
Stars: ✭ 12 (-98.12%)
Mutual labels:  rubygems
Cryptoexchange
[UNMAINTAINED] Ruby library to query market data from cryptocurrency exchanges (https://www.coingecko.com)
Stars: ✭ 272 (-57.37%)
Mutual labels:  rubygems
Deep pluck
Allow you to pluck attributes from nested associations without loading a bunch of records.
Stars: ✭ 385 (-39.66%)
Mutual labels:  rubygems
ebnf
EBNF parser and generic parser generator for Ruby.
Stars: ✭ 101 (-84.17%)
Mutual labels:  rubygems
Mailcatcher
Catches mail and serves it through a dream.
Stars: ✭ 5,512 (+763.95%)
Mutual labels:  rubygems
Pluck to hash
Extend ActiveRecord pluck to return array of hashes
Stars: ✭ 275 (-56.9%)
Mutual labels:  rubygems
Ruby Fann
Ruby library for interfacing with FANN (Fast Artificial Neural Network)
Stars: ✭ 425 (-33.39%)
Mutual labels:  rubygems
capsulecd
Continuous Delivery for automating package releases (npm, cookbooks, gems, pip, jars, etc)
Stars: ✭ 96 (-84.95%)
Mutual labels:  rubygems
cld3-ruby
cld3-ruby is an interface of Compact Language Detector v3 (CLD3) for Ruby.
Stars: ✭ 59 (-90.75%)
Mutual labels:  rubygems
Ruby Units
A unit handling library for ruby
Stars: ✭ 389 (-39.03%)
Mutual labels:  rubygems
codice fiscale
A Ruby gem that calculates the Italian Tax ID (Codice Fiscale)
Stars: ✭ 17 (-97.34%)
Mutual labels:  rubygems
Ruby Mqtt
Pure Ruby gem that implements the MQTT protocol, a lightweight protocol for publish/subscribe messaging.
Stars: ✭ 463 (-27.43%)
Mutual labels:  rubygems
maloss
Towards Measuring Supply Chain Attacks on Package Managers for Interpreted Languages
Stars: ✭ 46 (-92.79%)
Mutual labels:  rubygems
Gemsmith
A command line interface for smithing Ruby gems.
Stars: ✭ 354 (-44.51%)
Mutual labels:  rubygems
Unread
Handle unread records and mark them as read with Ruby on Rails
Stars: ✭ 638 (+0%)
Mutual labels:  rubygems
Bundler
Manage your Ruby application's gem dependencies
Stars: ✭ 4,846 (+659.56%)
Mutual labels:  rubygems
Papertrail Cli
Command-line client for Papertrail hosted syslog & app log management service
Stars: ✭ 397 (-37.77%)
Mutual labels:  rubygems

Build Status Code Climate

What is Gemstash?

Gemstash is both a cache for remote servers such as https://rubygems.org, and a private gem source.

If you are using bundler across many machines that have access to a server within your control, you might want to use Gemstash.

If you produce gems that you don’t want everyone in the world to have access to, you might want to use Gemstash.

If you frequently bundle the same set of gems across multiple projects, you might want to use Gemstash.

Are you only using gems from https://rubygems.org, and don’t bundle the same gems frequently? Well, maybe you don’t need Gemstash… yet.


Gemstash is maintained by Ruby Together, a grassroots initiative committed to supporting the critical Ruby infrastructure you rely on. Contribute today as an individual or even better, as a company, and ensure that Bundler, RubyGems, Gemstash, and other shared tooling is around for years to come.

Quickstart Guide

Setup

Gemstash is designed to be quick and painless to get set up. By the end of this Quickstart Guide, you will be able to bundle stashed gems from public sources against a Gemstash server running on your machine.

Install Gemstash to get started:

$ gem install gemstash

After it is installed, starting Gemstash requires no additional steps. Simply start the Gemstash server with the gemstash command:

$ gemstash start

You may have noticed that the command finished quickly. This is because Gemstash will run the server in the background by default. The server runs on port 9292.

Bundling

With the server running, you can bundle against it. Tell Bundler that you want to use Gemstash to find gems from RubyGems.org:

$ bundle config mirror.https://rubygems.org http://localhost:9292

Now you can create a Gemfile and install gems through Gemstash:

# ./Gemfile
source "https://rubygems.org"
gem "rubywarrior"

The gems you include should be gems you don’t yet have installed, otherwise Gemstash will have nothing to stash. Now bundle:

$ bundle install --path .bundle

Your Gemstash server has fetched the gems from https://rubygems.org and cached them for you! To prove this, you can disable your Internet connection and try again. Gem files (*.gem) are cached indefinitely. Gem dependencies metadata are cached for 30 minutes, so if you bundle again before that, you can successfully bundle without an Internet connection:

$ # Disable your Internet first!
$ rm -rf Gemfile.lock .bundle
$ bundle

Falling back to rubygems.org

If you want to make sure that your bundling from https://rubygems.org still works as expected when the Gemstash server is not running, you can easily configure Bundler to fallback to https://rubygems.org.

$ bundle config mirror.https://rubygems.org.fallback_timeout true

You can also configure this fallback as a number of seconds in case the Gemstash server is simply unresponsive. This example uses a 3 second timeout:

$ bundle config mirror.https://rubygems.org.fallback_timeout 3

Stopping the Server

Once you’ve finish using your Gemstash server, you can stop it just as easily as you started it:

$ gemstash stop

You’ll also want to tell Bundler that it can go back to getting gems from RubyGems.org directly, instead of going through Gemstash:

$ bundle config --delete mirror.https://rubygems.org

Under the Hood

You might wonder where the gems are stored. After running the commands above, you will find a new directory at ~/.gemstash. This directory holds all the cached and private gems. It also has a server log, the database, and configuration for Gemstash. If you prefer, you can point to a different directory.

Gemstash uses SQLite to store details about private gems. The database will be located in ~/.gemstash, however you won’t see the database appear until you start using private gems. If you prefer, you can use a different database.

Gemstash temporarily caches things like gem dependencies in memory. Anything cached in memory will last for 30 minutes before being retrieved again. You can use memcached instead of caching in memory. Gem files are always cached permanently, so bundling with a Gemfile.lock with all gems cached will never call out to https://rubygems.org.

The server you ran is provided via Puma and Rack, however they are not customizable at this point.

Deep Dive

Deep dive into more subjects:

Reference

An anatomy of various configuration and commands:

To see what has changed in recent versions of Gemstash, see the CHANGELOG.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake to run RuboCop and the tests. While developing, you can run bin/gemstash to run Gemstash. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/rubygems/gemstash. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].