From 560c1ef994143095adebdd8ea1a9e4607ff49547 Mon Sep 17 00:00:00 2001 From: Brandon Robins Date: Sun, 17 Dec 2017 12:56:24 -0600 Subject: [PATCH] Add comments --- lib/calligraphy.rb | 29 ++++++++-- lib/calligraphy/rails/mapper.rb | 55 ++++++++++++++++++- .../rails/web_dav_requests_controller.rb | 19 ++++--- 3 files changed, 88 insertions(+), 15 deletions(-) diff --git a/lib/calligraphy.rb b/lib/calligraphy.rb index 96b567c..09d53cc 100644 --- a/lib/calligraphy.rb +++ b/lib/calligraphy.rb @@ -23,35 +23,54 @@ require 'calligraphy/put' require 'calligraphy/unlock' module Calligraphy + # Constants used throughout Calligraphy. DAV_NS = 'DAV:' DAV_NO_LOCK_REGEX = /DAV:no-lock/i DAV_NOT_NO_LOCK_REGEX = /Not\s+/i ETAG_IF_REGEX = /\[(.+?)\]/ + INFINITY = 1.0 / 0.0 unless defined? INFINITY LOCK_TOKEN_ANGLE_REGEX = /[<>]/ LOCK_TOKEN_REGEX = /<(urn:uuid:.+?)>/ RESOURCE_REGEX = /^<+(.+?)>\s/ TAGGED_LIST_REGEX = /\)\s