milkode 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,8 @@ module Milkode
21
21
  class Database
22
22
  include Singleton
23
23
 
24
+ attr_reader :documents
25
+
24
26
  @@db_dir = nil
25
27
 
26
28
  def self.setup(db_dir)
@@ -35,3 +35,26 @@ en:
35
35
  filter_by_directory: Filter by Directory
36
36
  update_news: 'Update %{package_name}'
37
37
  add_news: 'Add %{package_name}'
38
+ filter_options: Filter Options
39
+ help_search_by_keyword: Search by Keywords
40
+ help_and_search: AND Search
41
+ help_phrase_search: Pyrase Search
42
+ help_filter_options_description: Can use along with the keywords
43
+ help_filter_by_package_name: Filter by package
44
+ help_filter_by_file_name: Filter by filename
45
+ help_filter_by_suffix: Filter by suffix
46
+ help_filter_by_a_file_name_or_package_name: Filter by a filename or packge
47
+ help_filter_by_a_file_name_or_package_name_or_contents: Filter by a filename or packge or contents
48
+ help_wide_search: Extend to multiple lines search range
49
+ help_wide_search_comment_01: Both of 'read' and 'write' to within seven lines are included
50
+ help_wide_search_comment_02: "File all if 'w:0'"
51
+ help_directpath: Direct Path
52
+ help_directpath_description: Direct Path is a <strong>"Absolute Path"</strong>
53
+ help_jump_directly_to_a_search_for_directpath: Jump directly to a search for Direct Path.
54
+ help_directpath_comment_01: /#{package}/#{filename}:#{lineno}
55
+ help_directpath_comment_02: If spaces are included
56
+ help_directpath_comment_03: You can pass more than one value if you separate them by blank
57
+ help_directpath_gif: Get by clicking the line number
58
+ help_emacs_milkode: Direct Path can work with <a href="https://github.com/ongaeshi/emacs-milkode">emacs-milkode</a>.
59
+
60
+
@@ -35,3 +35,26 @@ ja:
35
35
  filter_by_directory: ディレクトリで絞り込み
36
36
  update_news: '%{package_name}を更新'
37
37
  add_news: '%{package_name}を追加'
38
+ filter_options: 絞り込みオプション
39
+ help_and_search: キーワードを並べてAND検索
40
+ help_phrase_search: 1フレーズとして検索
41
+ help_search_by_keyword: キーワードで検索
42
+ help_filter_options_description: 検索キーワードと組み合わせて使う
43
+ help_filter_by_package_name: パッケージ名で絞り込み
44
+ help_filter_by_file_name: ファイル名で絞り込み
45
+ help_filter_by_suffix: 拡張子で絞り込み
46
+ help_filter_by_a_file_name_or_package_name: ファイル名もしくはパッケージ名で絞り込み
47
+ help_filter_by_a_file_name_or_package_name_or_contents: ファイル名、パッケージ名、もしくはファイルの内容
48
+ help_wide_search: 検索範囲を複数行に広げる
49
+ help_wide_search_comment_01: 7行以内に'read'と'write'が含まれる箇所
50
+ help_wide_search_comment_02: "'w:0'ならファイル内全て"
51
+ help_directpath: ダイレクトパス
52
+ help_directpath_description: Milkodeにおける<strong>"絶対パス"</strong>に相当するもの
53
+ help_jump_directly_to_a_search_for_directpath: ダイレクトパスで検索すると直接ジャンプ
54
+ help_directpath_comment_01: /パッケージ名/ファイル名:行番号
55
+ help_directpath_comment_02: 空白を含むダイレクトパスは""で囲む
56
+ help_directpath_comment_03: 空白で区切れば複数個渡せる
57
+ help_directpath_gif: ファイルモードで行番号をクリックすると取得可能
58
+ help_emacs_milkode: <a href="https://github.com/ongaeshi/emacs-milkode">emacs-milkode</a>との連携にも使う
59
+
60
+
@@ -2,75 +2,75 @@
2
2
 
3
3
  .content
4
4
  .help-content
5
- %h1 ヘルプ
5
+ %h1 #{t(:help)}
6
6
 
7
7
  %ol
