crapidocs 0.1.1 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd4e5f30914afdc7a2ee4d2faf1d3697de2397ef
4
- data.tar.gz: fa43f26801d4135f60e2ebe2fd94f065ab665a80
3
+ metadata.gz: e96c43f957311ed4171fe562e254178b01703eb1
4
+ data.tar.gz: b56b083d55e894514838ee36944d2b5f4c3f43fc
5
5
  SHA512:
6
- metadata.gz: bc1d214ebecba8346c73917a77d665be77200f8f8b8fdbe94a8a7c226fb33519e93e7d32c9772eaa55dfd189bd983980c12461e8993c0eac7040ea0a5964b1de
7
- data.tar.gz: 5beee50d7511be80b705ad0434daeadf376eb30a56f84f727c9b343cf9e318061d5473e4079b042f19daba58d080cff6a903d7d847a5ed384d316c46306f6daa
6
+ metadata.gz: e8a398dbe558b5343d53ccca09520f6aad5db9882896ee2325bddda7c6283ad05f5a9eadd0d29424ea71c4b1e84de2f57847aea82c268b1d88c7cd566db7cc29
7
+ data.tar.gz: 9551c3cee09da63baebd8c7c02d4c4b1c41e58bec8490bd98fad2e0475a3300318b9314cc4fe200dae04c4a242edec6b9ee4bd99344e8826d4575d7e5bbdb209
data/lib/crapidocs.rb CHANGED
@@ -16,7 +16,7 @@ module Rack
16
16
  end
17
17
 
18
18
  module CrapiDocs
19
- VERSION = [0, 1, 1]
19
+ VERSION = [0, 1, 2]
20
20
  TEMPLATE_DIR = File.expand_path('../..', __FILE__) + '/templates'
21
21
 
22
22
  class << self
@@ -0,0 +1,35 @@
1
+ ## Endpoints
2
+
3
+ <% @session.paths.each do |path| %>
4
+ * [<%= path %>](#<%= anchor(path) %>)
5
+ <% end %>
6
+
7
+ ## Details
8
+
9
+ <% @session.paths.each do |path| %>
10
+ ### <a name="<%= anchor(path) %>"></a><%= path %>
11
+
12
+ <% @session.methods(path).each do |method| %>
13
+ #### <%= method %>
14
+
15
+ <% params = @session.params(path, method) %>
16
+ <% if params %>
17
+ Parameters:
18
+
19
+ ```json
20
+ <%= JSON.pretty_generate(params) %>
21
+ ```
22
+ <% end %>
23
+
24
+ <% body = @session.body(path, method) %>
25
+ <% if body %>
26
+ Example response:
27
+
28
+ ```json
29
+ <%= JSON.pretty_generate(body) %>
30
+ ```
31
+ <% end %>
32
+
33
+ <% end %>
34
+
35
+ <% end %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crapidocs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Holly
@@ -19,6 +19,7 @@ files:
19
19
  - lib/crapidocs.rb
20
20
  - lib/crapidocs/formatter.rb
21
21
  - lib/crapidocs/session.rb
22
+ - templates/layout.md.erb
22
23
  homepage: https://rubygems.org/gems/crapidocs
23
24
  licenses:
24
25
  - MIT