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.
Files changed (48) hide show
  1. data/.travis.yml +2 -1
  2. data/Gemfile +12 -11
  3. data/HISTORY.ja.rdoc +41 -1
  4. data/HISTORY.rdoc +28 -1
  5. data/VERSION +1 -1
  6. data/bin/gmilk +1 -1
  7. data/bin/milk +1 -1
  8. data/lib/milkode/cdstk/cdstk.rb +15 -1
  9. data/lib/milkode/cdstk/package.rb +16 -0
  10. data/lib/milkode/cdweb/app.rb +72 -9
  11. data/lib/milkode/cdweb/cli_cdweb.rb +25 -55
  12. data/lib/milkode/cdweb/lib/database.rb +14 -0
  13. data/lib/milkode/cdweb/lib/info_home.rb +30 -0
  14. data/lib/milkode/cdweb/lib/info_package.rb +83 -0
  15. data/lib/milkode/cdweb/lib/package_list.rb +18 -0
  16. data/lib/milkode/cdweb/public/css/milkode.css +93 -8
  17. data/lib/milkode/cdweb/public/images/info-big.png +0 -0
  18. data/lib/milkode/cdweb/public/images/info.png +0 -0
  19. data/lib/milkode/cdweb/public/images/milkode-directpath-copy.gif +0 -0
  20. data/lib/milkode/cdweb/public/images/milkode-star.png +0 -0
  21. data/lib/milkode/cdweb/public/js/milkode.js +35 -5
  22. data/lib/milkode/cdweb/views/filelist.haml +9 -1
  23. data/lib/milkode/cdweb/views/header_menu.haml +1 -1
  24. data/lib/milkode/cdweb/views/help.haml +70 -23
  25. data/lib/milkode/cdweb/views/info_home.haml +14 -0
  26. data/lib/milkode/cdweb/views/info_package.haml +13 -0
  27. data/lib/milkode/cdweb/views/layout.haml +1 -0
  28. data/lib/milkode/cdweb/views/packages.haml +6 -2
  29. data/lib/milkode/cdweb/views/search.haml +13 -7
  30. data/lib/milkode/cdweb/views/search_form.haml +2 -0
  31. data/lib/milkode/cdweb/views/view.haml +9 -1
  32. data/lib/milkode/cli.rb +3 -2
  33. data/lib/milkode/common/util.rb +6 -2
  34. data/lib/milkode/database/document_table.rb +4 -0
  35. data/lib/milkode/database/package_table.rb +4 -0
  36. data/lib/milkode/grep/cli_grep.rb +48 -36
  37. data/lib/milkode/grep/fast_gotoline.rb +53 -0
  38. data/lib/milkode/{findgrep → grep}/findgrep.rb +42 -56
  39. data/lib/milkode/grep/findgrep_option.rb +63 -0
  40. data/milkode.gemspec +22 -11
  41. data/test/test_cli.rb +3 -1
  42. data/test/test_cli_grep.rb +1 -1
  43. data/test/test_findgrep.rb +2 -2
  44. data/test/test_milkode_yaml.rb +48 -4
  45. data/test/test_query.rb +2 -0
  46. metadata +39 -22
  47. data/lib/milkode/common/archive-zip.rb +0 -10
  48. data/lib/milkode/findgrep/result.rb +0 -43
@@ -1,10 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # @file
4
- # @brief archive-zipがRuby1.9.2に対応するまでのパッチ
5
- # @author ongaeshi
6
- # @date 2011/08/04
7
-
8
- # 0.4.0になったため、必要なくなった。
9
- # $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '../../../vendor')
10
- require 'archive/zip'
@@ -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