waylon-slack 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 909809c1f1e6121fb84667fb922a54cf22cbd801191ab646c9c9db5305c87e60
4
- data.tar.gz: d776dd6a040f8278862e8df2c176254acac8a2695e4965e8c06c3b56daef57e0
3
+ metadata.gz: 8a334379ea99d3b5f7946e90502a44c6edd6fcd9b2d5a7d28b3795ad0d943fee
4
+ data.tar.gz: 80c31fc47535da4645c02c55a80023071a03483dfd9979ed42742f0acd230355
5
5
  SHA512:
6
- metadata.gz: 56e572e2fbc880b4ce64f5a61ba888712282e54334705b07d8ecb671d8064fd5b2c217b7f789979bbc1e64ec09ca204b01e301b0b5c1d22766f74a6997c19661
7
- data.tar.gz: 5bfeadf428a8bc725c058955a5c0ca4987af49940d7c6523a02b8644e197ff495289f81aa8ea9fd9ef03d2126fa3431ec7ff9db46c5c2db2607f527bf4d33499
6
+ metadata.gz: 203c08e506188ff3128c7db54e8b85163ec179ebb671f733b1e45af6465182f3c635dff16e89d803f2296390b413303a22f70d732b2bfb5aa8cc7c461b38c631
7
+ data.tar.gz: f9891f817649bdf9ff4539acede3ec6b972ac191854b6090a081c2a977be136d7b2aa5e38b4c293834f0a19e3efbd1be2ede5bc58c37b1bde2ecd76a9f2cfa5f
data/.roxanne.yml CHANGED
@@ -2,3 +2,7 @@ version: 1.0
2
2
  stages:
3
3
  test:
4
4
  image: ruby:3.1
5
+ release:
6
+ image: ruby:3.1
7
+ only:
8
+ - main
data/.rubocop.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  AllCops:
2
- TargetRubyVersion: 3.0
2
+ TargetRubyVersion: 3.1
3
3
  NewCops: enable
4
+ SuggestExtensions: false
4
5
 
5
6
  Style/MixinUsage:
6
7
  Exclude:
@@ -36,3 +37,6 @@ Metrics/BlockLength:
36
37
  Exclude:
37
38
  - "**/*_spec.rb"
38
39
  - "*.gemspec"
40
+
41
+ Gemspec/DevelopmentDependencies:
42
+ Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.0
1
+ 3.1.2
data/Gemfile.lock CHANGED
@@ -1,20 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- waylon-slack (0.1.0)
4
+ waylon-slack (0.1.2)
5
5
  slack-ruby-client (~> 1.0)
6
6
  waylon-core (~> 0.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.8.0)
12
- public_suffix (>= 2.0.2, < 5.0)
11
+ addressable (2.8.6)
12
+ public_suffix (>= 2.0.2, < 6.0)
13
13
  ast (2.4.2)
14
- concurrent-ruby (1.1.9)
14
+ concurrent-ruby (1.2.2)
15
+ connection_pool (2.4.1)
15
16
  diff-lcs (1.5.0)
16
17
  docile (1.4.0)
17
- faraday (1.9.3)
18
+ faraday (1.10.3)
18
19
  faraday-em_http (~> 1.0)
19
20
  faraday-em_synchrony (~> 1.0)
20
21
  faraday-excon (~> 1.1)
@@ -30,8 +31,8 @@ GEM
30
31
  faraday-em_synchrony (1.0.0)
31
32
  faraday-excon (1.1.0)
32
33
  faraday-httpclient (1.0.1)
33
- faraday-multipart (1.0.3)
34
- multipart-post (>= 1.2, < 3)
34
+ faraday-multipart (1.0.4)
35
+ multipart-post (~> 2)
35
36
  faraday-net_http (1.0.1)
36
37
  faraday-net_http_persistent (1.2.0)
37
38
  faraday-patron (1.0.0)
@@ -39,80 +40,96 @@ GEM
39
40
  faraday-retry (1.0.3)
40
41
  faraday_middleware (1.2.0)
41
42
  faraday (~> 1.0)
42
- gli (2.21.0)
43
+ ffi (1.16.3)
44
+ gli (2.21.1)
43
45
  hashie (5.0.0)
44
- i18n (1.9.1)
46
+ i18n (1.14.1)
45
47
  concurrent-ruby (~> 1.0)
