mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
remove dependency on aquarium
This commit is contained in:
parent
ebd48d9321
commit
c4eeec986d
1 changed files with 15 additions and 13 deletions
|
@ -1,6 +1,5 @@
|
|||
require 'open-uri'
|
||||
require 'json'
|
||||
require 'aquarium'
|
||||
require 'yaml'
|
||||
|
||||
module Jekyll
|
||||
|
@ -36,19 +35,22 @@ module Jekyll
|
|||
end
|
||||
|
||||
def generate(site)
|
||||
@contributors = merge_contributors(fetch_contributors(), site.config['aliases']).sort_by{|c| - c['contributions']}
|
||||
@primary_devs = JSON.parse(open("https://api.github.com/repos/bitcoin/bitcoin/collaborators").read)
|
||||
class << site
|
||||
attr_accessor :primary_devs, :contributors
|
||||
|
||||
Aquarium::Aspects::Aspect.new :around, :invoking => :site_payload, :on_type => Site do |execution_point, site, *args|
|
||||
result = execution_point.proceed
|
||||
result['site']['project'] = {
|
||||
"primary_devs" => @primary_devs,
|
||||
"contributors" => @contributors
|
||||
}
|
||||
result
|
||||
def site_payload
|
||||
result = super
|
||||
result['site']['project'] = {
|
||||
"primary_devs" => self.primary_devs,
|
||||
"contributors" => self.contributors
|
||||
}
|
||||
result
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
site.primary_devs = JSON.parse(open("https://api.github.com/repos/bitcoin/bitcoin/collaborators").read)
|
||||
site.contributors = merge_contributors(fetch_contributors(), site.config['aliases']).sort_by{|c| - c['contributions']}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue