slack-ruby-bot 0.15.0 → 0.16.0

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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -0
  3. data/.rubocop_todo.yml +3 -9
  4. data/.travis.yml +6 -10
  5. data/CHANGELOG.md +9 -0
  6. data/DEPLOYMENT.md +3 -5
  7. data/Dangerfile +2 -0
  8. data/Gemfile +1 -4
  9. data/MIGRATION.md +13 -0
  10. data/README.md +50 -61
  11. data/UPGRADING.md +14 -0
  12. data/lib/slack-ruby-bot/bot.rb +1 -1
  13. data/lib/slack-ruby-bot/client.rb +22 -23
  14. data/lib/slack-ruby-bot/commands/about.rb +1 -1
  15. data/lib/slack-ruby-bot/commands/base.rb +0 -19
  16. data/lib/slack-ruby-bot/commands/help.rb +1 -1
  17. data/lib/slack-ruby-bot/commands/hi.rb +1 -1
  18. data/lib/slack-ruby-bot/commands/unknown.rb +1 -1
  19. data/lib/slack-ruby-bot/config.rb +1 -8
  20. data/lib/slack-ruby-bot/hooks/hook_support.rb +0 -6
  21. data/lib/slack-ruby-bot/hooks/message.rb +6 -17
  22. data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_error.rb +0 -2
  23. data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_message.rb +0 -2
  24. data/lib/slack-ruby-bot/rspec/support/slack-ruby-bot/respond_with_slack_messages.rb +0 -2
  25. data/lib/slack-ruby-bot/server.rb +3 -4
  26. data/lib/slack-ruby-bot/version.rb +1 -1
  27. data/spec/slack-ruby-bot/client_spec.rb +101 -28
  28. data/spec/slack-ruby-bot/config_spec.rb +0 -57
  29. data/spec/slack-ruby-bot/hooks/hook_support_spec.rb +0 -5
  30. data/spec/slack-ruby-bot/hooks/message_spec.rb +6 -53
  31. data/spec/slack-ruby-bot/server_spec.rb +4 -16
  32. data/spec/spec_helper.rb +0 -6
  33. metadata +9 -23
  34. data/lib/initializers/giphy.rb +0 -10
  35. data/lib/initializers/giphy_client.rb +0 -41
  36. data/spec/slack-ruby-bot/commands/send_gif_spec.rb +0 -27
  37. data/spec/slack-ruby-bot/commands/send_message_with_gif_spec.rb +0 -40
  38. data/spec/slack-ruby-bot/initializers/giphy_client_spec.rb +0 -30
  39. data/spec/slack-ruby-bot/initializers/giphy_spec.rb +0 -20
  40. data/spec/support/fixtures/slack/giphy_burrito.yml +0 -69
  41. data/spec/support/fixtures/slack/giphy_client_burrito.yml +0 -71
  42. data/spec/support/fixtures/slack/giphy_client_burrito_rated_pg.yml +0 -80
@@ -15,18 +15,6 @@ describe SlackRubyBot::Server do
15
15
  expect(server.send(:client).token).to eq 'token'
16
16
  end
17
17
 
18
- it 'send_gifs is false without giphy', unless: WithGiphy.env? do
19
- server = SlackRubyBot::Server.new(send_gifs: true)
20
- expect(server.send(:client).send_gifs?).to be false
21
- end
22
-
23
- it 'send_gifs', if: WithGiphy.env? do
24
- server = SlackRubyBot::Server.new(send_gifs: true)
25
- expect(server.send(:client).send_gifs?).to be true
26
- server = SlackRubyBot::Server.new(send_gifs: false)
27
- expect(server.send(:client).send_gifs?).to be false
28
- end
29
-
30
18
  it 'aliases' do
31
19
  server = SlackRubyBot::Server.new(aliases: %w[foo bar])
32
20
  expect(server.send(:client).aliases).to eq %w[foo bar]
@@ -40,16 +28,16 @@ describe SlackRubyBot::Server do
40
28
  end
41
29
  it 'creates a client with a token' do
42
30
  expect(client).to receive(:start!) { raise 'expected' }
43
- expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', send_gifs: nil, aliases: nil).and_return(client)
31
+ expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', aliases: nil).and_return(client)
44
32
  expect { subject.start! }.to raise_error RuntimeError, 'expected'
45
33
  end
