Skip to content

Commit b43b9f7

Browse files
remove hash module
1 parent 88900b5 commit b43b9f7

File tree

7 files changed

+39
-39
lines changed

7 files changed

+39
-39
lines changed

src/generics/generic_controller.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
require "../abstracts/index"
2-
require "../hashes/index"
2+
require "../tuples/all"
33

44
module Shivneri
55
module GENERIC
66
include ABSTRACT
7-
include HASHES
7+
include TUPLE
88

99
class GenericController < Controller
1010
def generic_method

src/handlers/request_handler_helper.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
require "../fort_global"
22
require "../constants"
3-
require "../hashes/index"
3+
require "../tuples/all"
44
require "http"
55
require "../exceptions/index"
66

77
module Shivneri
88
module Handlers
9-
include HASHES
9+
include TUPLE
1010
include EXCEPTION
1111

1212
class RequestHandlerHelper

src/hashes/index.cr

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/hashes/mime_type.cr

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/model/http_result.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
require "../hashes/index"
1+
require "../tuples/all"
22

33
module Shivneri
44
module MODEL
5-
include HASHES
5+
include TUPLE
66

77
struct HttpResult
88
property status_code, response_data, content_type, response_format, should_redirect, file

src/tuples/all.cr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
require "./http_method"
2+
require "./mime_type"

src/tuples/mime_type.cr

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module Shivneri
2+
module TUPLE
3+
MIME_TYPE = {
4+
text: "text/plain",
5+
json: "application/json",
6+
html: "text/html",
7+
form_url_encoded: "application/x-www-form-urlencoded",
8+
css: "text/css",
9+
csv: "text/csv",
10+
js: "application/javascript",
11+
# Bmp : "image/bmp",
12+
# Jpeg : "image/jpeg",
13+
# Gif : "image/gif",
14+
# Ico : "image/x-icon",
15+
# Png : "image/png",
16+
# Pdf : "application/pdf",
17+
# Svg : "image/svg+xml",
18+
rtf: "application/rtf",
19+
xml: "application/xml",
20+
# Xls : "application/vnd.ms-excel",
21+
# Xlsx : "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
22+
# Ttf : "font/ttf",
23+
# Woff : "font/woff",
24+
# Woff2 : "font/woff2",
25+
# Eot : "application/vnd.ms-fontobject",
26+
# Otf : "font/otf",
27+
# Swf : "application/x-shockwave-flash",
28+
# Avi : "video/avi",
29+
"form_multi_part": "multipart/form-data",
30+
}
31+
end
32+
end

0 commit comments

Comments
 (0)