html_errors 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.rdoc +0 -0
- data/Rakefile +2 -0
- data/html_errors.gemspec +21 -0
- data/lib/html_errors.rb +118 -0
- data/lib/html_errors/version.rb +3 -0
- metadata +61 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.rdoc
ADDED
File without changes
|
data/Rakefile
ADDED
data/html_errors.gemspec
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "html_errors/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "html_errors"
|
7
|
+
s.version = HtmlErrors::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Sprout - Chandra Mohan"]
|
10
|
+
s.email = ["chandra.thakur@sprout-technology.com"]
|
11
|
+
s.homepage = ""
|
12
|
+
s.summary = %q{html_errors gem specify all the Html status codes generally required along with the description that the user wants to know what actually the error is for.}
|
13
|
+
s.description = %q{html_errors gem for error status codes}
|
14
|
+
|
15
|
+
s.rubyforge_project = "html_errors"
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
+
s.require_paths = ["lib"]
|
21
|
+
end
|
data/lib/html_errors.rb
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
module HtmlErrors
|
2
|
+
|
3
|
+
def self.100
|
4
|
+
"Continue"
|
5
|
+
end
|
6
|
+
def self.101
|
7
|
+
"Switching Protocols"
|
8
|
+
end
|
9
|
+
def self.200
|
10
|
+
" OK => Action completed successfully"
|
11
|
+
end
|
12
|
+
def self.201
|
13
|
+
" Created => Success following a POST command"
|
14
|
+
end
|
15
|
+
def self.202
|
16
|
+
"Accepted => The request has been accepted for processing, but the processing has not been completed."
|
17
|
+
end
|
18
|
+
def self.203
|
19
|
+
" Partial Information => Response to a GET command, indicates that the returned meta information is from a private overlaid web"
|
20
|
+
end
|
21
|
+
def self.204
|
22
|
+
"No Content => Server has received the request but there is no information to send back."
|
23
|
+
end
|
24
|
+
def self.205
|
25
|
+
"Reset Content"
|
26
|
+
end
|
27
|
+
def self.206
|
28
|
+
"Partial Content => The requested file was partially sent. Usually caused by stopping or refreshing a web page."
|
29
|
+
end
|
30
|
+
def self.300
|
31
|
+
"Multiple Choices"
|
32
|
+
end
|
33
|
+
def self.301
|
34
|
+
"Moved Permanently => Requested a directory instead of a specific file. The web server added the filename index.html, index.htm, home.html, or home.htm to the URL."
|
35
|
+
end
|
36
|
+
def self.302
|
37
|
+
"Moved Temporarily"
|
38
|
+
end
|
39
|
+
def self.303
|
40
|
+
" See Other"
|
41
|
+
end
|
42
|
+
def self.304
|
43
|
+
"Not Modified => The cached version of the requested file is the same as the file to be sent."
|
44
|
+
end
|
45
|
+
def self.305
|
46
|
+
"Use Proxy"
|
47
|
+
end
|
48
|
+
def self.400
|
49
|
+
"Bad Request => The request had bad syntax or was impossible to be satisified."
|
50
|
+
end
|
51
|
+
def self.401
|
52
|
+
"Unauthorized =>User failed to provide a valid user name / password required for access to file / directory."
|
53
|
+
end
|
54
|
+
def self.402
|
55
|
+
"Payment Required"
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.403
|
59
|
+
"Forbidden => The request does not specify the file name. Or the directory or the file does not have the permission that allows the pages to be viewed from the web."
|
60
|
+
end
|
61
|
+
def self.404
|
62
|
+
" Not Found => The requested file was not found."
|
63
|
+
end
|
64
|
+
def self.405
|
65
|
+
" Method Not Allowed"
|
66
|
+
end
|
67
|
+
def self.406
|
68
|
+
"Not Acceptable"
|
69
|
+
end
|
70
|
+
def self.407
|
71
|
+
"Proxy Authentication Required"
|
72
|
+
end
|
73
|
+
def self.408
|
74
|
+
"Request Time-Out"
|
75
|
+
end
|
76
|
+
def self.409
|
77
|
+
"Conflict"
|
78
|
+
end
|
79
|
+
def self.410
|
80
|
+
"Gone"
|
81
|
+
end
|
82
|
+
def self.411
|
83
|
+
"Length Required"
|
84
|
+
end
|
85
|
+
def self.412
|
86
|
+
"Precondition Failed"
|
87
|
+
end
|
88
|
+
def self.413
|
89
|
+
" Request Entity Too Large"
|
90
|
+
end
|
91
|
+
def self.414
|
92
|
+
"Request-URL Too Large"
|
93
|
+
end
|
94
|
+
|
95
|
+
def self.415
|
96
|
+
"Unsupported Media Type"
|
97
|
+
end
|
98
|
+
def self.500
|
99
|
+
" Server Error => A problem with the code or program you are calling rather than with the web server itself."
|
100
|
+
end
|
101
|
+
def self.501
|
102
|
+
"Not Implemented => The server does not support the facility required."
|
103
|
+
end
|
104
|
+
def self.502
|
105
|
+
"Bad Gateway"
|
106
|
+
end
|
107
|
+
def self.503
|
108
|
+
"Out of Resources => The server cannot process the request due to a system overload. This should be a temporary condition."
|
109
|
+
end
|
110
|
+
def self.504
|
111
|
+
"Gateway Time-Out =>The service did not respond within the time frame that the gateway was willing to wait."
|
112
|
+
end
|
113
|
+
def self.505
|
114
|
+
"HTTP Version not supported"
|
115
|
+
end
|
116
|
+
|
117
|
+
|
118
|
+
end
|
metadata
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: html_errors
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Sprout - Chandra Mohan
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-06-23 00:00:00 Z
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: html_errors gem for error status codes
|
17
|
+
email:
|
18
|
+
- chandra.thakur@sprout-technology.com
|
19
|
+
executables: []
|
20
|
+
|
21
|
+
extensions: []
|
22
|
+
|
23
|
+
extra_rdoc_files: []
|
24
|
+
|
25
|
+
files:
|
26
|
+
- .gitignore
|
27
|
+
- Gemfile
|
28
|
+
- README.rdoc
|
29
|
+
- Rakefile
|
30
|
+
- html_errors.gemspec
|
31
|
+
- lib/html_errors.rb
|
32
|
+
- lib/html_errors/version.rb
|
33
|
+
homepage: ""
|
34
|
+
licenses: []
|
35
|
+
|
36
|
+
post_install_message:
|
37
|
+
rdoc_options: []
|
38
|
+
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: "0"
|
47
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: "0"
|
53
|
+
requirements: []
|
54
|
+
|
55
|
+
rubyforge_project: html_errors
|
56
|
+
rubygems_version: 1.7.2
|
57
|
+
signing_key:
|
58
|
+
specification_version: 3
|
59
|
+
summary: html_errors gem specify all the Html status codes generally required along with the description that the user wants to know what actually the error is for.
|
60
|
+
test_files: []
|
61
|
+
|