46
34
  it 'asynchronously creates a client with a token' do
47
35
  expect(client).to receive(:start_async) { raise 'expected' }
48
- expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', send_gifs: nil, aliases: nil).and_return(client)
36
+ expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', aliases: nil).and_return(client)
49
37
  expect { subject.start_async }.to raise_error RuntimeError, 'expected'
50
38
  end
51
39
  it 'stops client' do
52
- expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', send_gifs: nil, aliases: nil).and_return(client)
40
+ expect(Slack::RealTime::Client).to receive(:new).with(token: 'token', aliases: nil).and_return(client)
53
41
  expect(subject.send(:client)).to_not be nil
54
42
  expect(client).to receive(:started?).and_return(true)
55
43
  subject.stop!
@@ -68,7 +56,7 @@ describe SlackRubyBot::Server do
68
56
  subject.run
69
57
  end.to raise_error Slack::Web::Api::Error, 'unknown'
70
58
  end
71
- [Faraday::Error::ConnectionFailed, Faraday::Error::TimeoutError, Faraday::Error::SSLError].each do |err|
59
+ [Faraday::ConnectionFailed, Faraday::TimeoutError, Faraday::SSLError].each do |err|
72
60
  it err.to_s do
73
61
  expect(client).to receive(:start!) { raise err, 'Faraday' }
74
62
  expect(client).to receive(:start!) { raise 'unknown' }
@@ -3,9 +3,3 @@
3
3
  require 'slack-ruby-bot/rspec'
4
4
  require 'webmock/rspec'
5
5
  require_relative 'support/vcr'
6
-
7
- module WithGiphy
8
- def self.env?
9
- ENV.key?('WITH_GIPHY') || ENV.key?('WITH_GIPHY_CLIENT')
10
- end
11
- end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-ruby-bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-08 00:00:00.000000000 Z
11
+ date: 2020-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -122,12 +122,13 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- description:
125
+ description:
126
126
  email: dblock@dblock.org
127
127
  executables: []
128
128
  extensions: []
129
129
  extra_rdoc_files: []
130
130
  files:
131
+ - ".github/FUNDING.yml"
131
132
  - ".gitignore"
132
133
  - ".rspec"
133
134
  - ".rubocop.yml"
@@ -139,6 +140,7 @@ files:
139
140
  - Dangerfile
140
141
  - Gemfile
141
142
  - LICENSE.md
143
+ - MIGRATION.md
142
144
  - README.md
143
145
  - RELEASING.md
144
146
  - Rakefile
@@ -159,8 +161,6 @@ files:
159
161
  - lib/config/application.rb
160
162
  - lib/config/boot.rb
161
163
  - lib/config/environment.rb
162
- - lib/initializers/giphy.rb
163
- - lib/initializers/giphy_client.rb
164
164
  - lib/slack-ruby-bot.rb
165
165
  - lib/slack-ruby-bot/about.rb
166
166
  - lib/slack-ruby-bot/app.rb
@@ -239,9 +239,7 @@ files:
239
239
  - spec/slack-ruby-bot/commands/operators_spec.rb
240
240
  - spec/slack-ruby-bot/commands/operators_with_block_spec.rb
241
241
  - spec/slack-ruby-bot/commands/scan_spec.rb
242
- - spec/slack-ruby-bot/commands/send_gif_spec.rb
243
242
  - spec/slack-ruby-bot/commands/send_message_spec.rb
244
- - spec/slack-ruby-bot/commands/send_message_with_gif_spec.rb
245
243
  - spec/slack-ruby-bot/commands/support/attrs_spec.rb
246
244
  - spec/slack-ruby-bot/commands/support/help_spec.rb
247
245
  - spec/slack-ruby-bot/commands/support/match_spec.rb
@@ -251,8 +249,6 @@ files:
251
249
  - spec/slack-ruby-bot/hooks/hook_support_spec.rb
252
250
  - spec/slack-ruby-bot/hooks/message_spec.rb
253
251
  - spec/slack-ruby-bot/hooks/set_spec.rb
254
- - spec/slack-ruby-bot/initializers/giphy_client_spec.rb
255
- - spec/slack-ruby-bot/initializers/giphy_spec.rb
256
252
  - spec/slack-ruby-bot/mvc/controller/controller_to_command_spec.rb
257
253
  - spec/slack-ruby-bot/rspec/respond_with_error_spec.rb
258
254
  - spec/slack-ruby-bot/rspec/respond_with_slack_message_spec.rb
@@ -262,16 +258,13 @@ files:
262
258
  - spec/slack-ruby-bot/support/loggable_spec.rb
263
259
  - spec/slack-ruby-bot/version_spec.rb
264
260
  - spec/spec_helper.rb
265
- - spec/support/fixtures/slack/giphy_burrito.yml
266
- - spec/support/fixtures/slack/giphy_client_burrito.yml
267
- - spec/support/fixtures/slack/giphy_client_burrito_rated_pg.yml
268
261
  - spec/support/fixtures/slack/migration_in_progress.yml
269
262
  - spec/support/vcr.rb
270
263
  homepage: https://github.com/slack-ruby/slack-ruby-bot
271
264
  licenses:
272
265
  - MIT
273
266
  metadata: {}
274
- post_install_message:
267
+ post_install_message:
275
268
  rdoc_options: []
276
269
  require_paths:
277
270
  - lib
@@ -286,8 +279,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
286
279
  - !ruby/object:Gem::Version
287
280
  version: 1.3.6
288
281
  requirements: []
289
- rubygems_version: 3.0.3
290
- signing_key:
282
+ rubygems_version: 3.1.2
283
+ signing_key:
291
284
  specification_version: 4
292
285
  summary: The easiest way to write a Slack bot in Ruby.
293
286
  test_files:
@@ -320,9 +313,7 @@ test_files:
320
313
  - spec/slack-ruby-bot/commands/operators_spec.rb
321
314
  - spec/slack-ruby-bot/commands/operators_with_block_spec.rb
322
315
  - spec/slack-ruby-bot/commands/scan_spec.rb
323
- - spec/slack-ruby-bot/commands/send_gif_spec.rb
324
316
  - spec/slack-ruby-bot/commands/send_message_spec.rb
325
- - spec/slack-ruby-bot/commands/send_message_with_gif_spec.rb
326
317
  - spec/slack-ruby-bot/commands/support/attrs_spec.rb
327
318
  - spec/slack-ruby-bot/commands/support/help_spec.rb
328
319
  - spec/slack-ruby-bot/commands/support/match_spec.rb
@@ -332,8 +323,6 @@ test_files:
332
323
  - spec/slack-ruby-bot/hooks/hook_support_spec.rb
333
324
  - spec/slack-ruby-bot/hooks/message_spec.rb
334
325
  - spec/slack-ruby-bot/hooks/set_spec.rb
335
- - spec/slack-ruby-bot/initializers/giphy_client_spec.rb
336
- - spec/slack-ruby-bot/initializers/giphy_spec.rb
337
326
  - spec/slack-ruby-bot/mvc/controller/controller_to_command_spec.rb
338
327
  - spec/slack-ruby-bot/rspec/respond_with_error_spec.rb
339
328
  - spec/slack-ruby-bot/rspec/respond_with_slack_message_spec.rb
@@ -343,8 +332,5 @@ test_files:
343
332
  - spec/slack-ruby-bot/support/loggable_spec.rb
344
333
  - spec/slack-ruby-bot/version_spec.rb
345
334
  - spec/spec_helper.rb
346
- - spec/support/fixtures/slack/giphy_burrito.yml
347
- - spec/support/fixtures/slack/giphy_client_burrito.yml
348
- - spec/support/fixtures/slack/giphy_client_burrito_rated_pg.yml
349
335
  - spec/support/fixtures/slack/migration_in_progress.yml
