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,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.giphy.com/v1/gifs/random?api_key=key&tag=sloth
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Accept-Ranges:
22
+ - bytes
23
+ Access-Control-Allow-Credentials:
24
+ - 'true'
25
+ Access-Control-Allow-Headers:
26
+ - Content-Type, Accept
27
+ Access-Control-Allow-Methods:
28
+ - GET, POST, PUT, DELETE, OPTIONS
29
+ Access-Control-Allow-Origin:
30
+ - "*"
31
+ Age:
32
+ - '0'
33
+ Content-Type:
34
+ - application/json
35
+ Date:
36
+ - Fri, 20 Feb 2015 20:44:15 GMT
37
+ Server:
38
+ - nginx/1.4.6 (Ubuntu)
39
+ Vary:
40
+ - Accept-Encoding
41
+ Via:
42
+ - 1.1 varnish
43
+ X-Powered-By:
44
+ - PHP/5.5.9-1ubuntu4
45
+ X-Varnish:
46
+ - '531912009'
47
+ Content-Length:
48
+ - '426'
49
+ Connection:
50
+ - keep-alive
51
+ body:
52
+ encoding: UTF-8
53
+ string: |2-
54
+
55
+ {"data":{"type":"gif","id":"upNoNLqei1FVS","url":"http:\/\/giphy.com\/gifs\/sloth-eating-upNoNLqei1FVS","image_original_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/upNoNLqei1FVS\/giphy.gif","image_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/upNoNLqei1FVS\/giphy.gif","image_mp4_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/upNoNLqei1FVS\/giphy.mp4","image_frames":"53","image_width":"245","image_height":"184","fixed_height_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/upNoNLqei1FVS\/200_d.gif","fixed_height_downsampled_width":"266","fixed_height_downsampled_height":"200","fixed_width_downsampled_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/upNoNLqei1FVS\/200w_d.gif","fixed_width_downsampled_width":"200","fixed_width_downsampled_height":"150","fixed_height_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/upNoNLqei1FVS\/100.gif","fixed_height_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/upNoNLqei1FVS\/100_s.gif","fixed_height_small_width":"133","fixed_height_small_height":"100","fixed_width_small_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/upNoNLqei1FVS\/100w.gif","fixed_width_small_still_url":"http:\/\/s3.amazonaws.com\/giphymedia\/media\/upNoNLqei1FVS\/100w_s.gif","fixed_width_small_width":"100","fixed_width_small_height":"75","rating":"g","username":"","caption":"warholing beyonces me myself and i playing","tags":["animals","eating","sloth","lazy","relaxed"]},"meta":{"status":200,"msg":"OK"}}
56
+ http_version:
57
+ recorded_at: Fri, 20 Feb 2015 20:44:27 GMT
58
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,44 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://iheartquotes.com/api/v1/random?format=json
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
+ Connection:
22
+ - close
23
+ Etag:
24
+ - '"1246206a1dbc0940dace67e61cdbb2d8"'
25
+ X-Ua-Compatible:
26
+ - IE=Edge,chrome=1
27
+ Date:
28
+ - Sat, 21 Feb 2015 03:10:33 GMT
29
+ X-Runtime:
30
+ - '0.082495'
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ Cache-Control:
34
+ - max-age=0, private, must-revalidate
35
+ Server:
36
+ - thin 1.2.6 codename Crazy Delicious
37
+ Via:
38
+ - 1.1 vegur
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"json_class":"Fortune","tags":["vulgar","dictionary","1811_dictionary_of_the_vulgar_tongue","captain_grose"],"quote":"A random quote goes here"}'
42
+ http_version:
43
+ recorded_at: Sat, 21 Feb 2015 03:10:33 GMT
44
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,44 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://iheartquotes.com/api/v1/random?format=json&source=simpsons_homer
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
+ Connection:
22
+ - close
23
+ Etag:
24
+ - '"50e4925f21434704b52f82b716001c78"'
25
+ X-Ua-Compatible:
26
+ - IE=Edge,chrome=1
27
+ Date:
28
+ - Sat, 21 Feb 2015 03:11:17 GMT
29
+ X-Runtime:
30
+ - '0.014774'
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ Cache-Control:
34
+ - max-age=0, private, must-revalidate
35
+ Server:
36
+ - thin 1.2.6 codename Crazy Delicious
37
+ Via:
38
+ - 1.1 vegur
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"json_class":"Fortune","tags":["simpsons_homer"],"quote":"Marge: I would love you if you weighed 1,000 pounds but ...","link":"http://iheartquotes.com/fortune/show/5682","source":"simpsons_homer"}'
42
+ http_version:
43
+ recorded_at: Sat, 21 Feb 2015 03:11:17 GMT
44
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,44 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://iheartquotes.com/api/v1/random?format=json&source=starwars
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
+ Connection:
22
+ - close
23
+ Etag:
24
+ - '"e385abda7959a63f3705f95ab9caf46d"'
25
+ X-Ua-Compatible:
26
+ - IE=Edge,chrome=1
27
+ Date:
28
+ - Sat, 21 Feb 2015 03:12:35 GMT
29
+ X-Runtime:
30
+ - '0.010135'
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ Cache-Control:
34
+ - max-age=0, private, must-revalidate
35
+ Server:
36
+ - thin 1.2.6 codename Crazy Delicious
37
+ Via:
38
+ - 1.1 vegur
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"json_class":"Fortune","tags":["starwars"],"quote":"Emperor Palpatine Strike me down with all of your hatred and your journey towards the dark side will be complete!","link":"http://iheartquotes.com/fortune/show/1308","source":"starwars"}'
42
+ http_version:
43
+ recorded_at: Sat, 21 Feb 2015 03:12:35 GMT
44
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,211 @@
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 03:23:50 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
+ - '310'
49
+ Connection:
50
+ - keep-alive
51
+ body:
52
+ encoding: UTF-8
53
+ 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
54
+ 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
55
+ success kid thing, thing","ts":"1421810228.000006"}],"has_more":true}'
56
+ http_version:
57
+ recorded_at: Sun, 22 Feb 2015 03:23:50 GMT
58
+ - request:
59
+ method: post
60
+ uri: https://api.twitter.com/1.1/statuses/update.json
61
+ body:
62
+ encoding: UTF-8
63
+ string: status=Jarvis+success+kid+thing%2C+thing
64
+ headers:
65
+ Accept:
66
+ - application/json
67
+ User-Agent:
68
+ - TwitterRubyGem/5.14.0
69
+ Authorization:
70
+ - OAuth oauth_consumer_key="twitter_consumer_key", oauth_nonce="110cbb77f4ca6d9971184708027e18c3",
71
+ oauth_signature="diw6%2Fpa01qZMzh8%2FLOXFqfNO6qg%3D", oauth_signature_method="HMAC-SHA1",
72
+ oauth_timestamp="1424575430", oauth_token="twitter_access_token",
73
+ oauth_version="1.0"
74
+ Content-Type:
75
+ - application/x-www-form-urlencoded
76
+ Accept-Encoding:
77
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
78
+ response:
79
+ status:
80
+ code: 403
81
+ message: Forbidden
82
+ headers:
83
+ Cache-Control:
84
+ - no-cache, no-store, must-revalidate, pre-check=0, post-check=0
85
+ Content-Disposition:
86
+ - attachment; filename=json.json
87
+ Content-Length:
88
+ - '85'
89
+ Content-Type:
90
+ - application/json;charset=utf-8
91
+ Date:
92
+ - Sun, 22 Feb 2015 03:23:51 UTC
93
+ Expires:
94
+ - Tue, 31 Mar 1981 05:00:00 GMT
95
+ Last-Modified:
96
+ - Sun, 22 Feb 2015 03:23:51 GMT
97
+ Pragma:
98
+ - no-cache
99
+ Server:
100
+ - tsa_a
101
+ Set-Cookie:
102
+ - guest_id=v1%3A142457543142106229; Domain=.twitter.com; Path=/; Expires=Tue,
103
+ 21-Feb-2017 03:23:51 UTC
104
+ - lang=en
105
+ Status:
106
+ - 403 Forbidden
107
+ Strict-Transport-Security:
108
+ - max-age=631138519
109
+ X-Access-Level:
110
+ - read-write
111
+ X-Connection-Hash:
112
+ - 94193f251924b03d9f4a89a93584c761
113
+ X-Content-Type-Options:
114
+ - nosniff
115
+ X-Frame-Options:
116
+ - SAMEORIGIN
117
+ X-Response-Time:
118
+ - '42'
119
+ X-Transaction:
120
+ - 5723b35f8929db7c
121
+ X-Twitter-Response-Tags:
122
+ - BouncerCompliant
123
+ X-Xss-Protection:
124
+ - 1; mode=block
125
+ body:
126
+ encoding: UTF-8
127
+ string: '{"errors":[{"code":187,"message":"Status is a duplicate."}]}'
128
+ http_version:
129
+ recorded_at: Sun, 22 Feb 2015 03:23:51 GMT
130
+ - request:
131
+ method: get
132
+ uri: https://api.twitter.com/1.1/statuses/user_timeline.json?count=1
133
+ body:
134
+ encoding: US-ASCII
135
+ string: ''
136
+ headers:
137
+ Accept:
138
+ - application/json
139
+ User-Agent:
140
+ - TwitterRubyGem/5.14.0
141
+ Authorization:
142
+ - OAuth oauth_consumer_key="twitter_consumer_key", oauth_nonce="blah",
143
+ oauth_signature="blah", oauth_signature_method="HMAC-SHA1",
144
+ oauth_timestamp="1424575431", oauth_token="twitter_access_token",
145
+ oauth_version="1.0"
146
+ Accept-Encoding:
147
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
148
+ response:
149
+ status:
150
+ code: 200
151
+ message: OK
152
+ headers:
153
+ Cache-Control:
154
+ - no-cache, no-store, must-revalidate, pre-check=0, post-check=0
155
+ Content-Disposition:
156
+ - attachment; filename=json.json
157
+ Content-Length:
158
+ - '814'
159
+ Content-Type:
160
+ - application/json;charset=utf-8
161
+ Date:
162
+ - Sun, 22 Feb 2015 03:23:52 UTC
163
+ Expires:
164
+ - Tue, 31 Mar 1981 05:00:00 GMT
165
+ Last-Modified:
166
+ - Sun, 22 Feb 2015 03:23:52 GMT
167
+ Pragma:
168
+ - no-cache
169
+ Server:
170
+ - tsa_a
171
+ Set-Cookie:
172
+ - guest_id=v1%3A142457543216888662; Domain=.twitter.com; Path=/; Expires=Tue,
173
+ 21-Feb-2017 03:23:52 UTC
174
+ - lang=en
175
+ Status:
176
+ - 200 OK
177
+ Strict-Transport-Security:
178
+ - max-age=631138519
179
+ X-Access-Level:
180
+ - read-write
181
+ X-Connection-Hash:
182
+ - 7ace1b83c8a9993a555c69240d8ec10b
183
+ X-Content-Type-Options:
184
+ - nosniff
185
+ X-Frame-Options:
186
+ - SAMEORIGIN
187
+ X-Rate-Limit-Limit:
188
+ - '180'
189
+ X-Rate-Limit-Remaining:
190
+ - '179'
191
+ X-Rate-Limit-Reset:
192
+ - '1424576332'
193
+ X-Response-Time:
194
+ - '35'
195
+ X-Transaction:
196
+ - 95cb4f1b180a641a
197
+ X-Twitter-Response-Tags:
198
+ - BouncerCompliant
199
+ X-Xss-Protection:
200
+ - 1; mode=block
201
+ body:
202
+ encoding: UTF-8
203
+ string: '[{"created_at":"Sun Feb 22 02:56:09 +0000 2015","id":569329768350380032,"id_str":"569329768350380032","text":"Jarvis
204
+ success kid thing, thing","source":"\u003ca href=\"http:\/\/placeholderjarviscat.net\"
205
+ 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
206
+ 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
207
+ Nov 04 01:23:34 +0000 2014","favourites_count":1,"utc_offset":-18000,"time_zone":"Eastern
208
+ Time (US & Canada)","geo_enabled":false,"verified":false,"statuses_count":29,"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"}]'
209
+ http_version:
210
+ recorded_at: Sun, 22 Feb 2015 03:23:51 GMT
211
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,86 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://api.zippopotam.us/us/90210
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 01:42:27 GMT
23
+ Server:
24
+ - Apache/2.4.7
25
+ Content-Length:
26
+ - '225'
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": "90210", "country": "United States", "country abbreviation":
40
+ "US", "places": [{"place name": "Beverly Hills", "longitude": "-118.4065",
41
+ "state": "California", "state abbreviation": "CA", "latitude": "34.0901"}]}'
42
+ http_version:
43
+ recorded_at: Sun, 22 Feb 2015 01:42:27 GMT
44
+ - request:
45
+ method: get
46
+ uri: http://api.openweathermap.org/data/2.5/weather?q=Beverly%20Hills,%20CA
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
+ Server:
63
+ - nginx
64
+ Date:
65
+ - Sun, 22 Feb 2015 01:42:27 GMT
66
+ Content-Type:
67
+ - application/json; charset=utf-8
68
+ Transfer-Encoding:
69
+ - chunked
70
+ Connection:
71
+ - keep-alive
72
+ X-Source:
73
+ - back
74
+ Access-Control-Allow-Origin:
75
+ - "*"
76
+ Access-Control-Allow-Credentials:
77
+ - 'true'
78
+ Access-Control-Allow-Methods:
79
+ - GET, POST
80
+ body:
81
+ encoding: UTF-8
82
+ string: |
83
+ {"coord":{"lon":-118.4,"lat":34.07},"sys":{"message":0.0043,"country":"United States of America","sunrise":1424615395,"sunset":1424655844},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"base":"cmc stations","main":{"temp":284.384,"temp_min":284.384,"temp_max":284.384,"pressure":954.59,"sea_level":1024.84,"grnd_level":954.59,"humidity":86},"wind":{"speed":1.11,"deg":193.001},"clouds":{"all":56},"dt":1424568754,"id":5328041,"name":"Beverly Hills","cod":200}
84
+ http_version:
85
+ recorded_at: Sun, 22 Feb 2015 01:42:27 GMT
86
+ recorded_with: VCR 2.9.3