ruby-link-checker 0.1.0

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 (89) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +3 -0
  3. data/CONTRIBUTING.md +125 -0
  4. data/Dangerfile +4 -0
  5. data/Gemfile +23 -0
  6. data/Gemfile.lock +162 -0
  7. data/LICENSE.md +22 -0
  8. data/README.md +279 -0
  9. data/RELEASING.md +60 -0
  10. data/Rakefile +18 -0
  11. data/benchmarks/check.rb +31 -0
  12. data/benchmarks/data/opensearch.org/links.txt +4270 -0
  13. data/benchmarks/data/opensearch.org/small.txt +100 -0
  14. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc.png +0 -0
  15. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
  16. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_both.png +0 -0
  17. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_desc.png +0 -0
  18. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
  19. data/coverage/assets/0.12.3/application.css +1 -0
  20. data/coverage/assets/0.12.3/application.js +7 -0
  21. data/coverage/assets/0.12.3/colorbox/border.png +0 -0
  22. data/coverage/assets/0.12.3/colorbox/controls.png +0 -0
  23. data/coverage/assets/0.12.3/colorbox/loading.gif +0 -0
  24. data/coverage/assets/0.12.3/colorbox/loading_background.png +0 -0
  25. data/coverage/assets/0.12.3/favicon_green.png +0 -0
  26. data/coverage/assets/0.12.3/favicon_red.png +0 -0
  27. data/coverage/assets/0.12.3/favicon_yellow.png +0 -0
  28. data/coverage/assets/0.12.3/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  29. data/coverage/assets/0.12.3/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  30. data/coverage/assets/0.12.3/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  31. data/coverage/assets/0.12.3/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  32. data/coverage/assets/0.12.3/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  33. data/coverage/assets/0.12.3/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  34. data/coverage/assets/0.12.3/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  35. data/coverage/assets/0.12.3/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  36. data/coverage/assets/0.12.3/images/ui-icons_222222_256x240.png +0 -0
  37. data/coverage/assets/0.12.3/images/ui-icons_2e83ff_256x240.png +0 -0
  38. data/coverage/assets/0.12.3/images/ui-icons_454545_256x240.png +0 -0
  39. data/coverage/assets/0.12.3/images/ui-icons_888888_256x240.png +0 -0
  40. data/coverage/assets/0.12.3/images/ui-icons_cd0a0a_256x240.png +0 -0
  41. data/coverage/assets/0.12.3/loading.gif +0 -0
  42. data/coverage/assets/0.12.3/magnify.png +0 -0
  43. data/coverage/index.html +14555 -0
  44. data/lib/ruby-link-checker/callbacks.rb +50 -0
  45. data/lib/ruby-link-checker/checker.rb +42 -0
  46. data/lib/ruby-link-checker/config.rb +41 -0
  47. data/lib/ruby-link-checker/errors/base_error.rb +8 -0
  48. data/lib/ruby-link-checker/errors/redirect_loop_error.rb +18 -0
  49. data/lib/ruby-link-checker/errors.rb +2 -0
  50. data/lib/ruby-link-checker/logger.rb +14 -0
  51. data/lib/ruby-link-checker/net/http/checker.rb +31 -0
  52. data/lib/ruby-link-checker/net/http/config.rb +35 -0
  53. data/lib/ruby-link-checker/net/http/result.rb +53 -0
  54. data/lib/ruby-link-checker/net/http.rb +3 -0
  55. data/lib/ruby-link-checker/result.rb +74 -0
  56. data/lib/ruby-link-checker/task.rb +20 -0
  57. data/lib/ruby-link-checker/tasks.rb +99 -0
  58. data/lib/ruby-link-checker/typhoeus/hydra/checker.rb +52 -0
  59. data/lib/ruby-link-checker/typhoeus/hydra/config.rb +35 -0
  60. data/lib/ruby-link-checker/typhoeus/hydra/result.rb +53 -0
  61. data/lib/ruby-link-checker/typhoeus/hydra.rb +3 -0
  62. data/lib/ruby-link-checker/version.rb +5 -0
  63. data/lib/ruby-link-checker.rb +13 -0
  64. data/lib/ruby_link_checker.rb +3 -0
  65. data/pkg/ruby-link-checker-0.1.0.gem +0 -0
  66. data/ruby-link-checker.gemspec +21 -0
  67. data/spec/fixtures/200.yml +65 -0
  68. data/spec/fixtures/301_200.yml +102 -0
  69. data/spec/fixtures/301_301.yml +114 -0
  70. data/spec/fixtures/301_400_301_200.yml +185 -0
  71. data/spec/fixtures/301_403.yml +78 -0
  72. data/spec/fixtures/404.yml +57 -0
  73. data/spec/fixtures/404_200.yml +89 -0
  74. data/spec/fixtures/404_404.yml +81 -0
  75. data/spec/fixtures/429_200.yml +135 -0
  76. data/spec/fixtures/429_429_200.yml +201 -0
  77. data/spec/ruby-link-checker/callbacks_spec.rb +43 -0
  78. data/spec/ruby-link-checker/checker_spec.rb +10 -0
  79. data/spec/ruby-link-checker/config_spec.rb +39 -0
  80. data/spec/ruby-link-checker/net/http/checker_spec.rb +61 -0
  81. data/spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb +67 -0
  82. data/spec/ruby-link-checker/version_spec.rb +9 -0
  83. data/spec/spec_helper.rb +17 -0
  84. data/spec/support/config.rb +8 -0
  85. data/spec/support/link_checker.rb +322 -0
  86. data/spec/support/vcr.rb +13 -0
  87. data/spec/support/with_result.rb +15 -0
  88. data/spec/support/with_url.rb +14 -0
  89. metadata +144 -0
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
+ require 'ruby-link-checker/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'ruby-link-checker'
8
+ s.version = LinkChecker::VERSION
9
+ s.authors = ['Daniel Doubrovkine']
10
+ s.email = 'dblock@dblock.org'
11
+ s.platform = Gem::Platform::RUBY
12
+ s.required_rubygems_version = '>= 1.3.6'
13
+ s.required_ruby_version = '>= 2.7'
14
+ s.files = Dir['**/*']
15
+ s.require_paths = ['lib']
16
+ s.homepage = 'http://github.com/dblock/ruby-link-checker'
17
+ s.licenses = ['MIT']
18
+ s.summary = 'Fast ruby link checker.'
19
+ s.metadata['rubygems_mfa_required'] = 'true'
20
+ s.add_development_dependency 'typhoeus'
21
+ end
@@ -0,0 +1,65 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.example.org/
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
+ Host:
17
+ - www.example.org
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Accept-Ranges:
24
+ - bytes
25
+ Age:
26
+ - '474678'
27
+ Cache-Control:
28
+ - max-age=604800
29
+ Content-Type:
30
+ - text/html; charset=UTF-8
31
+ Date:
32
+ - Wed, 29 Mar 2023 16:16:22 GMT
33
+ Expires:
34
+ - Wed, 05 Apr 2023 16:16:22 GMT
35
+ Last-Modified:
36
+ - Thu, 17 Oct 2019 07:18:26 GMT
37
+ Server:
38
+ - Example.org
39
+ Vary:
40
+ - Accept-Encoding
41
+ X-Cache:
42
+ - HIT
43
+ Content-Length:
44
+ - '648'
45
+ body:
46
+ encoding: UTF-8
47
+ string: "<!doctype html>\n<html>\n<head>\n <title>Example Domain</title>\n\n
48
+ \ <meta charset=\"utf-8\" />\n <meta http-equiv=\"Content-type\" content=\"text/html;
49
+ charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,
50
+ initial-scale=1\" />\n <style type=\"text/css\">\n body {\n background-color:
51
+ #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system,
52
+ system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\",
53
+ Helvetica, Arial, sans-serif;\n \n }\n div {\n width:
54
+ 600px;\n margin: 5em auto;\n padding: 2em;\n background-color:
55
+ #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px
56
+ rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n
57
+ \ text-decoration: none;\n }\n @media (max-width: 700px) {\n div
58
+ {\n margin: 0 auto;\n width: auto;\n }\n }\n
59
+ \ </style> \n</head>\n\n<body>\n<div>\n <h1>Example Domain</h1>\n
60
+ \ <p>This domain is for use in illustrative examples in documents. You may
61
+ use this\n domain in literature without prior coordination or asking for
62
+ permission.</p>\n <p><a href=\"https://www.iana.org/domains/example\">More
63
+ information...</a></p>\n</div>\n</body>\n</html>\n"
64
+ recorded_at: Wed, 29 Mar 2023 16:16:22 GMT
65
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,102 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.example.org/
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
+ Host:
17
+ - www.example.org
18
+ response:
19
+ status:
20
+ code: 301
21
+ message: Moved Permanently
22
+ headers:
23
+ Connection:
24
+ - keep-alive
25
+ Content-Length:
26
+ - '162'
27
+ Server:
28
+ - Example.org
29
+ Content-Type:
30
+ - text/html
31
+ Location:
32
+ - https://www.dblock.org/
33
+ X-Github-Request-Id:
34
+ - 18E4:5EF8:5BC5E9:75D292:6425C766
35
+ Accept-Ranges:
36
+ - bytes
37
+ Date:
38
+ - Thu, 30 Mar 2023 17:31:18 GMT
39
+ body:
40
+ encoding: UTF-8
41
+ string: "<html>\r\n<head><title>301 Moved Permanently</title></head>\r\n<body>\r\n<center><h1>301
42
+ Moved Permanently</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n"
43
+ recorded_at: Thu, 30 Mar 2023 17:31:18 GMT
44
+ - request:
45
+ method: get
46
+ uri: https://www.dblock.org/
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
+ Host:
58
+ - www.example.org
59
+ response:
60
+ status:
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ Connection:
65
+ - keep-alive
66
+ Content-Length:
67
+ - '2428'
68
+ Server:
69
+ - Example.org
70
+ Content-Type:
71
+ - text/html; charset=utf-8
72
+ Last-Modified:
73
+ - Sat, 09 Jun 2018 03:06:53 GMT
74
+ Access-Control-Allow-Origin:
75
+ - "*"
76
+ Expires:
77
+ - Thu, 30 Mar 2023 17:41:18 GMT
78
+ Date:
79
+ - Thu, 30 Mar 2023 17:31:18 GMT
80
+ Vary:
81
+ - Accept-Encoding
82
+ body:
83
+ encoding: UTF-8
84
+ string: "<!doctype html>\n<html>\n<head>\n <title>Example Domain</title>\n\n
85
+ \ <meta charset=\"utf-8\" />\n <meta http-equiv=\"Content-type\" content=\"text/html;
86
+ charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,
87
+ initial-scale=1\" />\n <style type=\"text/css\">\n body {\n background-color:
88
+ #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system,
89
+ system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\",
90
+ Helvetica, Arial, sans-serif;\n \n }\n div {\n width:
91
+ 600px;\n margin: 5em auto;\n padding: 2em;\n background-color:
92
+ #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px
93
+ rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n
94
+ \ text-decoration: none;\n }\n @media (max-width: 700px) {\n div
95
+ {\n margin: 0 auto;\n width: auto;\n }\n }\n
96
+ \ </style> \n</head>\n\n<body>\n<div>\n <h1>Example Domain</h1>\n
97
+ \ <p>This domain is for use in illustrative examples in documents. You may
98
+ use this\n domain in literature without prior coordination or asking for
99
+ permission.</p>\n <p><a href=\"https://www.iana.org/domains/example\">More
100
+ information...</a></p>\n</div>\n</body>\n</html>\n"
101
+ recorded_at: Thu, 30 Mar 2023 17:31:18 GMT
102
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,114 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.example.org/
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
+ Host:
17
+ - www.example.org
18
+ response:
19
+ status:
20
+ code: 301
21
+ message: Moved Permanently
22
+ headers:
23
+ Connection:
24
+ - keep-alive
25
+ Content-Length:
26
+ - '162'
27
+ Server:
28
+ - Example.org
29
+ Content-Type:
30
+ - text/html
31
+ Location:
32
+ - https://www.example.org/
33
+ X-Github-Request-Id:
34
+ - 18E4:5EF8:5BC5E9:75D292:6425C766
35
+ Accept-Ranges:
36
+ - bytes
37
+ Date:
38
+ - Thu, 30 Mar 2023 17:33:09 GMT
39
+ Via:
40
+ - 1.1 varnish
41
+ Age:
42
+ - '111'
43
+ X-Served-By:
44
+ - cache-lga21931-LGA
45
+ X-Cache:
46
+ - HIT
47
+ X-Cache-Hits:
48
+ - '1'
49
+ X-Timer:
50
+ - S1680197590.621097,VS0,VE1
51
+ Vary:
52
+ - Accept-Encoding
53
+ X-Fastly-Request-Id:
54
+ - 53ae31782b812d1566298816280cd48542d5735d
55
+ body:
56
+ encoding: UTF-8
57
+ string: "<html>\r\n<head><title>301 Moved Permanently</title></head>\r\n<body>\r\n<center><h1>301
58
+ Moved Permanently</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n"
59
+ recorded_at: Thu, 30 Mar 2023 17:33:09 GMT
60
+ - request:
61
+ method: get
62
+ uri: https://www.example.org/
63
+ body:
64
+ encoding: US-ASCII
65
+ string: ''
66
+ headers:
67
+ Accept-Encoding:
68
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
69
+ Accept:
70
+ - "*/*"
71
+ User-Agent:
72
+ - Ruby
73
+ Host:
74
+ - www.example.org
75
+ response:
76
+ status:
77
+ code: 301
78
+ message: OK
79
+ headers:
80
+ Location:
81
+ - "/"
82
+ Connection:
83
+ - keep-alive
84
+ Content-Length:
85
+ - '2428'
86
+ Server:
87
+ - Example.org
88
+ Content-Type:
89
+ - text/html; charset=utf-8
90
+ Last-Modified:
91
+ - Sat, 09 Jun 2018 03:06:53 GMT
92
+ Access-Control-Allow-Origin:
93
+ - "*"
94
+ body:
95
+ encoding: UTF-8
96
+ string: "<!doctype html>\n<html>\n<head>\n <title>Example Domain</title>\n\n
97
+ \ <meta charset=\"utf-8\" />\n <meta http-equiv=\"Content-type\" content=\"text/html;
98
+ charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,
99
+ initial-scale=1\" />\n <style type=\"text/css\">\n body {\n background-color:
100
+ #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system,
101
+ system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\",
102
+ Helvetica, Arial, sans-serif;\n \n }\n div {\n width:
103
+ 600px;\n margin: 5em auto;\n padding: 2em;\n background-color:
104
+ #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px
105
+ rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n
106
+ \ text-decoration: none;\n }\n @media (max-width: 700px) {\n div
107
+ {\n margin: 0 auto;\n width: auto;\n }\n }\n
108
+ \ </style> \n</head>\n\n<body>\n<div>\n <h1>Example Domain</h1>\n
109
+ \ <p>This domain is for use in illustrative examples in documents. You may
110
+ use this\n domain in literature without prior coordination or asking for
111
+ permission.</p>\n <p><a href=\"https://www.iana.org/domains/example\">More
112
+ information...</a></p>\n</div>\n</body>\n</html>\n"
113
+ recorded_at: Thu, 30 Mar 2023 17:33:09 GMT
114
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,185 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: head
5
+ uri: https://www.example.org/
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
+ Host:
17
+ - www.example.org
18
+ response:
19
+ status:
20
+ code: 301
21
+ message: Moved Permanently
22
+ headers:
23
+ Connection:
24
+ - keep-alive
25
+ Content-Length:
26
+ - '162'
27
+ Server:
28
+ - Example.org
29
+ Content-Type:
30
+ - text/html
31
+ Location:
32
+ - https://www.dblock.org/
33
+ X-Github-Request-Id:
34
+ - 18E4:5EF8:5BC5E9:75D292:6425C766
35
+ Accept-Ranges:
36
+ - bytes
37
+ Date:
38
+ - Thu, 30 Mar 2023 17:31:18 GMT
39
+ body:
40
+ encoding: UTF-8
41
+ string: "<html>\r\n<head><title>301 Moved Permanently</title></head>\r\n<body>\r\n<center><h1>301
42
+ Moved Permanently</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n"
43
+ recorded_at: Thu, 30 Mar 2023 17:31:18 GMT
44
+ - request:
45
+ method: head
46
+ uri: https://www.dblock.org/
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
+ Host:
58
+ - www.example.org
59
+ response:
60
+ status:
61
+ code: 400
62
+ message: OK
63
+ headers:
64
+ Connection:
65
+ - keep-alive
66
+ Content-Length:
67
+ - '2428'
68
+ Server:
69
+ - Example.org
70
+ Content-Type:
71
+ - text/html; charset=utf-8
72
+ Last-Modified:
73
+ - Sat, 09 Jun 2018 03:06:53 GMT
74
+ Access-Control-Allow-Origin:
75
+ - "*"
76
+ Expires:
77
+ - Thu, 30 Mar 2023 17:41:18 GMT
78
+ Date:
79
+ - Thu, 30 Mar 2023 17:31:18 GMT
80
+ Vary:
81
+ - Accept-Encoding
82
+ body:
83
+ encoding: UTF-8
84
+ string: "Internal Server Error\n"
85
+ recorded_at: Thu, 30 Mar 2023 17:31:18 GMT
86
+ - request:
87
+ method: get
88
+ uri: https://www.example.org/
89
+ body:
90
+ encoding: US-ASCII
91
+ string: ''
92
+ headers:
93
+ Accept-Encoding:
94
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
95
+ Accept:
96
+ - "*/*"
97
+ User-Agent:
98
+ - Ruby
99
+ Host:
100
+ - www.example.org
101
+ response:
102
+ status:
103
+ code: 301
104
+ message: Moved Permanently
105
+ headers:
106
+ Connection:
107
+ - keep-alive
108
+ Content-Length:
109
+ - '162'
110
+ Server:
111
+ - Example.org
112
+ Content-Type:
113
+ - text/html
114
+ Location:
115
+ - https://www.dblock.org/
116
+ X-Github-Request-Id:
117
+ - 18E4:5EF8:5BC5E9:75D292:6425C766
118
+ Accept-Ranges:
119
+ - bytes
120
+ Date:
121
+ - Thu, 30 Mar 2023 17:31:18 GMT
122
+ body:
123
+ encoding: UTF-8
124
+ string: "<html>\r\n<head><title>301 Moved Permanently</title></head>\r\n<body>\r\n<center><h1>301
125
+ Moved Permanently</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n"
126
+ recorded_at: Thu, 30 Mar 2023 17:31:18 GMT
127
+ - request:
128
+ method: get
129
+ uri: https://www.dblock.org/
130
+ body:
131
+ encoding: US-ASCII
132
+ string: ''
133
+ headers:
134
+ Accept-Encoding:
135
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
136
+ Accept:
137
+ - "*/*"
138
+ User-Agent:
139
+ - Ruby
140
+ Host:
141
+ - www.example.org
142
+ response:
143
+ status:
144
+ code: 200
145
+ message: OK
146
+ headers:
147
+ Connection:
148
+ - keep-alive
149
+ Content-Length:
150
+ - '2428'
151
+ Server:
152
+ - Example.org
153
+ Content-Type:
154
+ - text/html; charset=utf-8
155
+ Last-Modified:
156
+ - Sat, 09 Jun 2018 03:06:53 GMT
157
+ Access-Control-Allow-Origin:
158
+ - "*"
159
+ Expires:
160
+ - Thu, 30 Mar 2023 17:41:18 GMT
161
+ Date:
162
+ - Thu, 30 Mar 2023 17:31:18 GMT
163
+ Vary:
164
+ - Accept-Encoding
165
+ body:
166
+ encoding: UTF-8
167
+ string: "<!doctype html>\n<html>\n<head>\n <title>Example Domain</title>\n\n
168
+ \ <meta charset=\"utf-8\" />\n <meta http-equiv=\"Content-type\" content=\"text/html;
169
+ charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,
170
+ initial-scale=1\" />\n <style type=\"text/css\">\n body {\n background-color:
171
+ #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system,
172
+ system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\",
173
+ Helvetica, Arial, sans-serif;\n \n }\n div {\n width:
174
+ 600px;\n margin: 5em auto;\n padding: 2em;\n background-color:
175
+ #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px
176
+ rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n
177
+ \ text-decoration: none;\n }\n @media (max-width: 700px) {\n div
178
+ {\n margin: 0 auto;\n width: auto;\n }\n }\n
179
+ \ </style> \n</head>\n\n<body>\n<div>\n <h1>Example Domain</h1>\n
180
+ \ <p>This domain is for use in illustrative examples in documents. You may
181
+ use this\n domain in literature without prior coordination or asking for
182
+ permission.</p>\n <p><a href=\"https://www.iana.org/domains/example\">More
183
+ information...</a></p>\n</div>\n</body>\n</html>\n"
184
+ recorded_at: Thu, 30 Mar 2023 17:31:18 GMT
185
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,78 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.example.org/
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
+ Host:
17
+ - www.example.org
18
+ response:
19
+ status:
20
+ code: 301
21
+ message: Moved Permanently
22
+ headers:
23
+ Date:
24
+ - Thu, 30 Mar 2023 17:29:41 GMT
25
+ Transfer-Encoding:
26
+ - chunked
27
+ Connection:
28
+ - keep-alive
29
+ Cache-Control:
30
+ - max-age=3600
31
+ Expires:
32
+ - Thu, 30 Mar 2023 18:29:41 GMT
33
+ Location:
34
+ - https://www.dblock.org/
35
+ Vary:
36
+ - Accept-Encoding
37
+ Server:
38
+ - Example.org
39
+ body:
40
+ encoding: UTF-8
41
+ string: ''
42
+ recorded_at: Thu, 30 Mar 2023 17:29:41 GMT
43
+ - request:
44
+ method: get
45
+ uri: https://www.dblock.org/
46
+ body:
47
+ encoding: US-ASCII
48
+ string: ''
49
+ headers:
50
+ Accept-Encoding:
51
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
52
+ Accept:
53
+ - "*/*"
54
+ User-Agent:
55
+ - Ruby
56
+ Host:
57
+ - www.example.org
58
+ response:
59
+ status:
60
+ code: 403
61
+ message: Forbidden
62
+ headers:
63
+ Server:
64
+ - Example.org
65
+ Date:
66
+ - Thu, 30 Mar 2023 17:29:41 GMT
67
+ Content-Type:
68
+ - text/html
69
+ Content-Length:
70
+ - '151'
71
+ Connection:
72
+ - keep-alive
73
+ body:
74
+ encoding: UTF-8
75
+ string: "<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body>\r\n<center><h1>403
76
+ Forbidden</h1></center>\r\n<hr><center>cloudflare</center>\r\n</body>\r\n</html>\r\n"
77
+ recorded_at: Thu, 30 Mar 2023 17:29:41 GMT
78
+ recorded_with: VCR 6.1.0
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.example.org/
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
+ Host:
17
+ - www.example.org
18
+ response:
19
+ status:
20
+ code: 404
21
+ message: Not Found
22
+ headers:
23
+ Cache-Control:
24
+ - max-age=604800
25
+ Content-Type:
26
+ - text/html; charset=UTF-8
27
+ Date:
28
+ - Wed, 29 Mar 2023 17:44:18 GMT
29
+ Expires:
30
+ - Wed, 05 Apr 2023 17:44:18 GMT
31
+ Server:
32
+ - Example.org
33
+ Vary:
34
+ - Accept-Encoding
35
+ Content-Length:
36
+ - '648'
37
+ body:
38
+ encoding: UTF-8
39
+ string: "<!doctype html>\n<html>\n<head>\n <title>Example Domain</title>\n\n
40
+ \ <meta charset=\"utf-8\" />\n <meta http-equiv=\"Content-type\" content=\"text/html;
41
+ charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,
42
+ initial-scale=1\" />\n <style type=\"text/css\">\n body {\n background-color:
43
+ #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system,
44
+ system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\",
45
+ Helvetica, Arial, sans-serif;\n \n }\n div {\n width:
46
+ 600px;\n margin: 5em auto;\n padding: 2em;\n background-color:
47
+ #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px
48
+ rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n
49
+ \ text-decoration: none;\n }\n @media (max-width: 700px) {\n div
50
+ {\n margin: 0 auto;\n width: auto;\n }\n }\n
51
+ \ </style> \n</head>\n\n<body>\n<div>\n <h1>Example Domain</h1>\n
52
+ \ <p>This domain is for use in illustrative examples in documents. You may
53
+ use this\n domain in literature without prior coordination or asking for
54
+ permission.</p>\n <p><a href=\"https://www.iana.org/domains/example\">More
55
+ information...</a></p>\n</div>\n</body>\n</html>\n"
56
+ recorded_at: Wed, 29 Mar 2023 17:44:18 GMT
57
+ recorded_with: VCR 6.1.0