0.03
No commit activity in last 3 years
No release in over 3 years
gem-codesearch sets up a full text code search engine for rubygems mirror. It use rubygems-mirror to mirror rubygems and "Code Search" (https://github.com/google/codesearch) for search engine.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 3.2.2, ~> 3.2
>= 3.0.8, ~> 3.0

Runtime

>= 10.4.2, ~> 10.4
>= 1.0.1, ~> 1.0
 Project Readme

gem-codesearch

gem-codesearch sets up a full text code search engine on mirror of rubygems. It use rubygems-mirror to mirror rubygems and codesearch for search engine.

400GB of free disk space is required to store the rubygems mirror, unpacked gems and codesearch index at 2016-01. It will be larger in future.

Usage

This creates "latest-gem" package in zoekt index.

# Install zoekt from GitHub repository: https://github.com/google/zoekt 
% gem install gem-codesearch
% mkdir $HOME/gem-codesearch        # Make a some directory
% cd $HOME/gem-codesearch
% gem-codesearch-setup all >& setup.log # It may take several days or more

If "gem-codesearch-setup all" fails due to network or server errors, try again to continue.

After the index is created, enjoy code search.

% zoekt -index_dir $HOME/gem-codesearch/zoekt-index sort_by

You can search without -index_dir option after creating the symlink named .zoekt to HOME directory

Usage without install

% sudo aptitude install codesearch  # https://github.com/google/codesearch
% gem install rubygems-mirror
% cd $HOME
% git clone https://github.com/akr/gem-codesearch.git
% cd gem-codesearch
% rake all >& setup.log             # It may take several days or more

Use milkode instead of zoekt

% gem install milkode
% milk init --default               # If you use milkode first time
% rake mirror unpack index_milkode >& setup.log

Use codesearch instead of zoekt

$ rake mirror unpack index_csearch

This creates a set of indexes for csearch in gem-codesearch/csearchindexes. Use a wrapper shell script to call csearch:

#!/bin/sh

export CSEARCHINDEX
for CSEARCHINDEX in /path/to/gem-codesearch/csearchindexes/?; do csearch "$@"; done

Links

Author

Tanaka Akira akr@fsij.org