devcenter 0.0.14 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/devcenter.gemspec CHANGED
@@ -28,5 +28,5 @@ Gem::Specification.new do |gem|
28
28
  gem.add_runtime_dependency('sinatra', '~>1.3.4')
29
29
  gem.add_runtime_dependency('tilt', '~>1.3.3')
30
30
  gem.add_runtime_dependency('rack-highlighter', '~>0.2.0')
31
- gem.add_runtime_dependency('devcenter-parser', '~>1.0.0')
31
+ gem.add_runtime_dependency('devcenter-parser', '~>1.1.0')
32
32
  end
@@ -12,6 +12,16 @@
12
12
  <div class="padder">
13
13
 
14
14
  <% if !@article.html.to_s.empty? %>
15
+
16
+ <section id="table-of-contents">
17
+ <h3 id="toc">Table of Contents</h3>
18
+ <ul>
19
+ <% @article.toc.each do |section| %>
20
+ <li><a href="#<%= section.attr('id') %>"><%= section.inner_text %></a></li>
21
+ <% end %>
22
+ </ul>
23
+ </section>
24
+
15
25
  <%= @article.html %>
16
26
  <% elsif @article.error %>
17
27
  <div class="cli-preview-error">
@@ -52,6 +52,7 @@ module Devcenter::Previewer
52
52
  if File.exists?(src_path)
53
53
  log "Parsing"
54
54
  @article = parse_article(src_path)
55
+ @article.toc = Nokogiri::HTML(@article.html).search('h2')
55
56
  @page_title = @article.metadata.title
56
57
  log "Serving"
57
58
  erb :article
@@ -1,3 +1,3 @@
1
1
  module Devcenter
2
- VERSION = "0.0.14"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devcenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-22 00:00:00.000000000 Z
13
+ date: 2013-05-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: listen
@@ -211,7 +211,7 @@ dependencies:
211
211
  requirements:
212
212
  - - ~>
213
213
  - !ruby/object:Gem::Version
214
- version: 1.0.0
214
+ version: 1.1.0
215
215
  type: :runtime
216
216
  prerelease: false
217
217
  version_requirements: !ruby/object:Gem::Requirement
@@ -219,7 +219,7 @@ dependencies:
219
219
  requirements:
220
220
  - - ~>
221
221
  - !ruby/object:Gem::Version
222
- version: 1.0.0
222
+ version: 1.1.0
223
223
  description: CLI to interact with Heroku's Dev Center
224
224
  email:
225
225
  - raul@heroku.com
@@ -328,3 +328,4 @@ signing_key:
328
328
  specification_version: 3
329
329
  summary: CLI to interact with Heroku's Dev Center
330
330
  test_files: []
331
+ has_rdoc: