milkode 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.1.6 2011/08/03
2
+
3
+ * Bug fix, faild 'milk init' for Ubunts. (thanks kumonopanya, and maroekun)
4
+
1
5
  === 0.1.5 2011/08/02
2
6
 
3
7
  * Compatibility Ruby 1.9.2p290.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
data/bin/milk CHANGED
@@ -6,5 +6,5 @@
6
6
  require 'rubygems'
7
7
  require 'milkode/cdstk/cli_cdstk'
8
8
 
9
- Version = "0.1.5"
9
+ Version = "0.1.6"
10
10
  Milkode::CLI_Cdstk.execute(STDOUT, ARGV)
@@ -9,6 +9,7 @@ require 'pathname'
9
9
  require 'milkode/cdstk/cdstk_yaml'
10
10
  require 'milkode/common/grenfiletest'
11
11
  require 'milkode/common/util'
12
+ require 'milkode/common/dir'
12
13
  include Milkode
13
14
  require 'kconv'
14
15
  begin
@@ -45,7 +46,7 @@ module Milkode
45
46
  end
46
47
 
47
48
  def init
48
- if Dir.entries(@db_dir) == [".", ".."]
49
+ if Dir.emptydir?(@db_dir)
49
50
  CdstkYaml.create(@db_dir)
50
51
  @out.puts "create : #{yaml_file}"
51
52
  db_create(db_file)
@@ -18,7 +18,7 @@ require 'milkode/cdweb/lib/mkurl'
18
18
  set :haml, :format => :html5
19
19
 
20
20
  get '/' do
21
- @version = "0.1.5"
21
+ @version = "0.1.6"
22
22
  @package_num = Database.instance.fileList('').size
23
23
  @file_num = Database.instance.fileNum
24
24
  haml :index
@@ -0,0 +1,14 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # @file
4
+ # @brief
5
+ # @author ongaeshi
6
+ # @date 2011/08/03
7
+
8
+ class Dir
9
+ def self.emptydir?(dir)
10
+ entries = Dir.entries(dir)
11
+ entries == [".", ".."] or entries == ["..", "."]
12
+ end
13
+ end
14
+
data/milkode.gemspec CHANGED
@@ -5,14 +5,14 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{milkode}
8
- s.version = "0.1.5"
8
+ s.version = "0.1.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = [%q{ongaeshi}]
12
- s.date = %q{2011-08-01}
11
+ s.authors = ["ongaeshi"]
12
+ s.date = %q{2011-08-03}
13
13
  s.description = %q{Line based local source code search engine & web-app.}
14
14
  s.email = %q{ongaeshi0621@gmail.com}
15
- s.executables = [%q{cdv}, %q{cdview}, %q{milk}]
15
+ s.executables = ["cdv", "milk", "cdview"]
16
16
  s.extra_rdoc_files = [
17
17
  "LICENSE.txt",
18
18
  "README.rdoc"
@@ -57,6 +57,7 @@ Gem::Specification.new do |s|
57
57
  "lib/milkode/cdweb/views/search.haml",
58
58
  "lib/milkode/cdweb/views/view.haml",
59
59
  "lib/milkode/common/dbdir.rb",
60
+ "lib/milkode/common/dir.rb",
60
61
  "lib/milkode/common/display_util.rb",
61
62
  "lib/milkode/common/grenfiletest.rb",
62
63
  "lib/milkode/common/grensnip.rb",
@@ -80,6 +81,7 @@ Gem::Specification.new do |s|
80
81
  "test/test_coderay_wrapper_data.rb",
81
82
  "test/test_database.rb",
82
83
  "test/test_dbdir.rb",
84
+ "test/test_dir.rb",
83
85
  "test/test_gren_util.rb",
84
86
  "test/test_helper.rb",
85
87
  "test/test_mkurl.rb",
@@ -88,15 +90,36 @@ Gem::Specification.new do |s|
88
90
  "test/test_util.rb"
89
91
  ]
