portchecker 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +3 -0
- data/.rubocop.yml +30 -0
- data/.travis.yml +65 -0
- data/CHANGELOG.md +5 -0
- data/CODEOWNERS +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +71 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/portcheck +82 -0
- data/lib/portchecker.rb +32 -0
- data/lib/portchecker/version.rb +3 -0
- data/portchecker.gemspec +28 -0
- metadata +109 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4dd560f09f6975ebca18bd437772e19c552a5a46778a556c6ac7e1924f3e47a9
|
4
|
+
data.tar.gz: 8a19668a51e2c9abeb2251cb926d96d78a87ab4a1a076324d2dccbc40abff7a8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fae6e9c969233fe7a83e9a1c5eb491ecd4d56f6081be54dba0cc905542264c77a14b5e9d669b2b290845b29a627c30f46f89e06ecdb4b3da46f163fd4473bf84
|
7
|
+
data.tar.gz: eafeb39479df89be9efcc95cb47bde8c8a0015c036ad2fe546831971f706f3ad37b49e0a2403cfa0c0bbc1cc87acbbcf955e065220c3a7b885030e6e0450be9c
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
Layout/IndentationWidth:
|
2
|
+
Width: 4
|
3
|
+
|
4
|
+
Metrics/AbcSize:
|
5
|
+
Max: 50
|
6
|
+
|
7
|
+
Metrics/LineLength:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Metrics/BlockLength:
|
11
|
+
Max: 40
|
12
|
+
|
13
|
+
Metrics/CyclomaticComplexity:
|
14
|
+
Max: 20
|
15
|
+
|
16
|
+
Metrics/MethodLength:
|
17
|
+
Max: 60
|
18
|
+
|
19
|
+
Metrics/PerceivedComplexity:
|
20
|
+
Max: 20
|
21
|
+
|
22
|
+
Style/GlobalVars:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Style/RaiseArgs:
|
26
|
+
EnforcedStyle: compact
|
27
|
+
|
28
|
+
Style/WordArray:
|
29
|
+
EnforcedStyle: brackets
|
30
|
+
|
data/.travis.yml
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
matrix:
|
2
|
+
include:
|
3
|
+
- language: ruby
|
4
|
+
name: "Bundler (rvm 2.4.4 & bundler 1.17.3)"
|
5
|
+
rvm: 2.4.4
|
6
|
+
before_install:
|
7
|
+
- gem install bundler -v 1.17.3
|
8
|
+
- language: ruby
|
9
|
+
name: "Bundler (rvm 2.4.4 & bundler 2.0.1)"
|
10
|
+
rvm: 2.4.4
|
11
|
+
before_install:
|
12
|
+
- gem install bundler -v 2.0.1
|
13
|
+
- language: ruby
|
14
|
+
name: "Bundler (rvm 2.5.3 & bundler 2.0.1)"
|
15
|
+
rvm: 2.5.3
|
16
|
+
before_install:
|
17
|
+
- gem install bundler -v 2.0.1
|
18
|
+
- language: ruby
|
19
|
+
name: "Bundler (rvm 2.6.1 & bundler 2.0.1)"
|
20
|
+
rvm: 2.6.1
|
21
|
+
before_install:
|
22
|
+
- gem install bundler -v 2.0.1
|
23
|
+
- language: ruby
|
24
|
+
name: "Rubocop (rvm 2.4.4)"
|
25
|
+
env: SKIP_INTERPRETER=true
|
26
|
+
rvm: 2.4.4
|
27
|
+
before_install:
|
28
|
+
- git clone https://github.com/TravisToolbox/rubocop-travis.git
|
29
|
+
install:
|
30
|
+
- ./rubocop-travis/install.sh
|
31
|
+
script:
|
32
|
+
- ./rubocop-travis/scan.sh
|
33
|
+
- language: ruby
|
34
|
+
name: "Rubocop (rvm 2.5.3)"
|
35
|
+
env: SKIP_INTERPRETER=true
|
36
|
+
rvm: 2.5.3
|
37
|
+
before_install:
|
38
|
+
- git clone https://github.com/TravisToolbox/rubocop-travis.git
|
39
|
+
install:
|
40
|
+
- ./rubocop-travis/install.sh
|
41
|
+
script:
|
42
|
+
- ./rubocop-travis/scan.sh
|
43
|
+
- language: ruby
|
44
|
+
name: "Rubocop (rvm 2.6.1)"
|
45
|
+
env: SKIP_INTERPRETER=true
|
46
|
+
rvm: 2.6.1
|
47
|
+
before_install:
|
48
|
+
- git clone https://github.com/TravisToolbox/rubocop-travis.git
|
49
|
+
install:
|
50
|
+
- ./rubocop-travis/install.sh
|
51
|
+
script:
|
52
|
+
- ./rubocop-travis/scan.sh
|
53
|
+
- language: ruby
|
54
|
+
name: "Link Checker (rvm 2.6.1)"
|
55
|
+
rvm: 2.6.1
|
56
|
+
before_install:
|
57
|
+
- mkdir travis
|
58
|
+
- git clone https://github.com/TravisToolbox/awesomebot-travis.git travis/awesomebot
|
59
|
+
install:
|
60
|
+
- ./travis/awesomebot/install.sh
|
61
|
+
script:
|
62
|
+
- ./travis/awesomebot/scan.sh
|
63
|
+
notifications:
|
64
|
+
slack:
|
65
|
+
secure: V8ENgteAFoJO+RV+jJDU32lopmTtRcqMb0Umk8RJSA3yVovkLmumjX9Da4pd5qGeurOn0RLI212mpIcvI5B4IdCmPavgY2eetYM6f7sC6W5WdKw6AcJmS31zmhA145mpo92phHxP3sCgMtJurgWRm1e964LjDCDUySZf4CSGAltlsJt9QD/JPXgvW+7twqI/jBTvAORSmeip0TIpwJE85kCFcVVQzSoAtDzCfbSM7kXQvcy3jQYVB/9xZrJeaoEdSSnkWsBRXWnM3pMFZBHGZyqnJb+NZv4t1buiF8V1jUUDxjgHroS4L0iW9Lpq+0opjLVAVD8Cqkm29jE2OiTgnJgFjJkcTe213JAZ5VvTpFTT8vp3LqGL5w4P/54k9Iu1L/wq268nunslNq/ZjqZaJHLPmBRKT3j4kKyfJmgWuvmuf2v82tUuGtXWnueZCGSr9C6EzPlFvp3Ej9/WwycXID6g53oO9irCpLZUm2ErTqHU0/s1nm2y+oNCUzA87bzzEBj3iM/p4oLNzLYeBXalJZvm3bYOHlY9Z7OcfcX5Hn3ImcJJmyxaQGokg1zPeEZfJGkKuExEcFVgtbdLL5VUw4arbqjGmh58Q7aW66DUNlypN3UGoEekGeC3Gx2LQk/aCwsGO8/EYcv52DoG+LfOPQZrPcW4Sd/IZ2v6XdnGUgw=
|
data/CHANGELOG.md
ADDED
data/CODEOWNERS
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at wolf@tgwolf.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Tim Gurney aka Wolf
|
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,71 @@
|
|
1
|
+
[![Build Status](https://img.shields.io/travis/AntiPhotonltd/portchecker/master.svg)](https://travis-ci.org/AntiPhotonltd/portchecker)
|
2
|
+
[![Software License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)
|
3
|
+
[![Release](https://img.shields.io/github/release/AntiPhotonltd/portchecker.svg)](https://github.com/AntiPhotonltd/portchecker/releases/latest)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/portchecker.svg)](https://badge.fury.io/rb/portchecker)
|
5
|
+
[![Github commits (since latest release)](https://img.shields.io/github/commits-since/AntiPhotonltd/portchecker/latest.svg)](https://github.com/AntiPhotonltd/portchecker/commits)
|
6
|
+
[![GitHub repo size in bytes](https://img.shields.io/github/repo-size/AntiPhotonltd/portchecker.svg)](https://github.com/AntiPhotonltd/portchecker)
|
7
|
+
[![GitHub contributors](https://img.shields.io/github/contributors/AntiPhotonltd/portchecker.svg)](https://github.com/AntiPhotonltd/portchecker)
|
8
|
+
|
9
|
+
# Portchecker
|
10
|
+
|
11
|
+
This is a VERY simply little gem with a cli to allow you to check if a given port is open.
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
Add this line to your application's Gemfile:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
gem 'portchecker'
|
19
|
+
```
|
20
|
+
|
21
|
+
And then execute:
|
22
|
+
|
23
|
+
$ bundle
|
24
|
+
|
25
|
+
Or install it yourself as:
|
26
|
+
|
27
|
+
$ gem install portchecker
|
28
|
+
|
29
|
+
## Usage
|
30
|
+
|
31
|
+
```
|
32
|
+
require 'portchecker'
|
33
|
+
|
34
|
+
puts Portchecker::Check.port_open?(host, port)
|
35
|
+
```
|
36
|
+
|
37
|
+
## Command Line
|
38
|
+
|
39
|
+
```
|
40
|
+
Usage: ./portcheck
|
41
|
+
-h, --help Display this screen
|
42
|
+
-a, --address string The address to connect to
|
43
|
+
-p, --port integer The port to connect to
|
44
|
+
```
|
45
|
+
|
46
|
+
## Development
|
47
|
+
|
48
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
49
|
+
|
50
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, 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).
|
51
|
+
|
52
|
+
## Testing
|
53
|
+
|
54
|
+
For local testing make sure that you run `bundle exec rspec spec` and then `rake install` to install the gem locally.
|
55
|
+
|
56
|
+
## Contributing
|
57
|
+
|
58
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/AntiPhotonltd/portchecker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
59
|
+
|
60
|
+
## License
|
61
|
+
|
62
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
63
|
+
|
64
|
+
## Code of Conduct
|
65
|
+
|
66
|
+
Everyone interacting in the Portchecker project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/AntiPhotonltd/portchecker/blob/master/CODE_OF_CONDUCT.md).
|
67
|
+
|
68
|
+
## ToDo
|
69
|
+
- [ ] UDP support
|
70
|
+
- [ ] customise timeout
|
71
|
+
- [ ] retries / sleep_period
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "portchecker"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/exe/portcheck
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'optparse'
|
4
|
+
require 'portchecker'
|
5
|
+
|
6
|
+
# -------------------------------------------------------------------------------- #
|
7
|
+
# Check port #
|
8
|
+
# -------------------------------------------------------------------------------- #
|
9
|
+
# This function will take the address and port and check to see if they are open. #
|
10
|
+
# -------------------------------------------------------------------------------- #
|
11
|
+
|
12
|
+
def check_port(options)
|
13
|
+
if Portchecker::Check.port_open?(options[:address], options[:port])
|
14
|
+
puts "#{options[:address]} port #{options[:port]} is open"
|
15
|
+
else
|
16
|
+
puts "#{options[:address]} port #{options[:port]} is closed"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# -------------------------------------------------------------------------------- #
|
21
|
+
# Process Arguments #
|
22
|
+
# -------------------------------------------------------------------------------- #
|
23
|
+
# This function will process the input from the command line and work out what it #
|
24
|
+
# is that the user wants to see. #
|
25
|
+
# #
|
26
|
+
# This is the main processing function where all the processing logic is handled. #
|
27
|
+
# -------------------------------------------------------------------------------- #
|
28
|
+
|
29
|
+
def process_arguments
|
30
|
+
options = {}
|
31
|
+
# Enforce the presence of
|
32
|
+
mandatory = %I[address port]
|
33
|
+
|
34
|
+
optparse = OptionParser.new do |opts|
|
35
|
+
opts.banner = "Usage: #{$PROGRAM_NAME}"
|
36
|
+
|
37
|
+
opts.on('-h', '--help', 'Display this screen') do
|
38
|
+
puts opts
|
39
|
+
exit(1)
|
40
|
+
end
|
41
|
+
opts.on('-a', '--address string', 'The address to connect to') do |address|
|
42
|
+
options[:address] = address
|
43
|
+
end
|
44
|
+
|
45
|
+
opts.on('-p', '--port integer', 'The port to connect to') do |port|
|
46
|
+
options[:port] = port
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
begin
|
51
|
+
optparse.parse!
|
52
|
+
options[:message] = ARGF.read if !STDIN.tty? # override message parameter if data is piped in
|
53
|
+
missing = mandatory.select { |param| options[param].nil? }
|
54
|
+
raise OptionParser::MissingArgument.new(missing.join(', ')) unless missing.empty?
|
55
|
+
rescue OptionParser::InvalidOption, OptionParser::MissingArgument => e
|
56
|
+
puts e.to_s
|
57
|
+
puts optparse
|
58
|
+
exit
|
59
|
+
end
|
60
|
+
|
61
|
+
exit 0 if check_port(options)
|
62
|
+
|
63
|
+
exit 1
|
64
|
+
end
|
65
|
+
|
66
|
+
# -------------------------------------------------------------------------------- #
|
67
|
+
# Main() #
|
68
|
+
# -------------------------------------------------------------------------------- #
|
69
|
+
# The main function where all of the heavy lifting and script config is done. #
|
70
|
+
# -------------------------------------------------------------------------------- #
|
71
|
+
|
72
|
+
def main
|
73
|
+
process_arguments
|
74
|
+
end
|
75
|
+
|
76
|
+
main
|
77
|
+
|
78
|
+
# -------------------------------------------------------------------------------- #
|
79
|
+
# End of Script #
|
80
|
+
# -------------------------------------------------------------------------------- #
|
81
|
+
# This is the end - nothing more to see here. #
|
82
|
+
# -------------------------------------------------------------------------------- #
|
data/lib/portchecker.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'socket'
|
2
|
+
require 'timeout'
|
3
|
+
|
4
|
+
require 'portchecker/version'
|
5
|
+
|
6
|
+
#
|
7
|
+
# Docs to follow
|
8
|
+
#
|
9
|
+
module Portchecker
|
10
|
+
#
|
11
|
+
# Docs to follow
|
12
|
+
#
|
13
|
+
class Check
|
14
|
+
def self.port_open?(address, port)
|
15
|
+
begin
|
16
|
+
Timeout.timeout(1) do
|
17
|
+
begin
|
18
|
+
TCPSocket.new(address, port).close
|
19
|
+
return true
|
20
|
+
rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::EADDRNOTAVAIL, SocketError
|
21
|
+
# sleep(sleep_period)
|
22
|
+
# retry
|
23
|
+
return false
|
24
|
+
end
|
25
|
+
end
|
26
|
+
rescue Timeout::Error
|
27
|
+
return false
|
28
|
+
end
|
29
|
+
false
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/portchecker.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "portchecker/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "portchecker"
|
7
|
+
spec.version = Portchecker::VERSION
|
8
|
+
spec.authors = ["Tim Gurney aka Wolf"]
|
9
|
+
spec.email = ["wolf@tgwolf.com"]
|
10
|
+
|
11
|
+
spec.summary = %q{A simple little gem (and cli) to check if a given port if open or not.}
|
12
|
+
spec.description = %q{A simple little gem (and cli) to check if a given port if open or not..}
|
13
|
+
spec.homepage = "https://github.com/AntiPhotonltd/portchecker"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
+
f.match(%r{^(test|spec|features)/})
|
18
|
+
end
|
19
|
+
spec.bindir = "exe"
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
#spec.required_ruby_version = '>= 2.3.0'
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", ">= 1.17", "< 3.0"
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: portchecker
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tim Gurney aka Wolf
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-03-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.17'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3.0'
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.17'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3.0'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rake
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '10.0'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '10.0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '3.0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '3.0'
|
61
|
+
description: A simple little gem (and cli) to check if a given port if open or not..
|
62
|
+
email:
|
63
|
+
- wolf@tgwolf.com
|
64
|
+
executables:
|
65
|
+
- portcheck
|
66
|
+
extensions: []
|
67
|
+
extra_rdoc_files: []
|
68
|
+
files:
|
69
|
+
- ".gitignore"
|
70
|
+
- ".rspec"
|
71
|
+
- ".rubocop.yml"
|
72
|
+
- ".travis.yml"
|
73
|
+
- CHANGELOG.md
|
74
|
+
- CODEOWNERS
|
75
|
+
- CODE_OF_CONDUCT.md
|
76
|
+
- Gemfile
|
77
|
+
- LICENSE.txt
|
78
|
+
- README.md
|
79
|
+
- Rakefile
|
80
|
+
- bin/console
|
81
|
+
- bin/setup
|
82
|
+
- exe/portcheck
|
83
|
+
- lib/portchecker.rb
|
84
|
+
- lib/portchecker/version.rb
|
85
|
+
- portchecker.gemspec
|
86
|
+
homepage: https://github.com/AntiPhotonltd/portchecker
|
87
|
+
licenses:
|
88
|
+
- MIT
|
89
|
+
metadata: {}
|
90
|
+
post_install_message:
|
91
|
+
rdoc_options: []
|
92
|
+
require_paths:
|
93
|
+
- lib
|
94
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
requirements: []
|
105
|
+
rubygems_version: 3.0.2
|
106
|
+
signing_key:
|
107
|
+
specification_version: 4
|
108
|
+
summary: A simple little gem (and cli) to check if a given port if open or not.
|
109
|
+
test_files: []
|