enki 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8523f2685c2123bf425f7d19aa4e30c281c838ca
4
- data.tar.gz: ff57940d741e8c08feb6638dedaf49bfccfb45cc
3
+ metadata.gz: 53a3f13279ea2d4fec2f7fbcf9e9ebdd648bbd16
4
+ data.tar.gz: 2d33c42a2cf9a07aca6ee3602fb54328800362a5
5
5
  SHA512:
6
- metadata.gz: 7622883a70c067430fb391415c0ef8763021e4dc9f3d4be3a0027ddfced4242059c7986f2e21e1cb5231216f209d47e577ea455b591c919ce59e1893efe58d6e
7
- data.tar.gz: 6e3c3ffb6b9ac187e8df743c2da91c33f583d5f2227e7cffc61b5316b42a51cb9e31e5d76f58bcf9c7cd042a31a8f8af7956d23bca5f32b18c0df6b02b5fba39
6
+ metadata.gz: 73b7a826bcf33284f341b716954367fe0a48e2bb24ced5ec53cdf223b2b7ab2c631d55b573a0ff6a79c8be1c23b0257d53331aebbdc86afbed69400aa2da9a10
7
+ data.tar.gz: 3a1aa2403f0ffa7e9815bf7c0e9a468040fee8efa8ca6945d11ffada9c4242b6cc91cd2a5e71846bcbffbdb3985f389a93b74c1a05b216f347a7ca69a591876e
@@ -6,8 +6,8 @@ require 'enki/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "enki"
8
8
  spec.version = Enki::VERSION
9
- spec.authors = ["Giorgos Avramidis"]
10
- spec.email = ["avramidg@gmail.com"]
9
+ spec.authors = ["Giorgos Avramidis", "Kostas Karachalios"]
10
+ spec.email = ["avramidg@gmail.com", "vrinek@me.com"]
11
11
  spec.summary = %q{Provide snowcrash and confluence integration}
12
12
  spec.description = %q{}
13
13
  spec.homepage = ""
@@ -10,6 +10,17 @@ class EnkiRender < Redcarpet::Render::HTML
10
10
  </ac:structured-macro>
11
11
  HTML
12
12
  end
13
+
14
+ def table(header, body)
15
+ <<-HTML
16
+ <table>
17
+ <tbody>
18
+ #{header}
19
+ #{body}
20
+ </tbody>
21
+ </table>
22
+ HTML
23
+ end
13
24
  end
14
25
 
15
26
  module Enki
@@ -21,7 +32,16 @@ module Enki
21
32
  @markdown = ::Redcarpet::Markdown.new(
22
33
  EnkiRender,
23
34
  no_intra_emphasis: true,
35
+ tables: true,
24
36
  )
37
+ @codes = {
38
+ "200" => "OK",
39
+ "201" => "Created",
40
+ "204" => "No Content",
41
+ "400" => "Bad Request",
42
+ "403" => "Forbidden",
43
+ "404" => "Forbidden",
44
+ }
25
45
 
26
46
  template_file = File.open(Enki.configuration.erb_template)
27
47
 
@@ -1,3 +1,3 @@
1
1
  module Enki
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -8,7 +8,8 @@
8
8
  <% @data['resourceGroups'].each do |group| %>
9
9
  <h2><%= group['name'] %></h2>
10
10
  <hr/>
11
- <% group['resources'].each do |resource| %>
11
+ <%=@markdown.render group['description'] if group['description'] %>
12
+ <% (group['resources'] || []).each do |resource| %>
12
13
  <% resource['actions'].each do |action| %>
13
14
  <h3><%= action['method'] %> <%= resource['uriTemplate'] %></h3>
14
15
 
@@ -75,7 +76,7 @@
75
76
  <% end %>
76
77
  <% end %>
77
78
  <% if example['responses'] %>
78
- <h5>Response codes</h5>
79
+ <h5>Responses</h5>
79
80
  <table>
80
81
  <tbody>
81
82
  <tr>
@@ -84,7 +85,7 @@
84
85
  </tr>
85
86
  <% example['responses'].each do |response| %>
86
87
  <tr>
87
- <td><%= response['name'] %></td>
88
+ <td><b><%= response['name'] %></b> <%= @codes[response['name']] %></td>
88
89
  <td>
89
90
  <%=@markdown.render response['description'].to_s %>
90
91
  <% if response['body'] %>
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giorgos Avramidis
8
+ - Kostas Karachalios
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-09-18 00:00:00.000000000 Z
12
+ date: 2014-09-19 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: qarioz-confluencer
@@ -113,6 +114,7 @@ dependencies:
113
114
  description: ''
114
115
  email:
115
116
  - avramidg@gmail.com
117
+ - vrinek@me.com
116
118
  executables: []
117
119
  extensions: []
118
120
  extra_rdoc_files: []