charyf 0.2.6 → 0.2.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: 85268dbf6cc1d03b50cd87fb6d04c07fb618103e
4
- data.tar.gz: 5c5e9fb065243a0baa7066c59c6d5cd475322d90
3
+ metadata.gz: f336e5499d3b8ba1c98487ff346af2546a372e0e
4
+ data.tar.gz: 45664cb770c6af8da8c91ee9f82637680041da9a
5
5
  SHA512:
6
- metadata.gz: 836bbf92eeb0cd151cee5cee6d2954849bd70d7e3f905f24c7fdb3ea585f069dfd85e5b14dba6b4fa2ec535edfe83430cac62a10591c14ba7cd475844a7e2e3f
7
- data.tar.gz: ac7f674be428d48b48720ba5dd04d5284aac5e26c3a90db0ad1afd4bd5158bfea06631c0c9cddc2f5662b28239df1d5ad5e8bf82610f9bc432d59ad0af7fa121
6
+ metadata.gz: e86ec3feae3fe2ec2c2b349346b7f0abcadbf7e88f67e6211e85a29c379a6edb467ab07822a7361876463c09addc4584a50d08188f182e212af653fd38543aef
7
+ data.tar.gz: d7432ab641ff21c4a490004ee7e6a26869b3aa25bedc0631b0a462ae78c292b982c1f3495c4aee46466bd6e72cd5795311c70a188cc5a0d660edb9f5cbbd2707
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- charyf (0.2.6)
4
+ charyf (0.2.7)
5
5
  charyf_sig (~> 1.1.2)
6
6
  colorize (~> 0.8)
7
7
  i18n (~> 0.9)
@@ -21,7 +21,7 @@ module Charyf
21
21
  end
22
22
 
23
23
  def start_interfaces
24
- Charyf::Interface.known.map(&:start)
24
+ Charyf.application.interfaces.map(&:start)
25
25
  end
26
26
 
27
27
  def start_pipeline
@@ -11,6 +11,7 @@ module Charyf
11
11
 
12
12
  attr_accessor :session_processor, :storage_provider, :dispatcher, :router
13
13
  attr_accessor :enabled_intent_processors
14
+ attr_accessor :enabled_interfaces
14
15
 
15
16
  def initialize(root)
16
17
 
@@ -42,6 +43,10 @@ module Charyf
42
43
  (@enabled_intent_processors || []).map(&:to_sym)
43
44
  end
44
45
 
46
+ def enabled_interfaces
47
+ (@enabled_interfaces || []).map(&:to_sym)
48
+ end
49
+
45
50
  def storage_provider
46
51
  @storage_provider ? @storage_provider.to_sym : nil
47
52
  end
@@ -87,6 +87,16 @@ module Charyf
87
87
  klasses
88
88
  end
89
89
 
90
+ def interfaces
91
+ # TODO resolve dependency on engine - maybe move the base classes to utils?
92
+ config.enabled_interfaces.map do |interface_name|
93
+ klass = Charyf::Interface.list[interface_name]
94
+ raise Charyf::Utils::InvalidConfiguration.new("No interface with name '#{interface_name}' found") unless klass
95
+
96
+ klass
97
+ end
98
+ end
99
+
90
100
  def dispatcher
91
101
  # TODO resolve dependency on engine - maybe move the base classes to utils?
92
102
  klass = Charyf::Engine::Dispatcher.list[config.dispatcher]
@@ -15,10 +15,13 @@ module <%= app_const_base %>
15
15
  config.i18n.default_locale = :en
16
16
 
17
17
  # Processor
18
- config.enabled_intent_processors = <%= intents_details.keys -%>
18
+ config.enabled_intent_processors = <%= intents_details.keys %>
19
+
20
+ # Interfaces
21
+ config.enabled_interfaces = []
19
22
 
20
23
  # Storage
21
- config.storage_provider = :<%= options[:storage_provider] -%>
24
+ config.storage_provider = :<%= options[:storage_provider] %>
22
25
 
23
26
  # Dispatcher
24
27
  # No other supported dispatchers now
@@ -1,2 +1,8 @@
1
1
  Charyf.application.configure do
2
+ # You can override here any configuration set in config/application.rb
3
+ #
4
+ # Example: To change memory provider for this environment
5
+ # set
6
+ #
7
+ # config.storage_provider = :some_other_provider
2
8
  end
@@ -1,2 +1,8 @@
1
1
  Charyf.application.configure do
2
+ # You can override here any configuration set in config/application.rb
3
+ #
4
+ # Example: To change memory provider for this environment
5
+ # set
6
+ #
7
+ # config.storage_provider = :some_other_provider
2
8
  end
@@ -1,2 +1,8 @@
1
1
  Charyf.application.configure do
2
+ # You can override here any configuration set in config/application.rb
3
+ #
4
+ # Example: To change memory provider for this environment
5
+ # set
6
+ #
7
+ # config.storage_provider = :some_other_provider
2
8
  end
@@ -11,7 +11,7 @@ module Charyf
11
11
  module VERSION
12
12
  MAJOR = 0
13
13
  MINOR = 2
14
- TINY = 6
14
+ TINY = 7
15
15
  PRE = nil
16
16
 
17
17
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: charyf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Ludvigh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-14 00:00:00.000000000 Z
11
+ date: 2018-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: charyf_sig