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,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=61520&username=imgflip_user&password=imgflip_password&text0=Not%20sure%20if%20this%20test%20is%20going%20to%20pass&text1=or%20if%20it's%20gonna%20break%20the%20build
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
+ - cloudflare-nginx
23
+ Date:
24
+ - Mon, 23 Feb 2015 02:34:16 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=019046646da49cd72b4d677087170990; path=/
33
+ - __cfduid=ddfc8211d525d5af3c8283e5dd20695381424658855; expires=Tue, 23-Feb-16
34
+ 02:34:15 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=c66OFX9q3YLuht_lkb_uXgsnPxKBoVSM; expires=Mon, 23-Feb-2015 04:34:15
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bd005f8a74c10e7-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzrz0.jpg","page_url":"https:\/\/imgflip.com\/i\/hzrz0"}}'
52
+ http_version:
53
+ recorded_at: Mon, 23 Feb 2015 02:34:17 GMT
54
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=61579&username=imgflip_user&password=imgflip_password&text0=One%20Does%20Not%20Simply&text1=write%20rspecs
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
+ - cloudflare-nginx
23
+ Date:
24
+ - Mon, 23 Feb 2015 02:38:00 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=38425547e60dd43ac5e2e6d50b4b7d3d; path=/
33
+ - __cfduid=d7fe0b069b8adcf709901c03cc92a9b371424659080; expires=Tue, 23-Feb-16
34
+ 02:38:00 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=pt5xd4yd0fSDWw49vJwrW_ZaniNZC8uh; expires=Mon, 23-Feb-2015 04:37:59
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bd00b73379e10c3-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzs4e.jpg","page_url":"https:\/\/imgflip.com\/i\/hzs4e"}}'
52
+ http_version:
53
+ recorded_at: Mon, 23 Feb 2015 02:38:00 GMT
54
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=100952&username=imgflip_user&password=imgflip_password&text0=I%20looked%20at%20your%20slack%20channel&text1=who%20is%20this%20jarvis%20you%20keep%20talking%20to%3F
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
+ - cloudflare-nginx
23
+ Date:
24
+ - Mon, 23 Feb 2015 02:43:10 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=04edc955186539e8ae4e4b74abcd787c; path=/
33
+ - __cfduid=d78cf495c8784925ba101d3e00e535e131424659389; expires=Tue, 23-Feb-16
34
+ 02:43:09 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=tNqd8hV9h48Mi9ytMD8momMkJptF4Z9T; expires=Mon, 23-Feb-2015 04:43:09
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bd013014b8b09ac-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzsbu.jpg","page_url":"https:\/\/imgflip.com\/i\/hzsbu"}}'
52
+ http_version:
53
+ recorded_at: Mon, 23 Feb 2015 02:43:10 GMT
54
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=245898&username=imgflip_user&password=imgflip_password&text0=why%20the%20fuck&text1=did%20you%20make%20so%20many%20memes%3F
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
+ - cloudflare-nginx
23
+ Date:
24
+ - Mon, 23 Feb 2015 02:46:36 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=b49c8bc0ae08ad9d584b0d6e7e601d14; path=/
33
+ - __cfduid=de332a208b43b0ccbf913a72aa09261af1424659595; expires=Tue, 23-Feb-16
34
+ 02:46:35 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=BZLEVwSuzcsjHSB-aprqL373ME5e8GW7; expires=Mon, 23-Feb-2015 04:46:35
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bd01809afd210c3-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzsgd.jpg","page_url":"https:\/\/imgflip.com\/i\/hzsgd"}}'
52
+ http_version:
53
+ recorded_at: Mon, 23 Feb 2015 02:46:36 GMT
54
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=61544&username=imgflip_user&password=imgflip_password&text0=hello&text1=world
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
+ - cloudflare-nginx
23
+ Date:
24
+ - Sun, 22 Feb 2015 19:48:12 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=20f67b465a2cddda7d71f56cb3ac0f47; path=/
33
+ - __cfduid=dabd0c7f840cdb415cbd242f3ff64b8851424634492; expires=Mon, 22-Feb-16
34
+ 19:48:12 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=AhWp1eH65ej9-AvuA9OvVUQGP3zkHRPk; expires=Sun, 22-Feb-2015 21:48:12
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bcdb32889460424-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hz9zo.jpg","page_url":"https:\/\/imgflip.com\/i\/hz9zo"}}'
52
+ http_version:
53
+ recorded_at: Sun, 22 Feb 2015 19:48:12 GMT
54
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=100948&username=imgflip_user&password=imgflip_password&text0=can't%20think%20of&text1=anything%20clever%20right%20now
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
+ - cloudflare-nginx
23
+ Date:
24
+ - Mon, 23 Feb 2015 02:53:37 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=64c0801c721a70282c33bf38568099aa; path=/
33
+ - __cfduid=dface20af6cf192293232beed83c4b2711424660016; expires=Tue, 23-Feb-16
34
+ 02:53:36 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=_pK8a3CJVGgHTzec8IersEXtk3v-F1PU; expires=Mon, 23-Feb-2015 04:53:36
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bd0224c45680168-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzspk.jpg","page_url":"https:\/\/imgflip.com\/i\/hzspk"}}'
52
+ http_version:
53
+ recorded_at: Mon, 23 Feb 2015 02:53:37 GMT
54
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=100947&username=imgflip_user&password=imgflip_password&text0=What%20if%20I%20told%20you&text1=Jarvis%20is%20the%20best%20bot%20ever%3F
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
+ - cloudflare-nginx
23
+ Date:
24
+ - Mon, 23 Feb 2015 02:57:37 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=d183c244a68b1e5f0ae5097d62e3f1e7; path=/
33
+ - __cfduid=dbcfd169b613c41dd5e0302ebd4eabfa11424660256; expires=Tue, 23-Feb-16
34
+ 02:57:36 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=w5LJYhtiFnPPWu0lgtu67LlYHaG7Ch5_; expires=Mon, 23-Feb-2015 04:57:36
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bd0282bca7710c3-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzsv9.jpg","page_url":"https:\/\/imgflip.com\/i\/hzsv9"}}'
52
+ http_version:
53
+ recorded_at: Mon, 23 Feb 2015 02:57:37 GMT
54
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=61582&username=imgflip_user&password=imgflip_password&text0=hello&text1=world
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
+ - cloudflare-nginx
23
+ Date:
24
+ - Mon, 23 Feb 2015 03:01:34 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=9120b433c903f0bbfb39f8ea2f42bab9; path=/
33
+ - __cfduid=d9147c503dda8cef3ff01a00f952ac1371424660493; expires=Tue, 23-Feb-16
34
+ 03:01:33 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=eAsLjP7ImGikzQwlAO13xX3Cw13VJUOm; expires=Mon, 23-Feb-2015 05:01:33
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bd02df3d0de10c3-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzt18.jpg","page_url":"https:\/\/imgflip.com\/i\/hzt18"}}'
52
+ http_version:
53
+ recorded_at: Mon, 23 Feb 2015 03:01:34 GMT
54
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,54 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.imgflip.com/caption_image
6
+ body:
7
+ encoding: UTF-8
8
+ string: template_id=61527&username=imgflip_user&password=imgflip_password&text0=Y%20U%20NO&text1=sql
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
+ - cloudflare-nginx
23
+ Date:
24
+ - Mon, 23 Feb 2015 03:04:17 GMT
25
+ Content-Type:
26
+ - text/html; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Set-Cookie:
32
+ - PHPSESSID=514b2e232a6f97f863aa88441b4ea437; path=/
33
+ - __cfduid=d44e92334d92c185830d2305d6644083f1424660655; expires=Tue, 23-Feb-16
34
+ 03:04:15 GMT; path=/; domain=.imgflip.com; HttpOnly
35
+ - claim_key=cYvB1oqX5BKuk7JhMp7rUfd9Vb36GUZn; expires=Mon, 23-Feb-2015 05:04:16
36
+ GMT; Max-Age=7200; path=/
37
+ Cache-Control:
38
+ - no-store, no-cache, must-revalidate, post-check=0, pre-check=0
39
+ Cf-Railgun:
40
+ - direct (starting new WAN connection)
41
+ Expires:
42
+ - Thu, 19 Nov 1981 08:52:00 GMT
43
+ Pragma:
44
+ - no-cache
45
+ Vary:
46
+ - User-Agent,Accept-Encoding
47
+ Cf-Ray:
48
+ - 1bd031e8ec8e09ac-ORD
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzt5g.jpg","page_url":"https:\/\/imgflip.com\/i\/hzt5g"}}'
52
+ http_version:
53
+ recorded_at: Mon, 23 Feb 2015 03:04:17 GMT
54
+ recorded_with: VCR 2.9.3