From e5f1dbd6260326bd85b50e2b86bc75adbd0c871b Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Wed, 6 Mar 2024 13:52:31 -0800 Subject: [PATCH] Dev tooling: bin/console, bin/rake, debugger --- Gemfile | 8 ++++++-- bin/console | 10 ++++++++++ bin/rake | 5 +++++ test/test_helper.rb | 5 +++++ 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100755 bin/console create mode 100755 bin/rake diff --git a/Gemfile b/Gemfile index 83ceda0..01c1d63 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,8 @@ -source 'https://rubygems.org' +source "https://rubygems.org" + +if RUBY_VERSION >= "2.7" + gem "irb" + gem "debug" +end -# Specify your gem's dependencies in marcel.gemspec gemspec diff --git a/bin/console b/bin/console new file mode 100755 index 0000000..69daace --- /dev/null +++ b/bin/console @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby +require "bundler/setup" +require "irb" + +begin + require "debug" +rescue LoadError +end + +IRB.start diff --git a/bin/rake b/bin/rake new file mode 100755 index 0000000..0f02bce --- /dev/null +++ b/bin/rake @@ -0,0 +1,5 @@ +#!/usr/bin/env ruby +require "bundler/setup" +require "rake" + +Rake.application.run diff --git a/test/test_helper.rb b/test/test_helper.rb index 7e052f1..557ecd7 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,6 +2,11 @@ require 'marcel' require 'pathname' +begin + require 'debug' +rescue LoadError +end + class Marcel::TestCase < Minitest::Test class << self def setup(&block)