alexa_generator 0.1.0 → 0.1.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: 650a7b5cb37d30de5a4feb18846c71ce321fa48e
4
- data.tar.gz: c9b7b88fcd63212a071b6b770241cddf5bd87365
3
+ metadata.gz: 95714b270aa9dfa94bdaf3804000a38200a89003
4
+ data.tar.gz: ab78ce1ab42d021cffee7eb1351da3476d66c164
5
5
  SHA512:
6
- metadata.gz: 5fa2035fe237d45fe6168855a4c0b2c3034a180d5ea42196b27fb2a69dab9c3171ac8e4a4c8bd3088a2e6214671cb88283a93f20e2a5ecb9d249ec449cc90e99
7
- data.tar.gz: d3f16acdef5a3cf0c0c5b8f927aa1b572bad896c7ffa5e5ab6c2551dbb863b47ccafd49e257ea7666b0f78cf4b153bb2810b82c17651b21c077bbb304526f049
6
+ metadata.gz: b057be5889006152bafea85083c142bdf89bfa2ab2ff59731843620828653973e25178993acab399349691d40f0569506a5fa6962ce44149b9fb90c528224ed9
7
+ data.tar.gz: 489d2b018e6605b7ad7d64e06b8f5af47f10ea45691394cb40348b0e1be36a7d3db9e3ba6b254b982f30761a0d043962bf10b8e8680ccf8ebe001326728881e2
@@ -5,7 +5,7 @@ require 'alexa_generator/slot_binding'
5
5
  require 'set'
6
6
 
7
7
  module AlexaGenerator
8
- class VoiceInterface
8
+ class InteractionModel
9
9
  attr_reader :intents
10
10
 
11
11
  class Builder
@@ -23,7 +23,7 @@ module AlexaGenerator
23
23
  end
24
24
 
25
25
  def create
26
- VoiceInterface.new(@intents, @utterance_templates, @bindings)
26
+ InteractionModel.new(@intents, @utterance_templates, @bindings)
27
27
  end
28
28
  end
29
29
 
@@ -1,3 +1,3 @@
1
1
  module AlexaGenerator
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -1,2 +1,2 @@
1
- require 'alexa_generator/voice_interface'
1
+ require 'alexa_generator/interaction_model'
2
2
  require 'alexa_generator/version'
@@ -1,10 +1,10 @@
1
1
  require 'spec_helper'
2
2
  require 'json'
3
3
 
4
- describe AlexaGenerator::VoiceInterface do
4
+ describe AlexaGenerator::InteractionModel do
5
5
  context 'builder' do
6
6
  it 'should build a valid voice interface' do
7
- iface = AlexaGenerator::VoiceInterface.build do |iface|
7
+ iface = AlexaGenerator::InteractionModel.build do |iface|
8
8
  iface.add_intent(:IntentOne) do |intent|
9
9
  intent.add_slot(:SlotOne, AlexaGenerator::Slot::SlotType::LITERAL) do |slot|
10
10
  slot.add_binding('value1')
@@ -14,7 +14,7 @@ describe AlexaGenerator::VoiceInterface do
14
14
  end
15
15
  end
16
16
 
17
- expect(iface).to be_an_instance_of(AlexaGenerator::VoiceInterface)
17
+ expect(iface).to be_an_instance_of(AlexaGenerator::InteractionModel)
18
18
  expect(iface.intent_schema).to eq(
19
19
  {
20
20
  intents: [
@@ -32,7 +32,7 @@ describe AlexaGenerator::VoiceInterface do
32
32
  end
33
33
 
34
34
  it 'should produce bound utterances' do
35
- iface = AlexaGenerator::VoiceInterface.build do |iface|
35
+ iface = AlexaGenerator::InteractionModel.build do |iface|
36
36
  iface.add_intent(:MyIntent) do |intent|
37
37
  intent.add_slot(:SlotOne, AlexaGenerator::Slot::SlotType::LITERAL) do |slot|
38
38
  slot.add_binding('make me a sandwich')
@@ -75,7 +75,7 @@ describe AlexaGenerator::VoiceInterface do
75
75
  slot_bindings = []
76
76
 
77
77
  it 'should produce utterances' do
78
- actual = AlexaGenerator::VoiceInterface.new(intents, utterance_templates, slot_bindings).sample_utterances(:MyIntent)
78
+ actual = AlexaGenerator::InteractionModel.new(intents, utterance_templates, slot_bindings).sample_utterances(:MyIntent)
79
79
  expected = [ "#{utterance_templates.first.intent_name} #{utterance_templates.first.template}" ]
80
80
 
81
81
  expect(actual).to eq(expected)
@@ -97,7 +97,7 @@ describe AlexaGenerator::VoiceInterface do
97
97
  ]
98
98
 
99
99
  it 'should produce bound utterances' do
100
- actual = AlexaGenerator::VoiceInterface.new(intents, utterance_templates, slot_bindings).sample_utterances(:MyIntent)
100
+ actual = AlexaGenerator::InteractionModel.new(intents, utterance_templates, slot_bindings).sample_utterances(:MyIntent)
101
101
 
102
102
  expect(actual.count).to eq(slot_bindings.count)
103
103
  expect(actual).to include('MyIntent Alexa, please {make me a sandwich|SlotOne}')
@@ -130,7 +130,7 @@ describe AlexaGenerator::VoiceInterface do
130
130
  ]
131
131
 
132
132
  it 'should produce bound utterances' do
133
- actual = AlexaGenerator::VoiceInterface.new(intents, utterance_templates, slot_bindings).sample_utterances(:MyIntent)
133
+ actual = AlexaGenerator::InteractionModel.new(intents, utterance_templates, slot_bindings).sample_utterances(:MyIntent)
134
134
 
135
135
  expect(actual.count).to eq(8)
136
136
  expect(actual).to include('MyIntent Alexa, please {fix my motorcycle|SlotOne} {one|SlotTwo} at {noon|SlotThree}')
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.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Mullins
@@ -53,15 +53,15 @@ files:
53
53
  - lib/alexa_generator.rb
54
54
  - lib/alexa_generator/intent.rb
55
55
  - lib/alexa_generator/intent_schema.rb
56
+ - lib/alexa_generator/interaction_model.rb
56
57
  - lib/alexa_generator/sample_utterance_template.rb
57
58
  - lib/alexa_generator/slot.rb
58
59
  - lib/alexa_generator/slot_binding.rb
59
60
  - lib/alexa_generator/version.rb
60
- - lib/alexa_generator/voice_interface.rb
61
61
  - spec/alexa_generator/intent_spec.rb
62
+ - spec/alexa_generator/interaction_model_spec.rb
62
63
  - spec/alexa_generator/sample_utterance_template_spec.rb
63
64
  - spec/alexa_generator/slot_spec.rb
64
- - spec/alexa_generator/voice_interface_spec.rb
65
65
  - spec/spec_helper.rb
66
66
  homepage: http://github.com/sidoh/alexa_generator
67
67
  licenses: []