indexer101 0.2.1 → 0.2.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: '059a4e8a4809e20f53e1d35100dad97936de2da80e2477650fb7efd0841c1cc2'
4
- data.tar.gz: 215873766f61840776a8d3540556a034536dd71621593b928af8cb100861f973
3
+ metadata.gz: 67c8317bb311f9715b5bbef8c325b7e0e76cf44cc7d1d83c5543f1758b67f9b2
4
+ data.tar.gz: 87c825fb9af605084589749fde1e8b07464c8e7d9cf7713f40e5e49351e4171e
5
5
  SHA512:
6
- metadata.gz: 54afb23966c1b323821dca57198fb0b45a88e5f0de514fd48361ec1fbb59c1903152d2854c30fb73b03b78f96b582d174ae6211cd1174105c465bff92665be55
7
- data.tar.gz: 864f8fa54173d1e769e70fbc688bd48c073aefb9aaf4b076d3e327f0c5c4c686303c1b1ab2a64295868aea8eced05bae276949edda6f2a2edb57427b2185ed58
6
+ metadata.gz: 737e4933056905d48a68c0a42997ab19a465b37008cafde631370b5505c4adbe1f2a7fe10c3a763daba2e9d4505e44432d4118ea2acb5b7cf0399c8c886d36fc
7
+ data.tar.gz: 13478e980d89771fa0014c8ad2b0a7d866ac3139f8fe39ef9f69d59e543b97d031d78567b6fc1a5507bffb450a785be39f8d5761712fb1493d06510a078ed8e2
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -6,6 +6,7 @@ require 'c32'
6
6
  require 'thread'
7
7
  require 'thwait'
8
8
  require 'dynarex'
9
+ require 'dxlite'
9
10
 
10
11
 
11
12
  class Indexer101
@@ -124,12 +125,22 @@ class Indexer101
124
125
 
125
126
  t = Time.now
126
127
  threads = locations.flatten.map do |location|
127
- Thread.new {Thread.current[:v] = Dynarex.new location}
128
+
129
+ Thread.new {
130
+
131
+ Thread.current[:v] = case File.extname(location)
132
+ when '.xml'
133
+ Dynarex.new location
134
+ when '.json'
135
+ DxLite.new location
136
+ end
137
+ }
128
138
  end
129
139
 
130
140
  ThreadsWait.all_waits(*threads)
131
141
 
132
142
  a = threads.map {|x| x[:v]}
143
+
133
144
  t2 = Time.now - t
134
145
  puts ("dxindex documents loaded in " + ("%.2f" % t2).brown \
135
146
  + " seconds").info
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indexer101
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  08cN0E9zjqKINgH/PsZTot+ohuVRLwn6WmHHhb18oUrxt3a0u4/3TNcWOcMeR0F2
36
36
  GeYL+mKGct5bfjn8IZnAJVKY
37
37
  -----END CERTIFICATE-----
38
- date: 2019-11-12 00:00:00.000000000 Z
38
+ date: 2020-06-23 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: dynarex
@@ -57,6 +57,26 @@ dependencies:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
59
  version: 1.8.21
60
+ - !ruby/object:Gem::Dependency
61
+ name: dxlite
62
+ requirement: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '0.2'
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 0.2.7
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '0.2'
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: 0.2.7
60
80
  description:
61
81
  email: james@jamesrobertson.eu
62
82
  executables: []
@@ -83,7 +103,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
103
  - !ruby/object:Gem::Version
84
104
  version: '0'
85
105
  requirements: []
86
- rubygems_version: 3.0.3
106
+ rubyforge_project:
107
+ rubygems_version: 2.7.10
87
108
  signing_key:
88
109
  specification_version: 4
89
110
  summary: Experimental gem to search a list of words 1 character at a time. Intended
metadata.gz.sig CHANGED
Binary file