90
92
  s.homepage = %q{http://github.com/ongaeshi/milkode}
91
- s.licenses = [%q{MIT}]
92
- s.require_paths = [%q{lib}]
93
- s.rubygems_version = %q{1.8.6}
93
+ s.licenses = ["MIT"]
94
+ s.require_paths = ["lib"]
95
+ s.rubygems_version = %q{1.3.6}
94
96
  s.summary = %q{Line based local source code search engine & web-app.}
97
+ s.test_files = [
98
+ "test/file_assert.rb",
99
+ "test/file_test_utils.rb",
100
+ "test/rake_test_loader.rb",
101
+ "test/runner.rb",
102
+ "test/test_bin_exec.rb",
103
+ "test/test_cdstk.rb",
104
+ "test/test_cdstk_yaml.rb",
105
+ "test/test_coderay_wrapper.rb",
106
+ "test/test_coderay_wrapper_data.rb",
107
+ "test/test_database.rb",
108
+ "test/test_dbdir.rb",
109
+ "test/test_dir.rb",
110
+ "test/test_gren_util.rb",
111
+ "test/test_helper.rb",
112
+ "test/test_mkurl.rb",
113
+ "test/test_query.rb",
114
+ "test/test_string_snip.rb",
115
+ "test/test_util.rb"
116
+ ]
95
117
 
96
118
  if s.respond_to? :specification_version then
119
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
97
120
  s.specification_version = 3
98
121
 
99
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
122
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
100
123
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
101
124
  s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
102
125
  s.add_development_dependency(%q<rcov>, [">= 0"])
data/test/test_dir.rb ADDED
@@ -0,0 +1,21 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # @file
4
+ # @brief
5
+ # @author ongaeshi
6
+ # @date 2011/02/20
7
+
8
+ require 'milkode/common/dir'
9
+ require 'test/unit'
10
+ require 'file_test_utils'
11
+
12
+ class TestDir < Test::Unit::TestCase
13
+ include FileTestUtils
14
+
15
+ def test_emptydir?
16
+ assert_equal true, Dir.emptydir?(".")
17
+ assert_equal false, Dir.emptydir?("..")
18
+ end
19
+ end
20
+
21
+
metadata CHANGED
@@ -1,170 +1,214 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: milkode
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.5
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 6
9
+ version: 0.1.6
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - ongaeshi
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2011-08-01 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: bundler
16
- requirement: &2156295840 !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
16
+
17
+ date: 2011-08-03 00:00:00 +09:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ requirements:
19
23
  - - ~>
20
- - !ruby/object:Gem::Version
24
+ - !ruby/object:Gem::Version
25
+ segments:
26
+ - 1
27
+ - 0
28
+ - 0
21
29
  version: 1.0.0
22
- type: :development
30
+ name: bundler
31
+ requirement: *id001
23
32
  prerelease: false
24
- version_requirements: *2156295840
25
- - !ruby/object:Gem::Dependency
26
- name: jeweler
27
- requirement: &2156294900 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
33
+ type: :development
34
+ - !ruby/object:Gem::Dependency
35
+ version_requirements: &id002 !ruby/object:Gem::Requirement
36
+ requirements:
30
37
  - - ~>
31
- - !ruby/object:Gem::Version
38
+ - !ruby/object:Gem::Version
39
+ segments:
40
+ - 1
41
+ - 5
42
+ - 2
32
43
  version: 1.5.2
33
- type: :development
44
+ name: jeweler
45
+ requirement: *id002
34
46
  prerelease: false
35
- version_requirements: *2156294900
36
- - !ruby/object:Gem::Dependency
37
- name: rcov
38
- requirement: &2156293400 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
44
47
  type: :development
48
+ - !ruby/object:Gem::Dependency
49
+ version_requirements: &id003 !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ segments:
54
+ - 0
55
+ version: "0"
56
+ name: rcov
57
+ requirement: *id003
45
58
  prerelease: false
46
- version_requirements: *2156293400
47
- - !ruby/object:Gem::Dependency
48
- name: termcolor
49
- requirement: &2156291660 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
59
+ type: :development
60
+ - !ruby/object:Gem::Dependency
61
+ version_requirements: &id004 !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ segments:
66
+ - 1
67
+ - 2
68
+ - 0
54
69
  version: 1.2.0
55
- type: :runtime
70
+ name: termcolor
71
+ requirement: *id004
56
72
  prerelease: false
57
- version_requirements: *2156291660
58
- - !ruby/object:Gem::Dependency
59
- name: rroonga
60
- requirement: &2156290840 !ruby/object:Gem::Requirement
61
- none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: 1.0.0
66
73
  type: :runtime
74
+ - !ruby/object:Gem::Dependency
75
+ version_requirements: &id005 !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ segments:
80
+ - 1
81
+ - 0
82
+ - 0
83
+ version: 1.0.0
84
+ name: rroonga
85
+ requirement: *id005
67
86
  prerelease: false
68
- version_requirements: *2156290840
69
- - !ruby/object:Gem::Dependency
70
- name: rack
71
- requirement: &2156281760 !ruby/object:Gem::Requirement
72
- none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: 1.2.1
77
87
  type: :runtime
88
+ - !ruby/object:Gem::Dependency
89
+ version_requirements: &id006 !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ segments:
94
+ - 1
95
+ - 2
96
+ - 1
97
+ version: 1.2.1
98
+ name: rack
99
+ requirement: *id006
78
100
  prerelease: false
79
- version_requirements: *2156281760
80
- - !ruby/object:Gem::Dependency
81
- name: sinatra
82
- requirement: &2156280900 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ! '>='
86
- - !ruby/object:Gem::Version
87
- version: 1.2.6
88
101
  type: :runtime
102
+ - !ruby/object:Gem::Dependency
103
+ version_requirements: &id007 !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ segments:
108
+ - 1
109
+ - 2
110
+ - 6
111
+ version: 1.2.6
112
+ name: sinatra
113
+ requirement: *id007
89
114
  prerelease: false
90
- version_requirements: *2156280900
91
- - !ruby/object:Gem::Dependency
92
- name: launchy
93
- requirement: &2156280140 !ruby/object:Gem::Requirement
94
- none: false
95
- requirements:
96
- - - ! '>='
97
- - !ruby/object:Gem::Version
98
- version: 0.3.7
99
115
  type: :runtime
116
+ - !ruby/object:Gem::Dependency
117
+ version_requirements: &id008 !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ segments:
122
+ - 0
123
+ - 3
124
+ - 7
125
+ version: 0.3.7
126
+ name: launchy
127
+ requirement: *id008
100
128
  prerelease: false
101
- version_requirements: *2156280140
102
- - !ruby/object:Gem::Dependency
103
- name: coderay
104
- requirement: &2156279380 !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: 0.9.8
110
129
  type: :runtime
130
+ - !ruby/object:Gem::Dependency
131
+ version_requirements: &id009 !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ segments:
136
+ - 0
137
+ - 9
138
+ - 8
139
+ version: 0.9.8
140
+ name: coderay
141
+ requirement: *id009
111
142
  prerelease: false
112
- version_requirements: *2156279380
113
- - !ruby/object:Gem::Dependency
114
- name: thin
115
- requirement: &2156278300 !ruby/object:Gem::Requirement
116
- none: false
117
- requirements:
118
- - - ! '>='
119
- - !ruby/object:Gem::Version
120
- version: 1.2.10
121
143
  type: :runtime
144
+ - !ruby/object:Gem::Dependency
145
+ version_requirements: &id010 !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ segments:
150
+ - 1
151
+ - 2
152
+ - 10
153
+ version: 1.2.10
154
+ name: thin
155
+ requirement: *id010
122
156
  prerelease: false
123
- version_requirements: *2156278300
124
- - !ruby/object:Gem::Dependency
125
- name: archive-zip
126
- requirement: &2156277200 !ruby/object:Gem::Requirement
127
- none: false
128
- requirements:
129
- - - ! '>='
130
- - !ruby/object:Gem::Version
131
- version: 0.3.0
132
157
  type: :runtime
158
+ - !ruby/object:Gem::Dependency
159
+ version_requirements: &id011 !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ segments:
164
+ - 0
165
+ - 3
166
+ - 0
167
+ version: 0.3.0
168
+ name: archive-zip
169
+ requirement: *id011
133
170
  prerelease: false
134
- version_requirements: *2156277200
135
- - !ruby/object:Gem::Dependency
136
- name: haml
137
- requirement: &2156276000 !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
140
- - - ! '>='
141
- - !ruby/object:Gem::Version
142
- version: 3.1.2
143
171
  type: :runtime
172
+ - !ruby/object:Gem::Dependency
173
+ version_requirements: &id012 !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ segments:
178
+ - 3
179
+ - 1
180
+ - 2
181
+ version: 3.1.2
182
+ name: haml
183
+ requirement: *id012
144
184
  prerelease: false
145
- version_requirements: *2156276000
146
- - !ruby/object:Gem::Dependency
147
- name: sass
148
- requirement: &2156274960 !ruby/object:Gem::Requirement
149
- none: false
150
- requirements:
151
- - - ! '>='
152
- - !ruby/object:Gem::Version
153
- version: 3.1.3
154
185
  type: :runtime
186
+ - !ruby/object:Gem::Dependency
187
+ version_requirements: &id013 !ruby/object:Gem::Requirement
188
+ requirements:
189
+ - - ">="
190
+ - !ruby/object:Gem::Version
191
+ segments:
192
+ - 3
193
+ - 1
194
+ - 3
195
+ version: 3.1.3
196
+ name: sass
197
+ requirement: *id013
155
198
  prerelease: false
156
- version_requirements: *2156274960
199
+ type: :runtime
157
200
  description: Line based local source code search engine & web-app.
158
201
  email: ongaeshi0621@gmail.com
159
- executables:
202
+ executables:
160
203
  - cdv
161
- - cdview
162
204
  - milk
205
+ - cdview
163
206
  extensions: []
164
- extra_rdoc_files:
207
+
208
+ extra_rdoc_files:
165
209
  - LICENSE.txt
166
210
  - README.rdoc
167
- files:
211
+ files:
168
212
  - .document
169
213
  - Gemfile
170
214
  - Gemfile.lock
@@ -204,6 +248,7 @@ files:
204
248
  - lib/milkode/cdweb/views/search.haml
205
249
  - lib/milkode/cdweb/views/view.haml
206
250
  - lib/milkode/common/dbdir.rb
251
+ - lib/milkode/common/dir.rb
207
252
  - lib/milkode/common/display_util.rb
208
253
  - lib/milkode/common/grenfiletest.rb
209
254
  - lib/milkode/common/grensnip.rb
@@ -227,35 +272,59 @@ files:
227
272
  - test/test_coderay_wrapper_data.rb
228
273
  - test/test_database.rb
229
274
  - test/test_dbdir.rb
275
+ - test/test_dir.rb
230
276
  - test/test_gren_util.rb
231
277
  - test/test_helper.rb
232
278
  - test/test_mkurl.rb
233
279
  - test/test_query.rb
234
280
  - test/test_string_snip.rb
235
281
  - test/test_util.rb
282
+ has_rdoc: true
236
283
  homepage: http://github.com/ongaeshi/milkode
237
- licenses:
284
+ licenses:
238
285
  - MIT
239
286
  post_install_message:
240
287
  rdoc_options: []
241
- require_paths:
288
+
289
+ require_paths:
242
290
  - lib
243
- required_ruby_version: !ruby/object:Gem::Requirement
244
- none: false
245
- requirements:
246
- - - ! '>='
247
- - !ruby/object:Gem::Version
248
- version: '0'
249
- required_rubygems_version: !ruby/object:Gem::Requirement
250
- none: false
251
- requirements:
252
- - - ! '>='
253
- - !ruby/object:Gem::Version
254
- version: '0'
291
+ required_ruby_version: !ruby/object:Gem::Requirement
292
+ requirements:
293
+ - - ">="
294
+ - !ruby/object:Gem::Version
295
+ segments:
296
+ - 0
297
+ version: "0"
298
+ required_rubygems_version: !ruby/object:Gem::Requirement
299
+ requirements:
300
+ - - ">="
301
+ - !ruby/object:Gem::Version
302
+ segments:
303
+ - 0
304
+ version: "0"
255
305
  requirements: []
306
+
256
307
  rubyforge_project:
257
- rubygems_version: 1.8.6
308
+ rubygems_version: 1.3.6
258
309
  signing_key:
259
310
  specification_version: 3
260
311
  summary: Line based local source code search engine & web-app.
261
- test_files: []
312
+ test_files:
313
+ - test/file_assert.rb
314
+ - test/file_test_utils.rb
315
+ - test/rake_test_loader.rb
316
+ - test/runner.rb
317
+ - test/test_bin_exec.rb
318
+ - test/test_cdstk.rb
319
+ - test/test_cdstk_yaml.rb
320
+ - test/test_coderay_wrapper.rb
321
+ - test/test_coderay_wrapper_data.rb
322
+ - test/test_database.rb
323
+ - test/test_dbdir.rb
324
+ - test/test_dir.rb
325
+ - test/test_gren_util.rb
326
+ - test/test_helper.rb
327
+ - test/test_mkurl.rb
328
+ - test/test_query.rb
329
+ - test/test_string_snip.rb
330
+ - test/test_util.rb