jtag 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/jtag +17 -17
- data/lib/jtag/jekylltag.rb +2 -2
- data/lib/jtag/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 072e652c6a5dfe8fa5140e7f2f7af1072826e3af41c6d89c030880cedf54041b
|
4
|
+
data.tar.gz: 99a3969d116038f099991f500d242b9c3fef1934c4ce24bcfbf8a5b27fb8a83e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bbca2f392910ab5d86b25a280cf1be8e350b03b34e2fa281f128edeb22a760bb67e604036289a278e2a85d7053ea4d510674e5df8ee8271b9e1ec8820e84575
|
7
|
+
data.tar.gz: fe8dca46e901ebba1cb289c76b4293725cbf91252ee17a95e3f9e9c7dd11697b416691a8b77a300c1caf7499c055b3f7d6466a70aebb436c709f3c64c282add7
|
data/bin/jtag
CHANGED
@@ -15,7 +15,7 @@ version Jtag::VERSION
|
|
15
15
|
|
16
16
|
def config_files_complete?
|
17
17
|
@config_files.each do |file|
|
18
|
-
return false unless File.
|
18
|
+
return false unless File.exist?(File.join(@config_target, file))
|
19
19
|
end
|
20
20
|
true
|
21
21
|
end
|
@@ -92,7 +92,7 @@ def write_config(atomic=false)
|
|
92
92
|
end
|
93
93
|
|
94
94
|
@config_files.each do |file|
|
95
|
-
unless File.
|
95
|
+
unless File.exist?(File.join(@config_target,file))
|
96
96
|
source_file = File.join(config_source,file)
|
97
97
|
target_file = File.join(@config_target,file)
|
98
98
|
FileUtils.cp(source_file, target_file)
|
@@ -170,20 +170,20 @@ command :posts_tagged do |c|
|
|
170
170
|
matches = []
|
171
171
|
args.length.times do
|
172
172
|
arg = args.pop
|
173
|
-
if File.
|
173
|
+
if File.exist?(arg)
|
174
174
|
files.push(arg)
|
175
175
|
else
|
176
176
|
tags.push(arg)
|
177
177
|
end
|
178
178
|
end
|
179
179
|
if files.empty?
|
180
|
-
if @jt.default_post_location && File.
|
180
|
+
if @jt.default_post_location && File.exist?(File.dirname(@jt.default_post_location))
|
181
181
|
files = Dir.glob(@jt.default_post_location)
|
182
182
|
end
|
183
183
|
end
|
184
184
|
exit_now! "No valid filename in arguments" if files.empty?
|
185
185
|
files.each {|file|
|
186
|
-
if File.
|
186
|
+
if File.exist?(file)
|
187
187
|
post_tags = @jt.post_tags(file)
|
188
188
|
|
189
189
|
if bool == "AND"
|
@@ -255,7 +255,7 @@ command :loners do |c|
|
|
255
255
|
|
256
256
|
if options[:e]
|
257
257
|
path = File.expand_path(options[:e])
|
258
|
-
while File.
|
258
|
+
while File.exist?(path)
|
259
259
|
if path =~ /(\d+)(\.[^\.]+?)?$/
|
260
260
|
path.sub!(/(\d+)(\.[^\.]+?)?$/) do |m|
|
261
261
|
$1.next! + $2
|
@@ -291,10 +291,10 @@ command :loners do |c|
|
|
291
291
|
files = []
|
292
292
|
args.length.times do
|
293
293
|
arg = args.pop
|
294
|
-
files.push(arg) if File.
|
294
|
+
files.push(arg) if File.exist?(arg)
|
295
295
|
end
|
296
296
|
if files.empty?
|
297
|
-
if @jt.default_post_location && File.
|
297
|
+
if @jt.default_post_location && File.exist?(File.dirname(@jt.default_post_location))
|
298
298
|
files = Dir.glob(@jt.default_post_location)
|
299
299
|
end
|
300
300
|
end
|
@@ -351,7 +351,7 @@ command :tags do |c|
|
|
351
351
|
end
|
352
352
|
end
|
353
353
|
args.each{|file|
|
354
|
-
if File.
|
354
|
+
if File.exist?(file)
|
355
355
|
tags = @jt.post_tags(file)
|
356
356
|
if args.length > 1
|
357
357
|
console_log
|
@@ -412,14 +412,14 @@ command :merge do |c|
|
|
412
412
|
tags = []
|
413
413
|
args.length.times do
|
414
414
|
arg = args.pop
|
415
|
-
if File.
|
415
|
+
if File.exist?(arg)
|
416
416
|
files.push(arg)
|
417
417
|
else
|
418
418
|
tags.push(arg)
|
419
419
|
end
|
420
420
|
end
|
421
421
|
if files.empty?
|
422
|
-
if @jt.default_post_location && File.
|
422
|
+
if @jt.default_post_location && File.exist?(File.dirname(@jt.default_post_location))
|
423
423
|
files = Dir.glob(@jt.default_post_location)
|
424
424
|
end
|
425
425
|
end
|
@@ -478,14 +478,14 @@ command :add do |c|
|
|
478
478
|
new_tags = []
|
479
479
|
args.length.times do
|
480
480
|
arg = args.pop
|
481
|
-
if File.
|
481
|
+
if File.exist?(arg)
|
482
482
|
files.push(arg)
|
483
483
|
else
|
484
484
|
new_tags.push(arg)
|
485
485
|
end
|
486
486
|
end
|
487
487
|
if files.empty?
|
488
|
-
if @jt.default_post_location && File.
|
488
|
+
if @jt.default_post_location && File.exist?(File.dirname(@jt.default_post_location))
|
489
489
|
files = Dir.glob(@jt.default_post_location)
|
490
490
|
end
|
491
491
|
end
|
@@ -527,14 +527,14 @@ command :remove do |c|
|
|
527
527
|
remove_tags = []
|
528
528
|
args.length.times do
|
529
529
|
arg = args.pop
|
530
|
-
if File.
|
530
|
+
if File.exist?(arg)
|
531
531
|
files.push(arg)
|
532
532
|
else
|
533
533
|
remove_tags.push(arg) unless options[:p]
|
534
534
|
end
|
535
535
|
end
|
536
536
|
if files.empty?
|
537
|
-
if @jt.default_post_location && File.
|
537
|
+
if @jt.default_post_location && File.exist?(File.dirname(@jt.default_post_location))
|
538
538
|
files = Dir.glob(@jt.default_post_location)
|
539
539
|
end
|
540
540
|
end
|
@@ -542,7 +542,7 @@ command :remove do |c|
|
|
542
542
|
|
543
543
|
if options[:p]
|
544
544
|
path = File.expand_path(options[:p])
|
545
|
-
exit_now! "Input file does not appear to be where you think it is." unless File.
|
545
|
+
exit_now! "Input file does not appear to be where you think it is." unless File.exist?(path)
|
546
546
|
IO.read(path).each_line {|l|
|
547
547
|
next if l =~ /^\s*#/
|
548
548
|
if l =~ /^(?:[\s\d])*(?:\|\s*)?(\S.*?)$/
|
@@ -598,7 +598,7 @@ command :tag do |c|
|
|
598
598
|
end
|
599
599
|
end
|
600
600
|
args.each {|file|
|
601
|
-
if File.
|
601
|
+
if File.exist?(File.expand_path(file))
|
602
602
|
input = IO.read(File.expand_path(file))
|
603
603
|
suggestions = @jt.suggest(input)
|
604
604
|
|
data/lib/jtag/jekylltag.rb
CHANGED
@@ -64,7 +64,7 @@ class JTag
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def synonyms
|
67
|
-
if File.
|
67
|
+
if File.exist?(File.join(@support,"synonyms.yml"))
|
68
68
|
syn = YAML::load(File.open(File.join(@support,"synonyms.yml")))
|
69
69
|
compiled = {}
|
70
70
|
syn.each {|k,v|
|
@@ -193,7 +193,7 @@ class JTag
|
|
193
193
|
|
194
194
|
def update_file_tags(file, tags, piped = false)
|
195
195
|
begin
|
196
|
-
if File.
|
196
|
+
if File.exist?(file) || piped
|
197
197
|
yaml, after = split_post(file, piped)
|
198
198
|
yaml[@tags_key] = tags
|
199
199
|
if piped
|
data/lib/jtag/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jtag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Terpstra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
|
-
rubygems_version: 3.
|
127
|
+
rubygems_version: 3.4.0.dev
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: Auto-tagging and tagging tools for Jekyll
|