dynarex-tags 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -1
- data/lib/dynarex-tags.rb +15 -6
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7df7566e93224127b7b98989296542da0bb9b37430c6b661e077c4c4dd09b6f
|
4
|
+
data.tar.gz: 823a2356aad3577df4fe21c78fee692c37535d1882973cf4b7732418341d4982
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebac2e9b912fde57986cbcb31f2921d3d18d1a2b7b6d07bfff79c26dcfd93816760333cab370a370d7771eff691002e026e1569be8a491fef3d794e1cf0fac54
|
7
|
+
data.tar.gz: 5e76d89817d1c23a8f6eae98a76b250faacd530c638807e0eaafeb80243fe0cf49a4cc2bc112900d231855d32aafc7ca06c414a60c8e9e5439b9d08347a75bef
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
d�
|
1
|
+
j ����ʾ��&�ph����c��<�����k���K??$�$X�D�,��T#�ź]Ậd�a4��>�$.͛����.�R
|
2
|
+
��!T1�qI��+�W����g��!aX�'�s!�&�����͜���>檧;_�l㡞1D�A*%WjYӦD�/�=>*k��8J��p�|�o<�@\2�os���7ڥ��!tʉ�����l�A>>�K��]��C_��:�}�ߠ{��El�ZF�{:������������1�E��vJکL����ǀy�Į!��+6%\�~��T�/K&���-y+�!���%�#�U�34
|
data/lib/dynarex-tags.rb
CHANGED
@@ -7,18 +7,26 @@ require 'fileutils'
|
|
7
7
|
|
8
8
|
|
9
9
|
class DynarexTags
|
10
|
+
include RXFHelperModule
|
11
|
+
using ColouredText
|
10
12
|
|
11
|
-
def initialize(tags_parent_path, tagfile_xslt: nil, indexfile_xslt: nil
|
13
|
+
def initialize(tags_parent_path, tagfile_xslt: nil, indexfile_xslt: nil,
|
14
|
+
debug: false)
|
12
15
|
|
13
|
-
|
16
|
+
puts ('tags_parent_path: ' + tags_parent_path).debug if debug
|
17
|
+
@filepath = tags_parent_path
|
18
|
+
|
19
|
+
@tagfile_xslt, @indexfile_xslt, @debug = tagfile_xslt,
|
20
|
+
indexfile_xslt, debug
|
14
21
|
|
15
22
|
@tags_path = File.join(tags_parent_path, 'tags')
|
16
|
-
|
23
|
+
FileX.mkdir_p @tags_path
|
17
24
|
@index_filename = File.join(tags_parent_path, 'dxtags.xml')
|
18
25
|
|
19
|
-
s =
|
26
|
+
s = FileX.exists?(@index_filename) ? \
|
20
27
|
@index_filename : 'tags/tag(keyword,count)'
|
21
28
|
|
29
|
+
puts ('dxtags filepath: ' + s.inspect).debug if debug
|
22
30
|
@dxindex = Dynarex.new s, json_out: false
|
23
31
|
@dxindex.xslt = @indexfile_xslt if @indexfile_xslt
|
24
32
|
|
@@ -27,7 +35,8 @@ class DynarexTags
|
|
27
35
|
def find(tag)
|
28
36
|
|
29
37
|
rx = @dxindex.find tag.downcase
|
30
|
-
|
38
|
+
puts ('rx: ' + rx.inspect).debug if @debug
|
39
|
+
|
31
40
|
if rx then
|
32
41
|
|
33
42
|
tagfile = File.join(@tags_path, tag.downcase + '.xml')
|
@@ -44,7 +53,7 @@ class DynarexTags
|
|
44
53
|
|
45
54
|
end
|
46
55
|
|
47
|
-
def generate(indexfilename='index.xml', &blk)
|
56
|
+
def generate(indexfilename=File.join(@filepath, 'index.xml'), &blk)
|
48
57
|
|
49
58
|
dx = Dynarex.new indexfilename
|
50
59
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynarex-tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
DWmhPViInQPjQftcVmbEJ7cSh3MAHLmEde9WXtfuVrqm7bLx2cT6gGph4MUs2CuA
|
36
36
|
WkefAv1RxMCo/1hDjM5UvmJx
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2018-11-
|
38
|
+
date: 2018-11-03 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: dynarex
|
metadata.gz.sig
CHANGED
Binary file
|