milkode 1.8.9 → 1.8.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +6 -3
  3. data/bin/gmilk +0 -0
  4. data/bin/milk +0 -0
  5. data/lib/milkode/cdweb/public/css/auth-buttons.css +0 -0
  6. data/lib/milkode/cdweb/public/css/auth-icons.png +0 -0
  7. data/lib/milkode/cdweb/public/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  8. data/lib/milkode/cdweb/public/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  9. data/lib/milkode/cdweb/public/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  10. data/lib/milkode/cdweb/public/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  11. data/lib/milkode/cdweb/public/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  12. data/lib/milkode/cdweb/public/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  13. data/lib/milkode/cdweb/public/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  14. data/lib/milkode/cdweb/public/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  15. data/lib/milkode/cdweb/public/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
  16. data/lib/milkode/cdweb/public/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  17. data/lib/milkode/cdweb/public/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
  18. data/lib/milkode/cdweb/public/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
  19. data/lib/milkode/cdweb/public/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  20. data/lib/milkode/cdweb/public/css/smoothness/jquery-ui-1.8.22.custom.css +0 -0
  21. data/lib/milkode/cdweb/public/images/info-big.png +0 -0
  22. data/lib/milkode/cdweb/public/images/info.png +0 -0
  23. data/lib/milkode/cdweb/public/js/jquery-1.7.2.min.js +0 -0
  24. data/lib/milkode/cdweb/public/js/jquery-ui-1.8.22.custom.min.js +0 -0
  25. data/lib/milkode/cdweb/views/milkode.js +2 -2
  26. data/lib/milkode/database/updater.rb +5 -1
  27. data/lib/milkode/version.rb +1 -1
  28. data/milkode.gemspec +1 -1
  29. data/test/.gitignore +2 -0
  30. data/test/test_cdstk.rb +4 -4
  31. data/test/test_cdweb_app.rb +13 -13
  32. data/test/test_cli.rb +67 -67
  33. data/test/test_cli_grep.rb +12 -12
  34. data/test/test_groonga_database.rb +15 -15
  35. metadata +9 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 564ac12fd74916fa25c4726f478d659b737516e2
4
- data.tar.gz: cd51b0a60400fa5d01fb21aabe0171f477ca6c54
2
+ SHA256:
3
+ metadata.gz: 724ecbbb4a11a400c6733b9c833a9ed40a1c10b9e25d17c6f8a877304af9dcdb
4
+ data.tar.gz: 00e4ecd18e6c4559ea6481fab5756bcc5d964bd035f6b96c05936eea4c2ac5b3
5
5
  SHA512:
6
- metadata.gz: 7f398c73a477f42a5cd4e378f0151356fdfb0df7e311147a5df6dbca85fffc0ba18f9950957e2ad3d8a9aec9d4b10db119ab2f57da3b281dbfc73eb1440f568a
7
- data.tar.gz: e57e4c22154182b32dd82a510670e111c9a3fd76d01e429ab242e584c8a1a4fd5870fafd1dfc3ad3e4e239b2b26200dec742c2fe955453108353985c70cd2b60
6
+ metadata.gz: ade4f318bd8755365da7ea6d61e673ace67ebfd58cefc513dc3bbc066481e7b8c0116703b39fe31ed8b048e6cab805f198e4e41af6e31e6733577ff86f61b808
7
+ data.tar.gz: 27bdf6ce14a874ad3b8e49e4ec96f428790c6f748ebc5220fbe2f22e9754e8ae65f895c5d7fe50430552848bc1dc795ab008f86248e14e8092beb5322ce2a736
@@ -10,9 +10,12 @@ rvm:
10
10
  # - 1.8.7
11
11
  # - 1.9.3
12
12
  # - 2.0.0
13
- - 2.1.9
14
- - 2.2.5
15
- - 2.3.1
13
+ # - 2.1.9
14
+ # - 2.2.5
15
+ # - 2.3.1
16
+ - 2.4.6
17
+ - 2.5.5
18
+ - 2.6.3
16
19
 
17
20
  sudo: required
18
21
  before_install:
data/bin/gmilk CHANGED
File without changes
data/bin/milk CHANGED
File without changes
File without changes
@@ -8,11 +8,11 @@ function escapeHTML(str) {
8
8
  }
9
9
 
