class Papers::BowerComponent
Public Class Methods
asset_type_name()
click to toggle source
# File lib/papers/dependency_specification/bower_component.rb, line 41 def self.asset_type_name 'Bower component' end
bower_json_entries()
click to toggle source
# File lib/papers/dependency_specification/bower_component.rb, line 34 def self.bower_json_entries json_files = Dir["#{Papers.config.bower_components_path}/*/.bower.json"] json_files.map do |path| JSON.parse File.read(path) end end
full_introspected_entries()
click to toggle source
# File lib/papers/dependency_specification/bower_component.rb, line 18 def self.full_introspected_entries whitelisted_license = Papers.config.version_whitelisted_license bower_json_entries.map do |entry| name = if whitelisted_license != nil && whitelisted_license == entry['license'] entry['name'] else "#{entry['name']}-#{entry['_release']}" end { 'name' => name, 'homepage' => entry['homepage'] } end end
introspected()
click to toggle source
# File lib/papers/dependency_specification/bower_component.rb, line 14 def self.introspected full_introspected_entries.map { |e| e['name'] } end
manifest_key()
click to toggle source
# File lib/papers/dependency_specification/bower_component.rb, line 45 def self.manifest_key "bower_components" end
Public Instance Methods
pretty_hash()
click to toggle source
# File lib/papers/dependency_specification/bower_component.rb, line 5 def pretty_hash { name: name_without_version, license: license, license_url: @license_url, project_url: @project_url } end