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,189 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://slack.com/api/channels.history?channel=C0000001&count=2&token=slack_token
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
+ Access-Control-Allow-Origin:
22
+ - "*"
23
+ Cache-Control:
24
+ - private, no-cache, no-store, must-revalidate
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Date:
28
+ - Sun, 22 Feb 2015 02:54:54 GMT
29
+ Expires:
30
+ - Mon, 26 Jul 1997 05:00:00 GMT
31
+ Pragma:
32
+ - no-cache
33
+ Server:
34
+ - Apache
35
+ Strict-Transport-Security:
36
+ - max-age=31536000; includeSubDomains; preload
37
+ Vary:
38
+ - Accept-Encoding
39
+ X-Accepted-Oauth-Scopes:
40
+ - read
41
+ X-Content-Type-Options:
42
+ - nosniff
43
+ X-Oauth-Scopes:
44
+ - identify,read,post,client,admin
45
+ X-Xss-Protection:
46
+ - '0'
47
+ Content-Length:
48
+ - '164'
49
+ Connection:
50
+ - keep-alive
51
+ body:
52
+ encoding: UTF-8
53
+ string: '{"ok":true,"messages":[{"type":"message","user":"U02TK3RKG","text":"Took
54
+ over 5000 steps to shovel","ts":"1424559066.000043"},{"type":"message","user":"U02TERHJX","text":"Heh","ts":"1424543398.000042"}],"has_more":true}'
55
+ http_version:
56
+ recorded_at: Sun, 22 Feb 2015 02:54:54 GMT
57
+ - request:
58
+ method: get
59
+ uri: https://slack.com/api/channels.history?channel=C0000001&count=2&token=slack_token
60
+ body:
61
+ encoding: US-ASCII
62
+ string: ''
63
+ headers:
64
+ Accept-Encoding:
65
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
66
+ Accept:
67
+ - "*/*"
68
+ User-Agent:
69
+ - Ruby
70
+ response:
71
+ status:
72
+ code: 200
73
+ message: OK
74
+ headers:
75
+ Access-Control-Allow-Origin:
76
+ - "*"
77
+ Cache-Control:
78
+ - private, no-cache, no-store, must-revalidate
79
+ Content-Type:
80
+ - application/json; charset=utf-8
81
+ Date:
82
+ - Sun, 22 Feb 2015 02:56:08 GMT
83
+ Expires:
84
+ - Mon, 26 Jul 1997 05:00:00 GMT
85
+ Pragma:
86
+ - no-cache
87
+ Server:
88
+ - Apache
89
+ Strict-Transport-Security:
90
+ - max-age=31536000; includeSubDomains; preload
91
+ Vary:
92
+ - Accept-Encoding
93
+ X-Accepted-Oauth-Scopes:
94
+ - read
95
+ X-Content-Type-Options:
96
+ - nosniff
97
+ X-Oauth-Scopes:
98
+ - identify,read,post,client,admin
99
+ X-Xss-Protection:
100
+ - '0'
101
+ Content-Length:
102
+ - '310'
103
+ Connection:
104
+ - keep-alive
105
+ body:
106
+ encoding: UTF-8
107
+ string: '{"ok":true,"messages":[{"username":"","text":"Here you go, dvg\n\n<http:\/\/i.imgflip.com\/gmvgk.jpg>","bot_id":"B02TFUM6S","attachments":[{"from_url":"http:\/\/i.imgflip.com\/gmvgk.jpg","fallback":"500x500px
108
+ image","image_url":"http:\/\/i.imgflip.com\/gmvgk.jpg","image_width":500,"image_height":500,"image_bytes":17919,"id":1}],"type":"message","subtype":"bot_message","ts":"1421810229.000007"},{"type":"message","user":"U02TEDJGF","text":"Jarvis
109
+ success kid thing, thing","ts":"1421810228.000006"}],"has_more":true}'
110
+ http_version:
111
+ recorded_at: Sun, 22 Feb 2015 02:56:08 GMT
112
+ - request:
113
+ method: post
114
+ uri: https://api.twitter.com/1.1/statuses/update.json
115
+ body:
116
+ encoding: UTF-8
117
+ string: status=Jarvis+success+kid+thing%2C+thing
118
+ headers:
119
+ Accept:
120
+ - application/json
121
+ User-Agent:
122
+ - TwitterRubyGem/5.14.0
123
+ Authorization:
124
+ - OAuth oauth_consumer_key="twitter_consumer_key", oauth_nonce="blah",
125
+ oauth_signature="nkSyDGscZcmm3E6j1tJon0PigdU%3D", oauth_signature_method="HMAC-SHA1",
126
+ oauth_timestamp="1424573768", oauth_token="twitter_access_token",
127
+ oauth_version="1.0"
128
+ Content-Type:
129
+ - application/x-www-form-urlencoded
130
+ Accept-Encoding:
131
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
132
+ response:
133
+ status:
134
+ code: 200
135
+ message: OK
136
+ headers:
137
+ Cache-Control:
138
+ - no-cache, no-store, must-revalidate, pre-check=0, post-check=0
139
+ Content-Disposition:
140
+ - attachment; filename=json.json
141
+ Content-Length:
142
+ - '812'
143
+ Content-Type:
144
+ - application/json;charset=utf-8
145
+ Date:
146
+ - Sun, 22 Feb 2015 02:56:09 UTC
147
+ Expires:
148
+ - Tue, 31 Mar 1981 05:00:00 GMT
149
+ Last-Modified:
150
+ - Sun, 22 Feb 2015 02:56:09 GMT
151
+ Pragma:
152
+ - no-cache
153
+ Server:
154
+ - tsa_a
155
+ Set-Cookie:
156
+ - guest_id=v1%3A142457376905829401; Domain=.twitter.com; Path=/; Expires=Tue,
157
+ 21-Feb-2017 02:56:09 UTC
158
+ - lang=en
159
+ Status:
160
+ - 200 OK
161
+ Strict-Transport-Security:
162
+ - max-age=631138519
163
+ X-Access-Level:
164
+ - read-write
165
+ X-Connection-Hash:
166
+ - d66980f0c1e6d9f2d64a5803c862d92c
167
+ X-Content-Type-Options:
168
+ - nosniff
169
+ X-Frame-Options:
170
+ - SAMEORIGIN
171
+ X-Response-Time:
172
+ - '126'
173
+ X-Transaction:
174
+ - 51f9a0fef4ef5cab
175
+ X-Twitter-Response-Tags:
176
+ - BouncerCompliant
177
+ X-Xss-Protection:
178
+ - 1; mode=block
179
+ body:
180
+ encoding: UTF-8
181
+ string: '{"created_at":"Sun Feb 22 02:56:09 +0000 2015","id":569329768350380032,"id_str":"569329768350380032","text":"Jarvis
182
+ success kid thing, thing","source":"\u003ca href=\"http:\/\/placeholderjarviscat.net\"
183
+ rel=\"nofollow\"\u003eCatPenTwitter\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":2859748697,"id_str":"2859748697","name":"The
184
+ Cat Pen","screen_name":"twitter_handle","location":"","profile_location":null,"description":"","url":null,"entities":{"description":{"urls":[]}},"protected":false,"followers_count":6,"friends_count":9,"listed_count":0,"created_at":"Tue
185
+ Nov 04 01:23:34 +0000 2014","favourites_count":1,"utc_offset":-18000,"time_zone":"Eastern
186
+ Time (US & Canada)","geo_enabled":false,"verified":false,"statuses_count":28,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_tile":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/529445226608218112\/yodLdvk3_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/529445226608218112\/yodLdvk3_normal.jpeg","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":true,"default_profile_image":false,"following":false,"follow_request_sent":false,"notifications":false},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[]},"favorited":false,"retweeted":false,"lang":"en"}'
187
+ http_version:
188
+ recorded_at: Sun, 22 Feb 2015 02:56:09 GMT
189
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,346 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.zippopotam.us/us/90201
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
+ Date:
22
+ - Sun, 22 Feb 2015 00:06:30 GMT
23
+ Server:
24
+ - Apache/2.4.7
25
+ Content-Length:
26
+ - '216'
27
+ X-Cache:
28
+ - hit
29
+ Charset:
30
+ - UTF-8
31
+ Vary:
32
+ - Accept-Encoding
33
+ Access-Control-Allow-Origin:
34
+ - "*"
35
+ Content-Type:
36
+ - application/json
37
+ body:
38
+ encoding: UTF-8
39
+ string: '{"post code": "90201", "country": "United States", "country abbreviation":
40
+ "US", "places": [{"place name": "Bell", "longitude": "-118.1689", "state":
41
+ "California", "state abbreviation": "CA", "latitude": "33.9767"}]}'
42
+ http_version:
43
+ recorded_at: Sun, 22 Feb 2015 00:06:30 GMT
44
+ - request:
45
+ method: get
46
+ uri: http://api.zippopotam.us/us/90201
47
+ body:
48
+ encoding: US-ASCII
49
+ string: ''
50
+ headers:
51
+ Accept-Encoding:
52
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
53
+ Accept:
54
+ - "*/*"
55
+ User-Agent:
56
+ - Ruby
57
+ response:
58
+ status:
59
+ code: 200
60
+ message: OK
61
+ headers:
62
+ Date:
63
+ - Sun, 22 Feb 2015 01:11:54 GMT
64
+ Server:
65
+ - Apache/2.2.15 (CentOS)
66
+ Content-Length:
67
+ - '216'
68
+ X-Cache:
69
+ - hit
70
+ Charset:
71
+ - UTF-8
72
+ Vary:
73
+ - Accept-Encoding
74
+ Access-Control-Allow-Origin:
75
+ - "*"
76
+ Connection:
77
+ - close
78
+ Content-Type:
79
+ - application/json
80
+ body:
81
+ encoding: UTF-8
82
+ string: '{"post code": "90201", "country": "United States", "country abbreviation":
83
+ "US", "places": [{"place name": "Bell", "longitude": "-118.1689", "state":
84
+ "California", "state abbreviation": "CA", "latitude": "33.9767"}]}'
85
+ http_version:
86
+ recorded_at: Sun, 22 Feb 2015 00:08:25 GMT
87
+ - request:
88
+ method: get
89
+ uri: http://api.zippopotam.us/us/90201
90
+ body:
91
+ encoding: US-ASCII
92
+ string: ''
93
+ headers:
94
+ Accept-Encoding:
95
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
96
+ Accept:
97
+ - "*/*"
98
+ User-Agent:
99
+ - Ruby
100
+ response:
101
+ status:
102
+ code: 200
103
+ message: OK
104
+ headers:
105
+ Date:
106
+ - Sun, 22 Feb 2015 00:08:30 GMT
107
+ Server:
108
+ - Apache/2.4.7
109
+ Content-Length:
110
+ - '216'
111
+ X-Cache:
112
+ - hit
113
+ Charset:
114
+ - UTF-8
115
+ Vary:
116
+ - Accept-Encoding
117
+ Access-Control-Allow-Origin:
118
+ - "*"
119
+ Content-Type:
120
+ - application/json
121
+ body:
122
+ encoding: UTF-8
123
+ string: '{"post code": "90201", "country": "United States", "country abbreviation":
124
+ "US", "places": [{"place name": "Bell", "longitude": "-118.1689", "state":
125
+ "California", "state abbreviation": "CA", "latitude": "33.9767"}]}'
126
+ http_version:
127
+ recorded_at: Sun, 22 Feb 2015 00:08:30 GMT
128
+ - request:
129
+ method: get
130
+ uri: http://api.zippopotam.us/us/90210
131
+ body:
132
+ encoding: US-ASCII
133
+ string: ''
134
+ headers:
135
+ Accept-Encoding:
136
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
137
+ Accept:
138
+ - "*/*"
139
+ User-Agent:
140
+ - Ruby
141
+ response:
142
+ status:
143
+ code: 200
144
+ message: OK
145
+ headers:
146
+ Date:
147
+ - Sun, 22 Feb 2015 00:10:03 GMT
148
+ Server:
149
+ - Apache/2.4.7
150
+ Content-Length:
151
+ - '225'
152
+ X-Cache:
153
+ - hit
154
+ Charset:
155
+ - UTF-8
156
+ Vary:
157
+ - Accept-Encoding
158
+ Access-Control-Allow-Origin:
159
+ - "*"
160
+ Content-Type:
161
+ - application/json
162
+ body:
163
+ encoding: UTF-8
164
+ string: '{"post code": "90210", "country": "United States", "country abbreviation":
165
+ "US", "places": [{"place name": "Beverly Hills", "longitude": "-118.4065",
166
+ "state": "California", "state abbreviation": "CA", "latitude": "34.0901"}]}'
167
+ http_version:
168
+ recorded_at: Sun, 22 Feb 2015 00:10:03 GMT
169
+ - request:
170
+ method: get
171
+ uri: http://api.openweathermap.org/data/2.5/weather?q=Beverly%20Hills,%20CA
172
+ body:
173
+ encoding: US-ASCII
174
+ string: ''
175
+ headers:
176
+ Accept-Encoding:
177
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
178
+ Accept:
179
+ - "*/*"
180
+ User-Agent:
181
+ - Ruby
182
+ response:
183
+ status:
184
+ code: 200
185
+ message: OK
186
+ headers:
187
+ Server:
188
+ - nginx
189
+ Date:
190
+ - Sun, 22 Feb 2015 00:24:09 GMT
191
+ Content-Type:
192
+ - application/json; charset=utf-8
193
+ Transfer-Encoding:
194
+ - chunked
195
+ Connection:
196
+ - keep-alive
197
+ X-Source:
198
+ - back
199
+ Access-Control-Allow-Origin:
200
+ - "*"
201
+ Access-Control-Allow-Credentials:
202
+ - 'true'
203
+ Access-Control-Allow-Methods:
204
+ - GET, POST
205
+ body:
206
+ encoding: UTF-8
207
+ string: |
208
+ {"coord":{"lon":-118.4,"lat":34.07},"sys":{"message":0.0204,"country":"United States of America","sunrise":1424615395,"sunset":1424655844},"weather":[{"id":800,"main":"Clear","description":"Sky is Clear","icon":"01n"}],"base":"cmc stations","main":{"temp":289.548,"temp_min":289.548,"temp_max":289.548,"pressure":953.79,"sea_level":1023.75,"grnd_level":953.79,"humidity":59},"wind":{"speed":1.22,"deg":208},"clouds":{"all":0},"dt":1424564559,"id":5328041,"name":"Beverly Hills","cod":200}
209
+ http_version:
210
+ recorded_at: Sun, 22 Feb 2015 00:24:10 GMT
211
+ - request:
212
+ method: get
213
+ uri: http://api.zippopotam.us/us/
214
+ body:
215
+ encoding: US-ASCII
216
+ string: ''
217
+ headers:
218
+ Accept-Encoding:
219
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
220
+ Accept:
221
+ - "*/*"
222
+ User-Agent:
223
+ - Ruby
224
+ response:
225
+ status:
226
+ code: 404
227
+ message: Not Found
228
+ headers:
229
+ Date:
230
+ - Sun, 22 Feb 2015 02:37:32 GMT
231
+ Server:
232
+ - Apache/2.2.15 (CentOS)
233
+ Content-Length:
234
+ - '729'
235
+ Connection:
236
+ - close
237
+ Content-Type:
238
+ - text/html; charset=UTF-8
239
+ body:
240
+ encoding: UTF-8
241
+ string: |2
242
+
243
+ <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
244
+ <html>
245
+ <head>
246
+ <title>Error: 404 Not Found</title>
247
+ <style type="text/css">
248
+ html {background-color: #eee; font-family: sans;}
249
+ body {background-color: #fff; border: 1px solid #ddd;
250
+ padding: 15px; margin: 15px;}
251
+ pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}
252
+ </style>
253
+ </head>
254
+ <body>
255
+ <h1>Error: 404 Not Found</h1>
256
+ <p>Sorry, the requested URL <tt>&#039;http://api.zippopotam.us/us/&#039;</tt>
257
+ caused an error:</p>
258
+ <pre>Not found: &#039;/us/&#039;</pre>
259
+ </body>
260
+ </html>
261
+ http_version:
262
+ recorded_at: Sun, 22 Feb 2015 01:34:01 GMT
263
+ - request:
264
+ method: get
265
+ uri: http://api.zippopotam.us/us/43123
266
+ body:
267
+ encoding: US-ASCII
268
+ string: ''
269
+ headers:
270
+ Accept-Encoding:
271
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
272
+ Accept:
273
+ - "*/*"
274
+ User-Agent:
275
+ - Ruby
276
+ response:
277
+ status:
278
+ code: 200
279
+ message: OK
280
+ headers:
281
+ Date:
282
+ - Sun, 22 Feb 2015 01:35:25 GMT
283
+ Server:
284
+ - Apache/2.4.7
285
+ Content-Length:
286
+ - '215'
287
+ X-Cache:
288
+ - hit
289
+ Charset:
290
+ - UTF-8
291
+ Vary:
292
+ - Accept-Encoding
293
+ Access-Control-Allow-Origin:
294
+ - "*"
295
+ Content-Type:
296
+ - application/json
297
+ body:
298
+ encoding: UTF-8
299
+ string: '{"post code": "43123", "country": "United States", "country abbreviation":
300
+ "US", "places": [{"place name": "Grove City", "longitude": "-83.0839", "state":
301
+ "Ohio", "state abbreviation": "OH", "latitude": "39.8814"}]}'
302
+ http_version:
303
+ recorded_at: Sun, 22 Feb 2015 01:35:25 GMT
304
+ - request:
305
+ method: get
306
+ uri: http://api.openweathermap.org/data/2.5/weather?q=Grove%20City,%20OH
307
+ body:
308
+ encoding: US-ASCII
309
+ string: ''
310
+ headers:
311
+ Accept-Encoding:
312
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
313
+ Accept:
314
+ - "*/*"
315
+ User-Agent:
316
+ - Ruby
317
+ response:
318
+ status:
319
+ code: 200
320
+ message: OK
321
+ headers:
322
+ Server:
323
+ - nginx
324
+ Date:
325
+ - Sun, 22 Feb 2015 01:35:26 GMT
326
+ Content-Type:
327
+ - application/json; charset=utf-8
328
+ Transfer-Encoding:
329
+ - chunked
330
+ Connection:
331
+ - keep-alive
332
+ X-Source:
333
+ - back
334
+ Access-Control-Allow-Origin:
335
+ - "*"
336
+ Access-Control-Allow-Credentials:
337
+ - 'true'
338
+ Access-Control-Allow-Methods:
339
+ - GET, POST
340
+ body:
341
+ encoding: UTF-8
342
+ string: |
343
+ {"coord":{"lon":-83.07,"lat":39.87},"sys":{"message":0.0192,"country":"United States of America","sunrise":1424607288,"sunset":1424646995},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"base":"cmc stations","main":{"temp":275.184,"temp_min":275.184,"temp_max":275.184,"pressure":993.5,"sea_level":1029.58,"grnd_level":993.5,"humidity":94},"wind":{"speed":2.16,"deg":359.501},"clouds":{"all":88},"rain":{"3h":2},"dt":1424568926,"id":4513409,"name":"Grove City","cod":200}
344
+ http_version:
345
+ recorded_at: Sun, 22 Feb 2015 01:35:26 GMT
346
+ recorded_with: VCR 2.9.3