ipcheck 0.1.2 → 1.1.0

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
  SHA256:
3
- metadata.gz: bb4a3a0459354ec4404afed4d5229233bd0b3d9243e1f11aa9445a089e768cc0
4
- data.tar.gz: a7a8e803cf14fe509233514df0ff6579ef5a742d94eaf36f88864a8d15727a3d
3
+ metadata.gz: 5d45c3ce454d64a2c69607e152f42be6827729531a8b509f5ac0295588146b68
4
+ data.tar.gz: 862ef643791b14b4fc13c0b37a391fafcfe0eb605dcb9d911267a8bb0ea5f498
5
5
  SHA512:
6
- metadata.gz: b2d417b2272b8e91f70bc7494fd3e585fdbdbfa80067e2d46df2e2e2ae530adf21e1fbd1d6d16b32bf20a579f846b938db53d562512fce3650ce2ab7cd883b6c
7
- data.tar.gz: c0b9b2bc894db753e51b932b233412de4c0bf97a602c41a3fb6fc8ceb5db17adb50628beeececaf8ca89eb26c2cdac1e696aa6ad0d738ffb802224bf666bb570
6
+ metadata.gz: 6cef0cbcfe3d9c57743ab0e3ed5698517c22e017708722dbc31ee40badb5cc0a0cb27b73dd8c41ae068a9d8ca0fef1b9ada5185c4e4ad03d003684727a34e098
7
+ data.tar.gz: ea219e042de3e94a32a79ee475637bbf0a23c38712226f406833211e07a94f70dbf8c77ef314d77f1425a1c8c5e8c12521267cdb16f87035d747c4dd8c160820
data/.rubocop.yml CHANGED
@@ -15,3 +15,6 @@ Layout/LineLength:
15
15
 
16
16
  Style/Documentation:
17
17
  Enabled: false
18
+
19
+ Metrics/BlockLength:
20
+ AllowedMethods: ['describe', 'context']
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ipcheck (0.1.2)
4
+ ipcheck (1.1.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -24,6 +24,8 @@ Or install it yourself as:
24
24
  ## Usage
25
25
 
26
26
  ```ruby
27
+ my_ip = Ipcheck.my_ip # 169.254.1.2
28
+
27
29
  ip_meta = Ipcheck.lookup('8.8.8.8')
28
30
  ip_meta.city # Ashburn
29
31
  ip_meta.country # United States
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ipcheck
4
- VERSION = '0.1.2'
4
+ VERSION = '1.1.0'
5
5
  end
data/lib/ipcheck.rb CHANGED
@@ -14,4 +14,9 @@ module Ipcheck
14
14
  response = URI.parse(url).read
15
15
  Metadata.parse(response)
16
16
  end
17
+
18
+ def self.my_ip
19
+ url = 'https://api64.ipify.org'
20
+ URI.parse(url).read
21
+ end
17
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipcheck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Zabrodin