Class: Papers::BowerComponent
Instance Attribute Summary
#license, #license_url, #name, #project_url
Class Method Summary
collapse
Instance Method Summary
collapse
#acceptable_license?, #initialize, #name_without_version
Class Method Details
.bower_json_entries ⇒ Object
27
28
29
30
31
32
|
# File 'lib/papers/dependency_specification/bower_component.rb', line 27
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 ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'lib/papers/dependency_specification/bower_component.rb', line 18
def self.full_introspected_entries
bower_json_entries.map do |entry|
{
'name' => "#{entry['name']}-#{entry['_release']}",
'homepage' => entry['homepage']
}
end
end
|
.introspected ⇒ Object
14
15
16
|
# File 'lib/papers/dependency_specification/bower_component.rb', line 14
def self.introspected
full_introspected_entries.map { |e| e['name'] }
end
|
.manifest_key ⇒ Object
34
35
36
|
# File 'lib/papers/dependency_specification/bower_component.rb', line 34
def self.manifest_key
"bower_components"
end
|
Instance Method Details
#pretty_hash ⇒ Object
5
6
7
8
9
10
11
12
|
# 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
|