Aloha,

I have finally got around to experimenting with rubocop-extension-generator and have been playing more with it.
I created a test repository that could be found here.

I have been experimenting with ast and how can I parse the gemspec to get the available methods for Gem::Specification.

Turned out I can get a lot of help from RuboCop::Cop::Gemspec.

To begin with, perhaps something like this:

def_node_search :gem_specification, <<~PATTERN
  (block
    (send
      (const
        (const {cbase nil?} :Gem) :Specification) :new)
    (args
      (arg $_)) ...)
PATTERN

Thanks to David’s advice,
I hit another jackpot from where I can “steal” a lot of stuff (:P) from: RuboCop::Cop::Gemspec::DuplicatedAssignment \o/
(I couldn’t be happier :P)

P.S. I hope I can have something ready for the call this Thursday.


:wq for today.