8
- %li <a href="#search">検索</a>
9
- %li <a href="#refine">絞り込みオプション</a>
10
- %li <a href="#directpath">ダイレクトパス</a>
8
+ %li <a href="#search">#{t(:help_search_by_keyword)}</a>
9
+ %li <a href="#refine">#{t(:filter_options)}</a>
10
+ %li <a href="#directpath">#{t(:help_directpath)}</a>
11
11
 
12
- %h2#search 検索
12
+ %h2#search #{t(:help_search_by_keyword)}
13
13
  %ul
14
- %li キーワードを並べてAND検索
14
+ %li #{t(:help_and_search)}
15
15
 
16
16
  %pre
17
17
  :preserve
18
18
  def open
19
19
 
20
- %li 1フレーズとして検索
20
+ %li #{t(:help_phrase_search)}
21
21
  %pre
22
22
  :preserve
23
23
  "def open"
24
24
 
25
- %h2#refine 絞り込みオプション
25
+ %h2#refine #{t(:filter_options)}
26
26
  %p
27
- 検索キーワードと組み合わせて使う
27
+ #{t(:help_filter_options_description)}
28
28
 
29
29
  %ul
30
- %li パッケージ名で絞り込み
30
+ %li #{t(:help_filter_by_package_name)}
31
31
  %pre
32
32
  :preserve
33
33
  p:milkode
34
34
 
35
- %li ファイル名で絞り込み
35
+ %li #{t(:help_filter_by_file_name)}
36
36
  %pre
37
37
  :preserve
38
38
  f:test
39
39
 
40
- %li 拡張子で絞り込み
40
+ %li #{t(:help_filter_by_suffix)}
41
41
  %pre
42
42
  :preserve
43
43
  s:rb
44
44
 
45
- %li ファイル名もしくはパッケージ名で絞り込み
45
+ %li #{t(:help_filter_by_a_file_name_or_package_name)}
46
46
  %pre
47
47
  :preserve
48
48
  fp:milkode
49
49
 
50
- %li ファイル名、パッケージ名、もしくはファイルの内容
50
+ %li #{t(:help_filter_by_a_file_name_or_package_name_or_contents)}
51
51
  %pre
52
52
  :preserve
53
53
  k:test
54
54
 
55
- %li 検索範囲を複数行に広げる
55
+ %li #{t(:help_wide_search)}
56
56
  %pre
57
57
  :preserve
58
- w:7 read write <span class="comment"># 7行以内に'read'と'write'が含まれる箇所</span>
59
- w:0 read write <span class="comment"># 'w:0'ならファイル内全て</span>
58
+ w:7 read write <span class="comment"># #{t(:help_wide_search_comment_01)}</span>
59
+ w:0 read write <span class="comment"># #{t(:help_wide_search_comment_02)}</span>
60
60
 
61
- %h2#directpath ダイレクトパス
61
+ %h2#directpath #{t(:help_directpath)}
62
62
  %p
63
- Milkodeにおける<strong>"絶対パス"</strong>に相当するもの
63
+ #{t(:help_directpath_description)}
64
64
 
65
65
  %ul
66
- %li ダイレクトパスで検索すると直接ジャンプ
66
+ %li #{t(:help_jump_directly_to_a_search_for_directpath)}
67
67
  %pre
68
68
  :preserve
69
- /proj/a/file.rb:81 <span class="comment"># /パッケージ名/ファイル名:行番号</span>
70
- "/proj/a file.rb:3" <span class="comment"># 空白を含むダイレクトパスは""で囲む</span>
71
- /proj1/file.rb:1 /proj2/file.c:2 <span class="comment"># 空白で区切れば複数個渡せる</span>
69
+ /proj/a/file.rb:81 <span class="comment"># #{t(:help_directpath_comment_01)}</span>
70
+ "/proj/a file.rb:3" <span class="comment"># #{t(:help_directpath_comment_02)}</span>
71
+ /proj1/file.rb:1 /proj2/file.c:2 <span class="comment"># #{t(:help_directpath_comment_03)}</span>
72
72
 
