gem-codesearch 0.2 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/README.md +14 -8
- data/Rakefile +15 -5
- data/gem-codesearch.gemspec +3 -4
- metadata +4 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56e7a104176e147ffadd86b273b9a3fbb8743cb7
|
4
|
+
data.tar.gz: 06862a9a9ecbeb0c9777501846d6af785bb06b75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a611d94d07105925bd0f53d44da0d78eeff73b5cd43af3856954cbab14a26a666d907a23b99284dc8a23fa9f0359defe9dc9147e8810d998db00ee7d5c45b2c
|
7
|
+
data.tar.gz: 215f2f2f68557773dd9533f6d12213ce59394825d980715b0e4969d2d70e035fc6491cc29d733b7c098ee73f03f3a05dbb97243c72a5b6f20e0f15c7fb54c6f1
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
# gem-codesearch
|
2
2
|
|
3
3
|
gem-codesearch sets up a full text code search engine on mirror of rubygems.
|
4
|
-
It use rubygems-mirror to mirror rubygems and
|
4
|
+
It use rubygems-mirror to mirror rubygems and codesearch for search engine.
|
5
5
|
|
6
|
-
|
7
|
-
unpacked gems and
|
6
|
+
400GB of free disk space is required to store the rubygems mirror,
|
7
|
+
unpacked gems and codesearch index at 2016-01.
|
8
8
|
It will be larger in future.
|
9
9
|
|
10
10
|
## Usage
|
11
11
|
|
12
|
-
This creates "latest-gem" package in
|
12
|
+
This creates "latest-gem" package in codesearch index.
|
13
13
|
|
14
|
+
% sudo aptitude install codesearch # https://github.com/google/codesearch
|
14
15
|
% gem install gem-codesearch
|
15
|
-
% milk init --default # If you use milkode first time
|
16
16
|
% mkdir $HOME/gem-codesearch # Make a some directory
|
17
17
|
% cd $HOME/gem-codesearch
|
18
18
|
% gem-codesearch-setup all >& setup.log # It may take several days or more
|
@@ -22,17 +22,23 @@ try again to continue.
|
|
22
22
|
|
23
23
|
After the index is created, enjoy code search.
|
24
24
|
|
25
|
-
%
|
25
|
+
% csearch sort_by
|
26
26
|
|
27
27
|
## Usage without install
|
28
28
|
|
29
|
-
%
|
30
|
-
%
|
29
|
+
% sudo aptitude install codesearch # https://github.com/google/codesearch
|
30
|
+
% gem install rubygems-mirror
|
31
31
|
% cd $HOME
|
32
32
|
% git clone https://github.com/akr/gem-codesearch.git
|
33
33
|
% cd gem-codesearch
|
34
34
|
% rake all >& setup.log # It may take several days or more
|
35
35
|
|
36
|
+
## Use milkode instead of codesesarch
|
37
|
+
|
38
|
+
% gem install milkode
|
39
|
+
% milk init --default # If you use milkode first time
|
40
|
+
% rake mirror unpack index_milkode >& setup.log
|
41
|
+
|
36
42
|
## Links
|
37
43
|
|
38
44
|
- https://github.com/akr/gem-codesearch
|
data/Rakefile
CHANGED
@@ -12,7 +12,9 @@ Usage:
|
|
12
12
|
rake all # mirror, unpack, index
|
13
13
|
rake mirror
|
14
14
|
rake unpack
|
15
|
-
rake index
|
15
|
+
rake index # same as index_codesearch
|
16
|
+
rake index_codesearch
|
17
|
+
rake index_milkode
|
16
18
|
End
|
17
19
|
end
|
18
20
|
|
@@ -40,7 +42,8 @@ end
|
|
40
42
|
task :mirror => "#{BASE_DIR}/.gem/.mirrorrc" do
|
41
43
|
FileUtils.mkpath MIRROR_DIR
|
42
44
|
# HOME is set because gem mirror reads $HOME/.gem/.mirrorrc.
|
43
|
-
|
45
|
+
env = {"HOME"=>BASE_DIR}
|
46
|
+
sh env, GEM_COMMAND, "mirror", "--verbose"
|
44
47
|
end
|
45
48
|
|
46
49
|
task :unpack do
|
@@ -91,16 +94,23 @@ task :unpack do
|
|
91
94
|
|
92
95
|
end
|
93
96
|
|
94
|
-
task :index
|
97
|
+
task :index => :index_codesearch
|
98
|
+
|
99
|
+
CINDEX_COMMAND = 'cindex'
|
100
|
+
task :index_codesearch do
|
101
|
+
sh CINDEX_COMMAND, LATEST_DIR
|
102
|
+
end
|
103
|
+
|
104
|
+
task :index_milkode do
|
95
105
|
# Assume default database for milkode is already created.
|
96
106
|
# If not, do it as follows:
|
97
107
|
# milk init --default
|
98
108
|
milkode_package_list = IO.popen([MILK_COMMAND, 'list']) {|f| f.read }
|
99
109
|
package_name = File.basename(LATEST_DIR)
|
100
110
|
if /^#{Regexp.escape package_name}$/ !~ milkode_package_list
|
101
|
-
|
111
|
+
sh MILK_COMMAND, 'add', '--verbose', LATEST_DIR
|
102
112
|
else
|
103
|
-
|
113
|
+
sh MILK_COMMAND, 'update', '--verbose', package_name
|
104
114
|
end
|
105
115
|
end
|
106
116
|
|
data/gem-codesearch.gemspec
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'gem-codesearch'
|
3
|
-
s.version = '0.
|
4
|
-
s.date = '
|
3
|
+
s.version = '0.3'
|
4
|
+
s.date = '2016-07-29'
|
5
5
|
s.author = 'Tanaka Akira'
|
6
6
|
s.email = 'akr@fsij.org'
|
7
7
|
s.required_ruby_version = '>= 2.2.0'
|
8
8
|
s.add_runtime_dependency 'rubygems-mirror', '~> 1.0', '>= 1.0.1'
|
9
|
-
s.add_runtime_dependency 'milkode', '~> 1.8', '>= 1.8.6'
|
10
9
|
s.add_runtime_dependency 'rake', '~> 10.4', '>= 10.4.2'
|
11
10
|
s.add_development_dependency 'builder', '~> 3.2', '>= 3.2.2'
|
12
11
|
s.add_development_dependency 'test-unit', '~> 3.0', '>= 3.0.8'
|
@@ -29,6 +28,6 @@ Gem::Specification.new do |s|
|
|
29
28
|
s.description = <<'End'
|
30
29
|
gem-codesearch sets up a full text code search engine for rubygems mirror.
|
31
30
|
It use rubygems-mirror to mirror rubygems and
|
32
|
-
|
31
|
+
"Code Search" (https://github.com/google/codesearch) for search engine.
|
33
32
|
End
|
34
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-codesearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanaka Akira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubygems-mirror
|
@@ -30,26 +30,6 @@ dependencies:
|
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.1
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: milkode
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '1.8'
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: 1.8.6
|
43
|
-
type: :runtime
|
44
|
-
prerelease: false
|
45
|
-
version_requirements: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - "~>"
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '1.8'
|
50
|
-
- - ">="
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: 1.8.6
|
53
33
|
- !ruby/object:Gem::Dependency
|
54
34
|
name: rake
|
55
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,7 +93,7 @@ dependencies:
|
|
113
93
|
description: |
|
114
94
|
gem-codesearch sets up a full text code search engine for rubygems mirror.
|
115
95
|
It use rubygems-mirror to mirror rubygems and
|
116
|
-
|
96
|
+
"Code Search" (https://github.com/google/codesearch) for search engine.
|
117
97
|
email: akr@fsij.org
|
118
98
|
executables:
|
119
99
|
- gem-codesearch-setup
|
@@ -148,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
128
|
version: '0'
|
149
129
|
requirements: []
|
150
130
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
131
|
+
rubygems_version: 2.6.3
|
152
132
|
signing_key:
|
153
133
|
specification_version: 4
|
154
134
|
summary: Set up a full text code search engine for rubygems mirror
|