gem-codesearch 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/README.md +14 -8
  4. data/Rakefile +15 -5
  5. data/gem-codesearch.gemspec +3 -4
  6. metadata +4 -24
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e8c7bb53fd63dd6e17be73b4539e85b56b375cb
4
- data.tar.gz: f13479a2283c8f7d9644cc32da9d94581ba36bd3
3
+ metadata.gz: 56e7a104176e147ffadd86b273b9a3fbb8743cb7
4
+ data.tar.gz: 06862a9a9ecbeb0c9777501846d6af785bb06b75
5
5
  SHA512:
6
- metadata.gz: a85f76d92147d3071d17e9a48b0f32f54fb7966bbc62d3d9c270367ce573fc821dc0904bbefbb08c1453a134103a60dcfc68614f454d1a975da2a720ef272e22
7
- data.tar.gz: e8289838b82d9a148154f77e5ebf74a160f0d0942bdc8f1ee39b745bb7b8cfad02584a72223fe1f52fe0ec4e081eb1230a0d4b82f84fecc2ba6b0c349701a218
6
+ metadata.gz: 4a611d94d07105925bd0f53d44da0d78eeff73b5cd43af3856954cbab14a26a666d907a23b99284dc8a23fa9f0359defe9dc9147e8810d998db00ee7d5c45b2c
7
+ data.tar.gz: 215f2f2f68557773dd9533f6d12213ce59394825d980715b0e4969d2d70e035fc6491cc29d733b7c098ee73f03f3a05dbb97243c72a5b6f20e0f15c7fb54c6f1
data/.gitignore CHANGED
@@ -8,6 +8,9 @@
8
8
  /test/tmp/
9
9
  /test/version_tmp/
10
10
  /tmp/
11
+ /latest-gem
12
+ /mirror
13
+ /log
11
14
 
12
15
  ## Specific to RubyMotion:
13
16
  .dat*
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 milkode for search engine.
4
+ It use rubygems-mirror to mirror rubygems and codesearch for search engine.
5
5
 
6
- 300GB of free disk space is required to store the rubygems mirror,
7
- unpacked gems and milkode index at 2015-01.
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 milkode index.
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
- % gmilk -p latest-gem sort_by
25
+ % csearch sort_by
26
26
 
27
27
  ## Usage without install
28
28
 
29
- % gem install rubygems-mirror milkode
30
- % milk init --default # If you use milkode first time
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
- sh "HOME=#{BASE_DIR} #{GEM_COMMAND} mirror --verbose"
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 do
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
- system MILK_COMMAND, 'add', '--verbose', LATEST_DIR
111
+ sh MILK_COMMAND, 'add', '--verbose', LATEST_DIR
102
112
  else
103
- system MILK_COMMAND, 'update', '--verbose', package_name
113
+ sh MILK_COMMAND, 'update', '--verbose', package_name
104
114
  end
105
115
  end
106
116
 
@@ -1,12 +1,11 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'gem-codesearch'
3
- s.version = '0.2'
4
- s.date = '2015-01-13'
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
- milkode for search engine.
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.2'
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: 2015-01-13 00:00:00.000000000 Z
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
- milkode for search engine.
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.4.5
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