grd 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/bin/grd +21 -0
- data/lib/grd/version.rb +3 -0
- data/lib/grd.rb +1 -0
- metadata +47 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MzE1MWRjMDdiNzgzZDdkZTYxNjZmOTBiNTg5ODFiY2NjMmZhYzQzNQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZGU4NWExOTYzMmRjMjU4YTExZGRlODM5YTc3ODNiYTc2M2Q1ZTE2MQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NmE0MDZjY2I1ZTBiZDZiNTkwMDc1YTY0NzQ5N2UzMGU0NGZhODhjNDEyNDQx
|
10
|
+
YTViZjJjODk1NzEzNzMxYjBkNTFhYzYyOTg1NzFiZTRjMDhlYjY4Y2VhOWU0
|
11
|
+
ZDc3YTBjYTc2OGI5OTQzNDlhNmM1ZjViNzVhYmY3OGNmY2ZjMmE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ODI3YmEzY2VhNDQwNjhiYjM0Y2Y1YTBiY2IxZGM1ZmM3YTY5MjgyMDM0ZTc0
|
14
|
+
OGY0ZGNlNjRkZDM0YTg1NTNkNGJiYTBkY2VjMGMyZmU5OGVjNzQ2OWQ2OGQ4
|
15
|
+
NDhmZjJiNWE4MTYxNWRlOWViNjljMTNiOGNhMmIzNjNjZDg2MTE=
|
data/bin/grd
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
# GRD (Get ReDirect)
|
4
|
+
|
5
|
+
begin
|
6
|
+
require 'net/http'
|
7
|
+
|
8
|
+
val = ARGV[0].dup
|
9
|
+
val.prepend('http://') unless !!val['http://']
|
10
|
+
uri = URI.parse val
|
11
|
+
req = Net::HTTP::Get.new(uri.request_uri)
|
12
|
+
puts Net::HTTP.new(uri.host).start { |server|
|
13
|
+
server.request(req)
|
14
|
+
}["location"]
|
15
|
+
rescue Exception => e
|
16
|
+
puts "Get ReDirect: Get the URL redirection."
|
17
|
+
puts "by Daniel P. Clark / License: The MIT License"
|
18
|
+
puts
|
19
|
+
puts " Usage: grd www.example.com"
|
20
|
+
puts
|
21
|
+
end
|
data/lib/grd/version.rb
ADDED
data/lib/grd.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'grd/version'
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: grd
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daniel P. Clark / 6ftDan(TM)
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-05-21 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Get url redirection on the command line. 'grd www.example.com'
|
14
|
+
email: webmaster@6ftdan.com
|
15
|
+
executables:
|
16
|
+
- grd
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- bin/grd
|
21
|
+
- lib/grd.rb
|
22
|
+
- lib/grd/version.rb
|
23
|
+
homepage: http://www.github.com/danielpclark/grd
|
24
|
+
licenses:
|
25
|
+
- The MIT License (MIT)
|
26
|
+
metadata: {}
|
27
|
+
post_install_message:
|
28
|
+
rdoc_options: []
|
29
|
+
require_paths:
|
30
|
+
- lib
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
requirements: []
|
42
|
+
rubyforge_project:
|
43
|
+
rubygems_version: 2.2.2
|
44
|
+
signing_key:
|
45
|
+
specification_version: 4
|
46
|
+
summary: Get url redirection on the command line.
|
47
|
+
test_files: []
|