From a7edd3757c21ed3f6ee0b8c0434f8d91f30b0677 Mon Sep 17 00:00:00 2001 From: Jeremy Woertink Date: Sun, 28 Mar 2021 17:17:21 -0700 Subject: [PATCH] Fixing compilation error and version restrictions to allow for crystal 1.0 --- shard.yml | 2 +- src/have_files.cr | 2 +- src/spec/expectation.cr | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/shard.yml b/shard.yml index 7ed0120..d97b9d5 100644 --- a/shard.yml +++ b/shard.yml @@ -6,7 +6,7 @@ authors: license: MIT -crystal: 0.24.2 +crystal: ">= 0.24.2, < 2.0.0" dependencies: stdio: diff --git a/src/have_files.cr b/src/have_files.cr index 22f7ef6..02f7bf9 100644 --- a/src/have_files.cr +++ b/src/have_files.cr @@ -28,7 +28,7 @@ module HaveFiles end end end - Dir.rmdir(path) + Dir.delete(path) else File.delete(path) end diff --git a/src/spec/expectation.cr b/src/spec/expectation.cr index 3fac00c..77869cd 100644 --- a/src/spec/expectation.cr +++ b/src/spec/expectation.cr @@ -5,7 +5,10 @@ require "file_utils" module HaveFiles::Spec struct Expectation @diff : String? - def diff; @diff.as(String); end + + def diff + @diff.as(String) + end def initialize(@expected_dir : String, @base_dir : String = "/tmp", @cleanup : Bool = true) end