packetgen 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36578b725eb28ace342c6468423d781158b376c16bcc8b949e1df62262aba11a
4
- data.tar.gz: 6e3bbdfc313f54611b05a19a31336438fa781cce24bc19867a2e72d91bbc8f9e
3
+ metadata.gz: 8250f474433743cf834e9a2a42771746445b84673913e6c57bfd8c90b4561e47
4
+ data.tar.gz: e332c5b2d585d19e6fd562184bf316e73ac87d84f9ff4991fcaf8702db76edc2
5
5
  SHA512:
6
- metadata.gz: 64cfe76137b2f4f2ea1b75806019a28d63d32cb904fe3a22982d8cf5b090e3df74befd527606d250d49a2541842b2dba2c0e1060b61128ecd538b2c6c7e6d544
7
- data.tar.gz: 9700b4a0f455d5b6918d8a0eac2309100e29db650eb2f88469a54241b8b5888d2605571883aaebe187d69db97c0e0e380ba35c4325a6bd420c492ec7dc619c55
6
+ metadata.gz: a33604e9cbd91c3acc86ea4c9af8edd53d284101c22090a3ecef39c491d81f3442ff64034ec7c95b56a44e200a5f1842b178af7c718ed57cbcdbd7cd27580e71
7
+ data.tar.gz: 9610100a4d73d136da46074761db827ca3124ee6aab3d7a8a71d3198981674a16e1c1627e259fbfc50000148d6deef4007a8c900fb058ccd1fc9e33f03efcac4
data/.travis.yml CHANGED
@@ -8,7 +8,8 @@ rvm:
8
8
  install:
9
9
  - sudo apt-get update -qq
10
10
  - sudo apt-get install libpcap-dev -qq
11
- - bundle install --path vendor/bundle --jobs=3 --retry=3
11
+ - gem install bundler --version "~>1.17.3"
12
+ - bundle _1.17.3_ install --path vendor/bundle --jobs=3 --retry=3
12
13
  before_script:
13
14
  - openssl version
14
15
  - ruby -ropenssl -e 'puts OpenSSL::VERSION'
@@ -38,7 +38,7 @@ module PacketGen
38
38
  def self.deprecated_class(klass, new_klass=nil, remove_version: REMOVE_VERSION)
39
39
  file, line = caller(2..2).first.split(':')[0, 2]
40
40
  message = +"#{file}:#{line}: #{klass} is deprecated"
41
- message << " in favor od #{new_klass}" unless new_klass.nil?
41
+ message << " in favor of #{new_klass}" unless new_klass.nil?
42
42
  message << ". It will be remove in PacketGen #{remove_version}."
43
43
  warn message
44
44
  end
@@ -318,6 +318,20 @@ module PacketGen
318
318
  to_s == other.to_s
319
319
  end
320
320
 
321
+ # @param [Packet] other
322
+ # @return [Boolean]
323
+ # @since 3.1.2
324
+ def ===(other)
325
+ case other
326
+ when PacketGen::Packet
327
+ self == other
328
+ when String
329
+ is? other
330
+ else
331
+ false
332
+ end
333
+ end
334
+
321
335
  # Invert all possible fields in packet to create a reply.
322
336
  # @return [self]
323
337
  # @since 2.7.0
@@ -160,7 +160,7 @@ module PacketGen
160
160
  # @abstract Should only be called on real TLV class instances.
161
161
  # @return [String]
162
162
  def to_human
163
- my_value = self[:value].is_a?(String) ? value.inspect : value.to_human
163
+ my_value = self[:value].is_a?(String) ? self[:value].inspect : self[:value].to_human
164
164
  "type:%s,length:%u,value:#{my_value}" % [human_type, length]
165
165
  end
166
166
  end
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  # This file is part of PacketGen
3
3
  # See https://github.com/sdaubert/packetgen for more informations
4
- # Copyright (C) 2032 Sylvain Daubert <sylvain.daubert@laposte.net>
4
+ # Copyright (C) 2016 Sylvain Daubert <sylvain.daubert@laposte.net>
5
5
  # This program is published under MIT license.
6
6
 
7
7
  # frozen_string_literal: true
@@ -10,5 +10,5 @@
10
10
  # @author Sylvain Daubert
11
11
  module PacketGen
12
12
  # PacketGen version
13
- VERSION = '3.1.1'
13
+ VERSION = '3.1.2'
14
14
  end
data/packetgen.gemspec CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.add_dependency 'pcaprub', '~>0.12.4'
29
29
  spec.add_dependency 'rasn1', '~>0.5', '>= 0.6.6'
30
30
 
31
- spec.add_development_dependency 'bundler', '~> 1.16'
31
+ spec.add_development_dependency 'bundler', '~> 1.17.3'
32
32
  spec.add_development_dependency 'rake', '~> 12.3'
33
33
  spec.add_development_dependency 'rspec', '~> 3.7'
34
34
  spec.add_development_dependency 'simplecov', '~> 0.16'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: packetgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Daubert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-21 00:00:00.000000000 Z
11
+ date: 2019-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: interfacez
@@ -64,14 +64,14 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '1.16'
67
+ version: 1.17.3
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '1.16'
74
+ version: 1.17.3
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rake
77
77
  requirement: !ruby/object:Gem::Requirement