public_ip 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 093c969531f5c5d6f98a4a0404682a2550fa0efe
4
+ data.tar.gz: 1bced70c93b53fc7aa5f32551aaac6d2033af68b
5
+ SHA512:
6
+ metadata.gz: 67916aa1d5d877e47237cdf15256fca7fe965f34c6b5d4e0a3bb0c4df97f8aa318f99959af4e89ad1e30b2a0e53b79ccd6c0344d5acd08ce1361c6c805e857e3
7
+ data.tar.gz: 69b7d8071f94abd4b92b6e66e34f18028a3e5d5fcf69e73cfd5a2d5f084060d6e3a9c4395fac3b43af64524701381d008479b2efac01d6a149106401610414ee
data/.gitignore ADDED
@@ -0,0 +1,7 @@
1
+ /.bundle/
2
+ /Gemfile.lock
3
+ /coverage/
4
+ /doc/
5
+ /pkg/
6
+ /spec/reports/
7
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,14 @@
1
+ AbcSize:
2
+ Enabled: false
3
+
4
+ Documentation:
5
+ Enabled: false
6
+
7
+ LineLength:
8
+ Max: 120
9
+
10
+ MethodLength:
11
+ Max: 15
12
+
13
+ SpaceAfterControlKeyword:
14
+ Enabled: true
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.2.3
data/.travis.yml ADDED
@@ -0,0 +1,13 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.3
4
+ - rbx-2
5
+ - ruby-head
6
+ before_install:
7
+ - gem update --system
8
+ - gem install bundler -v 1.10.6
9
+ install: 'bundle'
10
+ script: 'rake'
11
+ notifications:
12
+ email:
13
+ - pedro.carrico@gmail.com
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in public_ip.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Pedro Carriço
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,91 @@
1
+ # PublicIp
2
+
3
+ [![Build Status](https://secure.travis-ci.org/pedrocarrico/public_ip.png)](http://travis-ci.org/pedrocarrico/public_ip) [![Dependency Status](https://gemnasium.com/pedrocarrico/public_ip.png?travis)](https://gemnasium.com/pedrocarrico/public_ip) [![Gem Version](https://badge.fury.io/rb/public_ip.png)](http://badge.fury.io/rb/public_ip) [![Code Climate](https://codeclimate.com/github/pedrocarrico/public_ip/badges/gpa.svg)](https://codeclimate.com/github/pedrocarrico/public_ip)
4
+
5
+ Ever questioned what is your public internet IP and you've forgotten how to do it.
6
+ Instead of remembering every service that you can query to get your public internet IP you can use this gem.
7
+ You can use it directly in your code or in your CLI.
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'public_ip'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install public_ip
24
+
25
+ ## Usage
26
+
27
+ ### IRB
28
+
29
+ ```ruby
30
+ irb(main):001:0> require 'public_ip'
31
+ => true
32
+ irb(main):002:0> PublicIp.get_ip
33
+ => "79.169.202.87"
34
+ ```
35
+
36
+ ### CLI
37
+
38
+ ```bash
39
+ $ public_ip
40
+ 79.169.202.82
41
+ ```
42
+
43
+ Running with no arguments on the CLI will try and grab your IP address from a random service.
44
+ You can choose which service by passing an argument:
45
+
46
+ ```bash
47
+ $ public_ip akamai
48
+ 79.169.202.84
49
+ ```
50
+
51
+ You can also list all available services by like this:
52
+
53
+ ```bash
54
+ $ public_ip --list-services
55
+ The available services are:
56
+ akamai (http://whatismyip.akamai.com)
57
+ amazon_aws (http://checkip.amazonaws.com)
58
+ dyndns (http://checkip.dyndns.org)
59
+ i_can_haz_ip (http://icanhazip.com)
60
+ ident_me (http://ident.me)
61
+ ifconfig_me (http://ifconfig.me/ip)
62
+ ip_echo (http://ipecho.net/plain)
63
+ ip_info (http://ipinfo.io/ip)
64
+ ip_ogre (http://ipogre.com)
65
+ smart_ip (http://smart-ip.net/myip)
66
+ what_is_my_ip_address (http://bot.whatismyipaddress.com)
67
+ You may pick a service and run public_ip [service] to get your IP address from that service
68
+ ```
69
+
70
+ Be sure to run `public_ip --help` to get every available option for the CLI application.
71
+
72
+ ## Development
73
+
74
+ After checking out the repo, run `bin/setup` to install dependencies.
75
+ Then, run `rake spec` or `rake features` to run the tests.
76
+ Running `rake rubocop` will ensure consistent ruby syntax throughout the code.
77
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
78
+
79
+ To install this gem onto your local machine, run `bundle exec rake install`.
80
+ To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`,
81
+ which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
82
+
83
+ ## Contributing
84
+
85
+ Bug reports and pull requests are welcome on GitHub at https://github.com/pedrocarrico/public_ip.
86
+ This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the
87
+ [Contributor Covenant](contributor-covenant.org) code of conduct.
88
+
89
+ ## License
90
+
91
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+ require 'cucumber'
4
+ require 'cucumber/rake/task'
5
+ require 'rubocop/rake_task'
6
+
7
+ Cucumber::Rake::Task.new(:features) do |t|
8
+ t.cucumber_opts = 'features --format pretty'
9
+ end
10
+
11
+ RuboCop::RakeTask.new(:rubocop)
12
+
13
+ RSpec::Core::RakeTask.new(:spec)
14
+
15
+ task default: [:spec, :features, :rubocop]
data/bin/console ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'public_ip'
5
+ require 'pry'
6
+
7
+ Pry.start
data/bin/public_ip ADDED
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'optparse'
4
+ require 'methadone'
5
+ require 'public_ip'
6
+
7
+ class App
8
+ include Methadone::Main
9
+ include Methadone::CLILogging
10
+
11
+ main do |service|
12
+ if options['list-services']
13
+ list_of_services = PublicIp.list_services.map do |service_symbol, service_class|
14
+ "#{service_symbol} (#{service_class.uri})"
15
+ end.join("\n")
16
+
17
+ puts "The available services are:\n#{list_of_services}"
18
+ puts 'You may pick a service and run public_ip [service] to get your IP address from that service'
19
+ else
20
+ begin
21
+ service = service.nil? ? :random : service.to_sym
22
+ ip = PublicIp.get_ip(service: service)
23
+ puts ip
24
+ rescue PublicIp::UnknownService => e
25
+ puts e.message
26
+ puts 'To see a list of available services use: public_ip --list-services'
27
+ exit 1
28
+ end
29
+ end
30
+ end
31
+
32
+ description 'Find out what is your public internet IP address'
33
+
34
+ on('-l', '--list-services', 'List available services')
35
+ on('-l', '--list-services', 'List available services')
36
+
37
+ arg :service, :optional
38
+
39
+ version PublicIp::VERSION
40
+
41
+ go!
42
+ end
data/bin/setup ADDED
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
@@ -0,0 +1,9 @@
1
+ module PublicIp
2
+ module Service
3
+ class Akamai < Plain
4
+ def self.uri
5
+ URI('http://whatismyip.akamai.com')
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module PublicIp
2
+ module Service
3
+ class AmazonAWS < Plain
4
+ def self.uri
5
+ URI('http://checkip.amazonaws.com')
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ module PublicIp
2
+ module Service
3
+ class Dyndns < MatchedExpression
4
+ def self.uri
5
+ URI('http://checkip.dyndns.org')
6
+ end
7
+
8
+ def self.match_regex
9
+ /Current IP Address: ((?:[0-9]{1,3}\.){3}[0-9]{1,3})/
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ module PublicIp
2
+ module Service
3
+ class ICanHazIp < Plain
4
+ def self.uri
5
+ URI('http://icanhazip.com')
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module PublicIp
2
+ module Service
3
+ class IdentMe < Plain
4
+ def self.uri
5
+ URI('http://ident.me')
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module PublicIp
2
+ module Service
3
+ class IfconfigMe < Plain
4
+ def self.uri
5
+ URI('http://ifconfig.me/ip')
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module PublicIp
2
+ module Service
3
+ class IpEcho < Plain
4
+ def self.uri
5
+ URI('http://ipecho.net/plain')
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ module PublicIp
2
+ module Service
3
+ class IpInfo < Plain
4
+ def self.uri
5
+ URI('http://ipinfo.io/ip')
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ module PublicIp
2
+ module Service
3
+ class IpOgre < Plain
4
+ def self.uri
5
+ URI('http://ipogre.com')
6
+ end
7
+
8
+ def self.headers
9
+ { 'User-Agent' => 'curl/7.9.8 (i686-pc-linux-gnu) libcurl 7.9.8 (OpenSSL 0.9.6b) (ipv6 enabled)' }
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ module PublicIp
2
+ module Service
3
+ class MatchedExpression < Simple
4
+ extend PublicIp::Service::Registrable
5
+
6
+ attr_reader :match_regex
7
+
8
+ def self.ip
9
+ response = perform_request
10
+
11
+ response.body.match(match_regex)[1].strip
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ module PublicIp
2
+ module Service
3
+ class Plain < Simple
4
+ extend PublicIp::Service::Registrable
5
+
6
+ def self.ip
7
+ response = perform_request
8
+
9
+ response.body.strip
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ module PublicIp
2
+ module Service
3
+ module Registrable
4
+ def inherited(child_class)
5
+ PublicIp::Service::Registry.register_service(child_class)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,58 @@
1
+ require 'singleton'
2
+
3
+ module PublicIp
4
+ module Service
5
+ class Registry
6
+ include Singleton
7
+
8
+ attr_reader :service_database
9
+
10
+ def self.register_service(service_class)
11
+ unless instance.service_database.key?(service_class.symbol)
12
+ instance.service_database[service_class.symbol] = service_class
13
+ end
14
+ end
15
+
16
+ def self.[](service)
17
+ instance[service]
18
+ end
19
+
20
+ def self.random_service
21
+ instance.random_service
22
+ end
23
+
24
+ def self.available_services
25
+ instance.available_services
26
+ end
27
+
28
+ def [](service)
29
+ require "public_ip/service/#{service}"
30
+ service_database[service]
31
+ rescue LoadError
32
+ raise PublicIp::UnknownService, "Service #{service} is not a valid service"
33
+ end
34
+
35
+ def random_service
36
+ register_all_services
37
+
38
+ service_database.values.sample
39
+ end
40
+
41
+ def available_services
42
+ register_all_services
43
+ service_database
44
+ end
45
+
46
+ private
47
+
48
+ def initialize
49
+ @service_database = {}
50
+ end
51
+
52
+ def register_all_services
53
+ path = File.join(File.dirname(__FILE__), '*.rb')
54
+ Dir[path].each { |file| require file }
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,37 @@
1
+ require 'net/http'
2
+ require 'timeout'
3
+
4
+ module PublicIp
5
+ module Service
6
+ class Simple
7
+ attr_reader :uri
8
+ attr_reader :headers
9
+
10
+ def self.uri
11
+ fail 'Not implemented'
12
+ end
13
+
14
+ def self.headers
15
+ {}
16
+ end
17
+
18
+ # Perform a demodulize and underscore (as in Rails)
19
+ def self.symbol
20
+ symbol = name.match(/(?:.*)::(.*)$/)[1]
21
+ symbol.gsub!(/::/, '/')
22
+ symbol.gsub!(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
23
+ symbol.gsub!(/([a-z\d])([A-Z])/, '\1_\2')
24
+ symbol.tr!('-', '_')
25
+ symbol.downcase!
26
+ symbol.to_sym
27
+ end
28
+
29
+ def self.perform_request
30
+ Timeout.timeout(PublicIp::TIMEOUT_IN_SECS) do
31
+ request = Net::HTTP::Get.new(uri, headers)
32
+ Net::HTTP.start(uri.host, uri.port) { |http| http.request(request) }
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,9 @@
1
+ module PublicIp
2
+ module Service
3
+ class SmartIp < Plain
4
+ def self.uri
5
+ URI('http://smart-ip.net/myip')
6
+ end
7
+ end
8
+ end
9
+ end
File without changes
@@ -0,0 +1,9 @@
1
+ module PublicIp
2
+ module Service
3
+ class WhatIsMyIpAddress < Plain
4
+ def self.uri
5
+ URI('http://bot.whatismyipaddress.com')
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module PublicIp
2
+ VERSION = '0.1.0'
3
+ end
data/lib/public_ip.rb ADDED
@@ -0,0 +1,37 @@
1
+ require 'public_ip/service/registry'
2
+ require 'public_ip/service/registrable'
3
+ require 'public_ip/service/simple'
4
+ require 'public_ip/service/plain'
5
+ require 'public_ip/service/matched_expression'
6
+
7
+ require 'public_ip/version'
8
+
9
+ module PublicIp
10
+ MAX_RETRY_ATTEMPTS = 3
11
+ TIMEOUT_IN_SECS = 3
12
+
13
+ class UnknownService < StandardError; end
14
+ class TimedOut < StandardError; end
15
+
16
+ module_function
17
+
18
+ def get_ip(service: :random)
19
+ tries ||= MAX_RETRY_ATTEMPTS
20
+ if service == :random
21
+ PublicIp::Service::Registry.random_service.ip
22
+ else
23
+ PublicIp::Service::Registry[service].ip
24
+ end
25
+ rescue Timeout::Error
26
+ tries -= 1
27
+ if tries > 0 && service == :random
28
+ retry
29
+ else
30
+ raise PublicIp::TimedOut, 'Took too long to get your public ip address, try with another service'
31
+ end
32
+ end
33
+
34
+ def list_services
35
+ PublicIp::Service::Registry.available_services
36
+ end
37
+ end
data/public_ip.gemspec ADDED
@@ -0,0 +1,35 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'public_ip/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'public_ip'
7
+ spec.version = PublicIp::VERSION
8
+ spec.authors = ['Pedro Carriço']
9
+ spec.email = ['pedro.carrico@gmail.com']
10
+
11
+ spec.summary = 'Get your public internet IP the easy way.'
12
+ spec.description = <<-DESCRIPTION
13
+ Ever questioned what is your public internet IP and you've forgotten how to do it.
14
+ Instead of remembering every service that you can query to get your public internet IP you can use PublicIP.
15
+ You can use it directly in your code or in your CLI.
16
+ DESCRIPTION
17
+
18
+ spec.homepage = 'https://github.com/pedrocarrico/public_ip'
19
+ spec.license = 'MIT'
20
+
21
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
+ spec.bindir = 'bin'
23
+ spec.executables = ['public_ip']
24
+ spec.require_paths = ['lib']
25
+
26
+ spec.add_dependency 'methadone', '~> 1.9.2'
27
+
28
+ spec.add_development_dependency 'bundler', '~> 1.10'
29
+ spec.add_development_dependency 'rake', '~> 10.0'
30
+ spec.add_development_dependency 'rspec', '~> 3.4'
31
+ spec.add_development_dependency 'rubocop', '~> 0.35.1'
32
+ spec.add_development_dependency 'pry', '~> 0.10.3'
33
+ spec.add_development_dependency 'webmock', '~> 1.22.3'
34
+ spec.add_development_dependency 'aruba', '~> 0.11.2'
35
+ end
metadata ADDED
@@ -0,0 +1,193 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: public_ip
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Pedro Carriço
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-01-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: methadone
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.9.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.9.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.10'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.4'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.4'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.35.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.35.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.10.3
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.10.3
97
+ - !ruby/object:Gem::Dependency
98
+ name: webmock
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 1.22.3
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 1.22.3
111
+ - !ruby/object:Gem::Dependency
112
+ name: aruba
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.11.2
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.11.2
125
+ description: |
126
+ Ever questioned what is your public internet IP and you've forgotten how to do it.
127
+ Instead of remembering every service that you can query to get your public internet IP you can use PublicIP.
128
+ You can use it directly in your code or in your CLI.
129
+ email:
130
+ - pedro.carrico@gmail.com
131
+ executables:
132
+ - public_ip
133
+ extensions: []
134
+ extra_rdoc_files: []
135
+ files:
136
+ - ".gitignore"
137
+ - ".rspec"
138
+ - ".rubocop.yml"
139
+ - ".ruby-version"
140
+ - ".travis.yml"
141
+ - CODE_OF_CONDUCT.md
142
+ - Gemfile
143
+ - LICENSE.txt
144
+ - README.md
145
+ - Rakefile
146
+ - bin/console
147
+ - bin/public_ip
148
+ - bin/setup
149
+ - lib/public_ip.rb
150
+ - lib/public_ip/service/akamai.rb
151
+ - lib/public_ip/service/amazon_aws.rb
152
+ - lib/public_ip/service/dyndns.rb
153
+ - lib/public_ip/service/i_can_haz_ip.rb
154
+ - lib/public_ip/service/ident_me.rb
155
+ - lib/public_ip/service/ifconfig_me.rb
156
+ - lib/public_ip/service/ip_echo.rb
157
+ - lib/public_ip/service/ip_info.rb
158
+ - lib/public_ip/service/ip_ogre.rb
159
+ - lib/public_ip/service/matched_expression.rb
160
+ - lib/public_ip/service/plain.rb
161
+ - lib/public_ip/service/registrable.rb
162
+ - lib/public_ip/service/registry.rb
163
+ - lib/public_ip/service/simple.rb
164
+ - lib/public_ip/service/smart_ip.rb
165
+ - lib/public_ip/service/untitled
166
+ - lib/public_ip/service/what_is_my_ip_address.rb
167
+ - lib/public_ip/version.rb
168
+ - public_ip.gemspec
169
+ homepage: https://github.com/pedrocarrico/public_ip
170
+ licenses:
171
+ - MIT
172
+ metadata: {}
173
+ post_install_message:
174
+ rdoc_options: []
175
+ require_paths:
176
+ - lib
177
+ required_ruby_version: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ required_rubygems_version: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ requirements: []
188
+ rubyforge_project:
189
+ rubygems_version: 2.4.5.1
190
+ signing_key:
191
+ specification_version: 4
192
+ summary: Get your public internet IP the easy way.
193
+ test_files: []