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,57 @@
|
|
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 05:01:41 GMT
|
25
|
+
Content-Type:
|
26
|
+
- text/plain; charset="UTF-8"; charset=utf-8
|
27
|
+
Content-Length:
|
28
|
+
- '93'
|
29
|
+
X-Powered-By:
|
30
|
+
- Express
|
31
|
+
Access-Control-Allow-Origin:
|
32
|
+
- "*"
|
33
|
+
Access-Control-Allow-Headers:
|
34
|
+
- X-Requested-With
|
35
|
+
X-Numbers-Api-Number:
|
36
|
+
- '182'
|
37
|
+
X-Numbers-Api-Type:
|
38
|
+
- trivia
|
39
|
+
Pragma:
|
40
|
+
- no-cache
|
41
|
+
Cache-Control:
|
42
|
+
- no-cache
|
43
|
+
Expires:
|
44
|
+
- '0'
|
45
|
+
Proxy-Connection:
|
46
|
+
- Keep-Alive
|
47
|
+
Connection:
|
48
|
+
- Keep-Alive
|
49
|
+
Age:
|
50
|
+
- '0'
|
51
|
+
body:
|
52
|
+
encoding: UTF-8
|
53
|
+
string: 182 is the carat of the Star of Bombay cabochon-cut star sapphire originating
|
54
|
+
from Sri Lanka.
|
55
|
+
http_version:
|
56
|
+
recorded_at: Fri, 20 Feb 2015 05:01:27 GMT
|
57
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,513 @@
|
|
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:30:34 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
|
+
- '133978543'
|
47
|
+
Content-Length:
|
48
|
+
- '384'
|
49
|
+
Connection:
|
50
|
+
- keep-alive
|
51
|
+
body:
|
52
|
+
encoding: UTF-8
|
53
|
+
string: |2-
|
54
|
+
|
55
|
+
{"data":{"type":"gif","id":"10BhvFXneBD6X6","url":"http:\/\/giphy.com\/gifs\/xavi-hernndez-10BhvFXneBD6X6","image_original_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10BhvFXneBD6X6\/giphy.gif","image_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10BhvFXneBD6X6\/giphy.gif","image_mp4_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10BhvFXneBD6X6\/giphy.mp4","image_frames":"37","image_width":"160","image_height":"260","fixed_height_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10BhvFXneBD6X6\/200_d.gif","fixed_height_downsampled_width":"123","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10BhvFXneBD6X6\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"325","fixed_height_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10BhvFXneBD6X6\/100.gif","fixed_height_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10BhvFXneBD6X6\/100_s.gif","fixed_height_small_width":"62","fixed_height_small_height":"100","fixed_width_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10BhvFXneBD6X6\/100w.gif","fixed_width_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/10BhvFXneBD6X6\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"163","rating":"g","username":"","caption":"","tags":["xavi","xavi hernndez"]},"meta":{"status":200,"msg":"OK"}}
|
56
|
+
http_version:
|
57
|
+
recorded_at: Fri, 20 Feb 2015 20:30:48 GMT
|
58
|
+
- request:
|
59
|
+
method: get
|
60
|
+
uri: http://api.giphy.com/v1/gifs/random?api_key=key&tag=cat
|
61
|
+
body:
|
62
|
+
encoding: US-ASCII
|
63
|
+
string: ''
|
64
|
+
headers:
|
65
|
+
Accept-Encoding:
|
66
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
67
|
+
Accept:
|
68
|
+
- "*/*"
|
69
|
+
User-Agent:
|
70
|
+
- Ruby
|
71
|
+
response:
|
72
|
+
status:
|
73
|
+
code: 200
|
74
|
+
message: OK
|
75
|
+
headers:
|
76
|
+
Accept-Ranges:
|
77
|
+
- bytes
|
78
|
+
Access-Control-Allow-Credentials:
|
79
|
+
- 'true'
|
80
|
+
Access-Control-Allow-Headers:
|
81
|
+
- Content-Type, Accept
|
82
|
+
Access-Control-Allow-Methods:
|
83
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
84
|
+
Access-Control-Allow-Origin:
|
85
|
+
- "*"
|
86
|
+
Age:
|
87
|
+
- '0'
|
88
|
+
Content-Type:
|
89
|
+
- application/json
|
90
|
+
Date:
|
91
|
+
- Fri, 20 Feb 2015 20:34:55 GMT
|
92
|
+
Server:
|
93
|
+
- nginx/1.4.6 (Ubuntu)
|
94
|
+
Vary:
|
95
|
+
- Accept-Encoding
|
96
|
+
Via:
|
97
|
+
- 1.1 varnish
|
98
|
+
X-Powered-By:
|
99
|
+
- PHP/5.5.9-1ubuntu4
|
100
|
+
X-Varnish:
|
101
|
+
- '133985085'
|
102
|
+
Content-Length:
|
103
|
+
- '386'
|
104
|
+
Connection:
|
105
|
+
- keep-alive
|
106
|
+
body:
|
107
|
+
encoding: UTF-8
|
108
|
+
string: |2-
|
109
|
+
|
110
|
+
{"data":{"type":"gif","id":"4u8WdgQEMVaj6","url":"http:\/\/giphy.com\/gifs\/cat-kitten-please-4u8WdgQEMVaj6","image_original_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/4u8WdgQEMVaj6\/giphy.gif","image_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/4u8WdgQEMVaj6\/giphy.gif","image_mp4_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/4u8WdgQEMVaj6\/giphy.mp4","image_frames":"95","image_width":"240","image_height":"181","fixed_height_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/4u8WdgQEMVaj6\/200_d.gif","fixed_height_downsampled_width":"265","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/4u8WdgQEMVaj6\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"151","fixed_height_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/4u8WdgQEMVaj6\/100.gif","fixed_height_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/4u8WdgQEMVaj6\/100_s.gif","fixed_height_small_width":"133","fixed_height_small_height":"100","fixed_width_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/4u8WdgQEMVaj6\/100w.gif","fixed_width_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/4u8WdgQEMVaj6\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"75","rating":"g","username":"","caption":"","tags":["cat","kitten","please","beg"]},"meta":{"status":200,"msg":"OK"}}
|
111
|
+
http_version:
|
112
|
+
recorded_at: Fri, 20 Feb 2015 20:35:08 GMT
|
113
|
+
- request:
|
114
|
+
method: get
|
115
|
+
uri: http://api.giphy.com/v1/gifs/random?api_key=key&tag=sloth
|
116
|
+
body:
|
117
|
+
encoding: US-ASCII
|
118
|
+
string: ''
|
119
|
+
headers:
|
120
|
+
Accept-Encoding:
|
121
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
122
|
+
Accept:
|
123
|
+
- "*/*"
|
124
|
+
User-Agent:
|
125
|
+
- Ruby
|
126
|
+
response:
|
127
|
+
status:
|
128
|
+
code: 200
|
129
|
+
message: OK
|
130
|
+
headers:
|
131
|
+
Accept-Ranges:
|
132
|
+
- bytes
|
133
|
+
Access-Control-Allow-Credentials:
|
134
|
+
- 'true'
|
135
|
+
Access-Control-Allow-Headers:
|
136
|
+
- Content-Type, Accept
|
137
|
+
Access-Control-Allow-Methods:
|
138
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
139
|
+
Access-Control-Allow-Origin:
|
140
|
+
- "*"
|
141
|
+
Age:
|
142
|
+
- '0'
|
143
|
+
Content-Type:
|
144
|
+
- application/json
|
145
|
+
Date:
|
146
|
+
- Fri, 20 Feb 2015 20:36:21 GMT
|
147
|
+
Server:
|
148
|
+
- nginx/1.4.6 (Ubuntu)
|
149
|
+
Vary:
|
150
|
+
- Accept-Encoding
|
151
|
+
Via:
|
152
|
+
- 1.1 varnish
|
153
|
+
X-Powered-By:
|
154
|
+
- PHP/5.5.9-1ubuntu4
|
155
|
+
X-Varnish:
|
156
|
+
- '133986589'
|
157
|
+
Content-Length:
|
158
|
+
- '403'
|
159
|
+
Connection:
|
160
|
+
- keep-alive
|
161
|
+
body:
|
162
|
+
encoding: UTF-8
|
163
|
+
string: |2-
|
164
|
+
|
165
|
+
{"data":{"type":"gif","id":"FsjDdnIRcroIM","url":"http:\/\/giphy.com\/gifs\/cheezburger-sloth-yawn-FsjDdnIRcroIM","image_original_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/FsjDdnIRcroIM\/giphy.gif","image_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/FsjDdnIRcroIM\/giphy.gif","image_mp4_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/FsjDdnIRcroIM\/giphy.mp4","image_frames":"90","image_width":"300","image_height":"169","fixed_height_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/FsjDdnIRcroIM\/200_d.gif","fixed_height_downsampled_width":"355","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/FsjDdnIRcroIM\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"113","fixed_height_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/FsjDdnIRcroIM\/100.gif","fixed_height_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/FsjDdnIRcroIM\/100_s.gif","fixed_height_small_width":"178","fixed_height_small_height":"100","fixed_width_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/FsjDdnIRcroIM\/100w.gif","fixed_width_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/FsjDdnIRcroIM\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"56","rating":"pg","username":"cheezburger","caption":"","tags":["animals","cute","tired","sloth","yawn"]},"meta":{"status":200,"msg":"OK"}}
|
166
|
+
http_version:
|
167
|
+
recorded_at: Fri, 20 Feb 2015 20:36:35 GMT
|
168
|
+
- request:
|
169
|
+
method: get
|
170
|
+
uri: http://api.giphy.com/v1/gifs/random?api_key=key&tag=bacon
|
171
|
+
body:
|
172
|
+
encoding: US-ASCII
|
173
|
+
string: ''
|
174
|
+
headers:
|
175
|
+
Accept-Encoding:
|
176
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
177
|
+
Accept:
|
178
|
+
- "*/*"
|
179
|
+
User-Agent:
|
180
|
+
- Ruby
|
181
|
+
response:
|
182
|
+
status:
|
183
|
+
code: 200
|
184
|
+
message: OK
|
185
|
+
headers:
|
186
|
+
Accept-Ranges:
|
187
|
+
- bytes
|
188
|
+
Access-Control-Allow-Credentials:
|
189
|
+
- 'true'
|
190
|
+
Access-Control-Allow-Headers:
|
191
|
+
- Content-Type, Accept
|
192
|
+
Access-Control-Allow-Methods:
|
193
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
194
|
+
Access-Control-Allow-Origin:
|
195
|
+
- "*"
|
196
|
+
Age:
|
197
|
+
- '0'
|
198
|
+
Content-Type:
|
199
|
+
- application/json
|
200
|
+
Date:
|
201
|
+
- Fri, 20 Feb 2015 20:38:16 GMT
|
202
|
+
Server:
|
203
|
+
- nginx/1.4.6 (Ubuntu)
|
204
|
+
Vary:
|
205
|
+
- Accept-Encoding
|
206
|
+
Via:
|
207
|
+
- 1.1 varnish
|
208
|
+
X-Powered-By:
|
209
|
+
- PHP/5.5.9-1ubuntu4
|
210
|
+
X-Varnish:
|
211
|
+
- '488618084'
|
212
|
+
Content-Length:
|
213
|
+
- '371'
|
214
|
+
Connection:
|
215
|
+
- keep-alive
|
216
|
+
body:
|
217
|
+
encoding: UTF-8
|
218
|
+
string: |2-
|
219
|
+
|
220
|
+
{"data":{"type":"gif","id":"La4sAOzY9H8L6","url":"http:\/\/giphy.com\/gifs\/bacon-La4sAOzY9H8L6","image_original_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/La4sAOzY9H8L6\/giphy.gif","image_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/La4sAOzY9H8L6\/giphy.gif","image_mp4_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/La4sAOzY9H8L6\/giphy.mp4","image_frames":"59","image_width":"500","image_height":"281","fixed_height_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/La4sAOzY9H8L6\/200_d.gif","fixed_height_downsampled_width":"356","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/La4sAOzY9H8L6\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"112","fixed_height_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/La4sAOzY9H8L6\/100.gif","fixed_height_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/La4sAOzY9H8L6\/100_s.gif","fixed_height_small_width":"178","fixed_height_small_height":"100","fixed_width_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/La4sAOzY9H8L6\/100w.gif","fixed_width_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/La4sAOzY9H8L6\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"56","rating":"g","username":"","caption":"","tags":["bacon"]},"meta":{"status":200,"msg":"OK"}}
|
221
|
+
http_version:
|
222
|
+
recorded_at: Fri, 20 Feb 2015 20:37:44 GMT
|
223
|
+
- request:
|
224
|
+
method: get
|
225
|
+
uri: http://api.giphy.com/v1/gifs/random?api_key=key&tag=trippy
|
226
|
+
body:
|
227
|
+
encoding: US-ASCII
|
228
|
+
string: ''
|
229
|
+
headers:
|
230
|
+
Accept-Encoding:
|
231
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
232
|
+
Accept:
|
233
|
+
- "*/*"
|
234
|
+
User-Agent:
|
235
|
+
- Ruby
|
236
|
+
response:
|
237
|
+
status:
|
238
|
+
code: 200
|
239
|
+
message: OK
|
240
|
+
headers:
|
241
|
+
Accept-Ranges:
|
242
|
+
- bytes
|
243
|
+
Access-Control-Allow-Credentials:
|
244
|
+
- 'true'
|
245
|
+
Access-Control-Allow-Headers:
|
246
|
+
- Content-Type, Accept
|
247
|
+
Access-Control-Allow-Methods:
|
248
|
+
- GET, POST, PUT, DELETE, OPTIONS
|
249
|
+
Access-Control-Allow-Origin:
|
250
|
+
- "*"
|
251
|
+
Age:
|
252
|
+
- '0'
|
253
|
+
Content-Type:
|
254
|
+
- application/json
|
255
|
+
Date:
|
256
|
+
- Fri, 20 Feb 2015 20:38:45 GMT
|
257
|
+
Server:
|
258
|
+
- nginx/1.4.6 (Ubuntu)
|
259
|
+
Vary:
|
260
|
+
- Accept-Encoding
|
261
|
+
Via:
|
262
|
+
- 1.1 varnish
|
263
|
+
X-Powered-By:
|
264
|
+
- PHP/5.5.9-1ubuntu4
|
265
|
+
X-Varnish:
|
266
|
+
- '298562229'
|
267
|
+
Content-Length:
|
268
|
+
- '396'
|
269
|
+
Connection:
|
270
|
+
- keep-alive
|
271
|
+
body:
|
272
|
+
encoding: UTF-8
|
273
|
+
string: |2-
|
274
|
+
|
275
|
+
{"data":{"type":"gif","id":"muAhZqHWt0bv2","url":"http:\/\/giphy.com\/gifs\/trippy-psychedelic-eye-muAhZqHWt0bv2","image_original_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/muAhZqHWt0bv2\/giphy.gif","image_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/muAhZqHWt0bv2\/giphy.gif","image_mp4_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/muAhZqHWt0bv2\/giphy.mp4","image_frames":"19","image_width":"500","image_height":"369","fixed_height_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/muAhZqHWt0bv2\/200_d.gif","fixed_height_downsampled_width":"271","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/muAhZqHWt0bv2\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"148","fixed_height_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/muAhZqHWt0bv2\/100.gif","fixed_height_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/muAhZqHWt0bv2\/100_s.gif","fixed_height_small_width":"136","fixed_height_small_height":"100","fixed_width_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/muAhZqHWt0bv2\/100w.gif","fixed_width_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/muAhZqHWt0bv2\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"74","rating":"y","username":"","caption":"","tags":["trippy","psychedelic","eye","camera","flash"]},"meta":{"status":200,"msg":"OK"}}
|
276
|
+
http_version:
|
277
|
+
recorded_at: Fri, 20 Feb 2015 20:38:45 GMT
|
278
|
+
- request:
|
279
|
+
method: get
|
280
|
+
uri: http://api.giphy.com//gifs/random?api_key=
|
281
|
+
body:
|
282
|
+
encoding: US-ASCII
|
283
|
+
string: ''
|
284
|
+
headers:
|
285
|
+
Accept-Encoding:
|
286
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
287
|
+
Accept:
|
288
|
+
- "*/*"
|
289
|
+
User-Agent:
|
290
|
+
- Ruby
|
291
|
+
response:
|
292
|
+
status:
|
293
|
+
code: 404
|
294
|
+
message: Not Found
|
295
|
+
headers:
|
296
|
+
Accept-Ranges:
|
297
|
+
- bytes
|
298
|
+
Age:
|
299
|
+
- '0'
|
300
|
+
Content-Type:
|
301
|
+
- application/json
|
302
|
+
Date:
|
303
|
+
- Sun, 22 Feb 2015 01:34:34 GMT
|
304
|
+
Server:
|
305
|
+
- nginx/1.4.6 (Ubuntu)
|
306
|
+
Vary:
|
307
|
+
- Accept-Encoding
|
308
|
+
Via:
|
309
|
+
- 1.1 varnish
|
310
|
+
X-Powered-By:
|
311
|
+
- PHP/5.5.9-1ubuntu4
|
312
|
+
X-Varnish:
|
313
|
+
- '490645020'
|
314
|
+
Content-Length:
|
315
|
+
- '63'
|
316
|
+
Connection:
|
317
|
+
- keep-alive
|
318
|
+
body:
|
319
|
+
encoding: UTF-8
|
320
|
+
string: |2-
|
321
|
+
|
322
|
+
{"meta":{"status":404,"msg":"Not Found!"}}
|
323
|
+
http_version:
|
324
|
+
recorded_at: Sun, 22 Feb 2015 01:34:00 GMT
|
325
|
+
- request:
|
326
|
+
method: get
|
327
|
+
uri: http://api.giphy.com//gifs/random?api_key=&tag=cat
|
328
|
+
body:
|
329
|
+
encoding: US-ASCII
|
330
|
+
string: ''
|
331
|
+
headers:
|
332
|
+
Accept-Encoding:
|
333
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
334
|
+
Accept:
|
335
|
+
- "*/*"
|
336
|
+
User-Agent:
|
337
|
+
- Ruby
|
338
|
+
response:
|
339
|
+
status:
|
340
|
+
code: 404
|
341
|
+
message: Not Found
|
342
|
+
headers:
|
343
|
+
Accept-Ranges:
|
344
|
+
- bytes
|
345
|
+
Age:
|
346
|
+
- '0'
|
347
|
+
Content-Type:
|
348
|
+
- application/json
|
349
|
+
Date:
|
350
|
+
- Sun, 22 Feb 2015 01:33:35 GMT
|
351
|
+
Server:
|
352
|
+
- nginx/1.4.6 (Ubuntu)
|
353
|
+
Vary:
|
354
|
+
- Accept-Encoding
|
355
|
+
Via:
|
356
|
+
- 1.1 varnish
|
357
|
+
X-Powered-By:
|
358
|
+
- PHP/5.5.9-1ubuntu4
|
359
|
+
X-Varnish:
|
360
|
+
- '1927175401'
|
361
|
+
Content-Length:
|
362
|
+
- '63'
|
363
|
+
Connection:
|
364
|
+
- keep-alive
|
365
|
+
body:
|
366
|
+
encoding: UTF-8
|
367
|
+
string: |2-
|
368
|
+
|
369
|
+
{"meta":{"status":404,"msg":"Not Found!"}}
|
370
|
+
http_version:
|
371
|
+
recorded_at: Sun, 22 Feb 2015 01:34:00 GMT
|
372
|
+
- request:
|
373
|
+
method: get
|
374
|
+
uri: http://api.giphy.com//gifs/random?api_key=&tag=sloth
|
375
|
+
body:
|
376
|
+
encoding: US-ASCII
|
377
|
+
string: ''
|
378
|
+
headers:
|
379
|
+
Accept-Encoding:
|
380
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
381
|
+
Accept:
|
382
|
+
- "*/*"
|
383
|
+
User-Agent:
|
384
|
+
- Ruby
|
385
|
+
response:
|
386
|
+
status:
|
387
|
+
code: 404
|
388
|
+
message: Not Found
|
389
|
+
headers:
|
390
|
+
Accept-Ranges:
|
391
|
+
- bytes
|
392
|
+
Age:
|
393
|
+
- '0'
|
394
|
+
Content-Type:
|
395
|
+
- application/json
|
396
|
+
Date:
|
397
|
+
- Sun, 22 Feb 2015 01:33:58 GMT
|
398
|
+
Server:
|
399
|
+
- nginx/1.4.6 (Ubuntu)
|
400
|
+
Vary:
|
401
|
+
- Accept-Encoding
|
402
|
+
Via:
|
403
|
+
- 1.1 varnish
|
404
|
+
X-Powered-By:
|
405
|
+
- PHP/5.5.9-1ubuntu4
|
406
|
+
X-Varnish:
|
407
|
+
- '300518237'
|
408
|
+
Content-Length:
|
409
|
+
- '63'
|
410
|
+
Connection:
|
411
|
+
- keep-alive
|
412
|
+
body:
|
413
|
+
encoding: UTF-8
|
414
|
+
string: |2-
|
415
|
+
|
416
|
+
{"meta":{"status":404,"msg":"Not Found!"}}
|
417
|
+
http_version:
|
418
|
+
recorded_at: Sun, 22 Feb 2015 01:34:01 GMT
|
419
|
+
- request:
|
420
|
+
method: get
|
421
|
+
uri: http://api.giphy.com//gifs/random?api_key=&tag=bacon
|
422
|
+
body:
|
423
|
+
encoding: US-ASCII
|
424
|
+
string: ''
|
425
|
+
headers:
|
426
|
+
Accept-Encoding:
|
427
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
428
|
+
Accept:
|
429
|
+
- "*/*"
|
430
|
+
User-Agent:
|
431
|
+
- Ruby
|
432
|
+
response:
|
433
|
+
status:
|
434
|
+
code: 404
|
435
|
+
message: Not Found
|
436
|
+
headers:
|
437
|
+
Accept-Ranges:
|
438
|
+
- bytes
|
439
|
+
Age:
|
440
|
+
- '0'
|
441
|
+
Content-Type:
|
442
|
+
- application/json
|
443
|
+
Date:
|
444
|
+
- Sun, 22 Feb 2015 01:33:46 GMT
|
445
|
+
Server:
|
446
|
+
- nginx/1.4.6 (Ubuntu)
|
447
|
+
Vary:
|
448
|
+
- Accept-Encoding
|
449
|
+
Via:
|
450
|
+
- 1.1 varnish
|
451
|
+
X-Powered-By:
|
452
|
+
- PHP/5.5.9-1ubuntu4
|
453
|
+
X-Varnish:
|
454
|
+
- '136002449'
|
455
|
+
Content-Length:
|
456
|
+
- '63'
|
457
|
+
Connection:
|
458
|
+
- keep-alive
|
459
|
+
body:
|
460
|
+
encoding: UTF-8
|
461
|
+
string: |2-
|
462
|
+
|
463
|
+
{"meta":{"status":404,"msg":"Not Found!"}}
|
464
|
+
http_version:
|
465
|
+
recorded_at: Sun, 22 Feb 2015 01:34:01 GMT
|
466
|
+
- request:
|
467
|
+
method: get
|
468
|
+
uri: http://api.giphy.com//gifs/random?api_key=&tag=trippy
|
469
|
+
body:
|
470
|
+
encoding: US-ASCII
|
471
|
+
string: ''
|
472
|
+
headers:
|
473
|
+
Accept-Encoding:
|
474
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
475
|
+
Accept:
|
476
|
+
- "*/*"
|
477
|
+
User-Agent:
|
478
|
+
- Ruby
|
479
|
+
response:
|
480
|
+
status:
|
481
|
+
code: 404
|
482
|
+
message: Not Found
|
483
|
+
headers:
|
484
|
+
Accept-Ranges:
|
485
|
+
- bytes
|
486
|
+
Age:
|
487
|
+
- '0'
|
488
|
+
Content-Type:
|
489
|
+
- application/json
|
490
|
+
Date:
|
491
|
+
- Sun, 22 Feb 2015 01:33:36 GMT
|
492
|
+
Server:
|
493
|
+
- nginx/1.4.6 (Ubuntu)
|
494
|
+
Vary:
|
495
|
+
- Accept-Encoding
|
496
|
+
Via:
|
497
|
+
- 1.1 varnish
|
498
|
+
X-Powered-By:
|
499
|
+
- PHP/5.5.9-1ubuntu4
|
500
|
+
X-Varnish:
|
501
|
+
- '1927175417'
|
502
|
+
Content-Length:
|
503
|
+
- '63'
|
504
|
+
Connection:
|
505
|
+
- keep-alive
|
506
|
+
body:
|
507
|
+
encoding: UTF-8
|
508
|
+
string: |2-
|
509
|
+
|
510
|
+
{"meta":{"status":404,"msg":"Not Found!"}}
|
511
|
+
http_version:
|
512
|
+
recorded_at: Sun, 22 Feb 2015 01:34:01 GMT
|
513
|
+
recorded_with: VCR 2.9.3
|