alexa_generator 0.3.0 → 0.3.1

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: df62fac43ca92e9a3c82c42a1fae04bd1feecc1a
4
- data.tar.gz: 89650a53d1d39eb8469beef10a1999e8a671ae96
3
+ metadata.gz: 99ce7ef9324a3916c4bcb74eeec1b951d08b9528
4
+ data.tar.gz: c90ada13a698c92ccb4d1b2d0b550de43ca15ce2
5
5
  SHA512:
6
- metadata.gz: 44a03f30c76b4f5c7d7085413e606ba77c3b1d4371c08c497d50270b8864e1362efdd8d8163e1dac80cec0c03042c662c841075ad5305efc97952f25bef7f479
7
- data.tar.gz: a515a2e4824e6d1d3ae968a0c59bf7dabbc454f440ea7f64f0bd08a5d124e85f2591a887463ce75004ff31f4d259f9959b0b879fcc7c2a3498b5faa3ac1bef57
6
+ metadata.gz: 871ce5c20db59cb50c4e585c04810f12ca56770fbebc60e91b93e72b01b1305c7b00b998538081e17114e0fa9fa8b8c22840064100c923dcca6c9676bfd3cfa9
7
+ data.tar.gz: b9c3c54b1c190e8616be539cfbd81cf7413ca61e0cfff925afaf58c7c9e08429ceff119e4f979235f6c00e68ead3a2ea2b6fc1e02387befb460937c67a9fc6e9
@@ -30,7 +30,7 @@ module AlexaGenerator
30
30
  def initialize(intents, utterance_templates, slot_bindings)
31
31
  # Validate that utterance templates reference only defined slots
32
32
  all_referenced_slots = utterance_templates.map(&:referenced_slots).flatten
33
- slot_names = Set.new(slot_bindings.map(&:slot_name))
33
+ slot_names = Set.new(intents.map(&:slots).flatten.map(&:name))
34
34
  undefined_slots = all_referenced_slots.reject { |x| slot_names.include?(x) }
35
35
 
36
36
  if undefined_slots.any?
@@ -1,3 +1,3 @@
1
1
  module AlexaGenerator
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -231,4 +231,15 @@ describe AlexaGenerator::InteractionModel do
231
231
  expect(type2_bindings).to contain_exactly(*%w(valueA))
232
232
  end
233
233
  end
234
+
235
+ context 'with slots not having bindings' do
236
+ it 'should work' do
237
+ model = AlexaGenerator::InteractionModel.build do |iface|
238
+ iface.add_intent(:IntentOne) do |intent|
239
+ intent.add_slot(:SlotOne, AlexaGenerator::Slot::SlotType::DURATION)
240
+ intent.add_utterance_template('do something for {SlotOne}')
241
+ end
242
+ end
243
+ end
244
+ end
234
245
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexa_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Mullins