Skip to content

Commit

Permalink
Gemwork update: Use IRB + debug instead of Pry
Browse files Browse the repository at this point in the history
  • Loading branch information
pdobb committed Nov 26, 2023
1 parent aaa9afd commit 5bb7691
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 36 deletions.
31 changes: 17 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ GEM
benchmark (0.3.0)
benchmark-ips (2.12.0)
builder (3.2.4)
byebug (11.1.3)
coderay (1.1.3)
debug (1.8.0)
irb (>= 1.5.0)
reline (>= 0.3.1)
diff-lcs (1.5.0)
docile (1.4.0)
e2mmap (0.1.0)
gemwork (0.2.0)
gemwork (0.3.0)
debug
irb
minitest
minitest-reporters
much-stub
Expand All @@ -28,6 +31,10 @@ GEM
rubocop-rake
simplecov
yard
io-console (0.6.0)
irb (1.9.1)
rdoc
reline (>= 0.3.8)
jaro_winkler (1.5.6)
json (2.6.3)
kramdown (2.4.0)
Expand All @@ -36,7 +43,6 @@ GEM
kramdown (~> 2.0)
kwalify (0.7.2)
language_server-protocol (3.17.0.3)
method_source (1.0.0)
minitest (5.20.0)
minitest-reporters (1.6.1)
ansi
Expand All @@ -52,21 +58,21 @@ GEM
parser (3.2.2.4)
ast (~> 2.4.1)
racc
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
psych (5.1.1.1)
stringio
racc (1.7.3)
rainbow (3.1.1)
rake (13.1.0)
rbs (2.8.4)
rdoc (6.6.0)
psych (>= 4.0.0)
reek (6.1.4)
kwalify (~> 0.7.0)
parser (~> 3.2.0)
rainbow (>= 2.0, < 4.0)
regexp_parser (2.8.2)
reline (0.4.0)
io-console (~> 0.5)
reverse_markdown (2.1.1)
nokogiri
rexml (3.2.6)
Expand Down Expand Up @@ -113,6 +119,7 @@ GEM
thor (~> 1.0)
tilt (~> 2.0)
yard (~> 0.9, >= 0.9.24)
stringio (3.0.9)
thor (1.3.0)
tilt (2.3.0)
unicode-display_width (2.5.0)
Expand All @@ -124,12 +131,8 @@ PLATFORMS

DEPENDENCIES
benchmark-ips
bundler
byebug
gemwork
object_identifier!
pry
pry-byebug
rake
solargraph

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ Object Identifier works great with the [Object Inspector](https://github.com/pdo

### Benchmarking Formatters

Performance of Formatters can be tested by playing the [Formatters Benchmarking Scripts](https://github.com/pdobb/object_identifier/blob/master/script/benchmarking/formatters.rb) in the pry console for this gem.
Performance of Formatters can be tested by playing the [Formatters Benchmarking Scripts](https://github.com/pdobb/object_identifier/blob/master/script/benchmarking/formatters.rb) in the IRB console for this gem.

Custom Formatters may be similarly gauged for comparison by adding them to the `custom_formatter_klasses` array before playing the script.
Custom Formatters may be similarly gauged for comparison by adding them to the `custom_formatter_klasses` array before playing (loading) the script.

```ruby
custom_formatter_klasses = [MyCustomFormatter]

play script/benchmarking/formatters.rb
load "script/benchmarking/formatters.rb"
# ObjectIdentifier::StringFormatter
# 58.478k (± 0.8%) i/s - 295.776k in 5.058178s
# MyCustomFormatter
Expand Down
10 changes: 5 additions & 5 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ require "ostruct"
# 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(__FILE__)

# require "irb"
# IRB.start(__FILE__)
# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start
12 changes: 0 additions & 12 deletions object_identifier.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Gem::Specification.new do |spec|
spec.license = "MIT"
spec.required_ruby_version = ">= 2.7"

# spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"

spec.metadata = {
"bug_tracker_uri" => "https://github.com/pdobb/object_identifier/issues",
"changelog_uri" => "https://github.com/pdobb/object_identifier/releases",
Expand All @@ -30,18 +28,8 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

# Uncomment to register a new dependency of your gem
# spec.add_dependency "example-gem", "~> 1.0"

# For more information and examples about making a new gem, check out our
# guide at: https://bundler.io/guides/creating_gem.html

spec.add_development_dependency "benchmark-ips"
spec.add_development_dependency "bundler"
spec.add_development_dependency "byebug"
spec.add_development_dependency "gemwork"
spec.add_development_dependency "pry"
spec.add_development_dependency "pry-byebug"
spec.add_development_dependency "rake"
spec.add_development_dependency "solargraph"
end
4 changes: 2 additions & 2 deletions script/benchmarking/formatters.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Play from the pry console with:
# play script/benchmarking/formatters.rb
# Play from the IRB console with:
# load "script/benchmarking/formatters.rb"

require "benchmark/ips"

Expand Down

0 comments on commit 5bb7691

Please sign in to comment.