lib/incloudr.rb in capucine-0.1.5 vs lib/incloudr.rb in capucine-0.1.6

- old
+ new

@@ -5,10 +5,11 @@ require 'json' require 'packr' @@noderoot = 'http://registry.npmjs.org/' @@cdnjsroot = 'https://raw.github.com/cdnjs/cdnjs/master/ajax/libs/' + @@cdnjs = 'http://www.cdnjs.com/packages.json' def self.run_once files = Capucine.settings.config['incloudr_libs'] return false if files.length == 0 dir = File.join(Capucine.settings.working_dir, Capucine.settings.config['incloudr_output_dir']) @@ -75,9 +76,15 @@ # tarball = open(tarball_url).read # p version + end + + def self.list + content = JSON.parse open(@@cdnjs).read + packages = content['packages'] + packages.each {|p| puts "#{p['name']}\n"} end end end