exedb 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/exedb/version.rb +1 -1
- data/lib/exedb.rb +10 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 921bf48af155069a43bd8f50707a144f1a2501b7
|
|
4
|
+
data.tar.gz: 3bb71a327b6ef83e40495f5f6b6e0781d4f7d095
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d722b3968b6654d211180277070871dc631b9a3f814c889151785021b1a3584da9e3767a178280a0f99eded7c09a4189dd0f06f7241f11c3e50e529b94e979ae
|
|
7
|
+
data.tar.gz: c2513f1e53c6b06325c0ea1b0f2371ec306ee09ea26e5248f1abc098a0926cdc2eca56d26dd6050398b1c161f4105820820a8c03f6f377fa8808bd1c14d2a8a8
|
data/lib/exedb/version.rb
CHANGED
data/lib/exedb.rb
CHANGED
|
@@ -217,7 +217,7 @@ protected
|
|
|
217
217
|
f=u.tr('^qwertyuiopasdfghjklzxcvbnm_-','')
|
|
218
218
|
d=Digest::SHA256.hexdigest(u)
|
|
219
219
|
return f[0,60]+'..'+f[-60,60]+d if f.size>128
|
|
220
|
-
return f+d
|
|
220
|
+
# return f+d
|
|
221
221
|
end
|
|
222
222
|
|
|
223
223
|
def read_cache
|
|
@@ -225,11 +225,15 @@ protected
|
|
|
225
225
|
file.flock(File::LOCK_EX)
|
|
226
226
|
@content=file.read
|
|
227
227
|
warn "CACHE READ: #{@content}"
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
228
|
+
begin
|
|
229
|
+
File.open("#{@path}.code", File::RDONLY) { |code_file|
|
|
230
|
+
c=code_file.gets
|
|
231
|
+
c =~ /([0-9-]+)/
|
|
232
|
+
@code=$1.to_i
|
|
233
|
+
}
|
|
234
|
+
rescue
|
|
235
|
+
@code=-1
|
|
236
|
+
end
|
|
233
237
|
file.flock(File::LOCK_UN)
|
|
234
238
|
}
|
|
235
239
|
end
|