46
- json (2.6.1)
47
- moneta (1.4.2)
48
- mono_logger (1.1.1)
48
+ json (2.7.1)
49
+ language_server-protocol (3.17.0.3)
50
+ moneta (1.6.0)
51
+ mono_logger (1.1.2)
49
52
  multi_json (1.15.0)
50
- multipart-post (2.1.1)
51
- mustermann (1.1.1)
53
+ multipart-post (2.3.0)
54
+ mustermann (3.0.0)
52
55
  ruby2_keywords (~> 0.0.1)
53
- nio4r (2.5.8)
54
- parallel (1.21.0)
55
- parser (3.1.0.0)
56
+ nio4r (2.7.0)
57
+ parallel (1.24.0)
58
+ parser (3.2.2.4)
56
59
  ast (~> 2.4.1)
57
- public_suffix (4.0.6)
58
- puma (5.6.1)
60
+ racc
61
+ public_suffix (5.0.4)
62
+ puma (5.6.7)
59
63
  nio4r (~> 2.0)
60
- rack (2.2.3)
61
- rack-protection (2.1.0)
62
- rack
64
+ racc (1.7.3)
65
+ rack (2.2.8)
66
+ rack-protection (3.1.0)
67
+ rack (~> 2.2, >= 2.2.4)
63
68
  rainbow (3.1.1)
64
- rake (13.0.6)
65
- redis (4.5.1)
66
- redis-namespace (1.8.1)
67
- redis (>= 3.0.4)
68
- regexp_parser (2.2.0)
69
- resque (2.2.0)
69
+ rake (13.1.0)
70
+ rbnacl (7.1.1)
71
+ ffi
72
+ redis (5.0.8)
73
+ redis-client (>= 0.17.0)
74
+ redis-client (0.19.0)
75
+ connection_pool
76
+ redis-namespace (1.11.0)
77
+ redis (>= 4)
78
+ regexp_parser (2.8.3)
79
+ resque (2.6.0)
70
80
  mono_logger (~> 1.0)
71
81
  multi_json (~> 1.0)
72
82
  redis-namespace (~> 1.6)
73
83
  sinatra (>= 0.9.2)
74
- vegas (~> 0.1.2)
75
- rexml (3.2.5)
76
- rspec (3.10.0)
77
- rspec-core (~> 3.10.0)
78
- rspec-expectations (~> 3.10.0)
79
- rspec-mocks (~> 3.10.0)
80
- rspec-core (3.10.2)
81
- rspec-support (~> 3.10.0)
82
- rspec-expectations (3.10.2)
84
+ rexml (3.2.6)
85
+ rspec (3.12.0)
86
+ rspec-core (~> 3.12.0)
87
+ rspec-expectations (~> 3.12.0)
88
+ rspec-mocks (~> 3.12.0)
89
+ rspec-core (3.12.2)
90
+ rspec-support (~> 3.12.0)
91
+ rspec-expectations (3.12.3)
83
92
  diff-lcs (>= 1.2.0, < 2.0)
84
- rspec-support (~> 3.10.0)
85
- rspec-mocks (3.10.3)
93
+ rspec-support (~> 3.12.0)
94
+ rspec-mocks (3.12.6)
86
95
  diff-lcs (>= 1.2.0, < 2.0)
87
- rspec-support (~> 3.10.0)
88
- rspec-support (3.10.3)
89
- rubocop (1.25.0)
96
+ rspec-support (~> 3.12.0)
97
+ rspec-support (3.12.1)
98
+ rubocop (1.59.0)
99
+ json (~> 2.3)
100
+ language_server-protocol (>= 3.17.0)
90
101
  parallel (~> 1.10)
91
- parser (>= 3.1.0.0)
102
+ parser (>= 3.2.2.4)
92
103
  rainbow (>= 2.2.2, < 4.0)
93
104
  regexp_parser (>= 1.8, < 3.0)
94
- rexml
95
- rubocop-ast (>= 1.15.1, < 2.0)
105
+ rexml (>= 3.2.5, < 4.0)
106
+ rubocop-ast (>= 1.30.0, < 2.0)
96
107
  ruby-progressbar (~> 1.7)
97
- unicode-display_width (>= 1.4.0, < 3.0)
98
- rubocop-ast (1.15.1)
99
- parser (>= 3.0.1.1)
108
+ unicode-display_width (>= 2.4.0, < 3.0)
109
+ rubocop-ast (1.30.0)
110
+ parser (>= 3.2.1.0)
111
+ rubocop-capybara (2.19.0)
112
+ rubocop (~> 1.41)
113
+ rubocop-factory_bot (2.24.0)
114
+ rubocop (~> 1.33)
100
115
  rubocop-rake (0.6.0)
