Skip to content

Commit

Permalink
Merge pull request #36 from taylorfinnell/crystal-0.25.0
Browse files Browse the repository at this point in the history
fixes for crystal 0.25.0
  • Loading branch information
taylorfinnell committed Jun 23, 2018
2 parents 524b818 + 6dbbdbd commit af72437
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -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 <tmfinnell@gmail.com>
Expand Down
18 changes: 9 additions & 9 deletions spec/awscr-signer/signers/v2_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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"})
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/awscr-signer/version.cr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Awscr
MAJOR = "0"
MINOR = "5"
PATCH = "1"
PATCH = "2"

VERSION = [MAJOR, MINOR, PATCH].join(".")
end

0 comments on commit af72437

Please sign in to comment.