73
- %li ファイルモードで行番号をクリックすると取得可能
73
+ %li #{t(:help_directpath_gif)}
74
74
  <img src="#{url_for '/images/milkode-directpath-copy.gif'}" />
75
75
 
76
- %li <a href="https://github.com/ongaeshi/emacs-milkode">emacs-milkode</a>との連携にも使う
76
+ %li #{t(:help_emacs_milkode)}
@@ -27,6 +27,7 @@
27
27
  %input(name="query" type="text" style="width: 419px;")
28
28
  %input(type="submit" value="#{t(:search)}")
29
29
  %input(name='pathname' type='hidden' value='#{url_for '/home'}')
30
+ &nbsp;&nbsp;<a href="#{url_for '/help'}">#{t(:help)}</a>
30
31
 
31
32
  .row
32
33
  .span12.text-center
@@ -44,8 +45,6 @@
44
45
  <a href="#{url_for '/home'}">#{@package_num}</a> #{t(:packages)}
45
46
  .topmenu-item
46
47
  <a href="#{url_for '/home?query=f:*'}">#{@file_num}</a> #{t(:files)}
47
- .topmenu-item
48
- <a href="#{url_for '/help'}">#{t(:help)}</a>
49
48
  .topmenu-item
50
49
  [<a href="#{url_for '/?locale=en'}">#{t(:english)}</a> | <a href="#{url_for '/?locale=ja'}">#{t(:japanese)}</a>]<br>
51
50
  .topmenu-item
@@ -1,5 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  require 'thor'
3
+ require 'milkode'
3
4
  require 'milkode/cdstk/cdstk'
4
5
  require 'milkode/common/dbdir.rb'
5
6
  require 'milkode/cdweb/cli_cdweb'
@@ -165,6 +166,8 @@ EOF
165
166
  option :port, :default => 9292, :aliases => '-p', :desc => 'Use PORT.'
166
167
  option :server, :default => 'thin', :aliases => '-s', :desc => 'Use SERVER.'
167
168
  option :url, :aliases => '-u', :type => :string, :desc => 'Relative URL. (Default: "/")'
169
+ option :gomilk, :aliases => '-g', :type => :boolean, :desc => 'Allow "http://127.0.0.1:9292/gomilk"'
170
+
168
171
  def web
169
172
  opts = {
170
173
  :environment => ENV['RACK_ENV'] || "development",
@@ -178,6 +181,7 @@ EOF
178
181
  :LaunchBrowser => !options[:no_browser],
179
182
  :DbDir => options[:db],
180
183
  :url => options[:url],
184
+ :gomilk => options[:gomilk]
181
185
  }
182
186
  opts[:customize] = options[:customize]
183
187
  # cdstk(opts[:DbDir]).assert_compatible
@@ -240,7 +244,7 @@ EOF
240
244
  if options[:help] && task.name != 'grep'
241
245
  CLI.task_help(shell, task.name)
242
246
  elsif options[:version] && task.name == 'help'
243
- puts "milk #{Version}"
247
+ puts "milk #{Milkode::VERSION}"
244
248
  else
245
249
  super
246
250
  end
@@ -10,6 +10,8 @@ require 'milkode/common/util'
10
10
 
11
11
  module Milkode
12
12
  class DocumentTable
13
+ attr_reader :table
14
+
13
15
  def self.define_schema
14
16
  begin
15
17
  Groonga::Schema.define do |schema|
@@ -84,6 +84,7 @@ EOF
84
84
  opt.on('-d DIR', '--directory DIR', 'Start directory. (deafult:".")') {|v| current_dir = File.expand_path(v); my_option[:find_mode] = true}
85
85
  opt.on('--db DB_DIR', "Specify dbdir. (Use often with '-a')") {|v| option.dbFile = Dbdir.groonga_path(v) }
86
86
  opt.on('-e GREP', '--external-tool GREP', "Use external tool for file search. (e.g. grep, ag)") {|v| my_option[:external_tool] = v}
87
+ opt.on('--expand-path', "Display absolute path") {|v| option.expand_path = true }
87
88
  opt.on('-f FILE_PATH', '--file-path FILE_PATH', 'File path. (Enable multiple call)') {|v| option.filePatterns << v; my_option[:find_mode] = true }
88
89
  opt.on('-i', '--ignore', 'Ignore case.') {|v| option.ignoreCase = true}
89
90
  opt.on('-m', '--match-files', 'Display match files.') {|v| my_option[:match_files] = true}
@@ -167,7 +167,7 @@ module Milkode
167
167
  if (@option.gotoline > 0)
168
168
  records.each do |record|
169
169
  if FileTest.exist?(record.path)
170
- relative_path = Milkode::Util.relative_path(record.path, Dir.pwd).to_s
170
+ relative_path = convert_path(record.path)
171
171
  line = getTextLineno(relative_path, @option.gotoline)
172
172
  stdout.puts "#{relative_path}:#{@option.gotoline}:#{line}" if (line)
173
173
  @result.match_file_count += 1
@@ -185,8 +185,7 @@ module Milkode
185
185
  else
186
186
  records.each do |record|
187
187
  path = record.path
188
- relative_path = Milkode::Util.relative_path(path, Dir.pwd).to_s
189
- stdout.puts relative_path
188
+ stdout.puts convert_path(path)
190
189
  @result.match_file_count += 1
191
190
  raise MatchCountOverError if (0 < @option.matchCountLimit && @option.matchCountLimit <= @result.match_file_count)
192
191
  end
@@ -340,8 +339,7 @@ module Milkode
340
339
  if ( result )
341
340
  unless (@option.dispHtml)
342
341
  # header = "#{path}:#{index + 1}:"
343
- rpath = Milkode::Util.relative_path(path, Dir.pwd).to_s
344
- header = "#{rpath}:#{index + 1}:"
342
+ header = "#{convert_path(path)}:#{index + 1}:"
345
343
 
346
344
  line = GrenSnip::snip(line, match_datas) unless (@option.noSnip)
347
345
 
@@ -444,5 +442,13 @@ EOF
444
442
  or_matchs[0]
445
443
  end
446
444
  end
445
+
446
+ def convert_path(path)
447
+ unless @option.expand_path
448
+ Milkode::Util.relative_path(path, Dir.pwd).to_s
449
+ else
450
+ path
451
+ end
452
+ end
447
453
  end
448
454
  end
@@ -31,7 +31,9 @@ module Milkode
31
31
  :dispHtml,
32
32
  :matchCountLimit,
33
33
  :keywords,
34
- :gotoline)
34
+ :gotoline,
35
+ :expand_path,
36
+ )
35
37
 
