swaggard 0.2.1 → 0.3.0

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: 24e47db7c99a60f14f7334500350a810e300f2a8
4
- data.tar.gz: 2f52e42bb47863170511fd0cd037f87cac32e403
3
+ metadata.gz: db45ce4a5e5632d71b6713c8a082c69850ef530c
4
+ data.tar.gz: bfded1a0de338077a3fb2c6f918a70006f9a64ac
5
5
  SHA512:
6
- metadata.gz: 7827e98f7bf3ff42c00068a9b809e34bed18444fb1f0b5bdd0b1262e900c536fdbfef1c1ce4165a9f13e7aa10009ddb1f5804c006a3d015e1b2d07df983e76d9
7
- data.tar.gz: 64eb703c895231ec53ccb4d906252354f2743f57490a7ee5cc2a61b7f1cbb7b1aaff3ee8a32cb4f0fc3adcf1f587faee7ba92aefd24721906a4e9e7b4dab2ca2
6
+ metadata.gz: 267d4b741a6b97cdbc3f619025ad4d7096ed928d0ccf9cab042d5d17609fd4a7bb2f8f443e6f7c1ae79e1b429ae688be160cb3202c0b83c9ef64a600c82740b2
7
+ data.tar.gz: d7755a6bf7d351abca02611b06f82a0286b46c8f74fedf4f94493e48f5efde71a7cb2521fbbc83ae741f7aba6203d593966c4d4430f6458b7f9e9b6719135968
@@ -1,3 +1,5 @@
1
+ //= depend_on_asset 'swaggard/throbber.gif'
2
+
1
3
  /* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */
2
4
  .swagger-section pre code {
3
5
  display: block;
@@ -1,3 +1,7 @@
1
+ //= depend_on_asset 'swaggard/throbber.gif'
2
+ //= depend_on_asset 'swaggard/explorer_icons.png'
3
+ //= depend_on_asset 'swaggard/logo_small.png'
4
+
1
5
  /* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */
2
6
  .swagger-section pre code {
3
7
  display: block;
@@ -1,3 +1,12 @@
1
+ //= depend_on_asset 'swaggard/droid-sans-v6-latin-regular.eot'
2
+ //= depend_on_asset 'swaggard/droid-sans-v6-latin-regular.woff2'
3
+ //= depend_on_asset 'swaggard/droid-sans-v6-latin-regular.ttf'
4
+ //= depend_on_asset 'swaggard/droid-sans-v6-latin-regular.svg'
5
+ //= depend_on_asset 'swaggard/droid-sans-v6-latin-700.eot'
6
+ //= depend_on_asset 'swaggard/droid-sans-v6-latin-700.woff2'
7
+ //= depend_on_asset 'swaggard/droid-sans-v6-latin-700.ttf'
8
+ //= depend_on_asset 'swaggard/droid-sans-v6-latin-700.svg'
9
+
1
10
  /* droid-sans-regular - latin */
2
11
  @font-face {
3
12
  font-family: 'Droid Sans';
@@ -14,9 +14,7 @@ module Swaggard
14
14
  end
15
15
 
16
16
  format.json do
17
- doc = get_swaggard_doc
18
-
19
- render json: doc
17
+ render json: get_swaggard_doc_json
20
18
  end
21
19
  end
22
20
  end
@@ -31,16 +29,16 @@ module Swaggard
31
29
  end
32
30
  end
33
31
 
34
- def get_swaggard_doc
32
+ def get_swaggard_doc_json
35
33
  if Swaggard.configuration.use_cache
36
- doc = Rails.cache.fetch('swagger_doc')
37
- if doc.blank?
38
- doc = Swaggard.get_doc(request.host_with_port)
39
- Rails.cache.write('swagger_doc', doc)
34
+ doc_json = Rails.cache.fetch('swaggard_doc_json')
35
+ if doc_json.blank?
36
+ doc_json = Swaggard.get_doc(request.host_with_port).to_json
37
+ Rails.cache.write('swaggard_doc_json', doc_json)
40
38
  end
41
- doc
39
+ doc_json
42
40
  else
43
- Swaggard.get_doc(request.host_with_port)
41
+ Swaggard.get_doc(request.host_with_port).to_json
44
42
  end
45
43
  end
46
44
 
@@ -1,5 +1,5 @@
1
1
  module Swaggard
2
2
 
3
- VERSION = '0.2.1'
3
+ VERSION = '0.3.0'
4
4
 
5
5
  end
@@ -2,7 +2,7 @@ namespace :swaggard do
2
2
 
3
3
  desc 'Clear swaggard cache'
4
4
  task :clear_cache => :environment do
5
- Rails.cache.delete('swagger_doc')
5
+ Rails.cache.delete('swaggard_doc_json')
6
6
  puts 'Swaggard cache has been cleared'
7
7
  end
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swaggard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Gomez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-11 00:00:00.000000000 Z
11
+ date: 2016-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails