Sha256: 9cb66762f24ba73dee96051fd0ece586d8ce9080bc88b6e832f84a85eaaf3211

Contents?: true

Size: 988 Bytes

Versions: 2

Compression:

Stored size: 988 Bytes

Contents

#!/usr/bin/env ruby

# frozen_string_literal: true

require 'rubygems'
require 'gli'
require_relative '../lib/slack_messaging'

include GLI::App

program_desc 'Slack Messaging'
version SlackMessaging::VERSION

wrap_help_text :verbatim

flag [:config], desc: 'Slack Messaging config file path', default_value: SlackMessaging::DefaultPaths.config

program_long_desc "
DOCUMENTATION
    For documentation and help in setting up your configuration files,
    see Slack Messaging's GitHub repo: https://github.com/emmahsax/slack_messaging
"

desc 'Prints a variety of messages to Slack'
command 'send' do |c|
  pre do |global, _command, _options, _args|
    SlackMessaging::Config.load(global[:config])
    true
  end

  c.action do |_global_options, options, args|
    SlackMessaging::Send.execute(args, options)
  end
end

desc 'Sets up a Slack Messaging config file at ~/.slack_messaging.yml'
command 'setup' do |c|
  c.action do
    SlackMessaging::Setup.execute
  end
end

exit run(ARGV)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slack_messaging-3.1.0 bin/slack-messaging
slack_messaging-3.0.0 bin/slack-messaging