ruby-swagger 0.0.1 → 0.0.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: 6d94ab24421b81598d6242602e17f2cefaf039d6
4
- data.tar.gz: a7656dc9e774420f7a063d25cff63715bce4ca42
3
+ metadata.gz: 1e4ac438167f5b6401c7c05f95d8e5649be30d22
4
+ data.tar.gz: 1b62b58a496e0f9b1d5a4aaaa34e6c8b0f671f8f
5
5
  SHA512:
6
- metadata.gz: e2677461caa8dacfcc5d68f4fef90e1dc78ba1188207e462067b078e94a629113d3ad2ff9cdbca8b522b6c11d2591378c607e731b395821930b5fae01b829101
7
- data.tar.gz: 4dac18bf044a8dcc43caf9a94a5bb5c9e0484428fbf84ebc7172303e185fe9dd1f1dc0b227118a5900e676ac8917bc80813f989d04f2f6d43db8fea800dec021
6
+ metadata.gz: 73ec4b5357e64a3b16ccc7a1a84c3333ca52bc97045e3a7c9e72c92b2a4d82f8796a7a52e00403efe9545ac76bba06979d62ae96a54f97e853c9a6d3b0092def
7
+ data.tar.gz: a5f03988bb34dcbdb044174a2029c563407069cc4b1cbd27b4f8708974b0a2ba0993e7df38a1d8cc6e46bbd8b05648c5eb4533d47f5139cb9bfafd7b563fd683
@@ -24,7 +24,7 @@ module Swagger::IO
24
24
  end
25
25
 
26
26
  def self.read_file(name)
27
- YAML::load_file(@@default_path + '/' + name)
27
+ YAML.load(ERB.new(File.read(@@default_path + '/' + name)).result)
28
28
  end
29
29
 
30
30
  def self.write_file(content, location, overwrite = false)
@@ -68,11 +68,11 @@ module Swagger::IO
68
68
  end
69
69
 
70
70
  def self.read
71
- doc = YAML::load_file("#{default_path}/base_doc.yml")
71
+ doc = read_file('base_doc.yml')
72
72
 
73
73
  DOC_SUBPARTS.each do |doc_part|
74
- file_path = "#{default_path}/#{doc_part}.yml"
75
- doc[doc_part] = YAML::load_file(file_path) if File.exists?(file_path)
74
+ file_name = "#{doc_part}.yml"
75
+ doc[doc_part] = read_file(file_name) if File.exist?("#{default_path}/#{file_name}")
76
76
  end
77
77
 
78
78
  doc['paths'] = Swagger::IO::Paths.read_paths
@@ -94,4 +94,4 @@ module Swagger::IO
94
94
  end
95
95
 
96
96
  end
97
- end
97
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-swagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Bonmassar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-28 00:00:00.000000000 Z
11
+ date: 2015-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable