globalip 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +7 -0
  3. data/bin/globalip +10 -0
  4. data/globalip.gemspec +12 -0
  5. metadata +46 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 970847f2199b181583d47f4d1184fd1a356e6fa2
4
+ data.tar.gz: 0ec2ab34d2ffee5898717fae923fa4dad50040e0
5
+ SHA512:
6
+ metadata.gz: d02c4ea1e36ac292140ce3bbeb80687b1489ac60cc8c7e0f3be6e8c35745d32e8f9e29a04f24ae993da1ee32ee4b6c598d39303056ed808f28a7753fc30552c3
7
+ data.tar.gz: 5f57f2aa6454f6dcfc26d846616fd8b8f842d9f417449dff6fdde793c569746fe5ae1edbd7b688757f513ae9651962636f8e2cf287adbb268070233e6bb44460
@@ -0,0 +1,7 @@
1
+ ### Global IP Address
2
+
3
+ ```
4
+ $ gem install globalip
5
+
6
+ $ globalip
7
+ ```
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'net/http'
4
+ require 'json'
5
+ uri = URI('http://jsonip.com/')
6
+ response = Net::HTTP.get_response(uri)
7
+ data = response.body
8
+ result = JSON.parse(data)
9
+ ip = result['ip']
10
+ puts ip
@@ -0,0 +1,12 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'globalip'
3
+ s.version = '0.0.1'
4
+ s.date = '2015-01-29'
5
+ s.summary = "Your Global IP is :"
6
+ s.description = "View Your Global IP address"
7
+ s.author = "Dongri Jin"
8
+ s.email = 'dongriat@gmail.com'
9
+ s.homepage = 'https://github.com/dongri/globalip'
10
+ s.files = `git ls-files`.split($\)
11
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
12
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: globalip
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Dongri Jin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-01-29 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: View Your Global IP address
14
+ email: dongriat@gmail.com
15
+ executables:
16
+ - globalip
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - README.md
21
+ - bin/globalip
22
+ - globalip.gemspec
23
+ homepage: https://github.com/dongri/globalip
24
+ licenses: []
25
+ metadata: {}
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - '>='
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ requirements: []
41
+ rubyforge_project:
42
+ rubygems_version: 2.0.14
43
+ signing_key:
44
+ specification_version: 4
45
+ summary: 'Your Global IP is :'
46
+ test_files: []