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: 974e983d62e399bd41c40a34fc0869730d157a8361d74236e327b9aea7cd05e2
4
- data.tar.gz: 827c43ed21428ddc4138ecb8465af4265d432fbe3b3ca666f46f1b92b3598a44
3
+ metadata.gz: 8475fe522b442fb683dbc78e68cb2c6e7e019377f935b01fd2d74400d9674279
4
+ data.tar.gz: 8fcc5a18f483f71f45615e4eb8faa413525289e501babe429c16ad2a97957daa
5
5
  SHA512:
6
- metadata.gz: 7ede550eb0aae62274dd13b631f862f202b172bb6ba40f837358bac71cc58760edc444722bc5a0aea747760b6317cf33630754992866fdc439a8263c1b670c03
7
- data.tar.gz: 80671e11f47c81ef591ed496c9a1ee126f32762d588787d3cd15a79eaf229f7da0b1c8e69cedfbd33509df92030a399ae2faaa5c346f9cf1cbedfdc25ee80819
6
+ metadata.gz: c70f41a2deee2a09f83ed7df13482564990ba530c25f01c20a9f59620400411b6739fe2881e03e9c9a8837d3b5fc829b4aa183776e2162ecd3eec37e95f0ecbc
7
+ data.tar.gz: 359415436f53ffba906804c82aaa8b28a468dcb0aafba6fa475f9af0150bc42df8c9c3fa8f9b725d00487adce936b9024b4abe52cb68dad8b2d15906238793df
@@ -1,3 +1,3 @@
1
1
  module ActiveAgent
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
@@ -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|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeagent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Bowen