Sha256: 1e23994243c33d9ee859c7fc5970562f90d3e71dc33c0ad2863e857d58d61e6f

Contents?: true

Size: 287 Bytes

Versions: 2

Compression:

Stored size: 287 Bytes

Contents

CommitMsgUrlShortener::Service.define do |commit_message|
  def call_tinyurl_api long_url
    error_safe_request do
      uri = URI "http://tinyurl.com/api-create.php?url=#{long_url}"
      Net::HTTP.get uri
    end
  end

  each_long_url(commit_message) {|url| call_tinyurl_api url}
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
commit-msg-url-shortener-0.0.2 lib/commit-msg-url-shortener/services/tinyurl.com.rb
commit-msg-url-shortener-0.0.1 lib/commit-msg-url-shortener/services/tinyurl.com.rb