![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A Ruby based Slack app server. It provides API endpoints to Slack as well as functions to access Slack API and manages events with handlers you create.
Install the gem.
gem install mos-eisley
Create a configuration file and register some handlers. Handlers are your code that gets executed when events are received from Slack. See below for more details.
Run Mos Eisley.
mos-eisley -c config.rb start
This is a standard Ruby file and anything can go in it. It'll be executed at the very beginning of app launch, before the HTTP server is started. Here is an example.
# Configure application logging
MosEisley.logger = Logger.new(STDOUT)
MosEisley.logger.level = Logger::DEBUG
# Main configuration block (MosEisley namespace can be abbrv. to ME)
ME::Config.setup do |c|
# User custom data
c.user = {my_data1: 'Something', my_data2: 'Somethingelse'}
# HTTP server (Sinatra) settings
c.dump_errors = true
c.logging = true
# Your handlers
c.handler_paths = [
'handlers'
]
# Slack info
c.verification_token = 'vErIf1c4t0k3n5'
c.bot_access_token = 'xoxb-1234567890-b0t4cCe5sToK3N'
end
Define handlers, also a Ruby file, and they'll be executed as incoming Slack events are processed. You can define as many handlers as you want. You'll store the file(s) in the directory you've identified in the configuration file above.
There are 3 types of handlers you can define: :action
, :command
, :event
, which corresponds to the MosEisley endpoints accordingly.
ME::Handler.add(:event, 'debug') do |e, h|
e.event.each { |k, v| puts "#{k}: #{v}" }
h.stop unless e.for_me?
end
Create an app in Slack to setup a bot. Following features can be setup.
/action
endpoint./command
endpoint./event
endpoint. You'll likely Subscribe to Bot Events of app_mention
or any of the message.*
events.To see help:
$ mos-eisley -h
Usage: mos-eisley [options] {start|stop}
-c, --config=<s> Load config from file
-d, --daemonize Run in the background
-l, --log=<s> Log output to file
-P, --pid=<s> Store PID to file
-p, --port=<i> Use port (default: 4567)
The minimum to start a server:
$ mos-eisley -c config.rb start
FAQs
Unknown package
We found that mos-eisley demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.