api_canon 0.3.1 → 0.3.2

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.
@@ -65,7 +65,10 @@
65
65
  <% content_for :sidebar do %>
66
66
  <ul class='nav nav-list'>
67
67
  <% ApiCanon::DocumentationStore.instance.docos.each do |key, doco| %>
68
- <li><%= link_to doco.display_name, url_for(:controller => doco.controller_path, :action => :index, :format => :html) %></li>
68
+ <li>
69
+ <%- doco_link = doco.sidebar_link || url_for(:controller => doco.controller_path, :action => :index, :format => :html) -%>
70
+ <%= link_to doco.display_name, doco_link %>
71
+ </li>
69
72
  <% end %>
70
73
  </ul>
71
74
  <% end %>
@@ -1,6 +1,6 @@
1
1
  module ApiCanon
2
2
  class Document
3
- attr_reader :description, :controller_path, :controller_name
3
+ attr_reader :description, :controller_path, :controller_name, :sidebar_link
4
4
  attr_accessor :documented_actions
5
5
  def initialize(controller_path, controller_name, opts={})
6
6
  @controller_path = controller_path
@@ -15,6 +15,9 @@ module ApiCanon
15
15
  def describe(desc)
16
16
  @description = desc
17
17
  end
18
+ def link_path(link)
19
+ @sidebar_link = link
20
+ end
18
21
  def display_name
19
22
  @display_name || @controller_name.titleize
20
23
  end
@@ -1,3 +1,3 @@
1
1
  module ApiCanon
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_canon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Cameron Walsh
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-07-22 00:00:00 Z
18
+ date: 2013-08-12 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails