From 74134e82091ce291e84ac2e6f8f4306d6d0dc75b Mon Sep 17 00:00:00 2001 From: Brandon Robins Date: Tue, 21 Nov 2017 01:01:02 -0600 Subject: [PATCH] Clean up syntax --- lib/calligraphy/mkcol.rb | 2 +- lib/calligraphy/rails/web_dav_requests_controller.rb | 2 +- lib/calligraphy/unlock.rb | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/calligraphy/mkcol.rb b/lib/calligraphy/mkcol.rb index 2e0609d..ddb30d8 100644 --- a/lib/calligraphy/mkcol.rb +++ b/lib/calligraphy/mkcol.rb @@ -7,7 +7,7 @@ module Calligraphy @resource.create_collection set_content_location_header - + return :created end diff --git a/lib/calligraphy/rails/web_dav_requests_controller.rb b/lib/calligraphy/rails/web_dav_requests_controller.rb index 822af45..9fa682d 100644 --- a/lib/calligraphy/rails/web_dav_requests_controller.rb +++ b/lib/calligraphy/rails/web_dav_requests_controller.rb @@ -138,7 +138,7 @@ module Calligraphy::Rails def get(head: false) fresh_when(@resource, etag: @resource.etag) if @resource.readable? - + Calligraphy::Get.new(web_dav_request).request(head: head) end diff --git a/lib/calligraphy/unlock.rb b/lib/calligraphy/unlock.rb index 254c617..6ffc38c 100644 --- a/lib/calligraphy/unlock.rb +++ b/lib/calligraphy/unlock.rb @@ -6,6 +6,8 @@ module Calligraphy @resource.unlock lock_token_header end + private + def lock_token_header @headers['Lock-Token'].gsub Calligraphy::LOCK_TOKEN_ANGLE_REGEX, '' end