36
38
  def self.create_default
37
39
  Option.new([],
@@ -58,7 +60,9 @@ module Milkode
58
60
  false,
59
61
  -1,
60
62
  [],
61
- -1)
63
+ -1,
64
+ false,
65
+ )
62
66
  end
63
67
  end
64
68
  end
@@ -0,0 +1,3 @@
1
+ module Milkode
2
+ VERSION = "1.7.0"
3
+ end
@@ -1,270 +1,40 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'milkode/version'
5
5
 
6
- Gem::Specification.new do |s|
7
- s.name = "milkode"
8
- s.version = "1.6.1"
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "milkode"
8
+ spec.version = Milkode::VERSION
9
+ spec.authors = ["ongaeshi"]
10
+ spec.email = ["ongaeshi0621@gmail.com"]
11
+ spec.summary = %q{Milkode is line based local source code search engine.}
12
+ spec.description = %q{Milkode is line based local source code search engine. It have command line interface and web application. It will accelerate the code reading of your life.}
13
+ spec.homepage = "https://github.com/ongaeshi/milkode"
14
+ spec.license = "MIT"
9
15
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["ongaeshi"]
12
- s.date = "2014-04-15"
13
- s.description = "Milkode is line based local source code search engine. It have command line interface and web application. It will accelerate the code reading of your life."
14
- s.email = "ongaeshi0621@gmail.com"
15
- s.executables = ["gmilk", "milk"]
16
- s.extra_rdoc_files = [
17
- "LICENSE.txt",
18
- "README.md"
19
- ]
20
- s.files = [
21
- ".document",
22
- ".travis.yml",
23
- "Gemfile",
24
- "HISTORY.ja.rdoc",
25
- "HISTORY.rdoc",
26
- "LICENSE.txt",
27
- "README.md",
28
- "Rakefile",
29
- "VERSION",
30
- "bin/gmilk",
31
- "bin/milk",
32
- "lib/milkode/cdstk/cdstk.rb",
33
- "lib/milkode/cdstk/cdstk_command.rb",
34
- "lib/milkode/cdstk/milkode_yaml.rb",
35
- "lib/milkode/cdstk/package.rb",
36
- "lib/milkode/cdstk/yaml_file_wrapper.rb",
37
- "lib/milkode/cdweb/app.rb",
38
- "lib/milkode/cdweb/cli_cdweb.rb",
39
- "lib/milkode/cdweb/config.ru",
40
- "lib/milkode/cdweb/lib/coderay_html2.rb",
41
- "lib/milkode/cdweb/lib/coderay_php_utf8.rb",
42
- "lib/milkode/cdweb/lib/coderay_wrapper.rb",
43
- "lib/milkode/cdweb/lib/command.rb",
44
- "lib/milkode/cdweb/lib/database.rb",
45
- "lib/milkode/cdweb/lib/grep.rb",
46
- "lib/milkode/cdweb/lib/info_home.rb",
47
- "lib/milkode/cdweb/lib/info_package.rb",
48
- "lib/milkode/cdweb/lib/mkurl.rb",
49
- "lib/milkode/cdweb/lib/package_list.rb",
50
- "lib/milkode/cdweb/lib/query.rb",
51
- "lib/milkode/cdweb/lib/search_contents.rb",
52
- "lib/milkode/cdweb/lib/search_files.rb",
53
- "lib/milkode/cdweb/lib/search_fuzzy_gotoline.rb",
54
- "lib/milkode/cdweb/lib/search_gotoline.rb",
55
- "lib/milkode/cdweb/lib/web_setting.rb",
56
- "lib/milkode/cdweb/locales/en.yml",
57
- "lib/milkode/cdweb/locales/ja.yml",
58
- "lib/milkode/cdweb/public/css/auth-buttons.css",
59
- "lib/milkode/cdweb/public/css/auth-icons.png",
60
- "lib/milkode/cdweb/public/css/bootstrap-responsive.min.css",
61
- "lib/milkode/cdweb/public/css/bootstrap.min.css",
62
- "lib/milkode/cdweb/public/css/coderay-patch.css",
63
- "lib/milkode/cdweb/public/css/coderay.css",
64
- "lib/milkode/cdweb/public/css/jquery.multiselect.css",
65
- "lib/milkode/cdweb/public/css/jquery.multiselect.filter.css",
66
- "lib/milkode/cdweb/public/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png",
67
- "lib/milkode/cdweb/public/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png",
68
- "lib/milkode/cdweb/public/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png",
69
- "lib/milkode/cdweb/public/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png",
70
- "lib/milkode/cdweb/public/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png",
71
- "lib/milkode/cdweb/public/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png",
72
- "lib/milkode/cdweb/public/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png",
73
- "lib/milkode/cdweb/public/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png",
74
- "lib/milkode/cdweb/public/css/smoothness/images/ui-icons_222222_256x240.png",
75
- "lib/milkode/cdweb/public/css/smoothness/images/ui-icons_2e83ff_256x240.png",
76
- "lib/milkode/cdweb/public/css/smoothness/images/ui-icons_454545_256x240.png",
77
- "lib/milkode/cdweb/public/css/smoothness/images/ui-icons_888888_256x240.png",
78
- "lib/milkode/cdweb/public/css/smoothness/images/ui-icons_cd0a0a_256x240.png",
79
- "lib/milkode/cdweb/public/css/smoothness/jquery-ui-1.8.22.custom.css",
80
- "lib/milkode/cdweb/public/flash/clippy.swf",
81
- "lib/milkode/cdweb/public/images/MilkodeIcon135.png",
82
- "lib/milkode/cdweb/public/images/directory.png",
83
- "lib/milkode/cdweb/public/images/document-new-4.png",
84
- "lib/milkode/cdweb/public/images/favicon.ico",
85
- "lib/milkode/cdweb/public/images/file.png",
86
- "lib/milkode/cdweb/public/images/go-home-5.png",
87
- "lib/milkode/cdweb/public/images/help.png",
88
- "lib/milkode/cdweb/public/images/info-big.png",
89
- "lib/milkode/cdweb/public/images/info.png",
90
- "lib/milkode/cdweb/public/images/milkode-directpath-copy.gif",
91
- "lib/milkode/cdweb/public/images/milkode-star.png",
92
- "lib/milkode/cdweb/public/images/view-refresh-4.png",
93
- "lib/milkode/cdweb/public/images/waiting.gif",
94
- "lib/milkode/cdweb/public/img/glyphicons-halflings-white.png",
95
- "lib/milkode/cdweb/public/img/glyphicons-halflings.png",
96
- "lib/milkode/cdweb/public/js/bootstrap.min.js",
97
- "lib/milkode/cdweb/public/js/jquery-1.7.2.min.js",
98
- "lib/milkode/cdweb/public/js/jquery-ui-1.8.22.custom.min.js",
99
- "lib/milkode/cdweb/public/js/jquery.multiselect.filter.min.js",
100
- "lib/milkode/cdweb/public/js/jquery.multiselect.min.js",
101
- "lib/milkode/cdweb/views/error.haml",
102
- "lib/milkode/cdweb/views/filelist.haml",
103
- "lib/milkode/cdweb/views/header_menu.haml",
104
- "lib/milkode/cdweb/views/help.haml",
105
- "lib/milkode/cdweb/views/index.haml",
106
- "lib/milkode/cdweb/views/info_home.haml",
107
- "lib/milkode/cdweb/views/info_package.haml",
108
- "lib/milkode/cdweb/views/layout.haml",
109
- "lib/milkode/cdweb/views/milkode.js",
110
- "lib/milkode/cdweb/views/milkode.scss",
111
- "lib/milkode/cdweb/views/packages.haml",
112
- "lib/milkode/cdweb/views/search.haml",
113
- "lib/milkode/cdweb/views/search_form.haml",
114
- "lib/milkode/cdweb/views/view.haml",
115
- "lib/milkode/cli.rb",
116
- "lib/milkode/common/array_diff.rb",
117
- "lib/milkode/common/dbdir.rb",
118
- "lib/milkode/common/dir.rb",
119
- "lib/milkode/common/display_util.rb",
120
- "lib/milkode/common/grenfiletest.rb",
121
- "lib/milkode/common/grensnip.rb",
122
- "lib/milkode/common/ignore_checker.rb",
123
- "lib/milkode/common/ignore_setting.rb",
124
- "lib/milkode/common/plang_detector.rb",
125
- "lib/milkode/common/platform.rb",
126
- "lib/milkode/common/string_snip.rb",
127
- "lib/milkode/common/util.rb",
128
- "lib/milkode/common/wide_matcher.rb",
129
- "lib/milkode/database/document_record.rb",
130
- "lib/milkode/database/document_table.rb",
131
- "lib/milkode/database/groonga_database.rb",
132
- "lib/milkode/database/package_table.rb",
133
- "lib/milkode/database/updater.rb",
134
- "lib/milkode/grep/cli_grep.rb",
135
- "lib/milkode/grep/fast_gotoline.rb",
136
- "lib/milkode/grep/findgrep.rb",
137
- "lib/milkode/grep/findgrep_option.rb",
138
- "lib/sinatra/url_for.rb",
139
- "milkode.gemspec",
140
- "test/data/.gitignore",
141
- "test/data/.gitignore.sjis",
142
- "test/data/a_project/cdstk.rb",
143
- "test/data/a_project/cdstk_yaml.rb",
144
- "test/data/a_project/empty.txt",
145
- "test/data/abc.zip",
146
- "test/data/b_project/dummy_test_dir.rb",
147
- "test/data/b_project/runner.rb",
148
- "test/data/b_project2/dummy_test_dir.rb",
149
- "test/data/b_project2/runner.rb",
150
- "test/data/c_project/a.txt",
151
- "test/data/c_project/abc.c",
152
- "test/data/c_project/abc.h",
153
- "test/data/c_project/b.txt",
154
- "test/data/c_project/c.txt",
155
- "test/data/c_project/cc.txt",
156
- "test/data/c_project/to/file.rb",
157
- "test/data/ignore_test/.gitignore",
158
- "test/data/ignore_test/a.txt",
159
- "test/data/ignore_test_sjis/.gitignore",
160
- "test/data/ignore_test_sjis/a.txt",
161
- "test/data/no_auto_ignore/.gitignore",
162
- "test/data/no_auto_ignore/a.txt",
163
- "test/data/nodir_abc.zip",
164
- "test/data/nodir_abc_xpi.xpi",
165
- "test/file_assert.rb",
166
- "test/file_test_utils.rb",
167
- "test/milkode_test_work.rb",
168
- "test/rake_test_loader.rb",
169
- "test/runner.rb",
170
- "test/test_cdstk.rb",
171
- "test/test_cdstk_command.rb",
172
- "test/test_cdweb_app.rb",
173
- "test/test_cli.rb",
174
- "test/test_cli_grep.rb",
175
- "test/test_coderay_wrapper.rb",
176
- "test/test_coderay_wrapper_data.rb",
177
- "test/test_database.rb",
178
- "test/test_dbdir.rb",
179
- "test/test_dir.rb",
180
- "test/test_document_record.rb",
181
- "test/test_document_table.rb",
182
- "test/test_findgrep.rb",
183
- "test/test_gren_util.rb",
184
- "test/test_groonga_database.rb",
185
- "test/test_helper.rb",
186
- "test/test_ignore_checker.rb",
187
- "test/test_ignore_setting.rb",
188
- "test/test_milkode_yaml.rb",
189
- "test/test_mkurl.rb",
190
- "test/test_package.rb",
191
- "test/test_package_list.rb",
192
- "test/test_package_table.rb",
193
- "test/test_plang_detector.rb",
194
- "test/test_query.rb",
195
- "test/test_string_snip.rb",
196
- "test/test_updater.rb",
197
- "test/test_util.rb",
198
- "test/test_wide_matcher.rb",
199
- "test/test_yaml_file_wrapper.rb"
200
- ]
201
- s.homepage = "http://github.com/ongaeshi/milkode"
202
- s.licenses = ["MIT"]
203
- s.require_paths = ["lib"]
204
- s.rubygems_version = "1.8.23"
205
- s.summary = "Line based local source code search engine."
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
206
20
 
