Project

glom

0.01
No commit activity in last 3 years
No release in over 3 years
Intelligent package search, without leaving your shell.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.3
>= 0
 Project Readme

Glom

Problem:

To find a package for templating my new js project, I must open github.com and sift through people's crappy repos.

Solution:

$ glom 'javascript templating'

Searching `https://bower-component-list.herokuapp.com` for `templating`...
Searching `http://jiyinyiyong.github.io/nipster/packages.json` for `templating`...

+-----------------+-------------------------+---------------+-------+----------------+----------+
| Name            | Description             | Author        | Stars | Last Updated   | Registry |
+-----------------+-------------------------+---------------+-------+----------------+----------+
| mustache        | Minimal templating      | janl          | 5457  | 3 months       | bower    |
|                 | with {{mustaches}}      |               |       |                |          |
|                 | in JavaScript           |               |       |                |          |
| hogan           | A compiler for the      | twitter       | 2912  | 25 days        | bower    |
|                 | Mustache templating     |               |       |                |          |
|                 | language                |               |       |                |          |
+-----------------+-------------------------+---------------+-------+----------------+----------+

Installation

$ gem install glom

Contributing

Support for APIs can be added easily by adding [Registry].rb to the lib/glom/registries directory.

[Registry].rb should be a module with:

  • a KEYWORDS array
  • a NAME string
  • a URL string
  • a BLACKLIST array (containing package names to exclude)
  • a standardize() method that converts URL into an array of packages

Example:

# npm.rb

module Bower
  KEYWORDS = ['bower', 'font-end', 'frontend', 'js', 'javascript']
  
  def get
    return [
      ['mustache', 'Minimal templating with {{mustaches}}', 'janl', 5457, '3 months', 'bower'],
      ['hogan', 'A compiler for the mustache templating language', 'twitter', 2912, '25 days', 'bower']
    ]
  end
end
Glom helpers

The Glom module comes with two built-in helper methods that make standardizing APIs easier:

  • Glom.get() - Gets a JSON file from the web and caches it, or pulls it from the cache if it exists
  • Glom.match() - Breaks the package description and user's query into array of words and returns a boolean
Git for losers dummies
  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request