pxindex-builder 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 900c67db65c6a8baccf06262ec1ecd641f6ca752
4
- data.tar.gz: 8fc87cd446c191f1f16c3b13b6fa50377f8f6ad5
3
+ metadata.gz: 104ca6fc743176ff16ad3a8c04708b0e12cfbdb1
4
+ data.tar.gz: c726681463709bf8732cc192f7177c1500e89f8c
5
5
  SHA512:
6
- metadata.gz: af66a01f5694fdcc950333c2e5c9453e96b75301a1dac22324375ccf85b434cece960e05956a0f0265f7427314e6532dfd6c172cf269b28aff5991eae8dee201
7
- data.tar.gz: e590f621ecad5aa962b33417027156e129f2e529cf184ffbec37a478a6027519f16779cc061af40d74691ca8bb7487f3829fd4002c401b03d0aaae516100bea0
6
+ metadata.gz: 260251027050a9c28eb84f634b7412da6400220ffd4ba870e4d0b5c5e09d9619d0eb393908b4c040929634a0db1bb8e7a4515f7487a0954cac83086167c424ba
7
+ data.tar.gz: e35eb7185354cf457899a5e67fe790ed8fd63e4c2f3a6aa30a91747ff77858ca7b4e4cba8a2a46b24f2b56c3e48f282b3448278da3436ed9f48ce3e3c443935b
checksums.yaml.gz.sig CHANGED
Binary file
@@ -9,14 +9,16 @@ require 'polyrex-builder'
9
9
 
10
10
  class PxIndexBuilder
11
11
 
12
- attr_reader :to_xml
12
+ attr_reader :to_xml, :to_h
13
13
 
14
14
  def initialize(raw_s, ignore=[])
15
15
 
16
16
  s, _ = RXFHelper.read(raw_s)
17
17
 
18
18
  h = YAML.load(s)
19
+
19
20
  words = h.keys.join(' ').split(/ +/).map {|x| x[/\w+/]}.uniq\
21
+ #.tap {|x| puts 't: ' + x.inspect}
20
22
  .reject {|x| x.length < 3}\
21
23
  .reject {|x| ignore.include? x}\
22
24
  .reject {|x| x.length < 4 and !WordsDotDat.list.include? x.downcase}\
@@ -35,7 +37,9 @@ class PxIndexBuilder
35
37
 
36
38
  end
37
39
 
38
- @to_xml = PolyrexBuilder.new(scan(index), parents: %i(entry)).to_xml
40
+ @to_h = h = scan(index)
41
+ @to_xml = PolyrexBuilder.new(h, parents: %i(entry)).to_xml
42
+
39
43
 
40
44
  end
41
45
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pxindex-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  rpKyBm8O20gPepUR+u4B3OOMZL1vUMzoAppGGdK/fa9iZHfP9tccqmgXIQ8c4X1f
32
32
  C74enOZQySX7LA==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-10-20 00:00:00.000000000 Z
34
+ date: 2017-10-22 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: wordsdotdat
metadata.gz.sig CHANGED
Binary file