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.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/Guardfile +47 -0
- data/LICENSE.txt +22 -0
- data/README.md +129 -0
- data/Rakefile +11 -0
- data/bin/edi +12 -0
- data/edi.gemspec +40 -0
- data/features/fact_service.feature +7 -0
- data/features/giphy_service.feature +43 -0
- data/features/i_heart_quotes_service.feature +21 -0
- data/features/step_definitions/fact_service_steps.rb +7 -0
- data/features/step_definitions/giphy_steps.rb +3 -0
- data/features/step_definitions/server_steps.rb +3 -0
- data/features/step_definitions/tweet_that_steps.rb +19 -0
- data/features/step_definitions/weather_steps.rb +3 -0
- data/features/support/env.rb +37 -0
- data/features/support/hooks.rb +1 -0
- data/features/support/vcr_cassettes/Fact_Service/EDI_responds_with_a_random_fact.yml +53 -0
- data/features/support/vcr_cassettes/Fact_Service/Jarvis_responds_with_a_random_fact.yml +52 -0
- data/features/support/vcr_cassettes/Giphy_Service/Bacon.yml +58 -0
- data/features/support/vcr_cassettes/Giphy_Service/Cat_GIF_-_Cat_Wording.yml +58 -0
- data/features/support/vcr_cassettes/Giphy_Service/Cat_GIF_-_Kitty_Wording.yml +58 -0
- data/features/support/vcr_cassettes/Giphy_Service/Cat_GIF_-_Kitty_Wording_-_Case_Insensitive.yml +58 -0
- data/features/support/vcr_cassettes/Giphy_Service/Plain_old_GIF.yml +58 -0
- data/features/support/vcr_cassettes/Giphy_Service/Sloth.yml +58 -0
- data/features/support/vcr_cassettes/Giphy_Service/Trippy.yml +58 -0
- data/features/support/vcr_cassettes/I_Heart_Quotes/A_Random_Quote.yml +44 -0
- data/features/support/vcr_cassettes/I_Heart_Quotes/A_Simpsons_Quote.yml +44 -0
- data/features/support/vcr_cassettes/I_Heart_Quotes/A_Star_Wars_Quote.yml +44 -0
- data/features/support/vcr_cassettes/Tweet_that/Post_the_last_message_to_twitter.yml +211 -0
- data/features/support/vcr_cassettes/Weather_Service/Use_a_specified_location.yml +86 -0
- data/features/support/vcr_cassettes/Weather_Service/Use_default_location.yml +86 -0
- data/features/tweet_that_service.feature +14 -0
- data/features/weather_service.feature +21 -0
- data/lib/edi.rb +53 -0
- data/lib/edi/api/response.rb +22 -0
- data/lib/edi/application.rb +39 -0
- data/lib/edi/cli.rb +61 -0
- data/lib/edi/configuration.rb +26 -0
- data/lib/edi/core_ext.rb +1 -0
- data/lib/edi/core_ext/symbol.rb +7 -0
- data/lib/edi/exceptions.rb +8 -0
- data/lib/edi/http_utilities.rb +40 -0
- data/lib/edi/interpreter.rb +32 -0
- data/lib/edi/refinements.rb +1 -0
- data/lib/edi/refinements/zip_refinement.rb +11 -0
- data/lib/edi/scheduler.rb +21 -0
- data/lib/edi/server.rb +45 -0
- data/lib/edi/service.rb +89 -0
- data/lib/edi/services.rb +9 -0
- data/lib/edi/services/dice.rb +25 -0
- data/lib/edi/services/eightball.rb +38 -0
- data/lib/edi/services/fact.rb +7 -0
- data/lib/edi/services/giphy.rb +38 -0
- data/lib/edi/services/i_heart_quotes.rb +29 -0
- data/lib/edi/services/img_flip.rb +69 -0
- data/lib/edi/services/img_flip_memes/afraid_to_ask.rb +17 -0
- data/lib/edi/services/img_flip_memes/and_its_gone.rb +17 -0
- data/lib/edi/services/img_flip_memes/base_meme.rb +57 -0
- data/lib/edi/services/img_flip_memes/everywhere.rb +15 -0
- data/lib/edi/services/img_flip_memes/gonna_have_a_bad_time.rb +17 -0
- data/lib/edi/services/img_flip_memes/most_interesting_man.rb +13 -0
- data/lib/edi/services/img_flip_memes/not_sure_if.rb +13 -0
- data/lib/edi/services/img_flip_memes/one_does_not_simply.rb +17 -0
- data/lib/edi/services/img_flip_memes/overly_attached_girlfriend.rb +13 -0
- data/lib/edi/services/img_flip_memes/picard.rb +13 -0
- data/lib/edi/services/img_flip_memes/success_kid.rb +13 -0
- data/lib/edi/services/img_flip_memes/sudden_clarity.rb +13 -0
- data/lib/edi/services/img_flip_memes/what_if_i_told_you.rb +17 -0
- data/lib/edi/services/img_flip_memes/willy_wonka.rb +13 -0
- data/lib/edi/services/img_flip_memes/y_u_no.rb +17 -0
- data/lib/edi/services/null_service.rb +5 -0
- data/lib/edi/services/tweet_that.rb +68 -0
- data/lib/edi/services/weather.rb +42 -0
- data/lib/edi/slack.rb +1 -0
- data/lib/edi/slack/message.rb +17 -0
- data/lib/edi/test_support/cucumber.rb +1 -0
- data/lib/edi/test_support/test_support.rb +27 -0
- data/lib/edi/utilities/array_responder.rb +16 -0
- data/lib/edi/version.rb +3 -0
- data/spec/edi/edi_spec.rb +29 -0
- data/spec/edi/interpreter_spec.rb +61 -0
- data/spec/edi/server_spec.rb +20 -0
- data/spec/edi/service_spec.rb +112 -0
- data/spec/services/dice_spec.rb +22 -0
- data/spec/services/eightball_spec.rb +9 -0
- data/spec/services/fact_spec.rb +7 -0
- data/spec/services/giphy_spec.rb +46 -0
- data/spec/services/i_heart_quotes_spec.rb +50 -0
- data/spec/services/img_flip_spec.rb +89 -0
- data/spec/services/null_service_spec.rb +3 -0
- data/spec/services/tweet_that_spec.rb +18 -0
- data/spec/services/weather_spec.rb +17 -0
- data/spec/spec_helper.rb +51 -0
- data/spec/support/fixtures/vcr_cassettes/fact.yml +57 -0
- data/spec/support/fixtures/vcr_cassettes/giphy.yml +513 -0
- data/spec/support/fixtures/vcr_cassettes/i_heart_quotes.yml +222 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_afraid_to_ask.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_and_its_gone.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_everywhere.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_gonna_have_a_bad_time.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_most_interesting_man.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_not_sure_if.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_one_does_not_simply.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_overly_attached_girlfriend.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_picard.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_success_kid.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_sudden_clarity.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_what_if_I_told_you.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_willy_wonka.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/img_flip_y_u_no.yml +54 -0
- data/spec/support/fixtures/vcr_cassettes/tweet_that.yml +189 -0
- data/spec/support/fixtures/vcr_cassettes/weather.yml +346 -0
- data/spec/support/shared_contexts/server.rb +9 -0
- data/spec/support/shared_contexts/service.rb +10 -0
- data/templates/project/Gemfile +7 -0
- data/templates/project/bot/server.rb +6 -0
- data/templates/project/bot/services/.gitkeep +0 -0
- data/templates/project/config.ru +2 -0
- data/templates/project/config/.gitkeep +0 -0
- data/templates/project/config/environment.rb +12 -0
- data/templates/project/config/initializers/.gitkeep +0 -0
- data/templates/services/%name%.rb.tt +5 -0
- metadata +514 -0
@@ -0,0 +1,222 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.giphy.com//gifs/random?api_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: 404
|
19
|
+
message: Not Found
|
20
|
+
headers:
|
21
|
+
Accept-Ranges:
|
22
|
+
- bytes
|
23
|
+
Age:
|
24
|
+
- '0'
|
25
|
+
Content-Type:
|
26
|
+
- application/json
|
27
|
+
Date:
|
28
|
+
- Sat, 21 Feb 2015 02:10:01 GMT
|
29
|
+
Server:
|
30
|
+
- nginx/1.4.6 (Ubuntu)
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
Via:
|
34
|
+
- 1.1 varnish
|
35
|
+
X-Powered-By:
|
36
|
+
- PHP/5.5.9-1ubuntu4
|
37
|
+
X-Varnish:
|
38
|
+
- '1468789280'
|
39
|
+
Content-Length:
|
40
|
+
- '63'
|
41
|
+
Connection:
|
42
|
+
- keep-alive
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: |2-
|
46
|
+
|
47
|
+
{"meta":{"status":404,"msg":"Not Found!"}}
|
48
|
+
http_version:
|
49
|
+
recorded_at: Sat, 21 Feb 2015 02:10:05 GMT
|
50
|
+
- request:
|
51
|
+
method: get
|
52
|
+
uri: http://iheartquotes.com/api/v1/random?format=json
|
53
|
+
body:
|
54
|
+
encoding: US-ASCII
|
55
|
+
string: ''
|
56
|
+
headers:
|
57
|
+
Accept-Encoding:
|
58
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
59
|
+
Accept:
|
60
|
+
- "*/*"
|
61
|
+
User-Agent:
|
62
|
+
- Ruby
|
63
|
+
response:
|
64
|
+
status:
|
65
|
+
code: 200
|
66
|
+
message: OK
|
67
|
+
headers:
|
68
|
+
Connection:
|
69
|
+
- close
|
70
|
+
Etag:
|
71
|
+
- '"19231bcf5bbdafee30ecabf324dad23e"'
|
72
|
+
X-Ua-Compatible:
|
73
|
+
- IE=Edge,chrome=1
|
74
|
+
Date:
|
75
|
+
- Sat, 21 Feb 2015 02:12:55 GMT
|
76
|
+
X-Runtime:
|
77
|
+
- '0.074872'
|
78
|
+
Content-Type:
|
79
|
+
- application/json; charset=utf-8
|
80
|
+
Cache-Control:
|
81
|
+
- max-age=0, private, must-revalidate
|
82
|
+
Server:
|
83
|
+
- thin 1.2.6 codename Crazy Delicious
|
84
|
+
Via:
|
85
|
+
- 1.1 vegur
|
86
|
+
body:
|
87
|
+
encoding: UTF-8
|
88
|
+
string: '{"json_class":"Fortune","tags":["platitudes","publilius_syrus"],"quote":"Prosperity
|
89
|
+
makes friends, adversity tries them.\n\t\t-- Publilius Syrus","link":"http://iheartquotes.com/fortune/show/51230","source":"fortune"}'
|
90
|
+
http_version:
|
91
|
+
recorded_at: Sat, 21 Feb 2015 02:12:55 GMT
|
92
|
+
- request:
|
93
|
+
method: get
|
94
|
+
uri: http://iheartquotes.com/api/v1/random?format=json
|
95
|
+
body:
|
96
|
+
encoding: US-ASCII
|
97
|
+
string: ''
|
98
|
+
headers:
|
99
|
+
Accept-Encoding:
|
100
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
101
|
+
Accept:
|
102
|
+
- "*/*"
|
103
|
+
User-Agent:
|
104
|
+
- Ruby
|
105
|
+
response:
|
106
|
+
status:
|
107
|
+
code: 200
|
108
|
+
message: OK
|
109
|
+
headers:
|
110
|
+
Connection:
|
111
|
+
- close
|
112
|
+
Etag:
|
113
|
+
- '"65fb4535baef9c1655272f94a923fb71"'
|
114
|
+
X-Ua-Compatible:
|
115
|
+
- IE=Edge,chrome=1
|
116
|
+
Date:
|
117
|
+
- Sat, 21 Feb 2015 02:39:02 GMT
|
118
|
+
X-Runtime:
|
119
|
+
- '0.074269'
|
120
|
+
Content-Type:
|
121
|
+
- application/json; charset=utf-8
|
122
|
+
Cache-Control:
|
123
|
+
- max-age=0, private, must-revalidate
|
124
|
+
Server:
|
125
|
+
- thin 1.2.6 codename Crazy Delicious
|
126
|
+
Via:
|
127
|
+
- 1.1 vegur
|
128
|
+
body:
|
129
|
+
encoding: UTF-8
|
130
|
+
string: '{"json_class":"Fortune","tags":["codehappy"],"quote":"If you will practice
|
131
|
+
being fictional for a while, you will understand that\r\nfictional characters
|
132
|
+
are sometimes more real than people with bodies and\r\nheartbeats.","link":"http://iheartquotes.com/fortune/show/30552","source":"codehappy"}'
|
133
|
+
http_version:
|
134
|
+
recorded_at: Sat, 21 Feb 2015 02:39:02 GMT
|
135
|
+
- request:
|
136
|
+
method: get
|
137
|
+
uri: http://iheartquotes.com/api/v1/random?format=json&source=simpsons_homer
|
138
|
+
body:
|
139
|
+
encoding: US-ASCII
|
140
|
+
string: ''
|
141
|
+
headers:
|
142
|
+
Accept-Encoding:
|
143
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
144
|
+
Accept:
|
145
|
+
- "*/*"
|
146
|
+
User-Agent:
|
147
|
+
- Ruby
|
148
|
+
response:
|
149
|
+
status:
|
150
|
+
code: 200
|
151
|
+
message: OK
|
152
|
+
headers:
|
153
|
+
Connection:
|
154
|
+
- close
|
155
|
+
Etag:
|
156
|
+
- '"499fdfbaa6284d08f3b1f84d5dc92547"'
|
157
|
+
X-Ua-Compatible:
|
158
|
+
- IE=Edge,chrome=1
|
159
|
+
Date:
|
160
|
+
- Sat, 21 Feb 2015 03:00:33 GMT
|
161
|
+
X-Runtime:
|
162
|
+
- '0.008960'
|
163
|
+
Content-Type:
|
164
|
+
- application/json; charset=utf-8
|
165
|
+
Cache-Control:
|
166
|
+
- max-age=0, private, must-revalidate
|
167
|
+
Server:
|
168
|
+
- thin 1.2.6 codename Crazy Delicious
|
169
|
+
Via:
|
170
|
+
- 1.1 vegur
|
171
|
+
body:
|
172
|
+
encoding: UTF-8
|
173
|
+
string: '{"json_class":"Fortune","tags":["simpsons_homer"],"quote":"Homer:\tI
|
174
|
+
don''t want you to see me sitting on my worthless butt.\n\nBart:\tWe''ve seen
|
175
|
+
it, Dad.\n\n\t\t Homer at the Bat","link":"http://iheartquotes.com/fortune/show/5519","source":"simpsons_homer"}'
|
176
|
+
http_version:
|
177
|
+
recorded_at: Sat, 21 Feb 2015 03:00:33 GMT
|
178
|
+
- request:
|
179
|
+
method: get
|
180
|
+
uri: http://iheartquotes.com/api/v1/random?format=json&source=starwars
|
181
|
+
body:
|
182
|
+
encoding: US-ASCII
|
183
|
+
string: ''
|
184
|
+
headers:
|
185
|
+
Accept-Encoding:
|
186
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
187
|
+
Accept:
|
188
|
+
- "*/*"
|
189
|
+
User-Agent:
|
190
|
+
- Ruby
|
191
|
+
response:
|
192
|
+
status:
|
193
|
+
code: 200
|
194
|
+
message: OK
|
195
|
+
headers:
|
196
|
+
Connection:
|
197
|
+
- close
|
198
|
+
Etag:
|
199
|
+
- '"59651e5c2e7322c2f642af48dc409df9"'
|
200
|
+
X-Ua-Compatible:
|
201
|
+
- IE=Edge,chrome=1
|
202
|
+
Date:
|
203
|
+
- Sat, 21 Feb 2015 03:02:10 GMT
|
204
|
+
X-Runtime:
|
205
|
+
- '0.013754'
|
206
|
+
Content-Type:
|
207
|
+
- application/json; charset=utf-8
|
208
|
+
Cache-Control:
|
209
|
+
- max-age=0, private, must-revalidate
|
210
|
+
Server:
|
211
|
+
- thin 1.2.6 codename Crazy Delicious
|
212
|
+
Via:
|
213
|
+
- 1.1 vegur
|
214
|
+
body:
|
215
|
+
encoding: UTF-8
|
216
|
+
string: '{"json_class":"Fortune","tags":["starwars"],"quote":"Han Solo:\n\tAfraid
|
217
|
+
I was gonna leave without giving you a\n\tgoodbye kiss?\nPrincess Leia:\n\tI''d
|
218
|
+
just as soon kiss a Wookiee!\nHan Solo:\n\tI can arrange that! You could use
|
219
|
+
a good kiss!","link":"http://iheartquotes.com/fortune/show/1293","source":"starwars"}'
|
220
|
+
http_version:
|
221
|
+
recorded_at: Sat, 21 Feb 2015 03:02:10 GMT
|
222
|
+
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=24557067&username=imgflip_user&password=imgflip_password&text0=%2C%20I'm%20not%20sure%20how%20to%20mock%20third%20party%20apis%2C&text1=And%20at%20this%20point%2C%20I'm%20afraid%20to%20ask
|
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:52:46 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=6c4d055788bedf067741a1e18c2f8826; path=/
|
33
|
+
- __cfduid=def929d205d4dfb47e596f3b7110123021424634766; expires=Mon, 22-Feb-16
|
34
|
+
19:52:46 GMT; path=/; domain=.imgflip.com; HttpOnly
|
35
|
+
- claim_key=0B5Wd2oc4CkTudRiykCuXq9mkr2QrxW3; expires=Sun, 22-Feb-2015 21:52:46
|
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
|
+
- 1bcdb9d909a610db-ORD
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hza6u.jpg","page_url":"https:\/\/imgflip.com\/i\/hza6u"}}'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Sun, 22 Feb 2015 19:52:46 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=766986&username=imgflip_user&password=imgflip_password&text0=you%20have%20some%20services%20here%2C&text1=Annnnnnnd%20it's%20gone
|
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:07:51 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=ad47d111acfb04728fe6c39ecbf751bc; path=/
|
33
|
+
- __cfduid=d6a86161a43f0ed77eb6a24353e9169d71424657269; expires=Tue, 23-Feb-16
|
34
|
+
02:07:49 GMT; path=/; domain=.imgflip.com; HttpOnly
|
35
|
+
- claim_key=KppsjdFgSz8HbeoR1SZYWlg0GfRRvgmH; expires=Mon, 23-Feb-2015 04:07:50
|
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
|
+
- 1bcfdf4060af041e-ORD
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzqv7.jpg","page_url":"https:\/\/imgflip.com\/i\/hzqv7"}}'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Mon, 23 Feb 2015 02:07:51 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=347390&username=imgflip_user&password=imgflip_password&text0=tests&text1=tests%20everywhere
|
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:14:31 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=046c699b7b011c9f282428c77fe1f0da; path=/
|
33
|
+
- __cfduid=db5221cce6e59c258df512319d23046521424657671; expires=Tue, 23-Feb-16
|
34
|
+
02:14:31 GMT; path=/; domain=.imgflip.com; HttpOnly
|
35
|
+
- claim_key=uxdEMz3jfOpGZzQfCOTWImLnbxJcfes5; expires=Mon, 23-Feb-2015 04:14:31
|
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
|
+
- 1bcfe90cf5850168-ORD
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzr5m.jpg","page_url":"https:\/\/imgflip.com\/i\/hzr5m"}}'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Mon, 23 Feb 2015 02:14:31 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=100951&username=imgflip_user&password=imgflip_password&text0=if%20you%20mock%20when%20you%20should%20use%20a%20real%20object%2C&text1=You're%20gonna%20have%20a%20bad%20time
|
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:19:25 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=bf759a702b2d43b735a5845a59cc5ec4; path=/
|
33
|
+
- __cfduid=d6dc0cd03a7643ae16b261d0ded2bd29c1424657965; expires=Tue, 23-Feb-16
|
34
|
+
02:19:25 GMT; path=/; domain=.imgflip.com; HttpOnly
|
35
|
+
- claim_key=jAo4hV_4mE2tFKuB4-rRIIOD9kTXlPTM; expires=Mon, 23-Feb-2015 04:19:24
|
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
|
+
- 1bcff03b01cf10e7-ORD
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzrd1.jpg","page_url":"https:\/\/imgflip.com\/i\/hzrd1"}}'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Mon, 23 Feb 2015 02:19:25 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=61532&username=imgflip_user&password=imgflip_password&text0=I%20don't%20always%20ci%20my%20code&text1=but%20when%20I%20do%2C%20I%20do%20it%20on%20Travis
|
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:26:29 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=5d8091395bda29a331448a5639fcb812; path=/
|
33
|
+
- __cfduid=d80052448c6185ecdd7ea055b7d9ef7751424658388; expires=Tue, 23-Feb-16
|
34
|
+
02:26:28 GMT; path=/; domain=.imgflip.com; HttpOnly
|
35
|
+
- claim_key=AOKxTRomV9PN5fvByWkEq1KYi9HoTV-i; expires=Mon, 23-Feb-2015 04:26:28
|
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
|
+
- 1bcffa91227309b8-ORD
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"success":true,"data":{"url":"http:\/\/i.imgflip.com\/hzrnq.jpg","page_url":"https:\/\/imgflip.com\/i\/hzrnq"}}'
|
52
|
+
http_version:
|
53
|
+
recorded_at: Mon, 23 Feb 2015 02:26:29 GMT
|
54
|
+
recorded_with: VCR 2.9.3
|