<commit_before># Whois for gems, because gem names are like domains in the 90's
#
# gem whois <gemname> - returns gem details if it exists
#

module.exports = (robot) ->
  robot.respond /gem whois (.*)/i, (msg) ->
    gemname = escape(msg.match[1])
    msg.http("http://rubygems.org/api/v1/gems/#{gemname}.json")
      .get() (err, res, body) ->
        try
          json = JSON.parse(body)
          msg.send "   gem name: #{json.name}\n
     owners: #{json.authors}\n
       info: #{json.info}\n
    version: #{json.version}\n
  downloads: #{json.downloads}\n"
        catch err
          msg.send "Gem not found. It will be mine. Oh yes. It will be mine. *sinister laugh*"<commit_msg>Add more info in the gem whois response<commit_after># Whois for gems, because gem names are like domains in the 90's
#
# gem whois <gemname> - returns gem details if it exists
#

module.exports = (robot) ->
  robot.respond /gem whois (.*)/i, (msg) ->
    gemname = escape(msg.match[1])
    msg.http("http://rubygems.org/api/v1/gems/#{gemname}.json")
      .get() (err, res, body) ->
        try
          json = JSON.parse(body)
          msg.send "     gem name: #{json.name}\n
       owners: #{json.authors}\n
         info: #{json.info}\n
      version: #{json.version}\n
    downloads: #{json.downloads}\n
     homepage: #{json.homepage_uri}\n
documentation: #{json.documentation_uri}\n
  source code: #{json.source_code_uri}\n"
        catch err
          msg.send "Gem not found. It will be mine. Oh yes. It will be mine. *sinister laugh*"
{'fraction_non_alphanumeric': 0.15254237288135594, 'fraction_numerical': 0.005215123859191656, 'mean_word_length': 2.520642201834862, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6786520', 'n_tokens_mistral': 527, 'n_tokens_neox': 512, 'n_words': 151}