inventory-server 0.0.6 → 0.0.7

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: 84d72e786ae3173c439ccb24170aa15e3a16bf0d
4
- data.tar.gz: ad4c6d4b89247e08e5ce89b8f3d64e329223fddd
3
+ metadata.gz: aa2af8dd9d05ac5a2cca7365f5fa6c4c7e8bd67e
4
+ data.tar.gz: 89cfb258d7c89e880e36fe0cfae9bf88e0808f63
5
5
  SHA512:
6
- metadata.gz: d91e3d181aa1e25a39609a04e6fbe83976df36002da60de6b8745e0e3dbd27c16da6621cbb2afdfac8128e12ef57b500e30b9c52831abb59b725b2aaf374c496
7
- data.tar.gz: 50a189ca44fd4d93d903d6a58e9a8042ecb27c7367570bfd4be5102756e947b2a403e22052fc4923474f1f31d9c0f8c2cb29caefa7488ea8fd6f075c5234f10f
6
+ metadata.gz: 1996bd0a71360d16ed1f51b4f2780032741d8205b97b0854b94f9691a05c741eccb491c7d4468571b5ebd3ef3dacd2d5da6997cee46a94e5a4cc962ee98799db
7
+ data.tar.gz: 9c5427c47051827e4a4c9ef3250f3770359be8e282915cd85d61b8d1695cebd8d23241a25da23751b6f793ae2b9af8c68c476da7f1beef5e0be3ede4741b00dd
@@ -1,5 +1,5 @@
1
1
  module Inventory
2
2
  module Server
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ module Inventory
19
19
  version = facts[@config[:version_key]] || @config[:version_default]
20
20
 
21
21
  schema_type_file = File.join @config[:json_schema_dir], "#{type}.json"
22
- schema_version_file = File.join @config[:json_schema_dir], type, "#{version}.json"
22
+ schema_version_file = File.join @config[:json_schema_dir], type.to_s, "#{version}.json"
23
23
 
24
24
  if File.file? schema_type_file
25
25
  InventoryLogger.logger.info "Use JSON Schema #{schema_type_file}"
@@ -29,6 +29,14 @@ RSpec.describe Inventory::Server::JsonSchemaValidator, '#call' do
29
29
  end
30
30
  end
31
31
 
32
+ context "with type and version integer" do
33
+ env = { :facts => { 'key' => 'value', 'type' => 1, 'version' => 1.0} }
34
+ it "should pass" do
35
+ result = Inventory::Server::JsonSchemaValidator.new(noop, config).call(env)
36
+ expect(result).to eq 42
37
+ end
38
+ end
39
+
32
40
  context "with facts" do
33
41
  env = { :facts => { 'key' => 'value', 'type' => 'my_fact', 'version' => 'my_version' } }
34
42
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inventory-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filirom1