$ bin/init_new_gem roo Gem version you want to add (MAJOR.MINOR is recommended. e.g. 4.2): > 2.10 Your GitHub account if you want to become the maintainer of RBS for this gem (default: skip adding you to the maintainer) We recommentd to add your account to maintain the RBS actively. See https://github.com/ruby/gem_rbs_collection/blob/main/docs/CONTRIBUTING.md#gem-reviewer > sanfrecce-osaka ・gem の型の maintener になる場合は GitHub のアカウント名を入力 ・ならない場合は入力無しで OK
$ bin/init_new_gem roo Gem version you want to add (MAJOR.MINOR is recommended. e.g. 4.2): > 2.10 Your GitHub account if you want to become the maintainer of RBS for this gem (default: skip adding you to the maintainer) We recommentd to add your account to maintain the RBS actively. See https://github.com/ruby/gem_rbs_collection/blob/main/docs/CONTRIBUTING.md#gem-reviewer > sanfrecce-osaka create gems/roo/2.10/roo.rbs create gems/roo/2.10/_test/test.rb create gems/roo/2.10/_test/metadata.yaml create gems/roo/2.10/manifest.yaml create gems/roo/_reviewers.yaml The boilerplate for roo gem has been generated. Start writing the RBS! We recommend to focus on the main API of roo. See the CONTRIBUTING.md for more information. boilerplate が生成される
called # convert it to a call of spreadsheet.cell('a',42) def method_missing(m, *args) # #aa42 => #cell('aa',42) # #aa42('Sheet1') => #cell('aa',42,'Sheet1') if m =~ /^([a-z]+)(\d+)$/ col = ::Roo::Utils.letter_to_number(Regexp.last_match[1]) row = Regexp.last_match[2].to_i if args.empty? cell(row, col) else cell(row, col, args.first) end else super end end #a1 や #aa42 といったメソッドが無限に生える
metadata from https://rubygems.org/......... Resolving dependencies... Writing lockfile to /xxx/gem_rbs_collection/gems/roo/2.10/_test/Gemfile.lock Using csv:0 (/xxx/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rbs-3.5.3/stdlib/csv/0) Using date:0 (/xxx/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rbs-3.5.3/stdlib/date/0) Using forwardable:0 (/xxx/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rbs-3.5.3/stdlib/forwardable/0) Using nokogiri:1.11 (/xxx/gem_rbs_collection/gems/nokogiri/1.11) Using openssl:0 (/xxx/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rbs-3.5.3/stdlib/openssl/0) Using roo:2.10 (/xxx/gem_rbs_collection/gems/roo/2.10) Using rubyzip:2.3 (/xxx/gem_rbs_collection/gems/rubyzip/2.3) Using socket:0 (/xxx/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rbs-3.5.3/stdlib/socket/0) Using uri:0 (/xxx/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/rbs-3.5.3/stdlib/uri/0) It's done! 9 gems' RBSs now installed. # Type checking files: ............................................................................................................................ ............................................. No type error detected. No untyped calls detected. => Success
not appear in the gemspec. # If this gem includes such dependencies, comment-out the following lines and # declare the dependencies. # If all dependencies appear in the gemspec, you should remove this file. # dependencies: - name: date - name: forwardable - name: uri - name: csv - name: openssl gemspec に記載されていない依存を教えてあげる必要がある