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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79678d50cb3a33dd8db130fb309a9a7636511cfdc1b0f803c15a16af05811b59
4
- data.tar.gz: '069fb8252dd99e14d04dcce97d795f13c60d1574d428e4e6d731364caf562088'
3
+ metadata.gz: 87a6a19672587693b0838418b76f4885c97984f46641128a96f924e625e860d6
4
+ data.tar.gz: f29c2a1c6560b4a009b08afe4ee1e47c9016bf3b8428fae70d5a706935d98b82
5
5
  SHA512:
6
- metadata.gz: 5ee3d3708e6eef81509591e96d608781307273309b53888d745e4274437db5f2d84300a2058a9fcc241a9f21338107d3fbb27de4744e128dae9a070f9b7a556d
7
- data.tar.gz: 806bacb747669e0e5ddc58e9b80d905d9cbae12acf78ba80ff731e93807e2b6ee31d344ce57964d9d09c28a00c0fcc980b3e8bfb4f42689729990f1662b6f3fe
6
+ metadata.gz: f2490e337a3fc431f5faed56d77fd43553a3c474a74a7e101171181b1edc2cc532f2068b39182ada493cf600a2112ee7ccbf415d6e16d7abe2b0fbd42810d624
7
+ data.tar.gz: 540add6461dce9af54a4c02d93c8f2251119f8654b032d6f5a9e4b42d88a594288fcd44bb48cf2fa1b4dc78c349a0cf521b9b27439897f5b97c244e577720f30
@@ -10,7 +10,7 @@ jobs:
10
10
  - name: Set up Ruby
11
11
  uses: ruby/setup-ruby@v1
12
12
  with:
13
- ruby-version: 3.4.1
13
+ ruby-version: 3.4.2
14
14
  bundler-cache: true
15
15
  - name: Run the default task
16
16
  run: bundle exec rake
data/.rubocop.yml CHANGED
@@ -9,7 +9,7 @@
9
9
  #
10
10
  # See https://docs.rubocop.org/rubocop/configuration
11
11
 
12
- require:
12
+ plugins:
13
13
  - rubocop-minitest
14
14
  - rubocop-rake
15
15
 
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.1
1
+ 3.4.2
data/Rakefile CHANGED
@@ -11,8 +11,6 @@ Rake::TestTask.new(:test) do |t|
11
11
  t.test_files = FileList['test/**/*_test.rb']
12
12
  end
13
13
 
14
- RuboCop::RakeTask.new do |task|
15
- task.requires << 'rubocop-rake'
16
- end
14
+ RuboCop::RakeTask.new
17
15
 
18
16
  task default: %i[test rubocop]
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 simple tool to dump file contents in binary & text format side by side'
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
@@ -4,7 +4,7 @@
4
4
  # All other code is in lib/fd.rb
5
5
  #
6
6
  class Fd
7
- VERSION = '1.0.1'
7
+ VERSION = '1.0.2'
8
8
 
9
9
  def self.version
10
10
  VERSION
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', (CHAR_TABLE[char.ord] || char))
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
- puts("#{format("%#{(3 * line_length) - 1}s", hex_values.join(' '))} |#{format("%#{2 * line_length}s", line)}"
118
- .gsub(/([#{ESCAPE_CHARACTERS.join}])/, add_esc_sequence('\1')))
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.1
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: 2024-12-27 00:00:00.000000000 Z
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.2
62
+ rubygems_version: 3.6.8
63
63
  specification_version: 4
64
- summary: fd is a simple tool to dump file contents in binary & text format side by
65
- side
64
+ summary: fd is a tool to dump file contents in hexadecimal & text format side by side
66
65
  test_files: []