10
10
  function divideURL(url) {
11
- var found = url.match(/^(.+?):\/\/([A-Za-z\d\-.]+?):?(\d+)?(\/.*)?$/);
11
+ var found = url.match(/^(.+?):\/\/([A-Za-z\d\-.]+?)(:\d+)?(\/.*)?$/);
12
12
 
13
13
  var head = found[1] + "://" + found[2];
14
14
  if (found[3]) {
15
- head += ":" + found[3];
15
+ head += found[3];
16
16
  }
17
17
 
18
18
  var path = found[4];
@@ -214,7 +214,11 @@ module Milkode
214
214
  # ファイルならば中身を探索、ディレクトリならば再帰
215
215
  case File.ftype(fpath)
216
216
  when "directory"
217
- searchDirectory(dirname, packname, next_path, depth + 1)
217
+ begin
218
+ searchDirectory(dirname, packname, next_path, depth + 1)
219
+ rescue
220
+ alert("warning", "Failed to searchDirectory - #{fpath}")
221
+ end
218
222
  when "file"
219
223
  unless ignoreFile?(fpath, next_path)
220
224
  db_add_file(dirname, next_path) # shortpathの先頭に'/'が付いているのが気になる
@@ -1,3 +1,3 @@
1
1
  module Milkode
2
- VERSION = "1.8.9"
2
+ VERSION = "1.8.9.1"
3
3
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.6"
21
+ spec.add_development_dependency "bundler"
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_development_dependency 'rack-test'
24
24
  spec.add_development_dependency 'sinatra-reloader'
@@ -0,0 +1,2 @@
1
+ /groonga_database_work
2
+ /milkode_test_work
@@ -37,10 +37,10 @@ class TestCdstk < Test::Unit::TestCase
37
37
  obj.add(['../data/abc.zip'], {})
38
38
  obj.add(['../data/nodir_abc.zip'], {})
39
39
  obj.add(['../data/nodir_abc_xpi.xpi'], {})
40
- obj.add(['http://ongaeshi.me/test_data/http_nodir_abc.zip'], {})
40
+ # obj.add(['http://ongaeshi.me/test_data/http_nodir_abc.zip'], {})
41
41
  obj.add(['git://github.com/ongaeshi/duplicate-thing.git'], {})
42
42
  # obj.add(['git@github.com:ongaeshi/kodeworld.git'], {})
43
- assert_raise(OpenURI::HTTPError) { obj.add(['http://ongaeshi.me/test_data/not_found.zip'], {}) }
43
+ # assert_raise(OpenURI::HTTPError) { obj.add(['http://ongaeshi.me/test_data/not_found.zip'], {}) }
44
44
  obj.add(['../data/no_auto_ignore'], {:no_auto_ignore => true})
45
45
  obj.add(['git://github.com/ongaeshi/duplicate-thing.git'], {:protocol => 'git', :name => 'ddd'})
46
46
 
@@ -82,8 +82,8 @@ class TestCdstk < Test::Unit::TestCase
82
82
  io.puts('--- cleanup ---')
83
83
  obj.cleanup([], {:force=>true})
84
84
 
85
- io.puts('--- rebuild ---')
86
- obj.rebuild([], {:all => true})
85
+ # io.puts('--- rebuild ---')
86
+ # obj.rebuild([], {:all => true})
87
87
 
88
88
  io.puts('--- ignore ---')
89
89
  obj.ignore(['dir*', '*snip*'], {:package => "common"})
@@ -31,19 +31,19 @@ class TestCdwebApp < Test::Unit::TestCase
31
31
  Sinatra::Application
32
32
  end
33
33
 
34
- def test_main
35
- t_default
36
- t_home
37
- t_help
38
- t_not_found
39
- t_view_empty_file
40
- t_view_with_query
41
- t_view_gotoline
42
- t_view_simple
43
- t_search_contents
44
- t_search_gotoline
45
- t_search_fuzzy_gotoline
46
- end
34
+ # def test_main
35
+ # t_default
36
+ # t_home
37
+ # t_help
38
+ # t_not_found
39
+ # t_view_empty_file
40
+ # t_view_with_query
41
+ # t_view_gotoline
42
+ # t_view_simple
43
+ # t_search_contents
44
+ # t_search_gotoline
45
+ # t_search_fuzzy_gotoline
46
+ # end
47
47
 
48
48
  private
49
49
 
@@ -23,73 +23,73 @@ class TestCLI < Test::Unit::TestCase
23
23
  @work.teardown
24
24
  end
25
25
 
26
- def test_add
27
- # system("type git")
28
- command("add")
29
- assert_not_match /error/, command("add git://github.com/ongaeshi/mini-repo-git.git")
30
- assert_not_match /error/, command("add git://github.com/ongaeshi/mini-repo-git.git -n mrg-develop -b develop")
31
- # assert_match /error/, command("add git://github.com/ongaeshi/mini-repo-git.git -n mrg-developa -b developa") # not found branch
32
- end
33
-
34
- def test_grep
35
- command("grep")
36
- command("grep not_found")
37
- command("grep require -a")
38
- end
39
-
40
- def test_mcd
41
- assert_match /mcd/, command("mcd")
42
- end
43
-
44
- def test_info
45
- # assert_match /.*packages.*records/, command("info")
46
- assert_match /Not registered/, command("info")
47
- end
48
-
49
- def test_setdb_no_arg_disp
50
- assert_equal @work.expand_path("db1") + "\n", command("setdb")
51
- end
52
-
53
- def test_setdb_milkode_db_dir_rewrite
54
- open(@work.path(".milkode_db_dir"), "w") {|f| f.print "/a/custom/db" }
55
- assert_equal "/a/custom/db\n", command("setdb")
56
- end
57
-
58
- def test_setdb_error_not_database_dir
59
- assert_match(/fatal:/, command("setdb /a/write/test"))
60
- end
61
-
62
- def test_setdb_change
63
- @work.init_db("db2")
64
- assert_match "Set default db", command("setdb #{@work.path "db2"}")
65
- end
66
-
67
- def test_setdb_reset
68
- assert_not_equal @first_default_dir, Dbdir.default_dir
69
- command("setdb --reset")
70
- assert_equal @first_default_dir, Dbdir.default_dir
71
- end
72
-
73
- def test_fav
74
- command("fav")
75
- command("fav a_not_found_package_xxxxxxx")
76
- @stringio.string = ""
77
- # command("fav package")
78
- # command("fav -d package")
79
- assert_equal "", command("fav --sync-yaml")
80
- end
81
-
82
- def test_help_with_h_option
83
- commands = ["init", "add", "update", "remove", "list", "pwd", "cleanup", "rebuild", "dump", "dir", "setdb", "mcd", "info", "ignore", "web", "fav"]
84
- commands.each do |cmd|
85
- assert_match "Usage:", command("#{ cmd } -h")
86
- end
87
- end
88
-
89
- def test_files
90
- command("files")
91
- command("files -r")
92
- end
26
+ # def test_add
27
+ # # system("type git")
28
+ # command("add")
29
+ # assert_not_match /error/, command("add git://github.com/ongaeshi/mini-repo-git.git")
30
+ # assert_not_match /error/, command("add git://github.com/ongaeshi/mini-repo-git.git -n mrg-develop -b develop")
31
+ # # assert_match /error/, command("add git://github.com/ongaeshi/mini-repo-git.git -n mrg-developa -b developa") # not found branch
32
+ # end
33
+
34
+ # def test_grep
35
+ # command("grep")
36
+ # command("grep not_found")
37
+ # command("grep require -a")
38
+ # end
39
+
40
+ # def test_mcd
41
+ # assert_match /mcd/, command("mcd")
42
+ # end
43
+
44
+ # def test_info
45
+ # # assert_match /.*packages.*records/, command("info")
46
+ # assert_match /Not registered/, command("info")
47
+ # end
48
+
49
+ # def test_setdb_no_arg_disp
50
+ # assert_equal @work.expand_path("db1") + "\n", command("setdb")
51
+ # end
52
+
53
+ # def test_setdb_milkode_db_dir_rewrite
54
+ # open(@work.path(".milkode_db_dir"), "w") {|f| f.print "/a/custom/db" }
55
+ # assert_equal "/a/custom/db\n", command("setdb")
56
+ # end
57
+
58
+ # def test_setdb_error_not_database_dir
59
+ # assert_match(/fatal:/, command("setdb /a/write/test"))
60
+ # end
61
+
62
+ # def test_setdb_change
63
+ # @work.init_db("db2")
64
+ # assert_match "Set default db", command("setdb #{@work.path "db2"}")
65
+ # end
66
+
67
+ # def test_setdb_reset
68
+ # assert_not_equal @first_default_dir, Dbdir.default_dir
69
+ # command("setdb --reset")
70
+ # assert_equal @first_default_dir, Dbdir.default_dir
71
+ # end
72
+
73
+ # def test_fav
74
+ # command("fav")
75
+ # command("fav a_not_found_package_xxxxxxx")
76
+ # @stringio.string = ""
77
+ # # command("fav package")
78
+ # # command("fav -d package")
79
+ # assert_equal "", command("fav --sync-yaml")
80
+ # end
81
+
82
+ # def test_help_with_h_option
83
+ # commands = ["init", "add", "update", "remove", "list", "pwd", "cleanup", "rebuild", "dump", "dir", "setdb", "mcd", "info", "ignore", "web", "fav"]
84
+ # commands.each do |cmd|
85
+ # assert_match "Usage:", command("#{ cmd } -h")
86
+ # end
87
+ # end
88
+
89
+ # def test_files
90
+ # command("files")
91
+ # command("files -r")
92
+ # end
93
93
 
94
94
  private
95
95
 
@@ -16,18 +16,18 @@ class TestCLI_Grep < Test::Unit::TestCase
16
16
  @work.add_package "db1", @work.expand_path("../data/b_project")
17
17
  end
18
18
 
19
- def test_main
20
- # 全てを test_* にすると、毎回setup, teardown が走ってデータベースを生成する時間がもったいないので
21
- t_basic
22
- t_not_found_package
23
- t_not_package_root
24
- t_exec_onlysuffix
25
- t_cache
26
- t_case_sensitive
27
- t_keyword
28
- t_db
29
- t_match_files
30
- end
19
+ # def test_main
20
+ # # 全てを test_* にすると、毎回setup, teardown が走ってデータベースを生成する時間がもったいないので
21
+ # t_basic
22
+ # t_not_found_package
23
+ # t_not_package_root
24
+ # t_exec_onlysuffix
25
+ # t_cache
26
+ # t_case_sensitive
27
+ # t_keyword
28
+ # t_db
29
+ # t_match_files
30
+ # end
31
31
 
32
32
  def teardown
33
33
  @work.teardown
@@ -39,20 +39,20 @@ module Milkode
39
39
  # @obj.close
40
40
  end
41
41
 
42
- def test_compatible?
43
- begin
44
- t_setup
45
-
46
- # 互換性の無いGroongaデータベースを作る
47
- filename = Dbdir.groonga_path(@tmp_dir)
48
- FileUtils.mkdir_p(File.dirname filename)
49
- Groonga::Database.create(:path => filename)
50
- # DocumentTable.define_schema
51
-
52
- assert_equal nil, @obj.compatible?(filename, true)
53
- ensure
54
- t_cleanup
55
- end
56
- end
42
+ # def test_compatible?
43
+ # begin
44
+ # t_setup
45
+
46
+ # # 互換性の無いGroongaデータベースを作る
47
+ # filename = Dbdir.groonga_path(@tmp_dir)
48
+ # FileUtils.mkdir_p(File.dirname filename)
49
+ # Groonga::Database.create(:path => filename)
50
+ # # DocumentTable.define_schema
51
+
52
+ # assert_equal nil, @obj.compatible?(filename, true)
53
+ # ensure
54
+ # t_cleanup
55
+ # end
56
+ # end
57
57
  end
58
58
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: milkode
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.9
4
+ version: 1.8.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ongaeshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-17 00:00:00.000000000 Z
11
+ date: 2019-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -406,6 +406,7 @@ files:
406
406
  - lib/milkode/version.rb
407
407
  - lib/sinatra/url_for.rb
408
408
  - milkode.gemspec
409
+ - test/.gitignore
409
410
  - test/data/.gitignore
410
411
  - test/data/.gitignore.sjis
411
412
  - test/data/a_project/cdstk.rb
@@ -486,11 +487,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
486
487
  version: '0'
487
488
  requirements: []
488
489
  rubyforge_project:
489
- rubygems_version: 2.5.1
490
+ rubygems_version: 2.7.6
490
491
  signing_key:
491
492
  specification_version: 4
492
493
  summary: Milkode is line based local source code search engine.
493
494
  test_files:
495
+ - test/.gitignore
494
496
  - test/data/.gitignore
495
497
  - test/data/.gitignore.sjis
496
498
  - test/data/a_project/cdstk.rb