Skip to content

Commit

Permalink
Merge pull request #31 from crystal-garage/fix-ameba-warnings
Browse files Browse the repository at this point in the history
Format code and fix ameba warnings
  • Loading branch information
mamantoha authored Jan 17, 2025
2 parents 5554e11 + d39c2dd commit f5b5bd0
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .ameba.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

# Problems found: 25
# Run `ameba --only Lint/NotNil` for details

Excluded:
- lib/**/*

Lint/NotNil:
Description: Identifies usage of `not_nil!` calls
Excluded:
Expand Down
2 changes: 1 addition & 1 deletion templates/kemal/_gitignore.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ sentry.dwarf

tmp

config/database.yml
config/database.yml
2 changes: 1 addition & 1 deletion templates/kemal/bin/appctl.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ while [ "$#" -gt 0 ]; do
c|clear) clear_cli "$@";;
*) echo "unknown option: $1" >&2; exit 1;;
esac
done
done
2 changes: 1 addition & 1 deletion templates/kemal/config/database.yml.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ development:
uri: postgres://postgres@localhost/<%= opts["app_name_underscore"] %>_development

test:
uri: postgres://postgres@localhost/<%= opts["app_name_underscore"] %>_test
uri: postgres://postgres@localhost/<%= opts["app_name_underscore"] %>_test
4 changes: 2 additions & 2 deletions templates/kemal/src/controllers/application_controller.ecr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class ApplicationController
HTTP_METHODS = %w(get post put patch delete options)

class_property default_layout : -> TreeTemplate = ->{ View::Layouts.application }
class_property default_layout : -> TreeTemplate = -> { View::Layouts.application }

def self.render(view : TreeTemplate, layout : Nil)
view.render
Expand Down Expand Up @@ -52,4 +52,4 @@ class ApplicationController
end

end
end
end
8 changes: 4 additions & 4 deletions templates/kemal/src/controllers/welcome_controller.ecr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class WelcomeController < ApplicationController
# GET /
get do
render WelcomeView.index
end
# GET /
get do
render WelcomeView.index
end
end
2 changes: 1 addition & 1 deletion templates/kemal/src/db/init.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ def self.init_db
puts "FATAL: Connection to the database (#{uri}) has been refused"
exit
end
end
end
2 changes: 1 addition & 1 deletion templates/migration.cr.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ class <%= opts["class_name"] %>
def change(dir)
# TODO: Fill migration
end
end
end
2 changes: 1 addition & 1 deletion templates/model/migration.cr.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ class Create<%= opts["model_class"] %><%= opts["migration_uid"] %>
end

end
end
end

0 comments on commit f5b5bd0

Please sign in to comment.