rspec-networking 0.0.1

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
+ SHA256:
3
+ metadata.gz: 27e1529533844c6f359735dc609ecb1a937762787f2c609a147d4a30bdb700ee
4
+ data.tar.gz: 9c6856542b1477181e7b5ee82c39525e5295ed145e1a6edeaadfbd8feac6b500
5
+ SHA512:
6
+ metadata.gz: 0eb7ec667852a07380d2bc2344c04a175066b03ad86bfc5630f3b45f692555947e6ad02a505200fb73e76b0ff801214a684f19b2697baecf9bc52e941da5a326
7
+ data.tar.gz: 3a2521fe2955a92542c82e322d0f82eb602f8967aaf208e814f303586fd6de72cb42680b8f6df59dd3fa77fedceda74ce3292e656922e012c9f96ba40275a68e
data/CHANGELOG.md ADDED
@@ -0,0 +1,2 @@
1
+ ### 0.0.1 (2024-08-30)
2
+ init
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,49 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rspec-networking (0.0.1)
5
+ rspec-expectations (>= 3)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ byebug (11.1.3)
11
+ concurrent-ruby (1.3.4)
12
+ diff-lcs (1.5.1)
13
+ docile (1.4.0)
14
+ faker (3.4.2)
15
+ i18n (>= 1.8.11, < 2)
16
+ i18n (1.14.5)
17
+ concurrent-ruby (~> 1.0)
18
+ rspec (3.13.0)
19
+ rspec-core (~> 3.13.0)
20
+ rspec-expectations (~> 3.13.0)
21
+ rspec-mocks (~> 3.13.0)
22
+ rspec-core (3.13.0)
23
+ rspec-support (~> 3.13.0)
24
+ rspec-expectations (3.13.0)
25
+ diff-lcs (>= 1.2.0, < 2.0)
26
+ rspec-support (~> 3.13.0)
27
+ rspec-mocks (3.13.0)
28
+ diff-lcs (>= 1.2.0, < 2.0)
29
+ rspec-support (~> 3.13.0)
30
+ rspec-support (3.13.1)
31
+ simplecov (0.22.0)
32
+ docile (~> 1.1)
33
+ simplecov-html (~> 0.11)
34
+ simplecov_json_formatter (~> 0.1)
35
+ simplecov-html (0.12.3)
36
+ simplecov_json_formatter (0.1.4)
37
+
38
+ PLATFORMS
39
+ ruby
40
+
41
+ DEPENDENCIES
42
+ byebug
43
+ faker
44
+ rspec
45
+ rspec-networking!
46
+ simplecov
47
+
48
+ BUNDLED WITH
49
+ 2.5.7
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 Daniel Pepper
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,24 @@
1
+ RSpec::Networking
2
+ ======
3
+ ![Gem](https://img.shields.io/gem/dt/rspec-networking?style=plastic)
4
+ [![codecov](https://codecov.io/gh/dpep/rspec-networking/branch/main/graph/badge.svg)](https://codecov.io/gh/dpep/rspec-networking)
5
+
6
+ RSpec matchers for IP and MAC Addresses
7
+
8
+
9
+ ```ruby
10
+ require "rspec/networking"
11
+ ```
12
+
13
+
14
+ ----
15
+ ## Contributing
16
+
17
+ Yes please :)
18
+
19
+ 1. Fork it
20
+ 1. Create your feature branch (`git checkout -b my-feature`)
21
+ 1. Ensure the tests pass (`bundle exec rspec`)
22
+ 1. Commit your changes (`git commit -am 'awesome new feature'`)
23
+ 1. Push your branch (`git push origin my-feature`)
24
+ 1. Create a Pull Request
File without changes
@@ -0,0 +1,26 @@
1
+ # https://en.wikipedia.org/wiki/MAC_address
2
+
3
+ RSpec::Matchers.define :be_a_mac_address do
4
+ match do |actual|
5
+ @actual = actual
6
+
7
+ return false unless actual.is_a?(String)
8
+
9
+ hex = ['\h{2}'] * 5
10
+ actual.match?(/^\h{2}([:-])#{hex.join('\1')}$/)
11
+ end
12
+
13
+ description do
14
+ "a MAC address"
15
+ end
16
+
17
+ failure_message do
18
+ "expected '#{@actual}' to be #{description}"
19
+ end
20
+
21
+ failure_message_when_negated do
22
+ "expected '#{@actual}' not to be #{description}"
23
+ end
24
+ end
25
+
26
+ RSpec::Matchers.alias_matcher :a_mac_address, :be_a_mac_address
@@ -0,0 +1,5 @@
1
+ module RSpec
2
+ module Networking
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ require "rspec/expectations"
2
+
3
+ require "rspec/networking/ip_address"
4
+ require "rspec/networking/mac_address"
@@ -0,0 +1 @@
1
+ require "rspec/networking"
@@ -0,0 +1,23 @@
1
+ require_relative "lib/rspec/networking/version"
2
+ package = RSpec::Networking
3
+ package_name = "rspec-networking"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.authors = ["Daniel Pepper"]
7
+ s.description = "RSpec matchers for IP and MAC Addresses"
8
+ s.files = `git ls-files * ':!:spec'`.split("\n")
9
+ s.homepage = "https://github.com/dpep/#{package_name}"
10
+ s.license = "MIT"
11
+ s.name = package_name
12
+ s.summary = package.to_s
13
+ s.version = package.const_get "VERSION"
14
+
15
+ s.required_ruby_version = ">= 3"
16
+
17
+ s.add_dependency "rspec-expectations", ">= 3"
18
+
19
+ s.add_development_dependency "byebug"
20
+ s.add_development_dependency "faker"
21
+ s.add_development_dependency "rspec"
22
+ s.add_development_dependency "simplecov"
23
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec-networking
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Daniel Pepper
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-08-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec-expectations
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: byebug
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: faker
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '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: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: RSpec matchers for IP and MAC Addresses
84
+ email:
85
+ executables: []
86
+ extensions: []
87
+ extra_rdoc_files: []
88
+ files:
89
+ - CHANGELOG.md
90
+ - Gemfile
91
+ - Gemfile.lock
92
+ - LICENSE.txt
93
+ - README.md
94
+ - lib/rspec-networking.rb
95
+ - lib/rspec/networking.rb
96
+ - lib/rspec/networking/ip_address.rb
97
+ - lib/rspec/networking/mac_address.rb
98
+ - lib/rspec/networking/version.rb
99
+ - rspec-networking.gemspec
100
+ homepage: https://github.com/dpep/rspec-networking
101
+ licenses:
102
+ - MIT
103
+ metadata: {}
104
+ post_install_message:
105
+ rdoc_options: []
106
+ require_paths:
107
+ - lib
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '3'
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ requirements: []
119
+ rubygems_version: 3.5.17
120
+ signing_key:
121
+ specification_version: 4
122
+ summary: RSpec::Networking
123
+ test_files: []