101
116
  rubocop (~> 1.0)
102
- rubocop-rspec (2.8.0)
103
- rubocop (~> 1.19)
104
- ruby-progressbar (1.11.0)
117
+ rubocop-rspec (2.25.0)
118
+ rubocop (~> 1.40)
119
+ rubocop-capybara (~> 2.17)
120
+ rubocop-factory_bot (~> 2.22)
121
+ ruby-progressbar (1.13.0)
105
122
  ruby2_keywords (0.0.5)
106
- simplecov (0.21.2)
123
+ simplecov (0.22.0)
107
124
  docile (~> 1.1)
108
125
  simplecov-html (~> 0.11)
109
126
  simplecov_json_formatter (~> 0.1)
110
127
  simplecov-html (0.12.3)
111
- simplecov_json_formatter (0.1.3)
112
- sinatra (2.1.0)
113
- mustermann (~> 1.0)
114
- rack (~> 2.2)
115
- rack-protection (= 2.1.0)
128
+ simplecov_json_formatter (0.1.4)
129
+ sinatra (3.1.0)
130
+ mustermann (~> 3.0)
131
+ rack (~> 2.2, >= 2.2.4)
132
+ rack-protection (= 3.1.0)
116
133
  tilt (~> 2.0)
117
134
  slack-ruby-client (1.0.0)
118
135
  faraday (>= 1.0)
@@ -120,27 +137,25 @@ GEM
120
137
  gli
121
138
  hashie
122
139
  websocket-driver
123
- tilt (2.0.10)
124
- unicode-display_width (2.1.0)
125
- vegas (0.1.11)
126
- rack (>= 1.0.0)
127
- waylon-core (0.1.3)
140
+ tilt (2.3.0)
141
+ unicode-display_width (2.5.0)
142
+ waylon-core (0.2.6)
128
143
  addressable (~> 2.8)
129
144
  faraday (~> 1.8)
130
145
  i18n (~> 1.8)
131
146
  json (~> 2.6)
132
147
  moneta (~> 1.4)
133
148
  puma (~> 5.5)
149
+ rbnacl (~> 7.1)
134
150
  resque (~> 2.2)
135
- webrick (1.7.0)
136
- websocket-driver (0.7.5)
151
+ websocket-driver (0.7.6)
137
152
  websocket-extensions (>= 0.1.0)
138
153
  websocket-extensions (0.1.5)
139
- yard (0.9.27)
140
- webrick (~> 1.7.0)
154
+ yard (0.9.34)
141
155
 
142
156
  PLATFORMS
143
157
  arm64-darwin-21
158
+ x86_64-linux
144
159
 
145
160
  DEPENDENCIES
146
161
  bundler (~> 2.3)
@@ -39,7 +39,7 @@ module Waylon
39
39
  # @return [void]
40
40
  def self.private_reply(request, text)
41
41
  message = message_from_request(request)
42
- message.author.dm(text: text)
42
+ message.author.dm(text:)
43
43
  end
44
44
 
45
45
  # Provides a simple means to privately reply to the author of a Message using Blocks
@@ -48,7 +48,7 @@ module Waylon
48
48
  # @return [void]
49
49
  def self.private_reply_with_blocks(request, blocks)
50
50
  message = message_from_request(request)
51
- message.author.dm(blocks: blocks)
51
+ message.author.dm(blocks:)
52
52
  end
53
53
 
54
54
  # Allows reacting to a request via the Sense's own mechanism
@@ -66,7 +66,7 @@ module Waylon
66
66
  # @return [void]
67
67
  def self.reply(request, text)
68
68
  message = message_from_request(request)
69
- message.channel.post(text: text)
69
+ message.channel.post(text:)
70
70
  end
71
71
 
72
72
  # Reply to a Message in a Channel with some blocks
@@ -75,7 +75,7 @@ module Waylon
75
75
  # @return [void]
76
76
  def self.reply_with_blocks(request, blocks)
77
77
  message = message_from_request(request)
78
- message.channel.post(blocks: blocks)
78
+ message.channel.post(blocks:)
79
79
  end
80
80
 
81
81
  # Executed by Resque, this is how this Sense determines what to do with an incoming request
@@ -106,7 +106,7 @@ module Waylon
106
106
  # @return [void]
107
107
  def self.threaded_reply(request, text)
