浏览代码

Add Nokogiri documentation

Closes #123.
Thibaut 11 年之前
父节点
当前提交
d74d0e7e75

二进制
assets/images/icons.png


二进制
assets/images/icons@2x.png


+ 5 - 0
assets/javascripts/templates/pages/about_tmpl.coffee

@@ -227,6 +227,11 @@ credits = [
     'Joyent, Inc. and other Node contributors<br>Node.js is a trademark of Joyent, Inc.',
     'MIT',
     'https://raw.github.com/joyent/node/master/LICENSE'
+  ], [
+    'Nokogiri',
+    '2008-2014 2014 Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo, Patrick Mahoney, Yoko Harada, Akinori Musha',
+    'MIT',
+    'https://github.com/sparklemotion/nokogiri/blob/master/README.rdoc#license'
   ], [
     'PHP',
     '1997-2014 The PHP Documentation Group',

+ 1 - 1
assets/javascripts/templates/pages/news_tmpl.coffee

@@ -34,7 +34,7 @@ newsItem = (date, news) ->
 
 app.news = [
   [ 1417305600000, # November 30, 2014
-    """ New <a href="/phpunit/">PHPUnit</a> documentation """
+    """ New <a href="/phpunit/">PHPUnit</a> and <a href="/nokogiri/">Nokogiri</a> documentations """
   ], [
     1416096000000, # November 16, 2014
     """ New <a href="/python2/">Python 2</a> documentation """

+ 1 - 0
assets/stylesheets/global/_icons.scss

@@ -71,3 +71,4 @@
 ._icon-marionette:before    { background-position: -1rem -11rem; }
 ._icon-mongoose:before      { background-position: -2rem -11rem; }
 ._icon-phpunit:before       { background-position: -3rem -11rem; }
+._icon-nokogiri:before      { background-position: -4rem -11rem; }

+ 11 - 0
lib/docs/filters/nokogiri2/entries.rb

@@ -0,0 +1,11 @@
+module Docs
+  class Nokogiri2
+    class EntriesFilter < Docs::Rdoc::EntriesFilter
+      def get_type
+        type = name.dup
+        type.remove! %r{#.+\z}
+        type.split('::')[0..2].join('::')
+      end
+    end
+  end
+end

+ 19 - 0
lib/docs/scrapers/nokogiri2.rb

@@ -0,0 +1,19 @@
+module Docs
+  class Nokogiri2 < Rdoc
+    self.name = 'Nokogiri'
+    self.slug = 'nokogiri'
+    self.version = '1.6.4'
+    self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Nokogiri'
+
+    html_filters.replace 'rdoc/entries', 'nokogiri2/entries'
+
+    options[:root_title] = 'Nokogiri'
+    options[:only_patterns] = [/\ANokogiri/]
+
+    options[:attribution] = <<-HTML
+      &copy; 2008&ndash;2014 Aaron Patterson, Mike Dalessio, Charles Nutter,<br>
+      Sergio Arbeo, Patrick Mahoney, Yoko Harada, Akinori Musha<br>
+      Licensed under the MIT License.
+    HTML
+  end
+end

二进制
public/icons/docs/nokogiri/16.png


二进制
public/icons/docs/nokogiri/16@2x.png