Sha256: 1f15dab45dc75a57ca8765f6926a296f24c3279867ade07ffd7f69ba6222a364

Contents?: true

Size: 211 Bytes

Versions: 4

Compression:

Stored size: 211 Bytes

Contents

module NightcrawlerSwift
  class Upload < Command

    def execute path, file
      response = put "#{connection.upload_url}/#{path}", body: file.read
      [200, 201].include?(response.code)
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nightcrawler_swift-0.2.1 lib/nightcrawler_swift/upload.rb
nightcrawler_swift-0.2.0 lib/nightcrawler_swift/upload.rb
nightcrawler_swift-0.1.1 lib/nightcrawler_swift/upload.rb
nightcrawler_swift-0.1.0 lib/nightcrawler_swift/upload.rb