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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1dc00bb56036e15aad2d5f47b02e51ed85a10072c339e608e594cb449fca0e15
4
- data.tar.gz: 5e744e6b3110a89b7867cd35121c727bb3fbb21dc054eb1fb78e7b99818644e9
3
+ metadata.gz: e7df7566e93224127b7b98989296542da0bb9b37430c6b661e077c4c4dd09b6f
4
+ data.tar.gz: 823a2356aad3577df4fe21c78fee692c37535d1882973cf4b7732418341d4982
5
5
  SHA512:
6
- metadata.gz: d6b60c2ad6486cb738070e809ab345d3e0f3d9915de528376a5491d261320ede4217bf09704a8a0bc2f2289f05f2c4f0702a214c841af8b79fa7474e02ec48a9
7
- data.tar.gz: b1bcb7c4be977d8afc10daa19a2bc388b14940f36327451be96d1a2a8e12c8d9a9448232be6f35fb758f7f0306d73ba9dab2dd2710c8726b26c7cc12fa435812
6
+ metadata.gz: ebac2e9b912fde57986cbcb31f2921d3d18d1a2b7b6d07bfff79c26dcfd93816760333cab370a370d7771eff691002e026e1569be8a491fef3d794e1cf0fac54
7
+ data.tar.gz: 5e76d89817d1c23a8f6eae98a76b250faacd530c638807e0eaafeb80243fe0cf49a4cc2bc112900d231855d32aafc7ca06c414a60c8e9e5439b9d08347a75bef
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- d�w�������v�X�Cb耑馃#�܍���N�k�
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
@@ -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
- @tagfile_xslt, @indexfile_xslt = tagfile_xslt, indexfile_xslt
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
- FileUtils.mkdir_p @tags_path
23
+ FileX.mkdir_p @tags_path
17
24
  @index_filename = File.join(tags_parent_path, 'dxtags.xml')
18
25
 
19
- s = File.exists?(@index_filename) ? \
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.1
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-02 00:00:00.000000000 Z
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