charyf 0.2.6 → 0.2.7
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/charyf/utils/app_engine.rb +1 -1
- data/lib/charyf/utils/application/configuration.rb +5 -0
- data/lib/charyf/utils/application.rb +10 -0
- data/lib/charyf/utils/generators/app/templates/config/application.rb.tt +5 -2
- data/lib/charyf/utils/generators/app/templates/config/environments/development.rb.tt +6 -0
- data/lib/charyf/utils/generators/app/templates/config/environments/production.rb.tt +6 -0
- data/lib/charyf/utils/generators/app/templates/config/environments/test.rb.tt +6 -0
- data/lib/charyf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f336e5499d3b8ba1c98487ff346af2546a372e0e
|
|
4
|
+
data.tar.gz: 45664cb770c6af8da8c91ee9f82637680041da9a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e86ec3feae3fe2ec2c2b349346b7f0abcadbf7e88f67e6211e85a29c379a6edb467ab07822a7361876463c09addc4584a50d08188f182e212af653fd38543aef
|
|
7
|
+
data.tar.gz: d7432ab641ff21c4a490004ee7e6a26869b3aa25bedc0631b0a462ae78c292b982c1f3495c4aee46466bd6e72cd5795311c70a188cc5a0d660edb9f5cbbd2707
|
data/Gemfile.lock
CHANGED
|
@@ -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
|
data/lib/charyf/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2018-04-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: charyf_sig
|