tidtools 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.0.6 2010/04/29
2
+
3
+ * SJISでの出力機能にバグがあったのを修正
4
+
1
5
  === 0.0.5 2010/04/28
2
6
 
3
7
  * Windows環境の場合はSJISで入出力するように
data/bin/tidgrep CHANGED
@@ -9,7 +9,7 @@ require File.expand_path(File.dirname(__FILE__) + "/../lib/tidtools")
9
9
  require "tidgrep/cli"
10
10
 
11
11
  # バージョン番号
12
- Version = "0.0.3"
12
+ Version = "0.0.4"
13
13
 
14
14
  # コマンドの実行
15
15
  Tidgrep::CLI.execute(STDOUT, ARGV)
data/lib/tidgrep/cli.rb CHANGED
@@ -31,7 +31,7 @@ module Tidgrep
31
31
 
32
32
  @content_regexps = []
33
33
  keywords.each do |keyword|
34
- @content_regexps << Regexp.new(self.kconv(keyword), @regexp_option)
34
+ @content_regexps << Regexp.new(kcode2utf(keyword), @regexp_option)
35
35
  end
36
36
  end
37
37
 
@@ -47,20 +47,28 @@ module Tidgrep
47
47
  return true
48
48
  end
49
49
 
50
- def kconv(str)
50
+ def kcode2utf(str)
51
51
  if (@kcode != Kconv::UTF8)
52
- str.kconv(@kconv, Kconv::UTF8)
52
+ str.kconv(Kconv::UTF8, @kcode)
53
+ else
54
+ str
55
+ end
56
+ end
57
+
58
+ def utf2kcode(str)
59
+ if (@kcode != Kconv::UTF8)
60
+ str.kconv(@kcode, Kconv::UTF8)
53
61
  else
54
62
  str
55
63
  end
56
64
  end
57
65
 
58
66
  def print(msg)
59
- @stdout.print self.kconv msg
67
+ @stdout.print utf2kcode(msg)
60
68
  end
61
69
 
62
70
  def puts(msg)
63
- @stdout.puts self.kconv msg
71
+ @stdout.puts utf2kcode(msg)
64
72
  end
65
73
 
66
74
  def match_line
data/lib/tidtools.rb CHANGED
@@ -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 Tidtools
5
- VERSION = '0.0.5'
5
+ VERSION = '0.0.6'
6
6
  end
data/script/console CHANGED
File without changes
data/script/destroy CHANGED
File without changes
data/script/generate CHANGED
File without changes
metadata CHANGED
@@ -1,12 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tidtools
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 5
9
- version: 0.0.5
4
+ version: 0.0.6
10
5
  platform: ruby
11
6
  authors:
12
7
  - ongaeshi
@@ -14,51 +9,39 @@ autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
11
 
17
- date: 2010-04-28 00:00:00 +09:00
12
+ date: 2010-04-29 00:00:00 +09:00
18
13
  default_executable:
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
16
  name: hpricot
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
24
20
  requirements:
25
21
  - - ">="
26
22
  - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 8
30
- - 2
31
23
  version: 0.8.2
32
- type: :runtime
33
- version_requirements: *id001
24
+ version:
34
25
  - !ruby/object:Gem::Dependency
35
26
  name: rubyforge
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
38
30
  requirements:
39
31
  - - ">="
40
32
  - !ruby/object:Gem::Version
41
- segments:
42
- - 2
43
- - 0
44
- - 4
45
33
  version: 2.0.4
46
- type: :development
47
- version_requirements: *id002
34
+ version:
48
35
  - !ruby/object:Gem::Dependency
49
36
  name: hoe
50
- prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
52
40
  requirements:
53
41
  - - ">="
54
42
  - !ruby/object:Gem::Version
55
- segments:
56
- - 2
57
- - 6
58
- - 0
59
43
  version: 2.6.0
60
- type: :development
61
- version_requirements: *id003
44
+ version:
62
45
  description: FIX (describe your package)
63
46
  email:
64
47
  - ongaeshi@example.com
@@ -105,20 +88,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
88
  requirements:
106
89
  - - ">="
107
90
  - !ruby/object:Gem::Version
108
- segments:
109
- - 0
110
91
  version: "0"
92
+ version:
111
93
  required_rubygems_version: !ruby/object:Gem::Requirement
112
94
  requirements:
113
95
  - - ">="
114
96
  - !ruby/object:Gem::Version
115
- segments:
116
- - 0
117
97
  version: "0"
98
+ version:
118
99
  requirements: []
119
100
 
120
101
  rubyforge_project: tidtools
121
- rubygems_version: 1.3.6
102
+ rubygems_version: 1.3.5
122
103
  signing_key:
123
104
  specification_version: 3
124
105
  summary: FIX (describe your package)