https://github.com/eval/bundle-try
Start a REPL with the gems you want to try
https://github.com/eval/bundle-try
Last synced: 3 months ago
JSON representation
Start a REPL with the gems you want to try
- Host: GitHub
- URL: https://github.com/eval/bundle-try
- Owner: eval
- License: mit
- Created: 2015-05-17T12:11:01.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-04T14:01:51.000Z (almost 10 years ago)
- Last Synced: 2025-02-14T11:07:30.724Z (4 months ago)
- Language: Ruby
- Size: 430 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Bundle Try
Open a REPL with the gems you want to try.
Quick weekend-hack inspired by [lein-try](https://github.com/rkneufeld/lein-try).## Installation
```
gem install bundle-try
```## Usage
By default `bundle try some_gem` will start a Ruby REPL.
To open a shell (i.e. to use gem executables) do: `bundle try --shell some_gem`.Some examples:
```
$ bundle try redis
... some bundling ...
irb(main):001:0> Redis
=> Redis
```Multiple gems:
```
$ bundle try redis rake
```Specific version:
```
$ bundle try redis '3.1.0'
```...or any requirement that would be understood by bundler:
```
$ bundle try redis '~> 3.1.0'
```Combined with gems that don't need a specific version:
```
$ bundle try redis '~> 3.1.0' rake gem_with_version '1.0'
```Github repository:
```
$ bundle try https://github.com/jeremyevans/sequel # or the clone-url with .git
```...or via the short notation:
```
$ bundle try gh:jeremyevans/sequel
```Specific Github version:
```
$ bundle try gh:jeremyevans/sequel 4.21.0
```Prepend the gem-name when it can't be derived from the url:
```
$ bundle try redis@gh:redis/redis-rb
```Gem in a gist (see [the gist](https://gist.github.com/eval/66f7bfaf17d364ddd232) as an example of a minimum viable gem):
```
$ bundle try rot13@https://gist.github.com/eval/66f7bfaf17d364ddd232
```Nothing will be written to the current directory, so it's save to run from an existing project-folder.
But if you need the Gemfile:```
$ bundle try rake > Gemfile
```Feeling lucky?
```
# Gemception
$ bundle try bundle-try
```## Developing
Run the features:
```
$ bundle exec cucumber
```## Is it any good?
Glad you ask! Yes, it's 'Cloons Approved'. This, as my Ruby-friend [Elizabeth](https://twitter.com/_elsapet) learned me, means that if this gem would've had a slightly bigger budget, there would be a nice Nespresso-like commercial with George himself vowing for this software.

Thanks to [Odaeus](https://github.com/Odaeus) for the image.