bin/slack-messaging in slack_messaging-2.1.1 vs bin/slack-messaging in slack_messaging-2.2.0

- old
+ new

@@ -8,25 +8,33 @@ program_desc 'Slack Messaging' version SlackMessaging::VERSION wrap_help_text :verbatim -flag [:config], :desc => 'SlackMessaging config file path', :default_value => SlackMessaging::DefaultPaths.config +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 'slack' do |c| + pre do |global, command, options, args| + SlackMessaging::Config.load(global[:config]) + true + end + c.action do |global_options, options, args| SlackMessaging::Slack.execute(args, options) end end -pre do |global,command,options,args| - SlackMessaging::Config.load(global[:config]) - SlackMessaging::Config.set_config_options(global) - true +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)