govuk_tech_docs 1.6.1 → 1.6.2

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: 53bc02bac11f6ebf954c41005afaa42e17b050ef
4
- data.tar.gz: 48781c829d952afb37402f50cfbfc4d12b0f10f3
3
+ metadata.gz: ac50514097b631f4d275bd75e7db6fcf61085c22
4
+ data.tar.gz: 23bdb8b1962b066f4ed1fd96a1290c0a7178a145
5
5
  SHA512:
6
- metadata.gz: 1098aa8ced88e70aa73bb431c356198a1e4b88213922abbf2b6712ffe085dc177079b73f755e9ba801fdd358d85d04add18f4cf1de412ebfb508c5a9f5f0ee94
7
- data.tar.gz: b0895964d9e9e15c3096669a89aee2635c999c0cde3bfaa7c44b3e0c58991655e4613bbb7e60d42fba5fde22820aa1ceb07ae42051cf36034f4375e1348b2755
6
+ metadata.gz: '0091de68c7a21ed1fd0f174206ea9c7b6b303d17a3063c2f888d2f5b07882ee3e3063f7a5b0e30cefe80325299cdbff798e62130e8d2eaf6e73438db1eb8d581'
7
+ data.tar.gz: bbe21355416d729a9333c589b10a08f34a2910bc78b3b7aedeccde77b2af6670f7ea846c65fd4181d49b650395a5d1d90e59f4caaa4df644728beacfdd4ab7ee
data/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 1.6.2
4
+
5
+ This version fixes an issue with Middleman hanging (PR #54). It also allows the API reference page to include multiple servers and their descriptions (PR #53).
4
6
 
5
7
  ## 1.6.1
6
8
 
@@ -6,7 +6,10 @@ info:
6
6
  license:
7
7
  name: MIT
8
8
  servers:
9
- - url: http://petstore.swagger.io/v1
9
+ - description: Production
10
+ url: http://petstore.swagger.io/v1
11
+ - description: Development
12
+ url: http://dev.petstore.swagger.io
10
13
  paths:
11
14
  /pets:
12
15
  get:
@@ -42,4 +42,5 @@ Gem::Specification.new do |spec|
42
42
  spec.add_development_dependency "govuk-lint", "~> 3.7.0"
43
43
  spec.add_development_dependency "jasmine", "~> 3.1.0"
44
44
  spec.add_development_dependency "rspec", "~> 3.7.0"
45
+ spec.add_development_dependency "byebug"
45
46
  end
@@ -67,7 +67,7 @@ module GovukTechDocs
67
67
  text = text.strip
68
68
 
69
69
  if text == 'api>'
70
- @render.api_full(api_info, api_server)
70
+ @render.api_full(api_info, api_servers)
71
71
  elsif type == 'default'
72
72
  output = @render.path(text)
73
73
  # Render any schemas referenced in the above path
@@ -91,8 +91,8 @@ module GovukTechDocs
91
91
  @document.info
92
92
  end
93
93
 
94
- def api_server
95
- @document.servers[0]
94
+ def api_servers
95
+ @document.servers
96
96
  end
97
97
  end
98
98
  end
@@ -17,7 +17,7 @@ module GovukTechDocs
17
17
  @template_responses = get_renderer('responses.html.erb')
18
18
  end
19
19
 
20
- def api_full(info, server)
20
+ def api_full(info, servers)
21
21
  paths = ''
22
22
  paths_data = @document.paths
23
23
  paths_data.each do |path_data|
@@ -1,9 +1,19 @@
1
1
  <h1 id="<%= info.title.parameterize %>"><%= info.title %> v<%= info.version %></h1>
2
2
  <%= markdown(info.description) %>
3
- <% if server %>
4
- <h2 id="base-url">Base URL</h2>
5
- <p><strong><%= server.url %></strong></p>
3
+
4
+ <% unless servers.empty? %>
5
+ <h2 id="servers">Servers</h2>
6
+ <div id="server-list">
7
+ <% servers.each do |server| %>
8
+ <% if server.description %>
9
+ <p><strong><%= server.description %></strong></p>
10
+ <% end %>
11
+ <a href="<%= server.url %>"><%= server.url %></a>
12
+ <% end %>
13
+ </div>
6
14
  <% end %>
15
+
7
16
  <%= paths %>
17
+
8
18
  <h2 id="schemas">Schemas</h2>
9
19
  <%= schemas %>
@@ -1,3 +1,3 @@
1
1
  module GovukTechDocs
2
- VERSION = "1.6.1".freeze
2
+ VERSION = "1.6.2".freeze
3
3
  end
@@ -29,7 +29,6 @@ module GovukTechDocs
29
29
  # @option options [Hash] livereload Options to pass to the `livereload`
30
30
  # extension. Hash with symbols as keys.
31
31
  def self.configure(context, options = {})
32
- context.activate :autoprefixer
33
32
  context.activate :sprockets
34
33
  context.activate :syntax
35
34
 
@@ -52,6 +51,7 @@ module GovukTechDocs
52
51
  end
53
52
 
54
53
  context.configure :build do
54
+ activate :autoprefixer
55
55
  activate :minify_css
56
56
  activate :minify_javascript
57
57
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_tech_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Government Digital Service
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-13 00:00:00.000000000 Z
11
+ date: 2018-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -276,6 +276,20 @@ dependencies:
276
276
  - - "~>"
277
277
  - !ruby/object:Gem::Version
278
278
  version: 3.7.0
279
+ - !ruby/object:Gem::Dependency
280
+ name: byebug
281
+ requirement: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - ">="
284
+ - !ruby/object:Gem::Version
285
+ version: '0'
286
+ type: :development
287
+ prerelease: false
288
+ version_requirements: !ruby/object:Gem::Requirement
289
+ requirements:
290
+ - - ">="
291
+ - !ruby/object:Gem::Version
292
+ version: '0'
279
293
  description: Gem to distribute the GOV.UK Tech Docs Template. See https://github.com/alphagov/tech-docs-gem
280
294
  for the project.
281
295
  email: