edi 0.1.2

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 (129) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +23 -0
  3. data/.rspec +1 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +6 -0
  6. data/Gemfile +4 -0
  7. data/Guardfile +47 -0
  8. data/LICENSE.txt +22 -0
  9. data/README.md +129 -0
  10. data/Rakefile +11 -0
  11. data/bin/edi +12 -0
  12. data/edi.gemspec +40 -0
  13. data/features/fact_service.feature +7 -0
  14. data/features/giphy_service.feature +43 -0
  15. data/features/i_heart_quotes_service.feature +21 -0
  16. data/features/step_definitions/fact_service_steps.rb +7 -0
  17. data/features/step_definitions/giphy_steps.rb +3 -0
  18. data/features/step_definitions/server_steps.rb +3 -0
  19. data/features/step_definitions/tweet_that_steps.rb +19 -0
  20. data/features/step_definitions/weather_steps.rb +3 -0
  21. data/features/support/env.rb +37 -0
  22. data/features/support/hooks.rb +1 -0
  23. data/features/support/vcr_cassettes/Fact_Service/EDI_responds_with_a_random_fact.yml +53 -0
  24. data/features/support/vcr_cassettes/Fact_Service/Jarvis_responds_with_a_random_fact.yml +52 -0
  25. data/features/support/vcr_cassettes/Giphy_Service/Bacon.yml +58 -0
  26. data/features/support/vcr_cassettes/Giphy_Service/Cat_GIF_-_Cat_Wording.yml +58 -0
  27. data/features/support/vcr_cassettes/Giphy_Service/Cat_GIF_-_Kitty_Wording.yml +58 -0
  28. data/features/support/vcr_cassettes/Giphy_Service/Cat_GIF_-_Kitty_Wording_-_Case_Insensitive.yml +58 -0
  29. data/features/support/vcr_cassettes/Giphy_Service/Plain_old_GIF.yml +58 -0
  30. data/features/support/vcr_cassettes/Giphy_Service/Sloth.yml +58 -0
  31. data/features/support/vcr_cassettes/Giphy_Service/Trippy.yml +58 -0
  32. data/features/support/vcr_cassettes/I_Heart_Quotes/A_Random_Quote.yml +44 -0
  33. data/features/support/vcr_cassettes/I_Heart_Quotes/A_Simpsons_Quote.yml +44 -0
  34. data/features/support/vcr_cassettes/I_Heart_Quotes/A_Star_Wars_Quote.yml +44 -0
  35. data/features/support/vcr_cassettes/Tweet_that/Post_the_last_message_to_twitter.yml +211 -0
  36. data/features/support/vcr_cassettes/Weather_Service/Use_a_specified_location.yml +86 -0
  37. data/features/support/vcr_cassettes/Weather_Service/Use_default_location.yml +86 -0
  38. data/features/tweet_that_service.feature +14 -0
  39. data/features/weather_service.feature +21 -0
  40. data/lib/edi.rb +53 -0
  41. data/lib/edi/api/response.rb +22 -0
  42. data/lib/edi/application.rb +39 -0
  43. data/lib/edi/cli.rb +61 -0
  44. data/lib/edi/configuration.rb +26 -0
  45. data/lib/edi/core_ext.rb +1 -0
  46. data/lib/edi/core_ext/symbol.rb +7 -0
  47. data/lib/edi/exceptions.rb +8 -0
  48. data/lib/edi/http_utilities.rb +40 -0
  49. data/lib/edi/interpreter.rb +32 -0
  50. data/lib/edi/refinements.rb +1 -0
  51. data/lib/edi/refinements/zip_refinement.rb +11 -0
  52. data/lib/edi/scheduler.rb +21 -0
  53. data/lib/edi/server.rb +45 -0
  54. data/lib/edi/service.rb +89 -0
  55. data/lib/edi/services.rb +9 -0
  56. data/lib/edi/services/dice.rb +25 -0
  57. data/lib/edi/services/eightball.rb +38 -0
  58. data/lib/edi/services/fact.rb +7 -0
  59. data/lib/edi/services/giphy.rb +38 -0
  60. data/lib/edi/services/i_heart_quotes.rb +29 -0
  61. data/lib/edi/services/img_flip.rb +69 -0
  62. data/lib/edi/services/img_flip_memes/afraid_to_ask.rb +17 -0
  63. data/lib/edi/services/img_flip_memes/and_its_gone.rb +17 -0
  64. data/lib/edi/services/img_flip_memes/base_meme.rb +57 -0
  65. data/lib/edi/services/img_flip_memes/everywhere.rb +15 -0
  66. data/lib/edi/services/img_flip_memes/gonna_have_a_bad_time.rb +17 -0
  67. data/lib/edi/services/img_flip_memes/most_interesting_man.rb +13 -0
  68. data/lib/edi/services/img_flip_memes/not_sure_if.rb +13 -0
  69. data/lib/edi/services/img_flip_memes/one_does_not_simply.rb +17 -0
  70. data/lib/edi/services/img_flip_memes/overly_attached_girlfriend.rb +13 -0
  71. data/lib/edi/services/img_flip_memes/picard.rb +13 -0
  72. data/lib/edi/services/img_flip_memes/success_kid.rb +13 -0
  73. data/lib/edi/services/img_flip_memes/sudden_clarity.rb +13 -0
  74. data/lib/edi/services/img_flip_memes/what_if_i_told_you.rb +17 -0
  75. data/lib/edi/services/img_flip_memes/willy_wonka.rb +13 -0
  76. data/lib/edi/services/img_flip_memes/y_u_no.rb +17 -0
  77. data/lib/edi/services/null_service.rb +5 -0
  78. data/lib/edi/services/tweet_that.rb +68 -0
  79. data/lib/edi/services/weather.rb +42 -0
  80. data/lib/edi/slack.rb +1 -0
  81. data/lib/edi/slack/message.rb +17 -0
  82. data/lib/edi/test_support/cucumber.rb +1 -0
  83. data/lib/edi/test_support/test_support.rb +27 -0
  84. data/lib/edi/utilities/array_responder.rb +16 -0
  85. data/lib/edi/version.rb +3 -0
  86. data/spec/edi/edi_spec.rb +29 -0
  87. data/spec/edi/interpreter_spec.rb +61 -0
  88. data/spec/edi/server_spec.rb +20 -0
  89. data/spec/edi/service_spec.rb +112 -0
  90. data/spec/services/dice_spec.rb +22 -0
  91. data/spec/services/eightball_spec.rb +9 -0
  92. data/spec/services/fact_spec.rb +7 -0
  93. data/spec/services/giphy_spec.rb +46 -0
  94. data/spec/services/i_heart_quotes_spec.rb +50 -0
  95. data/spec/services/img_flip_spec.rb +89 -0
  96. data/spec/services/null_service_spec.rb +3 -0
  97. data/spec/services/tweet_that_spec.rb +18 -0
  98. data/spec/services/weather_spec.rb +17 -0
  99. data/spec/spec_helper.rb +51 -0
  100. data/spec/support/fixtures/vcr_cassettes/fact.yml +57 -0
  101. data/spec/support/fixtures/vcr_cassettes/giphy.yml +513 -0
  102. data/spec/support/fixtures/vcr_cassettes/i_heart_quotes.yml +222 -0
  103. data/spec/support/fixtures/vcr_cassettes/img_flip_afraid_to_ask.yml +54 -0
  104. data/spec/support/fixtures/vcr_cassettes/img_flip_and_its_gone.yml +54 -0
  105. data/spec/support/fixtures/vcr_cassettes/img_flip_everywhere.yml +54 -0
  106. data/spec/support/fixtures/vcr_cassettes/img_flip_gonna_have_a_bad_time.yml +54 -0
  107. data/spec/support/fixtures/vcr_cassettes/img_flip_most_interesting_man.yml +54 -0
  108. data/spec/support/fixtures/vcr_cassettes/img_flip_not_sure_if.yml +54 -0
  109. data/spec/support/fixtures/vcr_cassettes/img_flip_one_does_not_simply.yml +54 -0
  110. data/spec/support/fixtures/vcr_cassettes/img_flip_overly_attached_girlfriend.yml +54 -0
  111. data/spec/support/fixtures/vcr_cassettes/img_flip_picard.yml +54 -0
  112. data/spec/support/fixtures/vcr_cassettes/img_flip_success_kid.yml +54 -0
  113. data/spec/support/fixtures/vcr_cassettes/img_flip_sudden_clarity.yml +54 -0
  114. data/spec/support/fixtures/vcr_cassettes/img_flip_what_if_I_told_you.yml +54 -0
  115. data/spec/support/fixtures/vcr_cassettes/img_flip_willy_wonka.yml +54 -0
  116. data/spec/support/fixtures/vcr_cassettes/img_flip_y_u_no.yml +54 -0
  117. data/spec/support/fixtures/vcr_cassettes/tweet_that.yml +189 -0
  118. data/spec/support/fixtures/vcr_cassettes/weather.yml +346 -0
  119. data/spec/support/shared_contexts/server.rb +9 -0
  120. data/spec/support/shared_contexts/service.rb +10 -0
  121. data/templates/project/Gemfile +7 -0
  122. data/templates/project/bot/server.rb +6 -0
  123. data/templates/project/bot/services/.gitkeep +0 -0
  124. data/templates/project/config.ru +2 -0
  125. data/templates/project/config/.gitkeep +0 -0
  126. data/templates/project/config/environment.rb +12 -0
  127. data/templates/project/config/initializers/.gitkeep +0 -0
  128. data/templates/services/%name%.rb.tt +5 -0
  129. metadata +514 -0
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,53 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://numbersapi.com/random
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx/1.4.6 (Ubuntu)
23
+ Date:
24
+ - Wed, 04 Mar 2015 02:01:43 GMT
25
+ Content-Type:
26
+ - text/plain; charset="UTF-8"; charset=utf-8
27
+ Content-Length:
28
+ - '108'
29
+ Connection:
30
+ - keep-alive
31
+ X-Powered-By:
32
+ - Express
33
+ Access-Control-Allow-Origin:
34
+ - "*"
35
+ Access-Control-Allow-Headers:
36
+ - X-Requested-With
37
+ X-Numbers-Api-Number:
38
+ - '38'
39
+ X-Numbers-Api-Type:
40
+ - trivia
41
+ Pragma:
42
+ - no-cache
43
+ Cache-Control:
44
+ - no-cache
45
+ Expires:
46
+ - '0'
47
+ body:
48
+ encoding: UTF-8
49
+ string: 38 is the number of minutes in the shortest war in history in which
50
+ Zanzibar surrendered to England in 1896.
51
+ http_version:
52
+ recorded_at: Wed, 04 Mar 2015 02:01:28 GMT
53
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://numbersapi.com/random
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx/1.4.6 (Ubuntu)
23
+ Date:
24
+ - Fri, 20 Feb 2015 15:14:17 GMT
25
+ Content-Type:
26
+ - text/plain; charset="UTF-8"; charset=utf-8
27
+ Content-Length:
28
+ - '64'
29
+ Connection:
30
+ - keep-alive
31
+ X-Powered-By:
32
+ - Express
33
+ Access-Control-Allow-Origin:
34
+ - "*"
35
+ Access-Control-Allow-Headers:
36
+ - X-Requested-With
37
+ X-Numbers-Api-Number:
38
+ - '149000000'
39
+ X-Numbers-Api-Type:
40
+ - trivia
41
+ Pragma:
42
+ - no-cache
43
+ Cache-Control:
44
+ - no-cache
45
+ Expires:
46
+ - '0'
47
+ body:
48
+ encoding: UTF-8
49
+ string: 536 is the number of ways to arrange the pieces of the stomachion puzzle into a square.
50
+ http_version:
51
+ recorded_at: Fri, 20 Feb 2015 15:14:02 GMT
52
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.giphy.com/v1/gifs/random?api_key=key&tag=bacon
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Accept-Ranges:
22
+ - bytes
23
+ Access-Control-Allow-Credentials:
24
+ - 'true'
25
+ Access-Control-Allow-Headers:
26
+ - Content-Type, Accept
27
+ Access-Control-Allow-Methods:
28
+ - GET, POST, PUT, DELETE, OPTIONS
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Age:
32
+ - '0'
33
+ Content-Type:
34
+ - application/json
35
+ Date:
36
+ - Fri, 20 Feb 2015 20:44:24 GMT
37
+ Server:
38
+ - nginx/1.4.6 (Ubuntu)
39
+ Vary:
40
+ - Accept-Encoding
41
+ Via:
42
+ - 1.1 varnish
43
+ X-Powered-By:
44
+ - PHP/5.5.9-1ubuntu4
45
+ X-Varnish:
46
+ - '1468311114'
47
+ Content-Length:
48
+ - '369'
49
+ Connection:
50
+ - keep-alive
51
+ body:
52
+ encoding: UTF-8
53
+ string: |2-
54
+
55
+ {"data":{"type":"gif","id":"PJ3wMa5ImiVY4","url":"http:\/\/giphy.com\/gifs\/bacon-PJ3wMa5ImiVY4","image_original_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/PJ3wMa5ImiVY4\/giphy.gif","image_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/PJ3wMa5ImiVY4\/giphy.gif","image_mp4_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/PJ3wMa5ImiVY4\/giphy.mp4","image_frames":"92","image_width":"360","image_height":"480","fixed_height_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/PJ3wMa5ImiVY4\/200_d.gif","fixed_height_downsampled_width":"150","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/PJ3wMa5ImiVY4\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"267","fixed_height_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/PJ3wMa5ImiVY4\/100.gif","fixed_height_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/PJ3wMa5ImiVY4\/100_s.gif","fixed_height_small_width":"75","fixed_height_small_height":"100","fixed_width_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/PJ3wMa5ImiVY4\/100w.gif","fixed_width_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/PJ3wMa5ImiVY4\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"133","rating":"g","username":"","caption":"","tags":["bacon"]},"meta":{"status":200,"msg":"OK"}}
56
+ http_version:
57
+ recorded_at: Fri, 20 Feb 2015 20:44:27 GMT
58
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.giphy.com/v1/gifs/random?api_key=key&tag=cat
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Accept-Ranges:
22
+ - bytes
23
+ Access-Control-Allow-Credentials:
24
+ - 'true'
25
+ Access-Control-Allow-Headers:
26
+ - Content-Type, Accept
27
+ Access-Control-Allow-Methods:
28
+ - GET, POST, PUT, DELETE, OPTIONS
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Age:
32
+ - '0'
33
+ Content-Type:
34
+ - application/json
35
+ Date:
36
+ - Fri, 20 Feb 2015 20:44:12 GMT
37
+ Server:
38
+ - nginx/1.4.6 (Ubuntu)
39
+ Vary:
40
+ - Accept-Encoding
41
+ Via:
42
+ - 1.1 varnish
43
+ X-Powered-By:
44
+ - PHP/5.5.9-1ubuntu4
45
+ X-Varnish:
46
+ - '133998923'
47
+ Content-Length:
48
+ - '385'
49
+ Connection:
50
+ - keep-alive
51
+ body:
52
+ encoding: UTF-8
53
+ string: |2-
54
+
55
+ {"data":{"type":"gif","id":"ucEr1xRMsj6Fi","url":"http:\/\/giphy.com\/gifs\/cat-talking-ucEr1xRMsj6Fi","image_original_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/ucEr1xRMsj6Fi\/giphy.gif","image_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/ucEr1xRMsj6Fi\/giphy.gif","image_mp4_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/ucEr1xRMsj6Fi\/giphy.mp4","image_frames":"8","image_width":"500","image_height":"255","fixed_height_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/ucEr1xRMsj6Fi\/200_d.gif","fixed_height_downsampled_width":"392","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/ucEr1xRMsj6Fi\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"102","fixed_height_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/ucEr1xRMsj6Fi\/100.gif","fixed_height_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/ucEr1xRMsj6Fi\/100_s.gif","fixed_height_small_width":"196","fixed_height_small_height":"100","fixed_width_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/ucEr1xRMsj6Fi\/100w.gif","fixed_width_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/ucEr1xRMsj6Fi\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"51","rating":"g","username":"","caption":"","tags":["cat","animals","talking","meow"]},"meta":{"status":200,"msg":"OK"}}
56
+ http_version:
57
+ recorded_at: Fri, 20 Feb 2015 20:44:26 GMT
58
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.giphy.com/v1/gifs/random?api_key=key&tag=cat
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Accept-Ranges:
22
+ - bytes
23
+ Access-Control-Allow-Credentials:
24
+ - 'true'
25
+ Access-Control-Allow-Headers:
26
+ - Content-Type, Accept
27
+ Access-Control-Allow-Methods:
28
+ - GET, POST, PUT, DELETE, OPTIONS
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Age:
32
+ - '0'
33
+ Content-Type:
34
+ - application/json
35
+ Date:
36
+ - Fri, 20 Feb 2015 20:44:23 GMT
37
+ Server:
38
+ - nginx/1.4.6 (Ubuntu)
39
+ Vary:
40
+ - Accept-Encoding
41
+ Via:
42
+ - 1.1 varnish
43
+ X-Powered-By:
44
+ - PHP/5.5.9-1ubuntu4
45
+ X-Varnish:
46
+ - '1468311092'
47
+ Content-Length:
48
+ - '388'
49
+ Connection:
50
+ - keep-alive
51
+ body:
52
+ encoding: UTF-8
53
+ string: |2-
54
+
55
+ {"data":{"type":"gif","id":"xA88mlhRVZ3lm","url":"http:\/\/giphy.com\/gifs\/cat-oops-xA88mlhRVZ3lm","image_original_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/xA88mlhRVZ3lm\/giphy.gif","image_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/xA88mlhRVZ3lm\/giphy.gif","image_mp4_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/xA88mlhRVZ3lm\/giphy.mp4","image_frames":"74","image_width":"385","image_height":"355","fixed_height_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/xA88mlhRVZ3lm\/200_d.gif","fixed_height_downsampled_width":"217","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/xA88mlhRVZ3lm\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"184","fixed_height_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/xA88mlhRVZ3lm\/100.gif","fixed_height_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/xA88mlhRVZ3lm\/100_s.gif","fixed_height_small_width":"108","fixed_height_small_height":"100","fixed_width_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/xA88mlhRVZ3lm\/100w.gif","fixed_width_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/xA88mlhRVZ3lm\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"92","rating":"g","username":"","caption":"","tags":["cat","cat","buzzfeed","shit","oops"]},"meta":{"status":200,"msg":"OK"}}
56
+ http_version:
57
+ recorded_at: Fri, 20 Feb 2015 20:44:26 GMT
58
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.giphy.com/v1/gifs/random?api_key=key&tag=cat
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Accept-Ranges:
22
+ - bytes
23
+ Access-Control-Allow-Credentials:
24
+ - 'true'
25
+ Access-Control-Allow-Headers:
26
+ - Content-Type, Accept
27
+ Access-Control-Allow-Methods:
28
+ - GET, POST, PUT, DELETE, OPTIONS
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Age:
32
+ - '0'
33
+ Content-Type:
34
+ - application/json
35
+ Date:
36
+ - Fri, 20 Feb 2015 20:43:15 GMT
37
+ Server:
38
+ - nginx/1.4.6 (Ubuntu)
39
+ Vary:
40
+ - Accept-Encoding
41
+ Via:
42
+ - 1.1 varnish
43
+ X-Powered-By:
44
+ - PHP/5.5.9-1ubuntu4
45
+ X-Varnish:
46
+ - '2077463139'
47
+ Content-Length:
48
+ - '394'
49
+ Connection:
50
+ - keep-alive
51
+ body:
52
+ encoding: UTF-8
53
+ string: |2-
54
+
55
+ {"data":{"type":"gif","id":"paYyHCsUUXQPK","url":"http:\/\/giphy.com\/gifs\/cat-robot-playing-paYyHCsUUXQPK","image_original_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/paYyHCsUUXQPK\/giphy.gif","image_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/paYyHCsUUXQPK\/giphy.gif","image_mp4_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/paYyHCsUUXQPK\/giphy.mp4","image_frames":"50","image_width":"500","image_height":"281","fixed_height_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/paYyHCsUUXQPK\/200_d.gif","fixed_height_downsampled_width":"356","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/paYyHCsUUXQPK\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"112","fixed_height_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/paYyHCsUUXQPK\/100.gif","fixed_height_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/paYyHCsUUXQPK\/100_s.gif","fixed_height_small_width":"178","fixed_height_small_height":"100","fixed_width_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/paYyHCsUUXQPK\/100w.gif","fixed_width_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/paYyHCsUUXQPK\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"56","rating":"g","username":"","caption":"video","tags":["cat","robot","playing","toy"]},"meta":{"status":200,"msg":"OK"}}
56
+ http_version:
57
+ recorded_at: Fri, 20 Feb 2015 20:44:26 GMT
58
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.giphy.com/v1/gifs/random?api_key=key
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Accept-Ranges:
22
+ - bytes
23
+ Access-Control-Allow-Credentials:
24
+ - 'true'
25
+ Access-Control-Allow-Headers:
26
+ - Content-Type, Accept
27
+ Access-Control-Allow-Methods:
28
+ - GET, POST, PUT, DELETE, OPTIONS
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Age:
32
+ - '0'
33
+ Content-Type:
34
+ - application/json
35
+ Date:
36
+ - Fri, 20 Feb 2015 20:42:42 GMT
37
+ Server:
38
+ - nginx/1.4.6 (Ubuntu)
39
+ Vary:
40
+ - Accept-Encoding
41
+ Via:
42
+ - 1.1 varnish
43
+ X-Powered-By:
44
+ - PHP/5.5.9-1ubuntu4
45
+ X-Varnish:
46
+ - '488624767'
47
+ Content-Length:
48
+ - '389'
49
+ Connection:
50
+ - keep-alive
51
+ body:
52
+ encoding: UTF-8
53
+ string: |2-
54
+
55
+ {"data":{"type":"gif","id":"10eqhIldgc59za","url":"http:\/\/giphy.com\/gifs\/horror-clown-fatboy-10eqhIldgc59za","image_original_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10eqhIldgc59za\/giphy.gif","image_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10eqhIldgc59za\/giphy.gif","image_mp4_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10eqhIldgc59za\/giphy.mp4","image_frames":"11","image_width":"482","image_height":"267","fixed_height_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10eqhIldgc59za\/200_d.gif","fixed_height_downsampled_width":"361","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10eqhIldgc59za\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"111","fixed_height_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10eqhIldgc59za\/100.gif","fixed_height_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10eqhIldgc59za\/100_s.gif","fixed_height_small_width":"181","fixed_height_small_height":"100","fixed_width_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10eqhIldgc59za\/100w.gif","fixed_width_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10eqhIldgc59za\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"55","rating":"pg","username":"","caption":"","tags":["horror","clown","fatboy"]},"meta":{"status":200,"msg":"OK"}}
56
+ http_version:
57
+ recorded_at: Fri, 20 Feb 2015 20:42:10 GMT
58
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.giphy.com/v1/gifs/random?api_key=key&tag=sloth
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Accept-Ranges:
22
+ - bytes
23
+ Access-Control-Allow-Credentials:
24
+ - 'true'
25
+ Access-Control-Allow-Headers:
26
+ - Content-Type, Accept
27
+ Access-Control-Allow-Methods:
28
+ - GET, POST, PUT, DELETE, OPTIONS
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Age:
32
+ - '0'
33
+ Content-Type:
34
+ - application/json
35
+ Date:
36
+ - Fri, 20 Feb 2015 20:44:03 GMT
37
+ Server:
38
+ - nginx/1.4.6 (Ubuntu)
39
+ Vary:
40
+ - Accept-Encoding
41
+ Via:
42
+ - 1.1 varnish
43
+ X-Powered-By:
44
+ - PHP/5.5.9-1ubuntu4
45
+ X-Varnish:
46
+ - '1041668836'
47
+ Content-Length:
48
+ - '393'
49
+ Connection:
50
+ - keep-alive
51
+ body:
52
+ encoding: UTF-8
53
+ string: |2-
54
+
55
+ {"data":{"type":"gif","id":"QoxeDUyerqIrC","url":"http:\/\/giphy.com\/gifs\/tired-morning-sloth-QoxeDUyerqIrC","image_original_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/QoxeDUyerqIrC\/giphy.gif","image_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/QoxeDUyerqIrC\/giphy.gif","image_mp4_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/QoxeDUyerqIrC\/giphy.mp4","image_frames":"25","image_width":"250","image_height":"125","fixed_height_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/QoxeDUyerqIrC\/200_d.gif","fixed_height_downsampled_width":"400","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/QoxeDUyerqIrC\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"100","fixed_height_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/QoxeDUyerqIrC\/100.gif","fixed_height_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/QoxeDUyerqIrC\/100_s.gif","fixed_height_small_width":"200","fixed_height_small_height":"100","fixed_width_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/QoxeDUyerqIrC\/100w.gif","fixed_width_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/QoxeDUyerqIrC\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"50","rating":"pg-13","username":"","caption":"","tags":["animals","tired","morning","sloth","monday"]},"meta":{"status":200,"msg":"OK"}}
56
+ http_version:
57
+ recorded_at: Fri, 20 Feb 2015 20:44:27 GMT
58
+ recorded_with: VCR 2.9.3