gren 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ === 0.3.2 2011/02/20
2
+
3
+ * mkgrendb
4
+ * Bugfix : yamlに記述されたディレクトリが存在しない時にハングアップするバグを修正
5
+ * Bugfix : --fullオプションが正しく動作しない問題を修正
6
+
1
7
  === 0.3.1 2010/11/20
2
8
 
3
9
  * grenweb
@@ -1,3 +1,8 @@
1
+ === 0.3.2 2011/02/20
2
+
3
+ * mkgrendb
4
+ * Bugfix
5
+
1
6
  === 0.3.1 2010/11/20
2
7
 
3
8
  * grenweb
@@ -2,5 +2,5 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module Gren
5
- VERSION = '0.3.1'
5
+ VERSION = '0.3.2'
6
6
  end
@@ -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
- if (FileTest.directory? dir)
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
- File.unlink(f)
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
- - 1
9
- version: 0.3.1
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: 2010-11-20 00:00:00 +09:00
17
+ date: 2011-02-20 00:00:00 +09:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency