Skip to content

Commit 50b094f

Browse files
committed
Cleanup
1 parent d7f8f0e commit 50b094f

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
ooooo
2323
ooo vvv Syntropy - a web framework for Ruby
2424
o vvvvv -------------------------------------
25-
| vvv o
25+
| vvv o
2626
:|:::|::|:
2727
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2828
```

lib/syntropy/app.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def route(path, params = {}, compute_proc: false)
107107

108108
# Handles a not found error, taking into account hooks up the tree from the
109109
# request path.
110-
#
110+
#
111111
# @param req [Qeweney::Reqest] request
112112
# @return [void]
113113
def handle_not_found(req)
@@ -120,7 +120,7 @@ def handle_not_found(req)
120120
end
121121
end
122122

123-
# Returns the find
123+
# Returns the find
124124
def find_first_uptree_route(path)
125125
route = @router_proc.(path, {})
126126
if !route && path != '/'

lib/syntropy/applets/builtin/default_error_handler/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
body {
22
max-width: 800px;
33
margin: 4em auto;
4-
4+
55
font-family: Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif;
66

77
big {

lib/syntropy/request_extensions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ def ctx
3737
# @param accepted [Array<String>] list of accepted HTTP methods
3838
# @return [String] request's HTTP method
3939
def validate_http_method(*accepted)
40-
raise Syntropy::Error.method_not_allowed if !accepted.include?(method)
40+
return method if accepted.include?(method)
4141

42-
method
42+
raise Syntropy::Error.method_not_allowed
4343
end
4444

4545
# Responds according to the given map. The given map defines the responses

syntropy.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
2828
s.add_dependency 'uringmachine', '~>0.23.1'
2929

3030
s.add_dependency 'listen', '~>3.9.0'
31-
31+
3232
s.add_dependency 'json'
3333
s.add_dependency 'logger'
3434

test/test_app.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def test_app_rendering
122122
assert_equal Status::INTERNAL_SERVER_ERROR, req.response_status
123123
end
124124

125-
def test_automatic_redirect_on_trailing_slash
125+
def test_automatic_redirect_on_trailing_slash
126126
req = make_request(':method' => 'GET', ':path' => '/test/rss/')
127127
assert_equal Status::MOVED_PERMANENTLY, req.response_status
128128
assert_equal '/test/rss', req.response_headers['Location']

0 commit comments

Comments
 (0)