Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add IRB config, update console script
The `.irbrc` file configures IRB in a couple of ways, most notably by
dropping a local `.irb_history` file (ignored by Git) that'll persist
across `bin/console` sessions. Useful!
  • Loading branch information
jgarber623 committed Nov 22, 2023
commit 7dd1b6e5b31071d0cd1f2f514b2a4d000f848430
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# Used by dotenv library to load environment variables.
# .env

# Ignore history files.
.irb_history
.rdbg_history

# Documentation cache and generated files:
/.yardoc/
/_yardoc/
Expand All @@ -32,3 +36,6 @@ Gemfile.lock

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# Used by RuboCop. Remote config files pulled in from inherit_from directive.
# .rubocop-https?--*
12 changes: 12 additions & 0 deletions .irbrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

require "irb/completion"

IRB.conf[:AUTO_INDENT] = true
IRB.conf[:HISTORY_FILE] = ".irb_history"
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:USE_AUTOCOMPLETE] = false

def clear
system("clear")
end
10 changes: 5 additions & 5 deletions bin/console
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'bundler/setup'
require 'indieweb/endpoints'
require "bundler/setup"
require "indieweb/endpoints"

# 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'
# (If you use this, don"t forget to add pry to your Gemfile!)
# require "pry"
# Pry.start

require 'irb'
require "irb"
IRB.start(__FILE__)