From b6c8489da9befcf2c37b7f02ad5886224d02648a Mon Sep 17 00:00:00 2001 From: Simone Carletti Date: Sun, 8 Jan 2017 00:03:39 +0100 Subject: [PATCH] Convert "console" into a command, instead of a rake task --- Rakefile | 6 ------ bin/console | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100755 bin/console diff --git a/Rakefile b/Rakefile index 8295ce7e..e35d6ea9 100644 --- a/Rakefile +++ b/Rakefile @@ -27,12 +27,6 @@ end CLOBBER.include "yardoc" -desc "Open an irb session preloaded with this library" -task :console do - sh "irb -rubygems -I lib -r public_suffix.rb" -end - - desc "Downloads the Public Suffix List file from the repository and stores it locally." task :"update-list" do require "net/http" diff --git a/bin/console b/bin/console new file mode 100755 index 00000000..fd0f7392 --- /dev/null +++ b/bin/console @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby + +require "bundler/setup" +require "public_suffix" + +# You can add fixtures and/or initialization code here to make experimenting +# with your gem easier. You can also use a different console, if you like. + +# (If you use this, don't forget to add pry to your Gemfile!) +# require "pry" +# Pry.start + +require "irb" +IRB.start