hookd-client 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b373613f2ef4194aafacdb65fc585e39163d8673d619aa720834ac46083506e9
4
- data.tar.gz: a432227574294bbcb7f80c15be7d97a901dc7b33f79e450fcd13f9b9ef7b5f66
3
+ metadata.gz: 6e733c25ddc48c4abc81de335f540b1c04b25e93d1ae662c4140ee1b4d735afc
4
+ data.tar.gz: 221c74e9d5d1bb915799cb9ec852f54e8ea1cea894bd5246982fab00726769c7
5
5
  SHA512:
6
- metadata.gz: 4f3e6702167c4a92e5110d6da8d946c5f73029dd64df94bd49db1716b053e923a525e83e97ef5c6c3473f5d68ddcdd634ec98d3b50ae4d494a514391cab1902e
7
- data.tar.gz: bc2629120bf46c57d13627406cbf886daba9ab2569a5d54cbc9808475311cb5ec6eae3c66cd2c0e442f5ecb8d331f4a2792fd13f24a8b9c4c051b3ace3920201
6
+ metadata.gz: 8f41965d7a08d776b63b91b03cef5275183de8a4f58eb76077633ebbe790b19c042f94ed2a42c664b92b162d07c55d3e0bd75985c359f656e6f25d30848c5382
7
+ data.tar.gz: e88fa863ced788b552d5430d68ee351e5c7ed7b28514a59314937dda1ce3a7250cf75c26cf8ce4346780d24b78ed742c1523d50a206e6d7062664cd6e6014ea1
@@ -3,11 +3,12 @@
3
3
  module Hookd
4
4
  # Represents a captured DNS or HTTP interaction
5
5
  class Interaction
6
- attr_reader :type, :timestamp, :data
6
+ attr_reader :type, :timestamp, :source_ip, :data
7
7
 
8
- def initialize(type:, timestamp:, data:)
8
+ def initialize(type:, timestamp:, source_ip:, data:)
9
9
  @type = type
10
10
  @timestamp = timestamp
11
+ @source_ip = source_ip
11
12
  @data = data
12
13
  end
13
14
 
@@ -16,6 +17,7 @@ module Hookd
16
17
  new(
17
18
  type: hash['type'],
18
19
  timestamp: hash['timestamp'],
20
+ source_ip: hash['source_ip'],
19
21
  data: hash['data']
20
22
  )
21
23
  end
@@ -31,7 +33,12 @@ module Hookd
31
33
  end
32
34
 
33
35
  def to_s
34
- "#<Hookd::Interaction type=#{type} timestamp=#{timestamp}>"
36
+ "#<Hookd::Interaction type=#{type} timestamp=#{timestamp} source_ip=#{source_ip}>"
37
+ end
38
+
39
+ def inspect
40
+ "#<Hookd::Interaction:#{object_id.to_s(16)} @type=#{type.inspect}, @timestamp=#{timestamp.inspect}, " \
41
+ "@source_ip=#{source_ip.inspect}, @data=#{data.inspect}>"
35
42
  end
36
43
  end
37
44
  end
data/lib/hookd/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hookd
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hookd-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jomar
@@ -29,7 +29,7 @@ licenses:
29
29
  - MIT
30
30
  metadata:
31
31
  homepage_uri: https://github.com/JoshuaMart/hookd
32
- source_code_uri: https://github.com/jomar/JoshuaMart
32
+ source_code_uri: https://github.com/jomar/hookd
33
33
  rubygems_mfa_required: 'true'
34
34
  rdoc_options: []
35
35
  require_paths: