gren 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ === 0.2.1 2010/09/13
2
+
3
+ * デフォルトのignoreファイル追加 .d, .map, .MAP
4
+ * オプション名変更 : --sub → --not
5
+
1
6
  === 0.2.0 2010/09/13
2
7
 
3
8
  * grooongaを利用して超高速検索を実現した、grendbをリリース
data/bin/gren CHANGED
@@ -7,5 +7,5 @@ require 'rubygems'
7
7
  require File.expand_path(File.dirname(__FILE__) + "/../lib/gren")
8
8
  require "gren/cli"
9
9
 
10
- Version = "0.2.0"
10
+ Version = "0.2.1"
11
11
  Gren::CLI.execute(STDOUT, ARGV)
@@ -7,5 +7,5 @@ require 'rubygems'
7
7
  require File.expand_path(File.dirname(__FILE__) + "/../lib/gren")
8
8
  require "mkgrendb/cli"
9
9
 
10
- Version = "0.2.0"
10
+ Version = "0.2.1"
11
11
  Mkgrendb::CLI.execute(STDOUT, ARGV)
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  module GrenFileTest
4
- IGNORE_FILE = /(\A#.*#\Z)|(~\Z)|(\A\.#)/
4
+ IGNORE_FILE = /(\A#.*#\Z)|(~\Z)|(\A\.#)|(\.d\Z)|(\.map\Z)|(\.MAP\Z)/
5
5
  IGNORE_DIR = /(\A\.svn\Z)|(\A\.git\Z)|(\ACVS\Z)/
6
6
 
7
7
  def self.ignoreDir?(fpath)
@@ -11,7 +11,7 @@ require 'groonga'
11
11
 
12
12
  module FindGrep
13
13
  class FindGrep
14
- Option = Struct.new(:keywordsSub,
14
+ Option = Struct.new(:keywordsNot,
15
15
  :keywordsOr,
16
16
  :directory,
17
17
  :depth,
@@ -45,7 +45,7 @@ module FindGrep
45
45
  @patterns = patterns
46
46
  @option = option
47
47
  @patternRegexps = strs2regs(patterns, @option.ignoreCase)
48
- @subRegexps = strs2regs(option.keywordsSub, @option.ignoreCase)
48
+ @subRegexps = strs2regs(option.keywordsNot, @option.ignoreCase)
49
49
  @orRegexps = strs2regs(option.keywordsOr, @option.ignoreCase)
50
50
  @filePatterns = (!@option.dbFile) ? strs2regs(option.filePatterns) : []
51
51
  @ignoreFiles = strs2regs(option.ignoreFiles)
@@ -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.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
@@ -10,7 +10,7 @@ module Gren
10
10
 
11
11
  # オプション解析
12
12
  opt = OptionParser.new("#{File.basename($0)} [option] pattern")
13
- opt.on('--sub PATTERN', 'Keyword is not included.') {|v| option.keywordsSub << v}
13
+ opt.on('--not PATTERN', 'Keyword is not included.') {|v| option.keywordsNot << v}
14
14
  opt.on('--or PATTERN', 'Either of keyword is contained.') {|v| option.keywordsOr << v}
15
15
  opt.on('-d DIR', '--directory DIR', 'Start directory. (deafult:".")') {|v| option.directory = v}
16
16
  opt.on('--depth DEPTH', 'Limit search depth. ') {|v| option.depth = v.to_i}
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - ongaeshi