slackit 1.1.8 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/.travis.yml +1 -1
- data/CHANGELOG.md +28 -2
- data/Gemfile +1 -1
- data/README.md +90 -16
- data/VERSION.txt +1 -1
- data/exe/slackit +30 -4
- data/lib/slackit.rb +55 -13
- data/lib/slackit/version.rb +1 -1
- data/slackit.gemspec +2 -0
- data/testing/slackit +124 -0
- metadata +35 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19c0142dd96bef5b8b87d09a03e5af539bb14a7bb68f17bab9fbebae61c85879
|
4
|
+
data.tar.gz: af810fb2581d78251284ececd1d924fde680e5b4b8b2db5d5566f5088bed9391
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db62100414a06794a0560cd9c0702fa9f678eb76efaa28d5aed92c7da350fd8524973d5692aedd0e7c966bf78b6c28e6d975f021a1903b695796b77ce105237e
|
7
|
+
data.tar.gz: e471c2e16512f33b7bde41ca5ac5580df4b88551a9694899c961ca2a0df6fd7dd32b9ea0ed0e6894fce72e4665763cea577470844d15e6d96c2a61598cb30624
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -5,9 +5,35 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
|
6
6
|
This changelog was automatically generated using [Caretaker](https://github.com/AntiPhotonltd/slackit) by [Wolf Software](https://github.com/WolfSoftware)
|
7
7
|
|
8
|
-
### [
|
8
|
+
### [v1.1.10](https://github.com/AntiPhotonltd/slackit/compare/v1.1.9...v1.1.10)
|
9
9
|
|
10
|
-
|
10
|
+
> Released on July, 31st 2020
|
11
|
+
|
12
|
+
- Bump version ready for release [`[bf92ada]`](https://github.com/AntiPhotonltd/slackit/commit/bf92ada1d36007e652165546160dc91359a6e833) [`[TGWolf]`](https://github.com/TGWolf)
|
13
|
+
|
14
|
+
- Update readme to new verrsion [`[a9263c0]`](https://github.com/AntiPhotonltd/slackit/commit/a9263c04d5405ee46116c0ee4a5a1dbd46e25102) [`[TGWolf]`](https://github.com/TGWolf)
|
15
|
+
|
16
|
+
- Update the version of json due to github security alert [`[fa0e80a]`](https://github.com/AntiPhotonltd/slackit/commit/fa0e80a2a5cf21b2e25e534ab0dc67e3805abe0a) [`[TGWolf]`](https://github.com/TGWolf)
|
17
|
+
|
18
|
+
- Fix all of the rubocop errors [`[8897f54]`](https://github.com/AntiPhotonltd/slackit/commit/8897f54ec15160461898b206581522bf9d6c77aa) [`[TGWolf]`](https://github.com/TGWolf)
|
19
|
+
|
20
|
+
- Add attachments and blocks [`[3a84400]`](https://github.com/AntiPhotonltd/slackit/commit/3a844009d445b3684032fb5546baa95ebf219fd9) [`[TGWolf]`](https://github.com/TGWolf)
|
21
|
+
|
22
|
+
### [v1.1.9](https://github.com/AntiPhotonltd/slackit/compare/v1.1.8...v1.1.9)
|
23
|
+
|
24
|
+
> Released on March, 9th 2020
|
25
|
+
|
26
|
+
- Fix some new rubocop warnings/errors [`[cc6365d]`](https://github.com/AntiPhotonltd/slackit/commit/cc6365dc5464f9791219499025a0cce110ab2114) [`[TGWolf]`](https://github.com/TGWolf)
|
27
|
+
|
28
|
+
- Fix a typo in link checking job [`[e8ba2a6]`](https://github.com/AntiPhotonltd/slackit/commit/e8ba2a61b6b44adabdbf03d2160a8693f5f41b0a) [`[TGWolf]`](https://github.com/TGWolf)
|
29
|
+
|
30
|
+
### [v1.1.8](https://github.com/AntiPhotonltd/slackit/compare/v1.1.7...v1.1.8)
|
31
|
+
|
32
|
+
> Released on March, 9th 2020
|
33
|
+
|
34
|
+
- spec.required_ruby_version [`[519c7cb]`](https://github.com/AntiPhotonltd/slackit/commit/519c7cb481c538a46782e16fd17a83fb41a6e467) [`[TGWolf]`](https://github.com/TGWolf)
|
35
|
+
|
36
|
+
- Fix gemfile ruby version [`[fb0d2dc]`](https://github.com/AntiPhotonltd/slackit/commit/fb0d2dc6618b9fcf04c8730b827ad7e0fbc0001c) [`[TGWolf]`](https://github.com/TGWolf)
|
11
37
|
|
12
38
|
### [v1.1.7](https://github.com/AntiPhotonltd/slackit/compare/v1.1.6...v1.1.7)
|
13
39
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,18 +1,63 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
<h1 align="center">
|
2
|
+
<a href="#"><img src="https://github.com/AntiPhotonltd/branding/blob/master/images/company%20logo/banners/banner-1400-215.png?raw=true" alt="" width="600"></a>
|
3
|
+
<br>
|
4
|
+
Slackit
|
5
|
+
<br>
|
6
|
+
</h1>
|
7
|
+
|
8
|
+
<h4 align="center">Slackit is a very simply Ruby Gem for posting to a slack incoming webhook.</h4>
|
9
|
+
|
10
|
+
<p align="center">
|
11
|
+
<a href="https://travis-ci.org/AntiPhotonltd/slackit">
|
12
|
+
<img src="https://img.shields.io/travis/AntiPhotonltd/slackit/master?style=for-the-badge&logo=travis"
|
13
|
+
alt="Build Status">
|
14
|
+
</a>
|
15
|
+
<a href="https://github.com/AntiPhotonltd/slackit/releases/latest">
|
16
|
+
<img src="https://img.shields.io/github/release/AntiPhotonltd/slackit?color=blueviolet&style=for-the-badge&logo=github&label=Version"
|
17
|
+
alt="Release">
|
18
|
+
</a>
|
19
|
+
<a href="https://github.com/AntiPhotonltd/slackit/releases/latest">
|
20
|
+
<img src="https://img.shields.io/github/release-date/AntiPhotonltd/slackit?color=blueviolet&logo=github&style=for-the-badge"
|
21
|
+
alt="Latest Release">
|
22
|
+
</a>
|
23
|
+
<br/>
|
24
|
+
<a href="https://github.com/AntiPhotonltd/slackit/commits">
|
25
|
+
<img src="https://img.shields.io/github/commits-since/AntiPhotonltd/slackit/latest?color=blueviolet&style=for-the-badge&logo=github"
|
26
|
+
alt="Github commits (since latest release)">
|
27
|
+
</a>
|
28
|
+
<a href="https://github.com/AntiPhotonltd/slackit/commits/master">
|
29
|
+
<img src="https://img.shields.io/github/last-commit/AntiPhotonltd/slackit?color=blueviolet&style=for-the-badge&logo=github"
|
30
|
+
alt="Last Commit">
|
31
|
+
</a>
|
32
|
+
<br />
|
33
|
+
<a href="LICENSE.md">
|
34
|
+
<img src="https://img.shields.io/badge/license-MIT-blueviolet?style=for-the-badge"
|
35
|
+
alt="Software License">
|
36
|
+
</a>
|
37
|
+
<a href="https://github.com/AntiPhotonltd/branding/issues">
|
38
|
+
<img src="https://img.shields.io/github/issues/AntiPhotonltd/branding?logo=github&color=blueviolet&style=for-the-badge"
|
39
|
+
alt="Open an Issue">
|
40
|
+
</a>
|
41
|
+
<a href="https://github.com/AntiPhotonltd/branding/issues?q=is%3Aissue+is%3Aclosed)">
|
42
|
+
<img src="https://img.shields.io/github/issues-closed/AntiPhotonltd/branding?logo=github&color=blueviolet&style=for-the-badge"
|
43
|
+
alt="Open an Issue">
|
44
|
+
</a>
|
45
|
+
<a href="https://github.com/AntiPhotonltd">
|
46
|
+
<img src="https://img.shields.io/badge/Created%20By-AntiPhoton-blueviolet?style=for-the-badge" alt="AntiPhoton Limited">
|
47
|
+
</a>
|
48
|
+
</p>
|
49
|
+
<hr>
|
50
|
+
|
51
|
+
<h1>Slackit <img align="right" src="https://img.shields.io/badge/made%20with-ruby-blueviolet?logo=gnu-bash&logoColor=white&style=for-the-badge" /></h1>
|
52
|
+
|
13
53
|
|
14
54
|
Slackit is a very simply Ruby Gem for posting to a slack incoming webhook.
|
15
55
|
|
56
|
+
It is now possible to send attachments and blocks however slackit doesn't take responsibility for creating those only for sending them. For more information on how to use those please refer to the Slack API documentation.
|
57
|
+
|
58
|
+
* [Attachments](https://api.slack.com/reference/messaging/attachments)
|
59
|
+
* [Blocks](https://api.slack.com/block-kit/building)
|
60
|
+
|
16
61
|
## Installation
|
17
62
|
|
18
63
|
Add this line to your application's Gemfile:
|
@@ -35,13 +80,15 @@ Or install it yourself as:
|
|
35
80
|
require "slackit"
|
36
81
|
```
|
37
82
|
|
38
|
-
Initialize client
|
83
|
+
### Initialize client
|
84
|
+
|
85
|
+
#### Initialize with minimal options
|
39
86
|
|
40
87
|
```ruby
|
41
88
|
client = Slackit.new(webhook_url: "slack webhook url")
|
42
89
|
```
|
43
90
|
|
44
|
-
Initialize with options
|
91
|
+
#### Initialize with all options
|
45
92
|
|
46
93
|
```ruby
|
47
94
|
client = SlackNotify::Client.new(
|
@@ -52,22 +99,49 @@ client = SlackNotify::Client.new(
|
|
52
99
|
)
|
53
100
|
```
|
54
101
|
|
55
|
-
Initialize via shorthand method
|
102
|
+
#### Initialize via shorthand method
|
56
103
|
|
57
104
|
```Ruby
|
58
105
|
client = Slackit.new(options)
|
59
106
|
```
|
60
107
|
|
108
|
+
### Sending Messages
|
109
|
+
|
110
|
+
#### Simple messages
|
111
|
+
|
112
|
+
```Ruby
|
113
|
+
client.send_message("This is a test message")
|
114
|
+
```
|
115
|
+
|
116
|
+
#### Attachments
|
117
|
+
|
118
|
+
```Ruby
|
119
|
+
client.send_attachment(attachment_json)
|
120
|
+
```
|
121
|
+
> NOTE: We will test to make sure the json is valid and catch errors thrown by the API for invalid formatting, missing values etc. General error from the api is `missing_text_or_fallback_or_attachments`
|
122
|
+
|
123
|
+
#### Blocks
|
124
|
+
|
125
|
+
```Ruby
|
126
|
+
client.send_block(block_json)
|
127
|
+
```
|
128
|
+
|
129
|
+
> NOTE: We will test to make sure the json is valid and catch errors thrown by the API for invalid formatting, missing values etc. General error from the api is `invalid_blocks_format`
|
130
|
+
|
61
131
|
### Command Line Usage
|
62
132
|
|
63
133
|
```
|
64
134
|
Usage: slackit
|
65
135
|
-h, --help Display this screen
|
66
136
|
-c, --channel string The channel to send the message to
|
67
|
-
-i, --icon-emoji string The emoji to use
|
137
|
+
-i, --icon-emoji string The emoji to use for the channel icon [default: :wolf:]
|
68
138
|
-m, --message string The message to send
|
69
139
|
-w, --webhook-url string The slack incoming webhook url to use
|
70
140
|
-u, --username string The username to send as [default: slackit]
|
141
|
+
|
142
|
+
Message type options:
|
143
|
+
-a, --attachment Treat the message as an attachment
|
144
|
+
-b, --block Treat the message as a block
|
71
145
|
```
|
72
146
|
|
73
147
|
### Pipe message
|
data/VERSION.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.10
|
data/exe/slackit
CHANGED
@@ -12,9 +12,19 @@ require 'slackit'
|
|
12
12
|
def send_message_to_slack(options)
|
13
13
|
begin
|
14
14
|
s = Slackit.new(options)
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
|
16
|
+
if options[:attachment]
|
17
|
+
s.send_attachment(options[:message])
|
18
|
+
elsif options[:block]
|
19
|
+
s.send_block(options[:message])
|
20
|
+
else
|
21
|
+
s.send_message(options[:message])
|
22
|
+
end
|
23
|
+
rescue ArgumentError => e
|
24
|
+
puts e
|
25
|
+
exit(1)
|
26
|
+
rescue RuntimeError => e
|
27
|
+
puts e
|
18
28
|
exit(1)
|
19
29
|
end
|
20
30
|
end
|
@@ -29,7 +39,7 @@ end
|
|
29
39
|
# -------------------------------------------------------------------------------- #
|
30
40
|
|
31
41
|
def process_arguments
|
32
|
-
options = {}
|
42
|
+
options = { :username => 'slackit', :attachment => false, :block => false }
|
33
43
|
# Enforce the presence of
|
34
44
|
mandatory = %I[webhook_url message]
|
35
45
|
|
@@ -59,6 +69,17 @@ def process_arguments
|
|
59
69
|
opts.on('-u', '--username string', 'The username to send as [default: slackit]') do |username|
|
60
70
|
options[:username] = username
|
61
71
|
end
|
72
|
+
|
73
|
+
opts.separator ''
|
74
|
+
opts.separator 'Message type options:'
|
75
|
+
|
76
|
+
opts.on('-a', '--attachment', 'Treat the message as an attachment') do
|
77
|
+
options[:attachment] = true
|
78
|
+
end
|
79
|
+
|
80
|
+
opts.on('-b', '--block', 'Treat the message as a block') do
|
81
|
+
options[:block] = true
|
82
|
+
end
|
62
83
|
end
|
63
84
|
|
64
85
|
begin
|
@@ -72,6 +93,11 @@ def process_arguments
|
|
72
93
|
exit
|
73
94
|
end
|
74
95
|
|
96
|
+
if options[:attachment] && options[:block]
|
97
|
+
puts 'Error: You cannot use -a and -b at the same time! - aborting'
|
98
|
+
exit
|
99
|
+
end
|
100
|
+
|
75
101
|
exit 0 if send_message_to_slack(options)
|
76
102
|
|
77
103
|
exit 1
|
data/lib/slackit.rb
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
require 'slackit/version'
|
4
4
|
require 'httparty'
|
5
5
|
|
6
|
+
require 'json'
|
7
|
+
|
6
8
|
#
|
7
9
|
# To follow
|
8
10
|
#
|
@@ -16,27 +18,67 @@ class Slackit
|
|
16
18
|
raise ArgumentError.new('Webhook URL required') if @webhook_url.nil?
|
17
19
|
end
|
18
20
|
|
19
|
-
#
|
20
|
-
#
|
21
|
+
#
|
22
|
+
# Raw message
|
23
|
+
#
|
24
|
+
def send_message(text)
|
25
|
+
text = text.gsub('\\n', "\n") # ensure newlines are not escaped
|
26
|
+
|
27
|
+
payload = { 'text' => text }
|
28
|
+
|
29
|
+
return send_payload(payload)
|
30
|
+
end
|
31
|
+
|
32
|
+
#
|
33
|
+
# Add an alias for backwards compatibility
|
34
|
+
#
|
21
35
|
def send(text)
|
22
|
-
|
23
|
-
|
36
|
+
return send_message(text)
|
37
|
+
end
|
24
38
|
|
25
|
-
|
26
|
-
|
27
|
-
|
39
|
+
#
|
40
|
+
# Legacy attachments
|
41
|
+
#
|
42
|
+
def send_attachment(attachment)
|
43
|
+
payload = { 'attachments' => [ convert_to_json(attachment) ] }
|
44
|
+
return send_payload(payload)
|
45
|
+
end
|
46
|
+
|
47
|
+
#
|
48
|
+
# New shiney blocks
|
49
|
+
#
|
50
|
+
def send_block(block)
|
51
|
+
payload = convert_to_json(block)
|
52
|
+
return send_payload(payload)
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Convery the string to json
|
57
|
+
#
|
58
|
+
def convert_to_json(json_string)
|
59
|
+
begin
|
60
|
+
return JSON.parse(json_string)
|
61
|
+
rescue JSON::ParserError
|
62
|
+
raise ArgumentError.new('Invalid json')
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def send_payload(payload)
|
67
|
+
headers = { 'Content-Type' => 'application/json' }
|
28
68
|
|
29
|
-
#
|
30
|
-
|
69
|
+
# Add the additional payload items
|
70
|
+
payload['icon_emoji'] ||= @icon_emoji
|
71
|
+
payload['username'] ||= @username
|
72
|
+
payload['channel'] ||= @channel
|
31
73
|
|
32
74
|
begin
|
33
|
-
response = HTTParty.post(@webhook_url, body:
|
75
|
+
response = HTTParty.post(@webhook_url, body: payload.to_json, headers: headers)
|
34
76
|
|
35
77
|
return true if response.code == 200
|
36
78
|
|
37
|
-
|
38
|
-
rescue HTTParty::Error, SocketError =>
|
39
|
-
|
79
|
+
raise response
|
80
|
+
rescue HTTParty::Error, SocketError => e
|
81
|
+
raise e
|
40
82
|
end
|
41
83
|
end
|
42
84
|
end
|
data/lib/slackit/version.rb
CHANGED
data/slackit.gemspec
CHANGED
@@ -23,8 +23,10 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 2'
|
25
25
|
spec.add_development_dependency 'httparty', '~> 0.16.2'
|
26
|
+
spec.add_development_dependency 'json', '~> 2.3.0'
|
26
27
|
spec.add_development_dependency 'rake', '~> 12.3.3'
|
27
28
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
28
29
|
|
29
30
|
spec.add_runtime_dependency 'httparty', '~> 0.16.2'
|
31
|
+
spec.add_runtime_dependency 'json', '~> 2.3.0'
|
30
32
|
end
|
data/testing/slackit
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
|
5
|
+
require 'optparse'
|
6
|
+
require 'slackit'
|
7
|
+
|
8
|
+
# -------------------------------------------------------------------------------- #
|
9
|
+
# Send Mssage to Slack #
|
10
|
+
# -------------------------------------------------------------------------------- #
|
11
|
+
# This function will take the input arguments and then send the message. #
|
12
|
+
# -------------------------------------------------------------------------------- #
|
13
|
+
|
14
|
+
def send_message_to_slack(options)
|
15
|
+
begin
|
16
|
+
s = Slackit.new(options)
|
17
|
+
|
18
|
+
if options[:attachment]
|
19
|
+
s.send_attachment(options[:message])
|
20
|
+
elsif options[:block]
|
21
|
+
s.send_block(options[:message])
|
22
|
+
else
|
23
|
+
s.send_message(options[:message])
|
24
|
+
end
|
25
|
+
rescue ArgumentError => e
|
26
|
+
puts e
|
27
|
+
exit(1)
|
28
|
+
rescue RuntimeError => e
|
29
|
+
puts e
|
30
|
+
exit(1)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# -------------------------------------------------------------------------------- #
|
35
|
+
# Process Arguments #
|
36
|
+
# -------------------------------------------------------------------------------- #
|
37
|
+
# This function will process the input from the command line and work out what it #
|
38
|
+
# is that the user wants to see. #
|
39
|
+
# #
|
40
|
+
# This is the main processing function where all the processing logic is handled. #
|
41
|
+
# -------------------------------------------------------------------------------- #
|
42
|
+
|
43
|
+
def process_arguments
|
44
|
+
options = { :username => 'slackit', :attachment => false, :block => false }
|
45
|
+
# Enforce the presence of
|
46
|
+
mandatory = %I[webhook_url message]
|
47
|
+
|
48
|
+
optparse = OptionParser.new do |opts|
|
49
|
+
opts.banner = "Usage: #{$PROGRAM_NAME}"
|
50
|
+
|
51
|
+
opts.on('-h', '--help', 'Display this screen') do
|
52
|
+
puts opts
|
53
|
+
exit(1)
|
54
|
+
end
|
55
|
+
opts.on('-c', '--channel string', 'The channel to send the message to') do |channel|
|
56
|
+
options[:channel] = channel
|
57
|
+
end
|
58
|
+
|
59
|
+
opts.on('-i', '--icon-emoji string', 'The emoji to use for the channel icon [default: :wolf:]') do |icon_emoji|
|
60
|
+
options[:icon_emoji] = icon_emoji
|
61
|
+
end
|
62
|
+
|
63
|
+
opts.on('-m', '--message string', 'The message to send') do |message|
|
64
|
+
options[:message] = message
|
65
|
+
end
|
66
|
+
|
67
|
+
opts.on('-w', '--webhook-url string', 'The slack incoming webhook url to use') do |webhook_url|
|
68
|
+
options[:webhook_url] = webhook_url
|
69
|
+
end
|
70
|
+
|
71
|
+
opts.on('-u', '--username string', 'The username to send as [default: slackit]') do |username|
|
72
|
+
options[:username] = username
|
73
|
+
end
|
74
|
+
|
75
|
+
opts.separator ''
|
76
|
+
opts.separator 'Message type options:'
|
77
|
+
|
78
|
+
opts.on('-a', '--attachment', 'Treat the message as an attachment') do
|
79
|
+
options[:attachment] = true
|
80
|
+
end
|
81
|
+
|
82
|
+
opts.on('-b', '--block', 'Treat the message as a block') do
|
83
|
+
options[:block] = true
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
begin
|
88
|
+
optparse.parse!
|
89
|
+
options[:message] = ARGF.read unless STDIN.tty? # override message parameter if data is piped in
|
90
|
+
missing = mandatory.select { |param| options[param].nil? }
|
91
|
+
raise OptionParser::MissingArgument.new(missing.join(', ')) unless missing.empty?
|
92
|
+
rescue OptionParser::InvalidOption, OptionParser::MissingArgument => e
|
93
|
+
puts e.to_s
|
94
|
+
puts optparse
|
95
|
+
exit
|
96
|
+
end
|
97
|
+
|
98
|
+
if options[:attachment] && options[:block]
|
99
|
+
puts 'Error: You cannot use -a and -b at the same time! - aborting'
|
100
|
+
exit
|
101
|
+
end
|
102
|
+
|
103
|
+
exit 0 if send_message_to_slack(options)
|
104
|
+
|
105
|
+
exit 1
|
106
|
+
end
|
107
|
+
|
108
|
+
# -------------------------------------------------------------------------------- #
|
109
|
+
# Main() #
|
110
|
+
# -------------------------------------------------------------------------------- #
|
111
|
+
# The main function where all of the heavy lifting and script config is done. #
|
112
|
+
# -------------------------------------------------------------------------------- #
|
113
|
+
|
114
|
+
def main
|
115
|
+
process_arguments
|
116
|
+
end
|
117
|
+
|
118
|
+
main
|
119
|
+
|
120
|
+
# -------------------------------------------------------------------------------- #
|
121
|
+
# End of Script #
|
122
|
+
# -------------------------------------------------------------------------------- #
|
123
|
+
# This is the end - nothing more to see here. #
|
124
|
+
# -------------------------------------------------------------------------------- #
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slackit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Gurney aka Wolf
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.16.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: json
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.3.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.3.0
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +94,20 @@ dependencies:
|
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: 0.16.2
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: json
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.3.0
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.3.0
|
83
111
|
description: A simple gem for posting raw messages to a slack incoming webhook.
|
84
112
|
email:
|
85
113
|
- wolf@tgwolf.com
|
@@ -109,11 +137,12 @@ files:
|
|
109
137
|
- slackit.gemspec
|
110
138
|
- spec/slackit_spec.rb
|
111
139
|
- spec/spec_helper.rb
|
140
|
+
- testing/slackit
|
112
141
|
homepage: https://github.com/AntiPhotonltd/slackit
|
113
142
|
licenses:
|
114
143
|
- MIT
|
115
144
|
metadata: {}
|
116
|
-
post_install_message:
|
145
|
+
post_install_message:
|
117
146
|
rdoc_options: []
|
118
147
|
require_paths:
|
119
148
|
- lib
|
@@ -128,8 +157,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
157
|
- !ruby/object:Gem::Version
|
129
158
|
version: '0'
|
130
159
|
requirements: []
|
131
|
-
rubygems_version: 3.
|
132
|
-
signing_key:
|
160
|
+
rubygems_version: 3.1.4
|
161
|
+
signing_key:
|
133
162
|
specification_version: 4
|
134
163
|
summary: A simple gem for posting to a slack incoming webhook.
|
135
164
|
test_files: []
|