Sha256: a10b9e9c16df497f55e08d3aec07f6d452b5a1a6fa5969d56bef7b26a67ab7cc

Contents?: true

Size: 389 Bytes

Versions: 6

Compression:

Stored size: 389 Bytes

Contents

#!/usr/bin/env ruby

require "bundler/setup"
require "distack/urlsign"

key, url = ARGV

if key.nil? || url.nil?
  puts Distack::URLSign.strip_heredoc <<-EOF
    Usage: #{$0} <key> <url>

    Calculates a HMAC signature for the URL using the provided key.
    Prints the url with the _signature parameter.

  EOF

  exit(1)
end

puts Distack::URLSign::Signer.new(key).sign(URI.parse(url))

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
distack-urlsign-0.3.3 exe/distack-urlsign
distack-urlsign-0.3.2 exe/distack-urlsign
distack-urlsign-0.3.1 exe/distack-urlsign
distack-urlsign-0.3.0 exe/distack-urlsign
distack-urlsign-0.2.0 exe/distack-urlsign
distack-urlsign-0.1.0 exe/distack-urlsign