slack-ruby-bot 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/.rubocop_todo.yml +3 -9
- data/.travis.yml +6 -10
- data/CHANGELOG.md +9 -0
- data/DEPLOYMENT.md +3 -5
- data/Dangerfile +2 -0
- data/Gemfile +1 -4
- data/MIGRATION.md +13 -0
- data/README.md +50 -61
- data/UPGRADING.md +14 -0
- data/lib/slack-ruby-bot/bot.rb +1 -1
- data/lib/slack-ruby-bot/client.rb +22 -23
- data/lib/slack-ruby-bot/commands/about.rb +1 -1
- data/lib/slack-ruby-bot/commands/base.rb +0 -19
- data/lib/slack-ruby-bot/commands/help.rb +1 -1
- data/lib/slack-ruby-bot/commands/hi.rb +1 -1
- data/lib/slack-ruby-bot/commands/unknown.rb +1 -1
- data/lib/slack-ruby-bot/config.rb +1 -8
- data/lib/slack-ruby-bot/hooks/hook_support.rb +0 -6
- data/lib/slack-ruby-bot/hooks/message.rb +6 -17
- data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_error.rb +0 -2
- data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_message.rb +0 -2
- data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_messages.rb +0 -2
- data/lib/slack-ruby-bot/server.rb +3 -4
- data/lib/slack-ruby-bot/version.rb +1 -1
- data/spec/slack-ruby-bot/client_spec.rb +101 -28
- data/spec/slack-ruby-bot/config_spec.rb +0 -57
- data/spec/slack-ruby-bot/hooks/hook_support_spec.rb +0 -5
- data/spec/slack-ruby-bot/hooks/message_spec.rb +6 -53
- data/spec/slack-ruby-bot/server_spec.rb +4 -16
- data/spec/spec_helper.rb +0 -6
- metadata +9 -23
- data/lib/initializers/giphy.rb +0 -10
- data/lib/initializers/giphy_client.rb +0 -41
- data/spec/slack-ruby-bot/commands/send_gif_spec.rb +0 -27
- data/spec/slack-ruby-bot/commands/send_message_with_gif_spec.rb +0 -40
- data/spec/slack-ruby-bot/initializers/giphy_client_spec.rb +0 -30
- data/spec/slack-ruby-bot/initializers/giphy_spec.rb +0 -20
- data/spec/support/fixtures/slack/giphy_burrito.yml +0 -69
- data/spec/support/fixtures/slack/giphy_client_burrito.yml +0 -71
- data/spec/support/fixtures/slack/giphy_client_burrito_rated_pg.yml +0 -80
@@ -1,80 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://api.giphy.com/v1/gifs/random?api_key=giphy-api-key&rating=PG&tag=burrito
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Swagger-Codegen/1.0.0/ruby
|
12
|
-
Content-Type:
|
13
|
-
- application/json
|
14
|
-
Accept:
|
15
|
-
- application/json
|
16
|
-
Expect:
|
17
|
-
- ''
|
18
|
-
response:
|
19
|
-
status:
|
20
|
-
code: 200
|
21
|
-
message: OK
|
22
|
-
headers:
|
23
|
-
Content-Type:
|
24
|
-
- application/json
|
25
|
-
X-Robots-Tag:
|
26
|
-
- noindex
|
27
|
-
Access-Control-Allow-Credentials:
|
28
|
-
- 'true'
|
29
|
-
Access-Control-Allow-Methods:
|
30
|
-
- GET, POST, PUT, DELETE, OPTIONS
|
31
|
-
Access-Control-Allow-Headers:
|
32
|
-
- Content-Type, Accept, x-requested-with, cache-control, X-GIPHY-SDK-NAME, X-GIPHY-SDK-VERSION,
|
33
|
-
X-GIPHY-SDK-PLATFORM
|
34
|
-
Access-Control-Allow-Origin:
|
35
|
-
- "*"
|
36
|
-
Accept-Ranges:
|
37
|
-
- bytes
|
38
|
-
- bytes
|
39
|
-
- bytes
|
40
|
-
- bytes
|
41
|
-
Age:
|
42
|
-
- '0'
|
43
|
-
- '0'
|
44
|
-
- '0'
|
45
|
-
- '0'
|
46
|
-
X-Rule-Debug:
|
47
|
-
- '1'
|
48
|
-
X-Cachiness-Rule-Name:
|
49
|
-
- giphy_api_vcl_fetch_stale_if_error_val_set
|
50
|
-
X-Cachiness-Edge-Timeout:
|
51
|
-
- '120.000'
|
52
|
-
X-Cachiness-Cdn-Content-If-Error-Ttl:
|
53
|
-
- '86400.000'
|
54
|
-
X-Cachiness-Cdn-Content-While-Revalidate-Ttl:
|
55
|
-
- '1200.000'
|
56
|
-
X-Cachiness-Cdn-Content-Varnish-Grace-Ttl:
|
57
|
-
- '86400.000'
|
58
|
-
Transfer-Encoding:
|
59
|
-
- chunked
|
60
|
-
Date:
|
61
|
-
- Sun, 05 Apr 2020 09:48:06 GMT
|
62
|
-
Connection:
|
63
|
-
- keep-alive
|
64
|
-
X-Served-By:
|
65
|
-
- cache-bwi5120-BWI, cache-sin18037-SIN
|
66
|
-
X-Cache-Hits:
|
67
|
-
- 0, 0
|
68
|
-
X-Timer:
|
69
|
-
- S1586080086.016895,VS0,VE405
|
70
|
-
Vary:
|
71
|
-
- Accept-Encoding
|
72
|
-
body:
|
73
|
-
encoding: UTF-8
|
74
|
-
string: '{"data":{"type":"gif","id":"3o6gb3OJb2tWB76uwE","url":"https:\/\/giphy.com\/gifs\/new-girl-fox-new-girl-3o6gb3OJb2tWB76uwE","slug":"new-girl-fox-new-girl-3o6gb3OJb2tWB76uwE","bitly_gif_url":"https:\/\/gph.is\/217Ajw3","bitly_url":"https:\/\/gph.is\/217Ajw3","embed_url":"https:\/\/giphy.com\/embed\/3o6gb3OJb2tWB76uwE","username":"new-girl","source":"","title":"megan
|
75
|
-
fox GIF by New Girl","rating":"pg","content_url":"","source_tld":"","source_post_url":"","is_sticker":0,"import_datetime":"2016-02-17
|
76
|
-
00:06:19","trending_datetime":"0000-00-00 00:00:00","images":{"downsized_large":{"height":"281","size":"2065896","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy.gif","width":"500"},"fixed_height_small_still":{"height":"100","size":"10860","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/100_s.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=100_s.gif","width":"178"},"original":{"frames":"29","hash":"ce4159fb04d3cdf136684bd6ed168a2b","height":"281","mp4":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy.mp4?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy.mp4","mp4_size":"352777","size":"2065896","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy.gif","webp":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy.webp?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy.webp","webp_size":"575422","width":"500"},"fixed_height_downsampled":{"height":"200","size":"176994","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200_d.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=200_d.gif","webp":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200_d.webp?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=200_d.webp","webp_size":"88866","width":"356"},"downsized_still":{"height":"281","size":"36155","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy-downsized_s.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy-downsized_s.gif","width":"500"},"fixed_height_still":{"height":"200","size":"28570","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200_s.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=200_s.gif","width":"356"},"downsized_medium":{"height":"281","size":"2065896","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy.gif","width":"500"},"downsized":{"height":"281","size":"988581","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy-downsized.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy-downsized.gif","width":"500"},"preview_webp":{"height":"106","size":"34956","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy-preview.webp?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy-preview.webp","width":"188"},"original_mp4":{"height":"268","mp4":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy.mp4?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy.mp4","mp4_size":"352777","width":"480"},"fixed_height_small":{"height":"100","mp4":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/100.mp4?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=100.mp4","mp4_size":"27984","size":"299158","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/100.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=100.gif","webp":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/100.webp?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=100.webp","webp_size":"94524","width":"178"},"fixed_height":{"height":"200","mp4":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200.mp4?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=200.mp4","mp4_size":"107639","size":"793935","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=200.gif","webp":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200.webp?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=200.webp","webp_size":"257462","width":"356"},"downsized_small":{"height":"180","mp4":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy-downsized-small.mp4?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy-downsized-small.mp4","mp4_size":"33430","width":"321"},"preview":{"height":"198","mp4":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy-preview.mp4?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy-preview.mp4","mp4_size":"30813","width":"353"},"fixed_width_downsampled":{"height":"112","size":"76626","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200w_d.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=200w_d.gif","webp":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200w_d.webp?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=200w_d.webp","webp_size":"34772","width":"200"},"fixed_width_small_still":{"height":"56","size":"3889","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/100w_s.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=100w_s.gif","width":"100"},"fixed_width_small":{"height":"56","mp4":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/100w.mp4?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=100w.mp4","mp4_size":"10620","size":"88828","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/100w.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=100w.gif","webp":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/100w.webp?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=100w.webp","webp_size":"43728","width":"100"},"original_still":{"height":"281","size":"77064","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy_s.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy_s.gif","width":"500"},"fixed_width_still":{"height":"112","size":"13623","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200w_s.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=200w_s.gif","width":"200"},"looping":{"mp4":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy-loop.mp4?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy-loop.mp4","mp4_size":"1588862"},"fixed_width":{"height":"112","mp4":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200w.mp4?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=200w.mp4","mp4_size":"30417","size":"350865","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200w.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=200w.gif","webp":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200w.webp?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=200w.webp","webp_size":"109422","width":"200"},"preview_gif":{"height":"56","size":"48146","url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy-preview.gif?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=giphy-preview.gif","width":"100"},"480w_still":{"url":"https:\/\/media4.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/480w_s.jpg?cid=6ef6bcb4368a35413d72b78d296866a9dd0c839bdc0f4643&rid=480w_s.jpg","width":"480","height":"270"}},"user":{"avatar_url":"https:\/\/media1.giphy.com\/avatars\/new-girl\/I1nNp7T5S75c.png","banner_image":"https:\/\/media1.giphy.com\/headers\/new-girl\/T8rbcrTIdvy4.png","banner_url":"https:\/\/media1.giphy.com\/headers\/new-girl\/T8rbcrTIdvy4.png","profile_url":"https:\/\/giphy.com\/new-girl\/","username":"new-girl","display_name":"New
|
77
|
-
Girl","is_verified":true},"image_original_url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy.gif","image_url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy.gif","image_mp4_url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/giphy.mp4","image_frames":"29","image_width":"500","image_height":"281","fixed_height_downsampled_url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200_d.gif","fixed_height_downsampled_width":"356","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"112","fixed_height_small_url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/100.gif","fixed_height_small_still_url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/100_s.gif","fixed_height_small_width":"178","fixed_height_small_height":"100","fixed_width_small_url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/100w.gif","fixed_width_small_still_url":"https:\/\/media0.giphy.com\/media\/3o6gb3OJb2tWB76uwE\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"56","caption":""},"meta":{"status":200,"msg":"OK","response_id":"368a35413d72b78d296866a9dd0c839bdc0f4643"}}'
|
78
|
-
http_version: null
|
79
|
-
recorded_at: Sun, 05 Apr 2020 09:48:06 GMT
|
80
|
-
recorded_with: VCR 5.1.0
|