350
336
  - spec/support/vcr.rb
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- begin
4
- require 'giphy'
5
- rescue LoadError
6
- else
7
- Giphy::Configuration.configure do |config|
8
- config.api_key = ENV['GIPHY_API_KEY']
9
- end
10
- end
@@ -1,41 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- begin
4
- require 'GiphyClient'
5
-
6
- module Giphy
7
- module Config
8
- extend self
9
-
10
- attr_writer :api_key
11
- attr_writer :rating
12
-
13
- def api_key
14
- @api_key ||= ENV['GIPHY_API_KEY']
15
- end
16
-
17
- def rating
18
- @rating ||= 'G'
19
- end
20
- end
21
-
22
- class << self
23
- def configure
24
- block_given? ? yield(Config) : Config
25
- end
26
-
27
- def config
28
- Config
29
- end
30
-
31
- def client
32
- @client ||= GiphyClient::DefaultApi.new
33
- end
34
-
35
- def random(keywords)
36
- client.gifs_random_get(config.api_key, tag: keywords, rating: config.rating).data
37
- end
38
- end
39
- end
40
- rescue LoadError
41
- end
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- describe SlackRubyBot::Commands, if: WithGiphy.env? do
4
- let! :command do
5
- Class.new(SlackRubyBot::Commands::Base) do
6
- command 'send_gif_spec' do |client, data, _match|
7
- client.say(channel: data.channel, gif: 'dummy')
8
- end
9
- end
10
- end
11
-
12
- let(:gif_image_url) { 'http://media2.giphy.com/media/pzOijFsdDrsS4/giphy.gif' }
13
- let(:gif) { OpenStruct.new('image_url' => gif_image_url) }
14
-
15
- it 'sends a gif' do
16
- expect(Giphy).to receive(:random).and_return(gif)
17
- expect(message: "#{SlackRubyBot.config.user} send_gif_spec message").to respond_with_slack_message(gif_image_url)
18
- end
19
- it 'eats up the error' do
20
- expect(Giphy).to receive(:random) { raise 'oh no!' }
21
- expect(message: "#{SlackRubyBot.config.user} send_gif_spec message").to respond_with_slack_message('')
22
- end
23
- it 'eats up nil gif' do
24
- expect(Giphy).to receive(:random).and_return(nil)
25
- expect(message: "#{SlackRubyBot.config.user} send_gif_spec message").to respond_with_slack_message('')
26
- end
27
- end
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- describe SlackRubyBot::Commands, if: WithGiphy.env? do
4
- let! :command do
5
- Class.new(SlackRubyBot::Commands::Base) do
6
- command 'send_message_with_gif_spec' do |client, data, match|
7
- client.say(channel: data.channel, text: match['expression'], gif: 'dummy')
8
- end
9
- end
10
- end
11
-
12
- let(:gif_image_url) { 'http://media2.giphy.com/media/pzOijFsdDrsS4/giphy.gif' }
13
- let(:gif) { OpenStruct.new('image_url' => gif_image_url) }
14
-
15
- it 'sends a message with gif' do
16
- expect(Giphy).to receive(:random).and_return(gif)
17
- expect(message: "#{SlackRubyBot.config.user} send_message_with_gif_spec message").to respond_with_slack_message("message\n#{gif_image_url}")
18
- end
19
-
20
- it 'eats up errors' do
21
- expect(Giphy).to receive(:random) { raise 'oh no!' }
22
- expect(message: "#{SlackRubyBot.config.user} send_message_with_gif_spec message").to respond_with_slack_message('message')
23
- end
24
-
25
- it 'eats up nil gif' do
26
- expect(Giphy).to receive(:random).and_return(nil)
27
- expect(message: "#{SlackRubyBot.config.user} send_message_with_gif_spec message").to respond_with_slack_message('message')
28
- end
29
-
30
- context 'when client.send_gifs is false' do
31
- let :client do
32
- SlackRubyBot::Client.new.tap { |c| c.send_gifs = false }
33
- end
34
-
35
- it 'does not send a gif' do
36
- expect(Giphy).to_not receive(:random)
37
- expect(message: "#{SlackRubyBot.config.user} send_message_with_gif_spec message").to respond_with_slack_message('message')
38
- end
39
- end
40
- end
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- if ENV.key?('WITH_GIPHY_CLIENT')
4
- describe Giphy do
5
- before do
6
- ENV['GIPHY_API_KEY'] = 'giphy-api-key'
7
- end
8
- after do
9
- ENV.delete('GIPHY_API_KEY')
10
- end
11
- context 'rated g' do
12
- let(:burrito_gif) { 'https://media2.giphy.com/media/ImpBgQl7zzrO0/giphy.gif' }
13
- it 'random', vcr: { cassette_name: 'giphy_client_burrito' } do
14
- expect(Giphy.random('burrito').image_url).to eq burrito_gif
15
- end
16
- end
17
- context 'rated pg' do
18
- before do
19
- Giphy.config.rating = 'PG'
20
- end
21
- after do
22
- Giphy.config.rating = 'G'
23
- end
24
- let(:burrito_gif) { 'https://media0.giphy.com/media/3o6gb3OJb2tWB76uwE/giphy.gif' }
25
- it 'random', vcr: { cassette_name: 'giphy_client_burrito_rated_pg' } do
26
- expect(Giphy.random('burrito').image_url).to eq burrito_gif
27
- end
28
- end
29
- end
30
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- if ENV.key?('WITH_GIPHY')
4
- describe Giphy do
5
- let(:burrito_gif) { 'https://media3.giphy.com/media/xTiTndNDuNFxUW5Xoc/giphy.gif' }
6
- before do
7
- Giphy::Configuration.configure do |config|
8
- config.api_key = 'giphy-api-key'
9
- end
10
- end
11
- after do
12
- Giphy::Configuration.configure do |config|
13
- config.api_key = ENV['GIPHY_API_KEY']
14
- end
15
- end
16
- it 'random', vcr: { cassette_name: 'giphy_burrito' } do
17
- expect(Giphy.random('burrito').image_url.to_s).to eq burrito_gif
18
- end
19
- end
20
- end
@@ -1,69 +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&tag=burrito
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.13.1
12
- Accept-Encoding:
13
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - "*/*"
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Content-Type:
22
- - application/json
23
- Server:
24
- - nginx
25
- X-Powered-By:
26
- - PHP/5.6.35-1+ubuntu14.04.1+deb.sury.org+1
27
- X-Robots-Tag:
28
- - noindex
29
- Access-Control-Allow-Credentials:
30
- - 'true'
31
- Access-Control-Allow-Methods:
32
- - GET, POST, PUT, DELETE, OPTIONS
33
- Access-Control-Allow-Headers:
34
- - Content-Type, Accept, x-requested-with, cache-control
35
- Access-Control-Allow-Origin:
36
- - "*"
37
- X-Kong-Upstream-Latency:
38
- - '178'
39
- X-Kong-Proxy-Latency:
40
- - '0'
41
- Accept-Ranges:
42
- - bytes
43
- Date:
44
- - Fri, 04 May 2018 12:16:32 GMT
45
- X-Served-By:
46
- - cache-den19624-DEN
47
- X-Cache:
48
- - MISS
49
- - MISS from 3
50
- X-Cache-Hits:
51
- - '0'
52
- X-Timer:
53
- - S1525436192.385028,VS0,VE231
54
- Vary:
55
- - Accept-Encoding
56
- Transfer-Encoding:
57
- - chunked
58
- Via:
59
- - kong/0.11.0.3-enterprise-edition, 1.1 varnish, 1.1 3 (squid)
60
- Connection:
61
- - keep-alive
62
- body:
63
- encoding: ASCII-8BIT
64
- string: '{"data":{"type":"gif","id":"xTiTndNDuNFxUW5Xoc","slug":"burrito-taco-bell-spicy-xTiTndNDuNFxUW5Xoc","url":"https:\/\/giphy.com\/gifs\/burrito-taco-bell-spicy-xTiTndNDuNFxUW5Xoc","bitly_gif_url":"https:\/\/gph.is\/1L7tIcH","bitly_url":"https:\/\/gph.is\/1L7tIcH","embed_url":"https:\/\/giphy.com\/embed\/xTiTndNDuNFxUW5Xoc","username":"","source":"https:\/\/www.youtube.com\/watch?v=o5eZS1epVYY","content_url":"","source_tld":"www.youtube.com","source_post_url":"https:\/\/www.youtube.com\/watch?v=o5eZS1epVYY","is_sticker":0,"import_datetime":"2015-05-15
65
- 17:32:24","trending_datetime":"1970-01-01 00:00:00","images":{"fixed_height_still":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200_s.gif","width":"274","height":"200"},"original_still":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy_s.gif","width":"477","height":"348"},"fixed_width":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200w.gif","width":"200","height":"146","size":"496043","mp4":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200w.mp4","mp4_size":"52023","webp":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200w.webp","webp_size":"198114"},"fixed_height_small_still":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/100_s.gif","width":"137","height":"100"},"fixed_height_downsampled":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200_d.gif","width":"274","height":"200","size":"201979","webp":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200_d.webp","webp_size":"72220"},"preview":{"width":"150","height":"108","mp4":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy-preview.mp4","mp4_size":"38609"},"fixed_height_small":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/100.gif","width":"137","height":"100","size":"274381","mp4":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/100.mp4","mp4_size":"31076","webp":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/100.webp","webp_size":"121778"},"downsized_still":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy-downsized_s.gif","width":"477","height":"348","size":"81110"},"downsized":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy-downsized.gif","width":"477","height":"348","size":"1890849"},"downsized_large":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy.gif","width":"477","height":"348","size":"1890849"},"fixed_width_small_still":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/100w_s.gif","width":"100","height":"73"},"preview_webp":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy-preview.webp","width":"155","height":"113","size":"48796"},"fixed_width_still":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200w_s.gif","width":"200","height":"146"},"fixed_width_small":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/100w.gif","width":"100","height":"73","size":"161406","mp4":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/100w.mp4","mp4_size":"21768","webp":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/100w.webp","webp_size":"78562"},"downsized_small":{"width":"426","height":"312","mp4":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy-downsized-small.mp4","mp4_size":"163378"},"fixed_width_downsampled":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200w_d.gif","width":"200","height":"146","size":"118889","webp":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200w_d.webp","webp_size":"46382"},"downsized_medium":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy.gif","width":"477","height":"348","size":"1890849"},"original":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy.gif","width":"477","height":"348","size":"1890849","frames":"26","mp4":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy.mp4","mp4_size":"163985","webp":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy.webp","webp_size":"580074"},"fixed_height":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200.gif","width":"274","height":"200","size":"831881","mp4":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200.mp4","mp4_size":"75652","webp":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200.webp","webp_size":"308056"},"looping":{"mp4":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy-loop.mp4","mp4_size":"3398106"},"original_mp4":{"width":"480","height":"350","mp4":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy.mp4","mp4_size":"163985"},"preview_gif":{"url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy-preview.gif","width":"97","height":"71","size":"47979"},"480w_still":{"url":"https:\/\/media0.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/480w_s.jpg","width":"480","height":"350"}},"title":"taco
66
- bell burrito GIF","image_original_url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy.gif","image_url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy.gif","image_mp4_url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/giphy.mp4","image_frames":"26","image_width":"477","image_height":"348","fixed_height_downsampled_url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200_d.gif","fixed_height_downsampled_width":"274","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"146","fixed_height_small_url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/100.gif","fixed_height_small_still_url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/100_s.gif","fixed_height_small_width":"137","fixed_height_small_height":"100","fixed_width_small_url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/100w.gif","fixed_width_small_still_url":"https:\/\/media3.giphy.com\/media\/xTiTndNDuNFxUW5Xoc\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"73","caption":""},"meta":{"status":200,"msg":"OK","response_id":"5aec4f204d68436e6bd7e384"}}'
67
- http_version:
68
- recorded_at: Fri, 04 May 2018 12:16:33 GMT
69
- recorded_with: VCR 3.0.3
@@ -1,71 +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=G&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
- Server:
26
- - nginx
27
- X-Powered-By:
28
- - PHP/5.6.35-1+ubuntu14.04.1+deb.sury.org+1
29
- X-Robots-Tag:
30
- - noindex
31
- Access-Control-Allow-Credentials:
32
- - 'true'
33
- Access-Control-Allow-Methods:
34
- - GET, POST, PUT, DELETE, OPTIONS
35
- Access-Control-Allow-Headers:
36
- - Content-Type, Accept, x-requested-with, cache-control
37
- Access-Control-Allow-Origin:
38
- - "*"
39
- X-Kong-Upstream-Latency:
40
- - '124'
41
- X-Kong-Proxy-Latency:
42
- - '0'
43
- Accept-Ranges:
44
- - bytes
45
- Date:
46
- - Fri, 04 May 2018 12:13:24 GMT
47
- X-Served-By:
48
- - cache-mdw17369-MDW
49
- X-Cache:
50
- - MISS
51
- - MISS from 3
52
- X-Cache-Hits:
53
- - '0'
54
- X-Timer:
55
- - S1525436004.038252,VS0,VE209
56
- Vary:
57
- - Accept-Encoding
58
- Transfer-Encoding:
59
- - chunked
60
- Via:
61
- - kong/0.11.0.3-enterprise-edition, 1.1 varnish, 1.1 3 (squid)
62
- Connection:
63
- - keep-alive
64
- body:
65
- encoding: UTF-8
66
- string: '{"data":{"type":"gif","id":"ImpBgQl7zzrO0","slug":"ImpBgQl7zzrO0","url":"https:\/\/giphy.com\/gifs\/ImpBgQl7zzrO0","bitly_gif_url":"https:\/\/gph.is\/28OFlbE","bitly_url":"https:\/\/gph.is\/28OFlbE","embed_url":"https:\/\/giphy.com\/embed\/ImpBgQl7zzrO0","username":"","source":"https:\/\/imgur.com\/gallery\/tYeJgmR","content_url":"","source_tld":"imgur.com","source_post_url":"https:\/\/imgur.com\/gallery\/tYeJgmR","is_sticker":0,"import_datetime":"2016-06-22
67
- 21:59:33","trending_datetime":"1970-01-01 00:00:00","images":{"fixed_height_still":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200_s.gif","width":"361","height":"200"},"original_still":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy_s.gif","width":"460","height":"255"},"fixed_width":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200w.gif","width":"200","height":"111","size":"286865","mp4":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200w.mp4","mp4_size":"23159","webp":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200w.webp","webp_size":"116704"},"fixed_height_small_still":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/100_s.gif","width":"180","height":"100"},"fixed_height_downsampled":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200_d.gif","width":"361","height":"200","size":"247115","webp":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200_d.webp","webp_size":"84834"},"preview":{"width":"286","height":"156","mp4":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy-preview.mp4","mp4_size":"47310"},"fixed_height_small":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/100.gif","width":"180","height":"100","size":"238718","mp4":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/100.mp4","mp4_size":"19988","webp":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/100.webp","webp_size":"100746"},"downsized_still":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy-downsized_s.gif","width":"460","height":"255","size":"60015"},"downsized":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy-downsized.gif","width":"460","height":"255","size":"1325100"},"downsized_large":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy.gif","width":"460","height":"255","size":"1325100"},"fixed_width_small_still":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/100w_s.gif","width":"100","height":"55"},"preview_webp":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy-preview.webp","width":"193","height":"107","size":"48970"},"fixed_width_still":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200w_s.gif","width":"200","height":"111"},"fixed_width_small":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/100w.gif","width":"100","height":"55","size":"79677","mp4":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/100w.mp4","mp4_size":"9285","webp":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/100w.webp","webp_size":"41476"},"downsized_small":{"width":"460","height":"254","mp4":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy-downsized-small.mp4","mp4_size":"129300"},"fixed_width_downsampled":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200w_d.gif","width":"200","height":"111","size":"81308","webp":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200w_d.webp","webp_size":"31548"},"downsized_medium":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy.gif","width":"460","height":"255","size":"1325100"},"original":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy.gif","width":"460","height":"255","size":"1325100","frames":"22","mp4":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy.mp4","mp4_size":"113680","webp":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy.webp","webp_size":"538952"},"fixed_height":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200.gif","width":"361","height":"200","size":"893669","mp4":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200.mp4","mp4_size":"59270","webp":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200.webp","webp_size":"315936"},"looping":{"mp4":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy-loop.mp4","mp4_size":"1027642"},"original_mp4":{"width":"480","height":"266","mp4":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy.mp4","mp4_size":"113680"},"preview_gif":{"url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy-preview.gif","width":"119","height":"66","size":"49996"},"480w_still":{"url":"https:\/\/media0.giphy.com\/media\/ImpBgQl7zzrO0\/480w_s.jpg","width":"480","height":"266"}},"title":"feel
68
- dollar GIF","image_original_url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy.gif","image_url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy.gif","image_mp4_url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/giphy.mp4","image_frames":"22","image_width":"460","image_height":"255","fixed_height_downsampled_url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200_d.gif","fixed_height_downsampled_width":"361","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"111","fixed_height_small_url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/100.gif","fixed_height_small_still_url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/100_s.gif","fixed_height_small_width":"180","fixed_height_small_height":"100","fixed_width_small_url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/100w.gif","fixed_width_small_still_url":"https:\/\/media2.giphy.com\/media\/ImpBgQl7zzrO0\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"55","caption":""},"meta":{"status":200,"msg":"OK","response_id":"5aec4e6466454764320d1ea2"}}'
69
- http_version:
70
- recorded_at: Fri, 04 May 2018 12:13:24 GMT
71
- recorded_with: VCR 3.0.3