akabiru / faker-bot

A tool to make it easier to pick the right Faker methods to generate the fake data you need. 🔍
MIT License
205 stars 21 forks source link

Faker-bot list -v fails at first time execution #194

Open luilver opened 2 years ago

luilver commented 2 years ago

Issue summary

Following faker-bot documentation while executing faker list -v I got the following error:

/hidden/path/faker-2.19.0/lib/faker.rb:188:in `method_missing': super: no superclass method `species' for Faker::Games::DnD:Class (NoMethodError)

Expected behavior

As per described in Usage section it should retrieve a method list with sample output included.

Actual behavior

Instead I got the following error:

`DnD.species` is deprecated. Use `DnD.race` instead.
/hidden/path/gems/faker-2.19.0/lib/faker.rb:188:in `method_missing': super: no superclass method `species' for Faker::Games::DnD:Class (NoMethodError)
  from /hidden/path/gems/faker-2.19.0/lib/faker/games/dnd.rb:131:in `species'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:172:in `public_send'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:172:in `faker_method'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:158:in `verbose_output'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:137:in `block in leaf_args'
  from :90:in `tap'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:136:in `leaf_args'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:132:in `block in leaf'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:132:in `map'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:132:in `leaf'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:121:in `node'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:107:in `block in build_tree'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:106:in `each'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:106:in `reduce'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:106:in `build_tree'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:74:in `tree'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:94:in `gt_screen_height?'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:84:in `paginable?'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:50:in `call'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/renderer.rb:22:in `call'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/command.rb:47:in `render'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/commands/list.rb:40:in `render'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot/commands/list.rb:22:in `execute'
  from /hidden/path/gems/faker-bot-0.5.3/lib/faker/bot.rb:32:in `list'
  from /hidden/path/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
  from /hidden/path/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
  from /hidden/path/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
  from /hidden/path/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
  from /hidden/path/gems/faker-bot-0.5.3/bin/faker:14:in `'
  from /hidden/path/bin/faker:25:in `load'
  from /hidden/path/bin/faker:25:in `
'
  from /hidden/path/bin/ruby_executable_hooks:22:in `eval'
  from /hidden/path/bin/ruby_executable_hooks:22:in `
'

Steps to reproduce the problem

  1. gem install faker-bot
  2. faker list -v

Specifications

App type: CLI Operating System: macOS 12.1 Shell: zsh 5.8 (x86_64-apple-darwin21.0) Ruby version: 3.0.3

Additional considerations

Not sure if this could be related but when install asked for overwrite the executable I answered yes:

Overwrite the executable? [yN]  y
Successfully installed faker-bot-0.5.3
13 gems installed
jotolo commented 2 years ago

@luilver Probably it has no support for ruby 3? I have checked here: https://github.com/faker-ruby/faker-bot/blob/master/.github/workflows/ci.yml There you can see the test suite is not covering the ruby 3 version. If you check here: https://github.com/faker-ruby/faker-bot/blob/ada359a664d51ddfcbfa773f70241282fbee9c5d/faker-bot.gemspec#L18 you will notice there is no restriction but given the error, it might not support Ruby 3 yet.