nexmo_api_specification 0.1.2 → 0.1.3

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: ce4c29efbf7317e8bd615b119dbfebdb322a012b
4
- data.tar.gz: e573dc3bab14927ff7df0ef9e56bcd23f0960740
3
+ metadata.gz: dadfb662ccca53136d5633ccf5103d55a2dfd2df
4
+ data.tar.gz: ddb4598412e3f676ef19927bb29213a8e7d2399f
5
5
  SHA512:
6
- metadata.gz: 7bffbb96880bf25cb7b5ace8be585a43c9de1c9e3a6b2e245d8a964a377b6e9d45d67c79b6acc0d835104e27f9f71f26a5b36007d8792cbcbc3006329a95d314
7
- data.tar.gz: 165fac5f5b36286eced7bf6be50575a3847d098c1e98e468c2d32fc58be60123f3b808a7232d6b1dd4d4f0c64cebfe3b3a1a6da603711441d4a1e1714b2b571b
6
+ metadata.gz: df673e9af6e55ce517e6003d55c0c9f89791a0ca788e10a2e94590c6f1755ed8dc7593af90e64071b5ef08edd51ec97ff1e57309b4497bb5e25b23fc9f969007
7
+ data.tar.gz: dc63c24a5c5207d3d8a25e7f7bebc878ab360acc4d8590408a80f4554c4741d7857d40c7842fa699b48c5ccd86c2697aafec77d632fa3b04d1bf16ff0b890e49
@@ -1,13 +1,20 @@
1
1
  module NexmoApiSpecification
2
2
  module Definition
3
3
  def self.load(definition)
4
- path = File.join NexmoApiSpecification.root, "#{definition}.yml"
5
- return false unless File.exist? path
6
- File.read path
4
+ return false unless exists?(definition)
5
+ File.read(path(definition))
7
6
  end
8
7
 
9
8
  def self.load!(definition)
10
9
  load(definition) || raise('Definition does not exist')
11
10
  end
11
+
12
+ def self.path(definition)
13
+ File.join NexmoApiSpecification.root, "#{definition}.yml"
14
+ end
15
+
16
+ def self.exists?(definition)
17
+ File.exist? path(definition)
18
+ end
12
19
  end
13
20
  end
@@ -1,3 +1,3 @@
1
1
  module NexmoApiSpecification
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexmo_api_specification
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Butler