207
- if s.respond_to? :specification_version then
208
- s.specification_version = 3
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency 'rack-test'
24
+ spec.add_development_dependency 'sinatra-reloader'
25
+ spec.add_development_dependency 'test-unit' , '>= 2.5.4'
209
26
 
210
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
211
- s.add_runtime_dependency(%q<termcolor>, ["< 1.2.2", ">= 1.2.0"])
212
- s.add_runtime_dependency(%q<rroonga>, [">= 1.1.0"])
213
- s.add_runtime_dependency(%q<rack>, [">= 1.5.2"])
214
- s.add_runtime_dependency(%q<sinatra>, [">= 1.2.6"])
215
- s.add_runtime_dependency(%q<launchy>, [">= 0.3.7"])
216
- s.add_runtime_dependency(%q<coderay>, [">= 1.0.5"])
217
- s.add_runtime_dependency(%q<thin>, ["< 2.0.0", ">= 1.2.10"])
218
- s.add_runtime_dependency(%q<archive-zip>, [">= 0.4.0"])
219
- s.add_runtime_dependency(%q<haml>, [">= 3.1.2"])
220
- s.add_runtime_dependency(%q<sass>, [">= 3.1.3"])
221
- s.add_runtime_dependency(%q<thor>, [">= 0.18.1"])
222
- s.add_runtime_dependency(%q<i18n>, ["~> 0.6.5"])
223
- s.add_runtime_dependency(%q<whichr>, ["~> 0.3"])
224
- s.add_development_dependency(%q<bundler>, [">= 0"])
225
- s.add_development_dependency(%q<jeweler>, [">= 0"])
226
- s.add_development_dependency(%q<rack-test>, [">= 0"])
227
- s.add_development_dependency(%q<sinatra-reloader>, [">= 0"])
228
- s.add_development_dependency(%q<test-unit>, [">= 2.5.4"])
229
- else
230
- s.add_dependency(%q<termcolor>, ["< 1.2.2", ">= 1.2.0"])
231
- s.add_dependency(%q<rroonga>, [">= 1.1.0"])
232
- s.add_dependency(%q<rack>, [">= 1.5.2"])
233
- s.add_dependency(%q<sinatra>, [">= 1.2.6"])
234
- s.add_dependency(%q<launchy>, [">= 0.3.7"])
235
- s.add_dependency(%q<coderay>, [">= 1.0.5"])
236
- s.add_dependency(%q<thin>, ["< 2.0.0", ">= 1.2.10"])
237
- s.add_dependency(%q<archive-zip>, [">= 0.4.0"])
238
- s.add_dependency(%q<haml>, [">= 3.1.2"])
239
- s.add_dependency(%q<sass>, [">= 3.1.3"])
240
- s.add_dependency(%q<thor>, [">= 0.18.1"])
241
- s.add_dependency(%q<i18n>, ["~> 0.6.5"])
242
- s.add_dependency(%q<whichr>, ["~> 0.3"])
243
- s.add_dependency(%q<bundler>, [">= 0"])
244
- s.add_dependency(%q<jeweler>, [">= 0"])
245
- s.add_dependency(%q<rack-test>, [">= 0"])
246
- s.add_dependency(%q<sinatra-reloader>, [">= 0"])
247
- s.add_dependency(%q<test-unit>, [">= 2.5.4"])
248
- end
249
- else
250
- s.add_dependency(%q<termcolor>, ["< 1.2.2", ">= 1.2.0"])
251
- s.add_dependency(%q<rroonga>, [">= 1.1.0"])
252
- s.add_dependency(%q<rack>, [">= 1.5.2"])
253
- s.add_dependency(%q<sinatra>, [">= 1.2.6"])
254
- s.add_dependency(%q<launchy>, [">= 0.3.7"])
255
- s.add_dependency(%q<coderay>, [">= 1.0.5"])
256
- s.add_dependency(%q<thin>, ["< 2.0.0", ">= 1.2.10"])
257
- s.add_dependency(%q<archive-zip>, [">= 0.4.0"])
258
- s.add_dependency(%q<haml>, [">= 3.1.2"])
259
- s.add_dependency(%q<sass>, [">= 3.1.3"])
260
- s.add_dependency(%q<thor>, [">= 0.18.1"])
261
- s.add_dependency(%q<i18n>, ["~> 0.6.5"])
262
- s.add_dependency(%q<whichr>, ["~> 0.3"])
263
- s.add_dependency(%q<bundler>, [">= 0"])
264
- s.add_dependency(%q<jeweler>, [">= 0"])
265
- s.add_dependency(%q<rack-test>, [">= 0"])
266
- s.add_dependency(%q<sinatra-reloader>, [">= 0"])
267
- s.add_dependency(%q<test-unit>, [">= 2.5.4"])
268
- end
27
+ spec.add_dependency 'termcolor' , '>= 1.2.0' , '< 1.2.2'
28
+ spec.add_dependency 'rroonga' , '>= 1.1.0'
29
+ spec.add_dependency 'rack' , '>= 1.5.2'
30
+ spec.add_dependency 'sinatra' , '>= 1.2.6'
31
+ spec.add_dependency 'launchy' , '>= 0.3.7'
32
+ spec.add_dependency 'coderay' , '>= 1.0.5'
33
+ spec.add_dependency 'thin' , '>= 1.2.10', '< 2.0.0'
34
+ spec.add_dependency 'archive-zip' , '>= 0.4.0'
35
+ spec.add_dependency 'haml' , '>= 3.1.2'
36
+ spec.add_dependency 'sass' , '>= 3.1.3'
37
+ spec.add_dependency 'thor' , '>= 0.18.1'
38
+ spec.add_dependency 'i18n' , '~> 0.6.5'
39
+ spec.add_dependency 'whichr' , '~> 0.3'
269
40
  end
270
-