milkode 0.9.9 → 0.9.9.9
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -1
- data/Gemfile +12 -11
- data/HISTORY.ja.rdoc +41 -1
- data/HISTORY.rdoc +28 -1
- data/VERSION +1 -1
- data/bin/gmilk +1 -1
- data/bin/milk +1 -1
- data/lib/milkode/cdstk/cdstk.rb +15 -1
- data/lib/milkode/cdstk/package.rb +16 -0
- data/lib/milkode/cdweb/app.rb +72 -9
- data/lib/milkode/cdweb/cli_cdweb.rb +25 -55
- data/lib/milkode/cdweb/lib/database.rb +14 -0
- data/lib/milkode/cdweb/lib/info_home.rb +30 -0
- data/lib/milkode/cdweb/lib/info_package.rb +83 -0
- data/lib/milkode/cdweb/lib/package_list.rb +18 -0
- data/lib/milkode/cdweb/public/css/milkode.css +93 -8
- data/lib/milkode/cdweb/public/images/info-big.png +0 -0
- data/lib/milkode/cdweb/public/images/info.png +0 -0
- data/lib/milkode/cdweb/public/images/milkode-directpath-copy.gif +0 -0
- data/lib/milkode/cdweb/public/images/milkode-star.png +0 -0
- data/lib/milkode/cdweb/public/js/milkode.js +35 -5
- data/lib/milkode/cdweb/views/filelist.haml +9 -1
- data/lib/milkode/cdweb/views/header_menu.haml +1 -1
- data/lib/milkode/cdweb/views/help.haml +70 -23
- data/lib/milkode/cdweb/views/info_home.haml +14 -0
- data/lib/milkode/cdweb/views/info_package.haml +13 -0
- data/lib/milkode/cdweb/views/layout.haml +1 -0
- data/lib/milkode/cdweb/views/packages.haml +6 -2
- data/lib/milkode/cdweb/views/search.haml +13 -7
- data/lib/milkode/cdweb/views/search_form.haml +2 -0
- data/lib/milkode/cdweb/views/view.haml +9 -1
- data/lib/milkode/cli.rb +3 -2
- data/lib/milkode/common/util.rb +6 -2
- data/lib/milkode/database/document_table.rb +4 -0
- data/lib/milkode/database/package_table.rb +4 -0
- data/lib/milkode/grep/cli_grep.rb +48 -36
- data/lib/milkode/grep/fast_gotoline.rb +53 -0
- data/lib/milkode/{findgrep → grep}/findgrep.rb +42 -56
- data/lib/milkode/grep/findgrep_option.rb +63 -0
- data/milkode.gemspec +22 -11
- data/test/test_cli.rb +3 -1
- data/test/test_cli_grep.rb +1 -1
- data/test/test_findgrep.rb +2 -2
- data/test/test_milkode_yaml.rb +48 -4
- data/test/test_query.rb +2 -0
- metadata +39 -22
- data/lib/milkode/common/archive-zip.rb +0 -10
- data/lib/milkode/findgrep/result.rb +0 -43
@@ -1,43 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require 'find'
|
3
|
-
require 'milkode/common/util'
|
4
|
-
include Gren
|
5
|
-
|
6
|
-
module FindGrep
|
7
|
-
class Result
|
8
|
-
attr_accessor :count
|
9
|
-
attr_accessor :search_count
|
10
|
-
attr_accessor :match_file_count
|
11
|
-
attr_accessor :match_count
|
12
|
-
attr_accessor :size
|
13
|
-
attr_accessor :search_size
|
14
|
-
|
15
|
-
attr_accessor :search_files
|
16
|
-
attr_accessor :match_files
|
17
|
-
attr_accessor :unreadable_files
|
18
|
-
attr_accessor :prune_dirs
|
19
|
-
attr_accessor :ignore_files
|
20
|
-
|
21
|
-
def initialize(start_dir)
|
22
|
-
@start_dir = File.expand_path(start_dir)
|
23
|
-
@count, @search_count, @match_file_count, @match_count, @size, @search_size = 0, 0, 0, 0, 0, 0
|
24
|
-
@start_time = Time.now
|
25
|
-
@search_files, @match_files, @unreadable_files, @prune_dirs, @ignore_files = [], [], [], [], []
|
26
|
-
end
|
27
|
-
|
28
|
-
def time_stop
|
29
|
-
@end_time = Time.now
|
30
|
-
end
|
31
|
-
|
32
|
-
def time
|
33
|
-
@end_time - @start_time
|
34
|
-
end
|
35
|
-
|
36
|
-
def print(stdout)
|
37
|
-
stdout.puts "dir : #{@start_dir} (#{Gren::Util::time_s(time)})"
|
38
|
-
stdout.puts "files : #{@search_count} in #{@count} (#{Gren::Util::size_s(@search_size)} in #{Gren::Util::size_s(@size)})"
|
39
|
-
stdout.puts "match : #{@match_file_count} files, #{match_count} hit"
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|
43
|
-
end
|