findrr 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +8 -0
- data/lib/findrr/database.rb +2 -13
- data/lib/findrr/version.rb +1 -1
- 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: d8f9d45eebc9eb656c822476e2a7a778e31484dd
|
4
|
+
data.tar.gz: dc8ac6f13b7bfd18e3fb30dfb1bfbde2e623a14d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a73b00abed2490b8dfcf7287565e55d771cf24066e962391dc32b0dd2de7faa667877992b1ed807cd49dadc634b9298f37a19e9e46d1b7bcc595beb0f8c8f5c
|
7
|
+
data.tar.gz: e1fa71c3a7b7d69a572e75e45500d4e0e84a027ef9d9e04b7f75f0882ce06c9e13c086662bd7b134c860c8c7ef27c8a579e1884d69554370d9ef9902c35e9444
|
data/NEWS.md
CHANGED
data/lib/findrr/database.rb
CHANGED
@@ -16,18 +16,8 @@ module Findrr
|
|
16
16
|
Groonga::Database.open(database_path) do
|
17
17
|
files = Groonga["Files"]
|
18
18
|
Find.find(File.expand_path(target)) do |path|
|
19
|
-
|
20
|
-
|
21
|
-
files[path] = {:mtime => File.mtime(path)}
|
22
|
-
else
|
23
|
-
files.add(path, :basename => File.basename(path),
|
24
|
-
:mtime => File.mtime(path))
|
25
|
-
end
|
26
|
-
rescue Errno::ENOENT
|
27
|
-
next
|
28
|
-
rescue => e
|
29
|
-
$stderr.puts("Skip: #{e.class}: #{e.message} (#{path})")
|
30
|
-
next
|
19
|
+
unless files.has_key?(path)
|
20
|
+
files.add(path, :basename => File.basename(path))
|
31
21
|
end
|
32
22
|
end
|
33
23
|
files.size
|
@@ -77,7 +67,6 @@ module Findrr
|
|
77
67
|
|
78
68
|
Groonga::Schema.create_table("Files", :type => :patricia_trie) do |table|
|
79
69
|
table.short_text("basename")
|
80
|
-
table.time("mtime")
|
81
70
|
end
|
82
71
|
|
83
72
|
Groonga::Schema.create_table("Terms",
|
data/lib/findrr/version.rb
CHANGED