Class: Capucine::NPM

Inherits:
Object
  • Object
show all
Defined in:
lib/npm.rb

Constant Summary collapse

@@noderoot =
'http://registry.npmjs.org/'

Instance Method Summary collapse

Instance Method Details

#initialise(lib_name) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/npm.rb', line 11

def initialise(lib_name)
  infos = JSON.parse open("#{@@noderoot}#{file['name']}").read
  version = file['version'] || infos['dist-tags']['lastest']
  lib = infos['versions'][version]
  tarball_url = lib['dist']['tarball']

  # tarball = open(tarball_url).read

end