dcm 0.1.13 → 0.1.14

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: ec6cdc0993e9acfaa13e9e4393161d07dc545f70393b31ad2f9db651f8faa8ed
4
- data.tar.gz: 25246c2a17d7401e08b804cdd1c3819e108a6b7deba0660de2c4e37bab7d5eb9
3
+ metadata.gz: a2f35533dd709a691905434997a33700a7b253df40a6a81f92fe005d3be7bfbc
4
+ data.tar.gz: 3e283425bc98f028523089aab15b54c7156c9ab92b434101cf7a4eb37b0632b2
5
5
  SHA512:
6
- metadata.gz: b0dd2e2276ddf19e525db7605ac735846c90bf09b20dcea61be194081f3d91a8847a8e61bdaf1bc22fdd47f6866479283f7f94eb1bb23f2b9d453f3163c4cbc9
7
- data.tar.gz: 4761b9727aec332e5547a861c77e4535d8e7123d30675fb8317cddb3f9e644258001eb49f8351c79e1c01c2cd0c2fcf5fb8bc26b832c18d9997a8238bc8aede0
6
+ metadata.gz: 4a0cb85837bac7d6bffcd882edfd5e36e93441caa6e8c69581451f92912a0a4afc05d3277ac58fc9f7cd17baccbfdd0f7884811b7085910b44e61952e6b0256b
7
+ data.tar.gz: b3348ff3af42a2261b5b33602e5a82ffd413e520d43f63780bc7d46cd3cf76e9b9a07ec686db26832cc161cb66e21ae17ddf356a848547bb77425bb52783e92a
data/lib/cli.rb CHANGED
@@ -166,6 +166,15 @@ module Dcm
166
166
  parse_file(file)
167
167
  end
168
168
 
169
+ desc "clearcache [FILE]", "Clear cache(s)"
170
+ def clearcache(file=nil)
171
+ if file
172
+ FileCache.clear(file)
173
+ else
174
+ FileCache.clear_all
175
+ end
176
+ end
177
+
169
178
  desc "compare FILE1 FILE2", "Compare contents of FILE1 and FILE2"
170
179
  option :left, type: :boolean, aliases: ["-l"]
171
180
  option :right, type: :boolean, aliases: ["-r"]
data/lib/codinginfo.rb CHANGED
File without changes
data/lib/core_ext.rb CHANGED
File without changes
data/lib/diff_viewer.rb CHANGED
File without changes
data/lib/file_cache.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "tmpdir"
2
+ require "fileutils"
2
3
  require "digest"
3
4
 
4
5
  class FileCache
@@ -8,6 +9,16 @@ class FileCache
8
9
  new(filepath).cache!(&blk)
9
10
  end
10
11
 
12
+ def self.clear(filepath)
13
+ new(filepath).clear!
14
+ end
15
+
16
+ def self.clear_all
17
+ File.join(Dir.tmpdir, "dcm-*.dump")
18
+ .then { Dir.glob(_1) }
19
+ .each { FileUtils.rm(_1) }
20
+ end
21
+
11
22
  attr_reader :filepath
12
23
  def initialize(filepath)
13
24
  @filepath = filepath
@@ -19,6 +30,10 @@ class FileCache
19
30
  yield.tap { write_cache(_1) }
20
31
  end
21
32
 
33
+ def clear!
34
+ FileUtils.rm(cachefilepath)
35
+ end
36
+
22
37
  private
23
38
 
24
39
  def cached?
data/lib/file_reader.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dcm
2
- VERSION = "0.1.13"
2
+ VERSION = "0.1.14"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dcm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Mueller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-06 00:00:00.000000000 Z
11
+ date: 2025-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: automotive-ecu