tulios/nightcrawler_swift

View on GitHub
lib/nightcrawler_swift/commands/metadata.rb

Summary

Maintainability
A
0 mins
Test Coverage
module NightcrawlerSwift
  class Metadata < Command

    def execute path = nil
      resource_url = "#{connection.internal_url}/#{options.bucket}/#{path}"
      resource_url.gsub!(/\/$/, '') unless path

      response = head resource_url
      response.headers.symbolize_keys
    end

  end
end