bin/console in chronicle-etl-0.1.2 vs bin/console in chronicle-etl-0.1.3
- old
+ new
@@ -5,10 +5,22 @@
# 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 "pry"
+Pry.start
-require "irb"
-IRB.start(__FILE__)
+def reload!(print = true)
+ puts 'Reloading ...' if print
+ # Main project directory.
+ root_dir = File.expand_path('..', __dir__)
+ # Directories within the project that should be reloaded.
+ reload_dirs = %w{lib}
+ # Loop through and reload every file in all relevant project directories.
+ reload_dirs.each do |dir|
+ Dir.glob("#{root_dir}/#{dir}/**/*.rb").each { |f| load(f) }
+ end
+ # Return true when complete.
+ true
+end
+