gren 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.ja.txt +6 -0
- data/History.txt +5 -0
- data/lib/gren.rb +1 -1
- data/lib/mkgrendb/mkgrendb.rb +6 -2
- metadata +3 -3
data/History.ja.txt
CHANGED
data/History.txt
CHANGED
data/lib/gren.rb
CHANGED
data/lib/mkgrendb/mkgrendb.rb
CHANGED
@@ -4,6 +4,7 @@ require 'yaml'
|
|
4
4
|
require 'pathname'
|
5
5
|
require 'rubygems'
|
6
6
|
require 'groonga'
|
7
|
+
require 'fileutils'
|
7
8
|
require File.join(File.dirname(__FILE__), '../common/grenfiletest')
|
8
9
|
require File.join(File.dirname(__FILE__), '../common/util')
|
9
10
|
include Gren
|
@@ -27,7 +28,10 @@ module Mkgrendb
|
|
27
28
|
db_open(@output_db)
|
28
29
|
@src["directory"].each do |dir|
|
29
30
|
dir = File.expand_path(dir)
|
30
|
-
|
31
|
+
|
32
|
+
if (!FileTest.exist?(dir))
|
33
|
+
puts "[WARNING] : #{dir} (Not found, skip)"
|
34
|
+
elsif (FileTest.directory? dir)
|
31
35
|
db_add_dir(dir)
|
32
36
|
else
|
33
37
|
db_add_file(STDOUT, dir, File.basename(dir))
|
@@ -112,7 +116,7 @@ module Mkgrendb
|
|
112
116
|
raise "Illegal file name : #{filename}." unless filename =~ /\.db$/
|
113
117
|
Dir.glob("#{filename}*").each do |f|
|
114
118
|
puts "delete : #{f}"
|
115
|
-
|
119
|
+
FileUtils.rm_r(f)
|
116
120
|
end
|
117
121
|
end
|
118
122
|
private :db_delete
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 2
|
9
|
+
version: 0.3.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- ongaeshi
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-02-20 00:00:00 +09:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|