Skip to content

Commit

Permalink
Bump min Crystal version for framework, dotenv, and validator (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
Blacksmoke16 authored Jul 30, 2024
1 parent 474dd12 commit fa621cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: athena

version: 0.19.1

crystal: ~> 1.11
crystal: ~> 1.13

license: MIT

Expand Down
6 changes: 1 addition & 5 deletions src/athena.cr
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,7 @@ module Athena::Framework
{% end %}

# Handle exiting correctly on interrupt signals
{% if compare_versions(Crystal::VERSION, "1.12.0") >= 0 %}
Process.on_terminate { self.stop }
{% else %}
Process.on_interrupt { self.stop }
{% end %}
Process.on_terminate { self.stop }

Log.info { %(Server has started and is listening at #{@ssl_context ? "https" : "http"}://#{@server.addresses.first}) }

Expand Down
11 changes: 1 addition & 10 deletions src/binary_file_response.cr
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,7 @@ class Athena::Framework::BinaryFileResponse < Athena::Framework::Response
)
super nil, status, headers

# TODO: Inline this again once 1.13.0 is the new min version
{% begin %}
{% if compare_versions(Crystal::VERSION, "1.13.0-dev") >= 0 %}
is_file_readable = File::Info.readable? file_path
{% else %}
is_file_readable = File.readable? file_path
{% end %}

raise File::Error.new("File '#{file_path}' must be readable.", file: file_path) unless is_file_readable
{% end %}
raise File::Error.new("File '#{file_path}' must be readable.", file: file_path) unless File::Info.readable? file_path

@file_path = Path.new(file_path).expand

Expand Down

0 comments on commit fa621cf

Please sign in to comment.