lib/locomotive/wagon/liquid/tags/consume_swoop.rb
def prepare_url(token)
            known_endpoints = /events|people/
            if token.match(::Liquid::QuotedString) and token =~ known_endpoints
              # Prepend base URL for URL values passed in
              token = token.gsub(/['"]/, '')

              # Drop leading slash if present
              token = token.slice(1, token.length) if token[0] == "/"

              # Prepend value and wrap in quotes before passing along
              token = "'#{ @swoop_base }/#{ token }'"
            end

            # Delegate back to base implementation
            super(token)
          end
# If a URL is passed, prepend the SWOOP base URL before passing the value
# back to the base class
If a URL is passed, prepend the SWOOP base URL before passing the value
back to the base class
If a URL is passed prepend the SWOOP base URL before passing the value back to the base class
def prepare_url(token)
            known_endpoints = /events|people/
            if token.match(::Liquid::QuotedString) and token =~ known_endpoints
              token = token.gsub(/['"]/, '')
              token = token.slice(1, token.length) if token[0] == "/"
              token = "'#{ @swoop_base }/#{ token }'"
            end
            super(token)
          end
def prepare_url ( token ) known_endpoints = / events|people / if token . match ( :: Liquid :: QuotedString ) and token =~ known_endpoints token = token . gsub ( / ['"] / , '' ) token = token . slice ( 1 , token . length ) if token [ 0 ] == "/" token = "'#{ @swoop_base }/#{ token }'" end super ( token ) end
If a URL is passed, prepend the SWOOP base URL before passing the value
back to the base class
If a URL is passed prepend the SWOOP base URL before passing the value back to the base class
# Prepend base URL for URL values passed in # Drop leading slash if present # Prepend value and wrap in quotes before passing along # Delegate back to base implementation
token