Sha256: b4ea2425f4b15dfec810116a5edb57582e90e70aac00c887703e459c6b9a8b7d

Contents?: true

Size: 558 Bytes

Versions: 3

Compression:

Stored size: 558 Bytes

Contents

class SlackSmartBot
  #todo: Add tests
  def get_smartbot_readme(dest)
    save_stats(__method__)
    dir = Gem::Specification.latest_spec_for('slack-smart-bot').gem_dir
    file_name = "README.md"
    content = File.read("#{dir}/#{file_name}")
    content.gsub!('"img/', '"https://raw.githubusercontent.com/MarioRuiz/slack-smart-bot/master/img/')
    if File.exist?("#{dir}/#{file_name}")
      send_file(dest, "SmartBot README", "", file_name, "text/markdown", "markdown", content: content)
    else
      respond "There is no README.md"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slack-smart-bot-1.15.25 lib/slack/smart-bot/commands/general/get_smartbot_readme.rb
slack-smart-bot-1.15.1 lib/slack/smart-bot/commands/general/get_smartbot_readme.rb
slack-smart-bot-1.15.0 lib/slack/smart-bot/commands/general/get_smartbot_readme.rb