fd 1.0.1 → 1.0.2
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 +4 -4
- data/.github/workflows/main.yml +1 -1
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/Rakefile +1 -3
- data/fd.gemspec +1 -1
- data/lib/fd/version.rb +1 -1
- data/lib/fd.rb +7 -3
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87a6a19672587693b0838418b76f4885c97984f46641128a96f924e625e860d6
|
4
|
+
data.tar.gz: f29c2a1c6560b4a009b08afe4ee1e47c9016bf3b8428fae70d5a706935d98b82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2490e337a3fc431f5faed56d77fd43553a3c474a74a7e101171181b1edc2cc532f2068b39182ada493cf600a2112ee7ccbf415d6e16d7abe2b0fbd42810d624
|
7
|
+
data.tar.gz: 540add6461dce9af54a4c02d93c8f2251119f8654b032d6f5a9e4b42d88a594288fcd44bb48cf2fa1b4dc78c349a0cf521b9b27439897f5b97c244e577720f30
|
data/.github/workflows/main.yml
CHANGED
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.4.
|
1
|
+
3.4.2
|
data/Rakefile
CHANGED
data/fd.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ['Stephan Kämper']
|
9
9
|
spec.email = ['the.tester@seasidetesting.com']
|
10
10
|
|
11
|
-
spec.summary = 'fd is a
|
11
|
+
spec.summary = 'fd is a tool to dump file contents in hexadecimal & text format side by side'
|
12
12
|
spec.description = 'fd prints the given file in 2 columns (left: hex values left / right: / textual representations'
|
13
13
|
spec.homepage = 'https://github.com/s2k/fd'
|
14
14
|
spec.license = 'MIT'
|
data/lib/fd/version.rb
CHANGED
data/lib/fd.rb
CHANGED
@@ -105,7 +105,7 @@ class Fd
|
|
105
105
|
def append_to_line(bytes, char)
|
106
106
|
@byte_count_in_line += bytes.size
|
107
107
|
bytes.each { |bt| @hex_values << format('%02x', bt) }
|
108
|
-
@line += format('%2s',
|
108
|
+
@line += format('%2s', CHAR_TABLE[char.ord] || char)
|
109
109
|
@char_index += 1
|
110
110
|
end
|
111
111
|
|
@@ -114,7 +114,11 @@ class Fd
|
|
114
114
|
end
|
115
115
|
|
116
116
|
def print_single_line
|
117
|
-
|
118
|
-
|
117
|
+
hex_val_format = "%#{(3 * line_length) - 1}s"
|
118
|
+
line_content_format = "%#{2 * line_length}s"
|
119
|
+
puts(
|
120
|
+
"#{format(hex_val_format, hex_values.join(' '))} |#{format(line_content_format, line)}"
|
121
|
+
.gsub(/([#{ESCAPE_CHARACTERS.join}])/, add_esc_sequence('\1'))
|
122
|
+
)
|
119
123
|
end
|
120
124
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephan Kämper
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: 'fd prints the given file in 2 columns (left: hex values left / right:
|
13
13
|
/ textual representations'
|
@@ -59,8 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
|
-
rubygems_version: 3.6.
|
62
|
+
rubygems_version: 3.6.8
|
63
63
|
specification_version: 4
|
64
|
-
summary: fd is a
|
65
|
-
side
|
64
|
+
summary: fd is a tool to dump file contents in hexadecimal & text format side by side
|
66
65
|
test_files: []
|