jtag 0.1.21 → 0.1.22

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: dce6f0470ef8fd405ee64a347ff3248c12080d76b7d260f2767ea0df6a99754e
4
- data.tar.gz: e6bbedc5133afafb194165e07a830feacab40d6409a11d2f76dc974e42df26f3
3
+ metadata.gz: 3518e605a4ae81f16e38f572d99835dbfdd7b592607a9972d3c1964668e6b5d5
4
+ data.tar.gz: fa982a6286ded48b0063c2291aeb80135f0f4e76c9056c393b4379d60f87e5d1
5
5
  SHA512:
6
- metadata.gz: 2ae0e91ccbc3af0622c323fff774f0624927f16d9573a4170ba9f37ea08ebde9cf2cb92092f498bd4fbbd22179fa37e63d1ba01ad802995d8638b32567a95ab2
7
- data.tar.gz: 355dd96ef61e1b14e1bd17e03ac39b6d39afb118d1733eb6fd7b0ca48fd1ed170b9668d009e8c8157e3fcd020be7d184cab04d1760914349722f6726a044d006
6
+ metadata.gz: 036b07fb509fc8ebb3f73542b62f428205b52dccc14ee7d962503602d8f32b56acb4d09340eee1801e7a80f27c5b36bbab51c5438f78d328d8d82e58ce0ed90f
7
+ data.tar.gz: 772381ea377967c35ee48b11c3d73272d74da50c61f5c75b7a1f43571cf025c65d8f0f076307d6bcf5ffdee6f1192e209a7674bf16e4d1178e3d05e5da00486a
data/bin/jtag CHANGED
@@ -797,8 +797,11 @@ end
797
797
  ## @return [void]
798
798
  ##
799
799
  def update_deprecated_config
800
+ @util = JekyllTag::Util.new
800
801
  if File.exist?(File.expand_path("~/.jtag"))
801
- FileUtils.mv(File.expand_path("~/.jtag"), File.expand_path("~/.config/jtag"))
802
+ FileUtils.mkdir_p(File.expand_path("~/.config/jtag"))
803
+ FileUtils.cp_r(File.expand_path("~/.jtag"), File.expand_path("~/.config/jtag"), noop: true)
804
+ FileUtils.rm_rf(File.expand_path("~/.jtag"))
802
805
  @util.console_log "Moved ~/.jtag to ~/.config/jtag", level: :info, err: true, log: false
803
806
  end
804
807
  end
@@ -862,6 +865,7 @@ post do |global, command, options, args|
862
865
  end
863
866
 
864
867
  on_error do |exception|
868
+ @util = JekyllTag::Util.new
865
869
  if exception.is_a?(NoValidFile) || exception.is_a?(FileNotFound) || exception.is_a?(NoTagsFound)
866
870
  @util.console_log "#{@jt.color(:red)}#{exception.message}", err: true, level: :error
867
871
  return false
@@ -19,13 +19,18 @@ module JekyllTag
19
19
  @tags_loc = :auto
20
20
  files = Dir.glob(File.expand_path(File.join(config[:default_post_location], "**", "*.#{config[:post_extension]}")))
21
21
  else
22
- @tags_loc = File.expand_path(config[:tags_location])
23
- @tags_loc.sub!(/^https?:\/\//, "")
22
+ @tags_loc = config[:tags_location]
23
+ if File.exist?(File.expand_path(@tags_loc))
24
+ @tags_loc = File.expand_path(@tags_loc)
25
+ else
26
+ @tags_loc.sub!(/^https?:\/\//, "")
27
+ end
24
28
  files = nil
25
29
  end
26
30
  rescue StandardError => e
27
31
  raise InvalidTagsFile, "Error reading configured tags locatio (#{e})"
28
32
  end
33
+
29
34
  @min_matches = config[:min_matches] || 2
30
35
  @post_extension = config[:post_extension] || "md"
31
36
  @post_extension.sub!(/^\./, "")
data/lib/jtag/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jtag
2
- VERSION = "0.1.21"
2
+ VERSION = "0.1.22"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jtag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-22 00:00:00.000000000 Z
10
+ date: 2025-02-24 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rake