errors 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NGRmZmFhMTkwMmI5NzAzMWZkMDYzMmQ1ZmQ4MWQ1NWM3OTI5YzI3Nw==
5
+ data.tar.gz: !binary |-
6
+ OTRkYTkzY2FkYzJlNGFhZTdjMGEzOTI3ODU0ZTg3NzdlZDVkMDEwNg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ YTMwNzE0NDhjZTM3YWZhODllM2MzYzZiYmJjOGM1MjQxNjNkMDczYzJkYWQw
10
+ NWY2ODY1Mzc0ZmI2ZDFjMWNjZTIwYzQxMjA5Mzk2NzE3NDhkNDRhMWZlZTUx
11
+ NzRjYzc5Nzk2NjQ3ZDZjOTNiYTg4M2U2NWRhMDk4YmQzNDkzOTE=
12
+ data.tar.gz: !binary |-
13
+ MTk3ZjE1NzVmMTQ4MWFmMzhlMDE3YTM0NmE5NDRmYzcyZTEwMGFiYzVlNTZh
14
+ YmQyMGZkYjAyNzZlZGM2Y2RiM2JlMzhhNTk0MzgyZDhiZDc0NDEwODU5ZjYw
15
+ YWY0MDcxODhmNTZjN2NjNjU4ZWNlNzY1NGVlZTRiNzExMTU3MzE=
data/.gitignore ADDED
@@ -0,0 +1,34 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /lib/bundler/man/
26
+
27
+ # for a library or gem, you might want to ignore these files since the code is
28
+ # intended to run in multiple environments; otherwise, check them in:
29
+ # Gemfile.lock
30
+ # .ruby-version
31
+ # .ruby-gemset
32
+
33
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
+ .rvmrc
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --warnings
3
+ --require spec_helper
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in errors.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,33 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ errors (0.0.1)
5
+ multi_json
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.2.5)
11
+ multi_json (1.10.1)
12
+ rake (10.3.2)
13
+ rspec (3.0.0)
14
+ rspec-core (~> 3.0.0)
15
+ rspec-expectations (~> 3.0.0)
16
+ rspec-mocks (~> 3.0.0)
17
+ rspec-core (3.0.3)
18
+ rspec-support (~> 3.0.0)
19
+ rspec-expectations (3.0.3)
20
+ diff-lcs (>= 1.2.0, < 2.0)
21
+ rspec-support (~> 3.0.0)
22
+ rspec-mocks (3.0.3)
23
+ rspec-support (~> 3.0.0)
24
+ rspec-support (3.0.3)
25
+
26
+ PLATFORMS
27
+ ruby
28
+
29
+ DEPENDENCIES
30
+ bundler (~> 1.6)
31
+ errors!
32
+ rake
33
+ rspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Ahmet
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Errors
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'errors'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install errors
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it ( https://github.com/[my-github-username]/errors/fork )
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/errors.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'errors/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "errors"
8
+ spec.version = Errors::VERSION
9
+ spec.authors = ["Ahmet"]
10
+ spec.email = ["ahmetabdi@gmail.com"]
11
+ spec.summary = %q{Errors.}
12
+ spec.description = %q{Errors.}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_runtime_dependency 'multi_json'
22
+
23
+ spec.add_development_dependency 'bundler', '~> 1.6'
24
+ spec.add_development_dependency 'rake'
25
+ spec.add_development_dependency 'rspec'
26
+ end
@@ -0,0 +1,3 @@
1
+ module Errors
2
+ VERSION = "0.0.1"
3
+ end
data/lib/errors.rb ADDED
@@ -0,0 +1,11 @@
1
+ require "errors/version"
2
+ require 'multi_json'
3
+
4
+ module Errors
5
+ def initalise
6
+ end
7
+
8
+ def read_file
9
+ file = File.read('json/status-codes.json')
10
+ end
11
+ end
@@ -0,0 +1,429 @@
1
+ [
2
+ {
3
+ "code": "1xx",
4
+ "phrase": "**Informational**",
5
+ "description": "\"indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response.\" ~ [sure](http://www.urbandictionary.com/define.php?term=sure)",
6
+ "spec_title": "RFC7231#6.2",
7
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.2"
8
+ },
9
+ {
10
+ "code": "100",
11
+ "phrase": "Continue",
12
+ "description": "\"indicates that the initial part of a request has been received and has not yet been rejected by the server.\"",
13
+ "spec_title": "RFC7231#6.2.1",
14
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.2.1"
15
+ },
16
+ {
17
+ "code": "101",
18
+ "phrase": "Switching Protocols",
19
+ "description": "\"indicates that the server understands and is willing to comply with the client's request, via the Upgrade header field, for a change in the application protocol being used on this connection.\"",
20
+ "spec_title": "RFC7231#6.2.2",
21
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.2.2"
22
+ },
23
+ {
24
+ "code": "2xx",
25
+ "phrase": "**Successful**",
26
+ "description": "\"indicates that the client's request was successfully received, understood, and accepted.\" ~ [cool](https://twitter.com/DanaDanger/status/183316183494311936)",
27
+ "spec_title": "RFC7231#6.3",
28
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.3"
29
+ },
30
+ {
31
+ "code": "200",
32
+ "phrase": "OK",
33
+ "description": "\"indicates that the request has succeeded.\"",
34
+ "spec_title": "RFC7231#6.3.1",
35
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.3.1"
36
+ },
37
+ {
38
+ "code": "201",
39
+ "phrase": "Created",
40
+ "description": "\"indicates that the request has been fulfilled and has resulted in one or more new resources being created.\"",
41
+ "spec_title": "RFC7231#6.3.2",
42
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.3.2"
43
+ },
44
+ {
45
+ "code": "202",
46
+ "phrase": "Accepted",
47
+ "description": "\"indicates that the request has been accepted for processing, but the processing has not been completed.\"",
48
+ "spec_title": "RFC7231#6.3.3",
49
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.3.3"
50
+ },
51
+ {
52
+ "code": "203",
53
+ "phrase": "Non-Authoritative Information",
54
+ "description": "\"indicates that the request was successful but the enclosed payload has been modified from that of the origin server's 200 (OK) response by a transforming proxy.\"",
55
+ "spec_title": "RFC7231#6.3.4",
56
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.3.4"
57
+ },
58
+ {
59
+ "code": "204",
60
+ "phrase": "No Content",
61
+ "description": "\"indicates that the server has successfully fulfilled the request and that there is no additional content to send in the response payload body.\"",
62
+ "spec_title": "RFC7231#6.3.5",
63
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.3.5"
64
+ },
65
+ {
66
+ "code": "205",
67
+ "phrase": "Reset Content",
68
+ "description": "\"indicates that the server has fulfilled the request and desires that the user agent reset the \"document view\", which caused the request to be sent, to its original state as received from the origin server.\"",
69
+ "spec_title": "RFC7231#6.3.6",
70
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.3.6"
71
+ },
72
+ {
73
+ "code": "206",
74
+ "phrase": "Partial Content",
75
+ "description": "\"indicates that the server is successfully fulfilling a range request for the target resource by transferring one or more parts of the selected representation that correspond to the satisfiable ranges found in the requests's Range header field.\"",
76
+ "spec_title": "RFC7233#4.1",
77
+ "spec_href": "http://tools.ietf.org/html/rfc7233#section-4.1"
78
+ },
79
+ {
80
+ "code": "3xx",
81
+ "phrase": "**Redirection**",
82
+ "description": "\"indicates that further action needs to be taken by the user agent in order to fulfill the request.\" ~ [ask that dude over there](https://twitter.com/DanaDanger/status/183316183494311936)",
83
+ "spec_title": "RFC7231#6.4",
84
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.4"
85
+ },
86
+ {
87
+ "code": "300",
88
+ "phrase": "Multiple Choices",
89
+ "description": "\"indicates that the target resource has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to one or more of those identifiers.\"",
90
+ "spec_title": "RFC7231#6.4.1",
91
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.4.1"
92
+ },
93
+ {
94
+ "code": "301",
95
+ "phrase": "Moved Permanently",
96
+ "description": "\"indicates that the target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.\"",
97
+ "spec_title": "RFC7231#6.4.2",
98
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.4.2"
99
+ },
100
+ {
101
+ "code": "302",
102
+ "phrase": "Found",
103
+ "description": "\"indicates that the target resource resides temporarily under a different URI.\"",
104
+ "spec_title": "RFC7231#6.4.3",
105
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.4.3"
106
+ },
107
+ {
108
+ "code": "303",
109
+ "phrase": "See Other",
110
+ "description": "\"indicates that the server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, that is intended to provide an indirect response to the original request.\"",
111
+ "spec_title": "RFC7231#6.4.4",
112
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.4.4"
113
+ },
114
+ {
115
+ "code": "304",
116
+ "phrase": "Not Modified",
117
+ "description": "\"indicates that a conditional GET request has been received and would have resulted in a 200 (OK) response if it were not for the fact that the condition has evaluated to false.\"",
118
+ "spec_title": "RFC7232#4.1",
119
+ "spec_href": "http://tools.ietf.org/html/rfc7232#section-4.1"
120
+ },
121
+ {
122
+ "code": "305",
123
+ "phrase": "Use Proxy",
124
+ "description": "*deprecated*",
125
+ "spec_title": "RFC7231#6.4.5",
126
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.4.5"
127
+ },
128
+ {
129
+ "code": "307",
130
+ "phrase": "Temporary Redirect",
131
+ "description": "\"indicates that the target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI.\"",
132
+ "spec_title": "RFC7231#6.4.7",
133
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.4.7"
134
+ },
135
+ {
136
+ "code": "4xx",
137
+ "phrase": "**Client Error**",
138
+ "description": "\"indicates that the client seems to have erred.\" ~ [*you* fucked up](https://twitter.com/DanaDanger/status/183316183494311936)",
139
+ "spec_title": "RFC7231#6.5",
140
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5"
141
+ },
142
+ {
143
+ "code": "400",
144
+ "phrase": "Bad Request",
145
+ "description": "\"indicates that the server cannot or will not process the request because the received syntax is invalid, nonsensical, or exceeds some limitation on what the server is willing to process.\"",
146
+ "spec_title": "RFC7231#6.5.1",
147
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.1"
148
+ },
149
+ {
150
+ "code": "401",
151
+ "phrase": "Unauthorized",
152
+ "description": "\"indicates that the request has not been applied because it lacks valid authentication credentials for the target resource.\"",
153
+ "spec_title": "RFC7235#6.3.1",
154
+ "spec_href": "http://tools.ietf.org/html/rfc7235#section-3.1"
155
+ },
156
+ {
157
+ "code": "402",
158
+ "phrase": "Payment Required",
159
+ "description": "*reserved*",
160
+ "spec_title": "RFC7231#6.5.2",
161
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.2"
162
+ },
163
+ {
164
+ "code": "403",
165
+ "phrase": "Forbidden",
166
+ "description": "\"indicates that the server understood the request but refuses to authorize it.\"",
167
+ "spec_title": "RFC7231#6.5.3",
168
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.3"
169
+ },
170
+ {
171
+ "code": "404",
172
+ "phrase": "Not Found",
173
+ "description": "\"indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.\"",
174
+ "spec_title": "RFC7231#6.5.4",
175
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.4"
176
+ },
177
+ {
178
+ "code": "405",
179
+ "phrase": "Method Not Allowed",
180
+ "description": "\"indicates that the method specified in the request-line is known by the origin server but not supported by the target resource.\"",
181
+ "spec_title": "RFC7231#6.5.5",
182
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.5"
183
+ },
184
+ {
185
+ "code": "406",
186
+ "phrase": "Not Acceptable",
187
+ "description": "\"indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.\"",
188
+ "spec_title": "RFC7231#6.5.6",
189
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.6"
190
+ },
191
+ {
192
+ "code": "407",
193
+ "phrase": "Proxy Authentication Required",
194
+ "description": "\"is similar to 401 (Unauthorized), but indicates that the client needs to authenticate itself in order to use a proxy.\"",
195
+ "spec_title": "RFC7231#6.3.2",
196
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.3.2"
197
+ },
198
+ {
199
+ "code": "408",
200
+ "phrase": "Request Timeout",
201
+ "description": "\"indicates that the server did not receive a complete request message within the time that it was prepared to wait.\"",
202
+ "spec_title": "RFC7231#6.5.7",
203
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.7"
204
+ },
205
+ {
206
+ "code": "409",
207
+ "phrase": "Conflict",
208
+ "description": "\"indicates that the request could not be completed due to a conflict with the current state of the resource.\"",
209
+ "spec_title": "RFC7231#6.5.8",
210
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.8"
211
+ },
212
+ {
213
+ "code": "410",
214
+ "phrase": "Gone",
215
+ "description": "\"indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent.\"",
216
+ "spec_title": "RFC7231#6.5.9",
217
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.9"
218
+ },
219
+ {
220
+ "code": "411",
221
+ "phrase": "Length Required",
222
+ "description": "\"indicates that the server refuses to accept the request without a defined Content-Length.\"",
223
+ "spec_title": "RFC7231#6.5.10",
224
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.10"
225
+ },
226
+ {
227
+ "code": "412",
228
+ "phrase": "Precondition Failed",
229
+ "description": "\"indicates that one or more preconditions given in the request header fields evaluated to false when tested on the server.\"",
230
+ "spec_title": "RFC7232#4.2",
231
+ "spec_href": "http://tools.ietf.org/html/rfc7232#section-4.2"
232
+ },
233
+ {
234
+ "code": "413",
235
+ "phrase": "Payload Too Large",
236
+ "description": "\"indicates that the server is refusing to process a request because the request payload is larger than the server is willing or able to process.\"",
237
+ "spec_title": "RFC7231#6.5.11",
238
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.11"
239
+ },
240
+ {
241
+ "code": "414",
242
+ "phrase": "URI Too Long",
243
+ "description": "\"indicates that the server is refusing to service the request because the request-target is longer than the server is willing to interpret.\"",
244
+ "spec_title": "RFC7231#6.5.12",
245
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.12"
246
+ },
247
+ {
248
+ "code": "415",
249
+ "phrase": "Unsupported Media Type",
250
+ "description": "\"indicates that the origin server is refusing to service the request because the payload is in a format not supported by the target resource for this method.\"",
251
+ "spec_title": "RFC7231#6.5.13",
252
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.13"
253
+ },
254
+ {
255
+ "code": "416",
256
+ "phrase": "Range Not Satisfiable",
257
+ "description": "\"indicates that none of the ranges in the request's Range header field overlap the current extent of the selected resource or that the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges.\"",
258
+ "spec_title": "RFC7233#4.4",
259
+ "spec_href": "http://tools.ietf.org/html/rfc7233#section-4.4"
260
+ },
261
+ {
262
+ "code": "417",
263
+ "phrase": "Expectation Failed",
264
+ "description": "\"indicates that the expectation given in the request's Expect header field could not be met by at least one of the inbound servers.\"",
265
+ "spec_title": "RFC7231#6.5.14",
266
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.14"
267
+ },
268
+ {
269
+ "code": "426",
270
+ "phrase": "Upgrade Required",
271
+ "description": "\"indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.\"",
272
+ "spec_title": "RFC7231#6.5.15",
273
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.5.15"
274
+ },
275
+ {
276
+ "code": "5xx",
277
+ "phrase": "**Server Error**",
278
+ "description": "\"indicates that the server is aware that it has erred or is incapable of performing the requested method.\" ~ [*we* fucked up](https://twitter.com/DanaDanger/status/183316183494311936)",
279
+ "spec_title": "RFC7231#6.6",
280
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.6"
281
+ },
282
+ {
283
+ "code": "500",
284
+ "phrase": "Internal Server Error",
285
+ "description": "\"indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.\"",
286
+ "spec_title": "RFC7231#6.6.1",
287
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.6.1"
288
+ },
289
+ {
290
+ "code": "501",
291
+ "phrase": "Not Implemented",
292
+ "description": "\"indicates that the server does not support the functionality required to fulfill the request.\"",
293
+ "spec_title": "RFC7231#6.6.2",
294
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.6.2"
295
+ },
296
+ {
297
+ "code": "502",
298
+ "phrase": "Bad Gateway",
299
+ "description": "\"indicates that the server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.\"",
300
+ "spec_title": "RFC7231#6.6.3",
301
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.6.3"
302
+ },
303
+ {
304
+ "code": "503",
305
+ "phrase": "Service Unavailable",
306
+ "description": "\"indicates that the server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.\"",
307
+ "spec_title": "RFC7231#6.6.4",
308
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.6.4"
309
+ },
310
+ {
311
+ "code": "504",
312
+ "phrase": "Gateway Time-out",
313
+ "description": "\"indicates that the server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.\"",
314
+ "spec_title": "RFC7231#6.6.5",
315
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.6.5"
316
+ },
317
+ {
318
+ "code": "505",
319
+ "phrase": "HTTP Version Not Supported",
320
+ "description": "\"indicates that the server does not support, or refuses to support, the protocol version that was used in the request message.\"",
321
+ "spec_title": "RFC7231#6.6.6",
322
+ "spec_href": "http://tools.ietf.org/html/rfc7231#section-6.6.6"
323
+ },
324
+ {
325
+ "code": "102",
326
+ "phrase": "Processing",
327
+ "description": "\"is an interim response used to inform the client that the server has accepted the complete request, but has not yet completed it.\"",
328
+ "spec_title": "RFC5218#10.1",
329
+ "spec_href": "http://tools.ietf.org/html/rfc2518#section-10.1"
330
+ },
331
+ {
332
+ "code": "207",
333
+ "phrase": "Multi-Status",
334
+ "description": "\"provides status for multiple independent operations.\"",
335
+ "spec_title": "RFC5218#10.2",
336
+ "spec_href": "http://tools.ietf.org/html/rfc2518#section-10.2"
337
+ },
338
+ {
339
+ "code": "226",
340
+ "phrase": "IM Used",
341
+ "description": "\"The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.\"",
342
+ "spec_title": "RFC3229#10.4.1",
343
+ "spec_href": "http://tools.ietf.org/html/rfc3229#section-10.4.1"
344
+ },
345
+ {
346
+ "code": "308",
347
+ "phrase": "Permanent Redirect",
348
+ "description": "\"The target resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. [...] This status code is similar to 301 Moved Permanently (Section 7.3.2 of rfc7231), except that it does not allow rewriting the request method from POST to GET.\"",
349
+ "spec_title": "RFC7238",
350
+ "spec_href": "http://tools.ietf.org/html/rfc7238"
351
+ },
352
+ {
353
+ "code": "422",
354
+ "phrase": "Unprocessable Entity",
355
+ "description": "\"means the server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions.\"",
356
+ "spec_title": "RFC5218#10.3",
357
+ "spec_href": "http://tools.ietf.org/html/rfc2518#section-10.3"
358
+ },
359
+ {
360
+ "code": "423",
361
+ "phrase": "Locked",
362
+ "description": "\"means the source or destination resource of a method is locked.\"",
363
+ "spec_title": "RFC5218#10.4",
364
+ "spec_href": "http://tools.ietf.org/html/rfc2518#section-10.4"
365
+ },
366
+ {
367
+ "code": "424",
368
+ "phrase": "Failed Dependency",
369
+ "description": "\"means that the method could not be performed on the resource because the requested action depended on another action and that action failed.\"",
370
+ "spec_title": "RFC5218#10.5",
371
+ "spec_href": "http://tools.ietf.org/html/rfc2518#section-10.5"
372
+ },
373
+ {
374
+ "code": "428",
375
+ "phrase": "Precondition Required",
376
+ "description": "\"indicates that the origin server requires the request to be conditional.\"",
377
+ "spec_title": "RFC6585#3",
378
+ "spec_href": "http://tools.ietf.org/html/rfc6585#section-3"
379
+ },
380
+ {
381
+ "code": "429",
382
+ "phrase": "Too Many Requests",
383
+ "description": "\"indicates that the user has sent too many requests in a given amount of time (\"rate limiting\").\"",
384
+ "spec_title": "RFC6585#4",
385
+ "spec_href": "http://tools.ietf.org/html/rfc6585#section-4"
386
+ },
387
+ {
388
+ "code": "431",
389
+ "phrase": "Request Header Fields Too Large",
390
+ "description": "\"indicates that the server is unwilling to process the request because its header fields are too large.\"",
391
+ "spec_title": "RFC6585#5",
392
+ "spec_href": "http://tools.ietf.org/html/rfc6585#section-5"
393
+ },
394
+ {
395
+ "code": "451",
396
+ "phrase": "Unavailable For Legal Reasons",
397
+ "description": "\"This status code indicates that the server is denying access to the resource in response to a legal demand.\"",
398
+ "spec_title": "draft-tbray-http-legally-restricted-status",
399
+ "spec_href": "http://tools.ietf.org/html/draft-tbray-http-legally-restricted-status"
400
+ },
401
+ {
402
+ "code": "506",
403
+ "phrase": "Variant Also Negotiates",
404
+ "description": "\"indicates that the server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.\"",
405
+ "spec_title": "RFC2295#8.1",
406
+ "spec_href": "http://tools.ietf.org/html/rfc2295#section-8.1"
407
+ },
408
+ {
409
+ "code": "507",
410
+ "phrase": "Insufficient Storage",
411
+ "description": "\"means the method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request.\"",
412
+ "spec_title": "RFC5218#10.6",
413
+ "spec_href": "http://tools.ietf.org/html/rfc2518#section-10.6"
414
+ },
415
+ {
416
+ "code": "511",
417
+ "phrase": "Network Authentication Required",
418
+ "description": "\"indicates that the client needs to authenticate to gain network access.\"",
419
+ "spec_title": "RFC6585#6",
420
+ "spec_href": "http://tools.ietf.org/html/rfc6585#section-6"
421
+ },
422
+ {
423
+ "code": "7xx",
424
+ "phrase": "**Developer Error**",
425
+ "description": "[err](http://www.urbandictionary.com/define.php?term=err)",
426
+ "spec_title": "7xx-rfc",
427
+ "spec_href": "http://documentup.com/joho/7XX-rfc"
428
+ }
429
+ ]
@@ -0,0 +1,78 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, make a
10
+ # separate helper file that requires this one and then use it only in the specs
11
+ # that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
+ RSpec.configure do |config|
18
+ # The settings below are suggested to provide a good initial experience
19
+ # with RSpec, but feel free to customize to your heart's content.
20
+ =begin
21
+ # These two settings work together to allow you to limit a spec run
22
+ # to individual examples or groups you care about by tagging them with
23
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
24
+ # get run.
25
+ config.filter_run :focus
26
+ config.run_all_when_everything_filtered = true
27
+
28
+ # Many RSpec users commonly either run the entire suite or an individual
29
+ # file, and it's useful to allow more verbose output when running an
30
+ # individual spec file.
31
+ if config.files_to_run.one?
32
+ # Use the documentation formatter for detailed output,
33
+ # unless a formatter has already been configured
34
+ # (e.g. via a command-line flag).
35
+ config.default_formatter = 'doc'
36
+ end
37
+
38
+ # Print the 10 slowest examples and example groups at the
39
+ # end of the spec run, to help surface which specs are running
40
+ # particularly slow.
41
+ config.profile_examples = 10
42
+
43
+ # Run specs in random order to surface order dependencies. If you find an
44
+ # order dependency and want to debug it, you can fix the order by providing
45
+ # the seed, which is printed after each run.
46
+ # --seed 1234
47
+ config.order = :random
48
+
49
+ # Seed global randomization in this process using the `--seed` CLI option.
50
+ # Setting this allows you to use `--seed` to deterministically reproduce
51
+ # test failures related to randomization by passing the same `--seed` value
52
+ # as the one that triggered the failure.
53
+ Kernel.srand config.seed
54
+
55
+ # rspec-expectations config goes here. You can use an alternate
56
+ # assertion/expectation library such as wrong or the stdlib/minitest
57
+ # assertions if you prefer.
58
+ config.expect_with :rspec do |expectations|
59
+ # Enable only the newer, non-monkey-patching expect syntax.
60
+ # For more details, see:
61
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
62
+ expectations.syntax = :expect
63
+ end
64
+
65
+ # rspec-mocks config goes here. You can use an alternate test double
66
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
67
+ config.mock_with :rspec do |mocks|
68
+ # Enable only the newer, non-monkey-patching expect syntax.
69
+ # For more details, see:
70
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
71
+ mocks.syntax = :expect
72
+
73
+ # Prevents you from mocking or stubbing a method that does not exist on
74
+ # a real object. This is generally recommended.
75
+ mocks.verify_partial_doubles = true
76
+ end
77
+ =end
78
+ end
metadata ADDED
@@ -0,0 +1,114 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: errors
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Ahmet
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-08-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: multi_json
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Errors.
70
+ email:
71
+ - ahmetabdi@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - .gitignore
77
+ - .rspec
78
+ - Gemfile
79
+ - Gemfile.lock
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - errors.gemspec
84
+ - lib/errors.rb
85
+ - lib/errors/version.rb
86
+ - lib/json/status-codes.json
87
+ - spec/spec_helper.rb
88
+ homepage: ''
89
+ licenses:
90
+ - MIT
91
+ metadata: {}
92
+ post_install_message:
93
+ rdoc_options: []
94
+ require_paths:
95
+ - lib
96
+ required_ruby_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ! '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ requirements: []
107
+ rubyforge_project:
108
+ rubygems_version: 2.2.2
109
+ signing_key:
110
+ specification_version: 4
111
+ summary: Errors.
112
+ test_files:
113
+ - spec/spec_helper.rb
114
+ has_rdoc: