wurly 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +19 -0
  3. data/README.md +3 -0
  4. data/bin/wurly +23 -0
  5. metadata +47 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: dc5fd9436349076a9fb379b52f2b29325bc91d28a6dfa379c1969429ff54c7ff
4
+ data.tar.gz: 5e3aad6bb3f139e18e76f1251de1803e3c250f34ddf6391ce93e3cf197cdccf1
5
+ SHA512:
6
+ metadata.gz: 0c16d43cae8bc392ff902691043190473ae63ecd6736d42221a9e1a62b7b5c6002ea4ec39fcf5398594f34c496730cf80abb6c167db6bfca0200818916fb91ec
7
+ data.tar.gz: 46f4264efc6148166a2f36f6b805045e2041e735b763f31693d8a173dd4b6823e48d68a3183434c3cf7c1e00b1bd4e433ba9cfd3fa08d3183f102bf0c5cc5c59
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2019 Daniel Stamer, Mahindra Kumar
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # wurly
2
+
3
+ `wurly` shortens URLs!
data/bin/wurly ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'httparty'
4
+ require 'json'
5
+ require 'thor'
6
+
7
+ class Wurly < Thor
8
+ desc 'version', 'Print `wurly` version info'
9
+ def version
10
+ puts "wurly version: #{Gem.loaded_specs['wurly'].version}"
11
+ end
12
+
13
+ desc 'shorten URL', 'Shorten URL'
14
+ def shorten(url)
15
+ domain = Gem.loaded_specs['wurly'].homepage
16
+ response = HTTParty.get("#{domain}/s?url='#{url}'")
17
+ object = JSON.parse(response)
18
+ puts "ERROR: #{object['message']}" unless object['shortened_url']
19
+ puts object['shortened_url']
20
+ end
21
+ end
22
+
23
+ Wurly.start(ARGV)
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wurly
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Daniel Stamer
8
+ - Mahindra Kumar
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2019-05-03 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: " Wurly shortens long HTTPS/HTTP URLs.'\n"
15
+ email: dan@hello-world.sh
16
+ executables:
17
+ - wurly
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - LICENSE
22
+ - README.md
23
+ - bin/wurly
24
+ homepage: https://urly-wurly-oyehxjlgwa-uc.a.run.app
25
+ licenses:
26
+ - MIT
27
+ metadata: {}
28
+ post_install_message:
29
+ rdoc_options: []
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ required_rubygems_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ requirements: []
43
+ rubygems_version: 3.0.1
44
+ signing_key:
45
+ specification_version: 4
46
+ summary: wurly is an URL shortener.
47
+ test_files: []