From 6dbbdbd9fbf6d9515a4f3509242602caba6205b7 Mon Sep 17 00:00:00 2001 From: Taylor Finnell Date: Sat, 23 Jun 2018 15:06:31 -0400 Subject: [PATCH] fixes for crystal 0.25.0 --- shard.yml | 4 ++-- spec/awscr-signer/signers/v2_spec.cr | 18 +++++++++--------- src/awscr-signer/version.cr | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/shard.yml b/shard.yml index fb74d8b..b305936 100644 --- a/shard.yml +++ b/shard.yml @@ -1,6 +1,6 @@ name: awscr-signer -version: 0.5.1 -crystal: 0.24.2 +version: 0.5.2 +crystal: 0.25.0 authors: - Taylor Finnell diff --git a/spec/awscr-signer/signers/v2_spec.cr b/spec/awscr-signer/signers/v2_spec.cr index 7bc9841..1ea6a23 100644 --- a/spec/awscr-signer/signers/v2_spec.cr +++ b/spec/awscr-signer/signers/v2_spec.cr @@ -6,7 +6,7 @@ module Awscr describe V2 do describe "presign" do it "can presign" do - time = Time.new(2007, 3, 20, 3, 40, 20) + time = Time.utc(2007, 3, 20, 3, 40, 20) Timecop.freeze(time) do request = HTTP::Request.new("GET", "/johnsmith/photos/puppy.jpg?Expires=1175139620", HTTP::Headers.new) @@ -25,7 +25,7 @@ module Awscr describe "#sign" do it "can sign get requests" do - time = Time.new(2007, 3, 27, 19, 36, 42) + time = Time.utc(2007, 3, 27, 19, 36, 42) Timecop.freeze(time) do request = HTTP::Request.new("GET", "/johnsmith/photos/puppy.jpg", HTTP::Headers.new) @@ -40,7 +40,7 @@ module Awscr end it "can sign put requests with no body" do - time = Time.new(2007, 3, 27, 21, 15, 45) + time = Time.utc(2007, 3, 27, 21, 15, 45) Timecop.freeze(time) do request = HTTP::Request.new("PUT", "/johnsmith/photos/puppy.jpg", HTTP::Headers{"Content-Type" => "image/jpeg"}) @@ -55,7 +55,7 @@ module Awscr end it "can sign get with query params" do - time = Time.new(2007, 3, 27, 19, 42, 41) + time = Time.utc(2007, 3, 27, 19, 42, 41) Timecop.freeze(time) do request = HTTP::Request.new("GET", "/johnsmith/?prefix=photos&max-keys=50&marker=puppy", HTTP::Headers.new) @@ -70,7 +70,7 @@ module Awscr end it "can sign with sub resources" do - time = Time.new(2007, 3, 27, 19, 44, 46) + time = Time.utc(2007, 3, 27, 19, 44, 46) Timecop.freeze(time) do request = HTTP::Request.new("GET", "/johnsmith/?acl", HTTP::Headers.new) @@ -85,7 +85,7 @@ module Awscr end it "can sign deletes" do - time = Time.new(2007, 3, 27, 21, 20, 26) + time = Time.utc(2007, 3, 27, 21, 20, 26) Timecop.freeze(time) do request = HTTP::Request.new("DELETE", "/johnsmith/photos/puppy.jpg", HTTP::Headers.new) @@ -100,7 +100,7 @@ module Awscr end it "signs cname style requests" do - time = Time.new(2007, 3, 27, 21, 6, 8) + time = Time.utc(2007, 3, 27, 21, 6, 8) Timecop.freeze(time) do headers = HTTP::Headers.new @@ -128,7 +128,7 @@ module Awscr end it "signs plain get" do - time = Time.new(2007, 3, 28, 1, 29, 59) + time = Time.utc(2007, 3, 28, 1, 29, 59) Timecop.freeze(time) do request = HTTP::Request.new("GET", "/", HTTP::Headers.new) @@ -143,7 +143,7 @@ module Awscr end it "signs unicode" do - time = Time.new(2007, 3, 28, 1, 49, 49) + time = Time.utc(2007, 3, 28, 1, 49, 49) Timecop.freeze(time) do request = HTTP::Request.new("GET", "/dictionary/fran%C3%A7ais/pr%c3%a9f%c3%a8re", HTTP::Headers.new) diff --git a/src/awscr-signer/version.cr b/src/awscr-signer/version.cr index 8336139..e24b692 100644 --- a/src/awscr-signer/version.cr +++ b/src/awscr-signer/version.cr @@ -1,7 +1,7 @@ module Awscr MAJOR = "0" MINOR = "5" - PATCH = "1" + PATCH = "2" VERSION = [MAJOR, MINOR, PATCH].join(".") end