charyf 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -0
- data/lib/charyf/engine/controller/actions.rb +2 -2
- data/lib/charyf/engine/controller/controller.rb +3 -1
- data/lib/charyf/engine/controller/renderers.rb +2 -2
- data/lib/charyf/engine/dispatcher/base.rb +1 -0
- data/lib/charyf/engine/interface/program.rb +1 -1
- data/lib/charyf/utils/utils.rb +3 -2
- 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: 7c18514711153530b6ec38086d043116a9fe43f4
|
4
|
+
data.tar.gz: bd3695d976533447bf9a1c822ccc9289c4ba4f07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e0e95b6362d59a34a67bf2eef0ed2d4de4de2042892ff6b7e9a8d599a42ba123028f7b1b4cd10b20b2e9fac19308530122e24060c01e1b2690bc050d1efd37c
|
7
|
+
data.tar.gz: 6704b0af876f06ba75609ef1e6c477f3377d47435f002769e0bb30cf6618c50c747299cfd814d5344333c204c4c7fe11030e379b7b891a17f0ff7ef1652876ab
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -22,3 +22,8 @@ To read more about roadmap continue to [Roadmap](https://github.com/Charyf/chary
|
|
22
22
|
To report an issue follow steps in [Reporting an issue](https://github.com/Charyf/charyf-core/wiki/Reporting-an-issue)
|
23
23
|
|
24
24
|
Continue to [wiki](https://github.com/Charyf/charyf-core/wiki)
|
25
|
+
|
26
|
+
|
27
|
+
***
|
28
|
+
|
29
|
+
The development process is currently on hold. The author has to finish his Master's thesis. :)
|
@@ -10,8 +10,8 @@ module Charyf
|
|
10
10
|
|
11
11
|
module ClassMethods
|
12
12
|
|
13
|
-
def before_action(method_name, only: [], except: [])
|
14
|
-
(@_before_actions ||= {})[method_name] = Charyf::Utils.create_action_filters(only, except)
|
13
|
+
def before_action(method_name, on_all = nil, only: [], except: [])
|
14
|
+
(@_before_actions ||= {})[method_name] = Charyf::Utils.create_action_filters(on_all, only, except)
|
15
15
|
end
|
16
16
|
|
17
17
|
def _before_actions(action)
|
@@ -16,8 +16,8 @@ module Charyf
|
|
16
16
|
|
17
17
|
module ClassMethods
|
18
18
|
|
19
|
-
def auto_reply(only: [], except: [])
|
20
|
-
@_render_filters = Charyf::Utils.create_action_filters(only, except)
|
19
|
+
def auto_reply(on_all = nil, only: [], except: [])
|
20
|
+
@_render_filters = Charyf::Utils.create_action_filters(on_all, only, except)
|
21
21
|
end
|
22
22
|
|
23
23
|
def _render_on?(action)
|
@@ -26,7 +26,7 @@ module Charyf
|
|
26
26
|
end
|
27
27
|
|
28
28
|
sig_self ['String', 'Charyf::Engine::Response'], nil,
|
29
|
-
def self.reply(conversation_id, response)
|
29
|
+
def self.reply(conversation_id, message_id, response)
|
30
30
|
interface = _interfaces[conversation_id]
|
31
31
|
raise InvalidConversationError.new("No program interface found for conversation #{conversation_id}") unless interface
|
32
32
|
|
data/lib/charyf/utils/utils.rb
CHANGED
@@ -38,13 +38,14 @@ module Charyf
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
|
42
|
-
def self.create_action_filters(only = [], except = [])
|
41
|
+
def self.create_action_filters(on_all = nil, only = [], except = [])
|
43
42
|
if only && only != :all && !only.empty? && except && !except.empty?
|
44
43
|
raise InvalidDefinitionError.new("Define only or except, don't define both");
|
45
44
|
end
|
46
45
|
|
47
46
|
_only = except && except.empty? ? only.map(&:to_sym) : :all
|
47
|
+
|
48
|
+
_only = :all if on_all == :all
|
48
49
|
_except = except.map(&:to_sym)
|
49
50
|
|
50
51
|
{
|
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.9
|
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-
|
11
|
+
date: 2018-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: charyf_sig
|