activeagent 0.6.1 → 0.6.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8475fe522b442fb683dbc78e68cb2c6e7e019377f935b01fd2d74400d9674279
|
4
|
+
data.tar.gz: 8fcc5a18f483f71f45615e4eb8faa413525289e501babe429c16ad2a97957daa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c70f41a2deee2a09f83ed7df13482564990ba530c25f01c20a9f59620400411b6739fe2881e03e9c9a8837d3b5fc829b4aa183776e2162ecd3eec37e95f0ecbc
|
7
|
+
data.tar.gz: 359415436f53ffba906804c82aaa8b28a468dcb0aafba6fa475f9af0150bc42df8c9c3fa8f9b725d00487adce936b9024b4abe52cb68dad8b2d15906238793df
|
data/lib/active_agent/version.rb
CHANGED
@@ -9,6 +9,14 @@ module ActiveAgent
|
|
9
9
|
|
10
10
|
check_class_collision suffix: "Agent"
|
11
11
|
|
12
|
+
def initialize(*args, **kwargs)
|
13
|
+
super(*args, **kwargs)
|
14
|
+
|
15
|
+
# We must duplicate due to immutable hash
|
16
|
+
dup_options = options.dup
|
17
|
+
@options = dup_options.merge(template_engine: :erb)
|
18
|
+
end
|
19
|
+
|
12
20
|
def create_agent_file
|
13
21
|
template "agent.rb", File.join("app/agents", class_path, "#{file_name}_agent.rb")
|
14
22
|
|
@@ -6,6 +6,14 @@ module ActiveAgent
|
|
6
6
|
class_option :skip_config, type: :boolean, default: false, desc: "Skip configuration file generation"
|
7
7
|
class_option :formats, type: :array, default: [ "text" ], desc: "Specify formats to generate (text, html, json)"
|
8
8
|
|
9
|
+
def initialize(*args, **kwargs)
|
10
|
+
super(*args, **kwargs)
|
11
|
+
|
12
|
+
# We must duplicate due to immutable hash
|
13
|
+
dup_options = options.dup
|
14
|
+
@options = dup_options.merge(template_engine: :erb)
|
15
|
+
end
|
16
|
+
|
9
17
|
def self.usage_path
|
10
18
|
@usage_path ||= File.expand_path("../USAGE", __dir__)
|
11
19
|
end
|
@@ -26,6 +34,7 @@ module ActiveAgent
|
|
26
34
|
hook_for :template_engine
|
27
35
|
|
28
36
|
private
|
37
|
+
|
29
38
|
def formats
|
30
39
|
options[:formats].map(&:to_sym)
|
31
40
|
end
|
@@ -9,6 +9,14 @@ module Erb # :nodoc:
|
|
9
9
|
argument :actions, type: :array, default: [], banner: "method method"
|
10
10
|
class_option :formats, type: :array, default: [ "text" ], desc: "Specify formats to generate (text, html, json)"
|
11
11
|
|
12
|
+
def initialize(*args, **kwargs)
|
13
|
+
super(*args, **kwargs)
|
14
|
+
|
15
|
+
# We must duplicate due to immutable hash
|
16
|
+
dup_options = options.dup
|
17
|
+
@options = dup_options.merge(template_engine: :erb)
|
18
|
+
end
|
19
|
+
|
12
20
|
def copy_view_files
|
13
21
|
view_base_path = File.join("app/views", class_path, file_name + "_agent")
|
14
22
|
empty_directory view_base_path
|
@@ -6,6 +6,14 @@ module Erb # :nodoc:
|
|
6
6
|
source_root File.expand_path("templates", __dir__)
|
7
7
|
class_option :formats, type: :array, default: [ "text" ], desc: "Specify formats to generate (text, html, json)"
|
8
8
|
|
9
|
+
def initialize(*args, **kwargs)
|
10
|
+
super(*args, **kwargs)
|
11
|
+
|
12
|
+
# We must duplicate due to immutable hash
|
13
|
+
dup_options = options.dup
|
14
|
+
@options = dup_options.merge(template_engine: :erb)
|
15
|
+
end
|
16
|
+
|
9
17
|
def create_agent_layouts
|
10
18
|
if behavior == :invoke
|
11
19
|
formats.each do |format|
|