108
108
  message = message_from_request(request)
109
- message.channel.post(text: text, thread: message.thread_parent)
109
+ message.channel.post(text:, thread: message.thread_parent)
110
110
  end
111
111
 
112
112
  # Required by the Waylon framework, this provides the Sense's own Message class
@@ -10,7 +10,7 @@ module Waylon
10
10
  # @raise [Slack::Web::Api::Errors::ChannelNotFound] When the channel doesn't exist
11
11
  # @return [Channel]
12
12
  def self.from_name(name)
13
- name = name.start_with?("#") ? name : "##{name}"
13
+ name = "##{name}" unless name.start_with?("#")
14
14
  raw = sense.client.conversations_info(channel: name)
15
15
  new(raw["channel"]["id"], data: raw["channel"])
16
16
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Waylon
4
4
  module Slack
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end
data/lib/waylon/slack.rb CHANGED
@@ -3,12 +3,12 @@
3
3
  require "waylon/core"
4
4
  require "slack-ruby-client"
5
5
 
6
- ::Slack.configure do |conf|
7
- conf.token = ENV["SLACK_OAUTH_TOKEN"]
6
+ Slack.configure do |conf|
7
+ conf.token = ENV.fetch("SLACK_OAUTH_TOKEN", nil)
8
8
  conf.logger = Waylon::Logger.logger
9
9
  end
10
10
 
11
- ::Slack::Web::Client.configure do |conf|
11
+ Slack::Web::Client.configure do |conf|
12
12
  conf.user_agent = "Waylon/#{Waylon::Core::VERSION}"
13
13
  conf.logger = Waylon::Logger.logger
14
14
  end
@@ -0,0 +1,9 @@
1
+ #!/bin/sh
2
+
3
+ apt-get update && apt-get install -y libsodium-dev
4
+
5
+ gem install bundler -v '~> 2.3'
6
+ bundle install
7
+ rm -rf pkg/*.gem
8
+ bundle exec rake build
9
+ bundle exec gem push pkg/*.gem
data/scripts/test.sh CHANGED
@@ -1,5 +1,7 @@
1
1
  #!/bin/sh
2
2
 
3
- gem install bundler -v '~> 2.2'
3
+ apt-get update && apt-get install -y libsodium-dev
4
+
5
+ gem install bundler -v '~> 2.3'
4
6
  bundle install
5
7
  bundle exec rake
data/waylon-slack.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "Full Slack integration for the Waylon Bot Framework"
13
13
  spec.homepage = "https://github.com/jgnagy/waylon-slack"
14
14
  spec.license = "MIT"
15
- spec.required_ruby_version = "~> 3.0"
15
+ spec.required_ruby_version = "~> 3.1"
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = "https://github.com/jgnagy/waylon-slack"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waylon-slack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Gnagy
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-01 00:00:00.000000000 Z
11
+ date: 2023-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slack-ruby-client
@@ -183,6 +183,7 @@ files:
183
183
  - lib/waylon/slack/user.rb
184
184
  - lib/waylon/slack/version.rb
185
185
  - lib/waylon/webhooks/slack.rb
186
+ - scripts/release.sh
186
187
  - scripts/test.sh
187
188
  - waylon-slack.gemspec
188
189
  homepage: https://github.com/jgnagy/waylon-slack
@@ -192,7 +193,7 @@ metadata:
192
193
  homepage_uri: https://github.com/jgnagy/waylon-slack
193
194
  source_code_uri: https://github.com/jgnagy/waylon-slack
194
195
  changelog_uri: https://github.com/jgnagy/waylon-slack/blob/main/CHANGELOG.md
195
- post_install_message:
196
+ post_install_message:
196
197
  rdoc_options: []
197
198
  require_paths:
198
199
  - lib
@@ -200,15 +201,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
200
201
  requirements:
201
202
  - - "~>"
202
203
  - !ruby/object:Gem::Version
203
- version: '3.0'
204
+ version: '3.1'
204
205
  required_rubygems_version: !ruby/object:Gem::Requirement
205
206
  requirements:
206
207
  - - ">="
207
208
  - !ruby/object:Gem::Version
208
209
  version: '0'
209
210
  requirements: []
210
- rubygems_version: 3.3.3
211
- signing_key:
211
+ rubygems_version: 3.3.7
212
+ signing_key:
212
213
  specification_version: 4
213
214
  summary: Slack Sense for the Waylon Bot Framework
214
215
  test_files: []