Project

scsi

0.0
No commit activity in last 3 years
No release in over 3 years
A Ruby server for receiving Slack Slash Command and responding with Slack info.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.1
~> 1.4
 Project Readme

scsi

Gem Version Code Climate security

A Ruby server for receiving Slack Slash Command and responding with Slack info.

Requirements

Getting Started

Install

$ gem install scsi

Optionally install Thin for more robustness.

Configure

Optionally, create a configuration file following the example below.

# Configure application logging
SCSI.logger = Logger.new(STDOUT)
SCSI.logger.level = Logger::DEBUG

SCSI::Config.setup do |c|
  # Optional: if any number of strings are set, it will require a matching
  #           "token" parameter in the incoming request (generated by Slack)
  c.tokens = [
    'sLaCkG3nEr4TeDt0KeN'
  ]
  # HTTP server (Sinatra) settings
  c.dump_errors = true
  c.logging = true
end

Run

In Slack, add a Slash Command configuration. Set the URL to wherever you're exposing the SCSI server at. (Hint: setup an SSL front; Slack requires your server to talk HTTPS. E.g., NGINX reverse proxy, Cloudflare.) Also, turn on the "Escape channels, users, and links" setting.

The minimum to start the SCSI server:

$ scsi-server start

Or, to use your configuration file:

$ scsi-server start -c config.rb

See help for more options:

$ scsi-server -h

Use

In any Slack channel, type your slash command; e.g., /slackinfo. You'll get a response like:

BOT 00:00 Only visible to you

SCSI: Slash Command Slack Info v0.0.0

channel_name
general

channel_id
C000AAAAA