zhexdump 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: 8b2e6bfef9bdafb2b9c55ca2682113a71e008e5e9fc5d2492e0a03f7fbb74abb
4
- data.tar.gz: 6c8ffe4c3d33f5c1fbe2c79dd02263f5b57582abb7c12950d54def6e8e942ff3
3
+ metadata.gz: c0405a9a00093fb08a5ff3294e1636d3350e49c83f478c2d4e1fa1575b72bb83
4
+ data.tar.gz: 0cf51636f3344e94c0e9a5647fbe1cb9f54b1d134e0d22cd7c595d2f41a03552
5
5
  SHA512:
6
- metadata.gz: f6fe0c14cdf444797c7393def5d1949ad319fc93f86075efecc7f083e012d87e210f78530340cb4401919905445c2f7f79581b1fe45f7348c79a367629ae1090
7
- data.tar.gz: 4c86d845b5820ac1ab2b51293e290cb3b8877005b80316355ae0e40b234d245f05560c80f3617791a14c47bdcd18e0b16a0c7314e5b811ba7104cb01a9730314
6
+ metadata.gz: e117316024d5ecc48f7eefa79cff23603ef728959791c522a93aa50dafc50f05f202aeb17ee5994d2ebe9bd22c1d881840cfad3c6a392076c7aabd6da4f06b4d
7
+ data.tar.gz: c3d12f02963fa811e42d44f93a328eebb2a81964350b2f3edebd7666f4ef2122c1fd01488e05be2d690784dae86fbdb0c2d109f76d9d9d929360a4ab3d911171
@@ -1,3 +1,3 @@
1
1
  module ZHexdump
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/zhexdump.rb CHANGED
@@ -57,7 +57,7 @@ module ZHexdump
57
57
  end
58
58
 
59
59
  if dedup && hex == prevhex
60
- row = "*"
60
+ row = indent + "*"
61
61
  yield(row, offset+add, ascii) if block_given?
62
62
  unless prevdup
63
63
  output << "\n" if offset > start
data/spec/hexdump_spec.rb CHANGED
@@ -1,3 +1,4 @@
1
+ #coding: binary
1
2
  require 'spec_helper'
2
3
  require 'stringio'
3
4
 
@@ -53,6 +54,17 @@ describe ZHexdump do
53
54
  s.should == "00000002: 6f 62 61 |oba |\n"
54
55
  end
55
56
 
57
+ it "respects :indent" do
58
+ data = 'foobar' + "\x00"*100
59
+ s = ''
60
+ ZHexdump.dump data, :output => s, :indent => 2
61
+ a = s.split("\n")
62
+ a[0].should == " 00000000: 66 6f 6f 62 61 72 00 00 00 00 00 00 00 00 00 00 |foobar..........|"
63
+ a[1].should == " 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|"
64
+ a[2].should == " *"
65
+ a[3].should == " 00000060: 00 00 00 00 00 00 00 00 00 00 |.......... |"
66
+ end
67
+
56
68
  it "adds :add to offset shown" do
57
69
  data = 'foo'*100
58
70
  s = ''
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zhexdump
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
  - Andrey "Zed" Zaikin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-14 00:00:00.000000000 Z
11
+ date: 2024-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec