Project

rudisco

0.0
No commit activity in last 3 years
No release in over 3 years
Rubygems sqlite3 database (includes information about ~ 126000 gems). Table gems consist of next columns: name, description, authors, version, license, sha, source_code_url and more. Supports CLI.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 3.0, ~> 3.0
>= 12.0.0, ~> 12.0
>= 4.42.1, ~> 4.42.1
>= 1.3.13, ~> 1.3.13
>= 0.19.4, ~> 0.19.4
 Project Readme

Rudisco Build Status

Description

Gems local database (based on Rubygems). Includes information about ~ 126000 gems.

Table gems consist of next columns: name, description, authors, version, license, sha, source_code_url and more. Full table structure described in gem.rb file.

Installation

  $ gem install rudisco

Usage

Database usage example

  gems = Rudisco::Gem # Sequel::Model
  
  top = gems.where{ total_downloads > 50000000 }
            .select(:name, :description, :source_code_url)
  
  top.each do |record|
    puts record[:name]
    puts record[:description]
    puts record[:source_code_url] if record[:source_code_url]
    puts
  end

Simple search gems by selected phrase

  phrase = 'rails'
  gems = Rudisco::Gem.find_phrase(phrase)
                     .select(:name, :description)
  
  gems.each do |record|
    puts record[:name]
    puts record[:description]
    puts
  end

Open documentation and download gems

  path_to_load = File.join(__dir__, '..', 'tmp')
  
  sample = Rudisco::Gem.exclude(source_code_url: '').first
  sample.action(:open_sources)
        .action(:git_clone, path: path_to_load)
        
  sample2 = Rudisco::Gem.limit(2)
  sample2.action(:download, path: path_to_load)

Update database

Through CLI

  $ gem install rudisco
  $ rudisco update

By #deep_scanning call

  require 'rudisco'
  
  Rudisco::Gem.deep_scanning

CLI

Alt text

Commands list

  $ rudisco clone GEM_NAME     # Clones gem sources from git
  $ rudisco download GEM_NAME  # Downloads a gem
  $ rudisco find PHRASE        # Searches phrase in gem name or description
  $ rudisco open GEM_NAME      # Opens gem page on rubygems.org
  $ rudisco show GEM_NAME      # Shows detailed information about single gem
  $ rudisco update             # Updates database

Todo

  • CLI statistic (database&program statistic) commands.
  • Tests coverage.

Dependencies

  • Ruby 2.1.0 or higher
  • sqlite3 ~> 1.3.13
  • sequel ~> 4.42.1

License


Released under the MIT License. See the LICENSE file for further details.