Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivanshamatov/fetcher
npm dependency fetcher
https://github.com/ivanshamatov/fetcher
Last synced: about 1 month ago
JSON representation
npm dependency fetcher
- Host: GitHub
- URL: https://github.com/ivanshamatov/fetcher
- Owner: IvanShamatov
- Created: 2016-01-05T20:08:25.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-05T23:05:59.000Z (almost 9 years ago)
- Last Synced: 2024-10-14T02:13:03.728Z (2 months ago)
- Language: Ruby
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# NPM dependencies fetcher
Simple sinatra based service to fetch dependencies recursively. It uses Concurrent::Future's for async requests and Concurrent::Map as a storage for futures and results, because they can be modified asynchronously.
```ruby
$ git clone https://github.com/IvanShamatov/fetcher.git
$ cd fetcher
$ bundle install
```To start server use `shotgun`, and you can touch server with curl like that
```
curl http://localhost:9393/[:packet_name]
# example
curl http://localhost:9393/forever
```Or you can use npm class like that:
```ruby
> require './lib/npm.rb'
> winston = NPM.new('winston')
> winston.all_dependencies
> #=> ["async", "colors", "cycle", "stack-trace", "eyes", "isstream", "pkginfo"]
```Use `rake test` to run tests.