ipify 0.3.0 → 0.4.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -1
  3. data/lib/ipify/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f6ed2e822a7daffac35154bf508112e4d6df5df
4
- data.tar.gz: c1832e18eba09cd705e8c45632fbb373eee21779
3
+ metadata.gz: cd7624018d5a5e11dbbc962529f1cbdccc5361f5
4
+ data.tar.gz: 5c5facbfc9db35a53cb92de7ca525a3241b8ddfd
5
5
  SHA512:
6
- metadata.gz: 8ee22bb67a8ff713295afc629c8de6a3b99c20bb494519254c58f25296fd52cf02431567ff424fbb98985a6458bd2097da188396d9dcb19c856ddcb4e61833ae
7
- data.tar.gz: 44e842f67c93881e163aef294cc6a46bfa2266f23988b1951e54820599385b0375b73d8ac09f770f938b9dd979ab7516a35d34066d71ef442e2916c038e824f9
6
+ metadata.gz: 42e65b9e274a72d98d7f3bcc18dca4b5915e42ab25ea0e31991f8dc00356b4297e5fd4cc69a927ac019ee2dc41f174b9b811a75ae6d4680476edd65a83d64ff4
7
+ data.tar.gz: 1e331fba66ba7e2ad77bf48d580553541cd636dec3fd1ea7af3a77c644d31637d7e0767d54bc9028fcecca190fa9c5fa34779b133ce8786ed8b803897af816b5
data/README.md CHANGED
@@ -20,7 +20,27 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- TODO: Write usage instructions here
23
+ Pretty simple, you can either ignore exceptions or deal with them:
24
+
25
+ ```
26
+ require 'ipify'
27
+
28
+ # deal w/errors!
29
+ begin
30
+ ip = Ipify.ip!
31
+ # => '1.2.3.4'
32
+ rescue Ipify::ConnectionError
33
+ # failed to connect to the service
34
+ rescue Ipify::ServiceError
35
+ # ipify.org is having issues!
36
+ rescue
37
+ # something else...
38
+ end
39
+
40
+ # ignore errors!
41
+ ip = Ipify.ip
42
+ # => '1.2.3.4'
43
+ ```
24
44
 
25
45
  ## Development
26
46
 
@@ -1,3 +1,3 @@
1
1
  module Ipify
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Veys