ipcountry 0.0.4 → 0.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94e4f06cf8b63e6220ae2cec30d8be54da51253d
4
- data.tar.gz: 8798ec4a2248cb315cfe9eb6d9170400ab08dde0
3
+ metadata.gz: 70cfb04aeb4c881a83ce42710db7bf528e3f6ec1
4
+ data.tar.gz: d39159179d2609c3347c59d0b4f6ddebb248a47a
5
5
  SHA512:
6
- metadata.gz: e52e130a850dbaebabdad395aaf3fae912e009ab33f34e74e7a4d7131fecdf4543cd34109580898751cd8492615a0d3679bc7b47ef5d43999cc56f1bf32cdf23
7
- data.tar.gz: 7db8e56750ab4a9c748972f5988238bed209fc7d03a236515b6e87383b7938480d4a333e2e758c064bb4554bd2cae9787f7b15a6d80b1a7414abf00b47f6ec39
6
+ metadata.gz: f2b25e20c1ef1b52922f8451e9ecfec88c0677005aa7d80b286c5c6ecc7314b9e1be35db7ebe390ca41cd9abf42076deeed758b026df1a2bb1ea546ff02c017d
7
+ data.tar.gz: a575c2a5b14ab4616fb8ed7496142eb8042efd4e4a3059b1aab2ff4e3715848e055c1f9ff14b0eec46d2cd5a279f04c0c4a448e67cbae11b08dc5cec2736c114
data/bin/ipcountry CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  require 'ipcountry'
4
4
 
5
- ARGV.each{ |arg|
6
- info = Ipcountry::Info.new(arg)
5
+ def send(ip)
6
+ info = Ipcountry::Info.new(ip)
7
7
  result = ''
8
8
  if info.status == 'success'
9
9
  result = info.query + ':' + info.country
@@ -11,5 +11,15 @@ ARGV.each{ |arg|
11
11
  result = info.query + ':' + info.message
12
12
  end
13
13
  p result
14
- }
14
+ end
15
+
16
+
17
+ if ARGV.length == 0
18
+ send("")
19
+ else
20
+ ARGV.each{ |arg|
21
+ send(arg)
22
+ }
23
+ end
24
+
15
25
 
@@ -1,3 +1,3 @@
1
1
  module Ipcountry
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipcountry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yusuke Ohashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-15 00:00:00.000000000 Z
11
+ date: 2014-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.2.2
78
+ rubygems_version: 2.4.2
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: look up ip address information.