active_act 0.1.3 → 0.1.4

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: 58a16343df10db3561829ff8e63e168cb641198f3e166b44d1f5d8f9d3eb06b4
4
- data.tar.gz: e9d05dadf20bb9206c6fc55f58d443a048066504747f6c30b7c52e13375c1cc7
3
+ metadata.gz: 22022f1f6aaee5a5548c7c72be37583baf9d0349c74cdba06c01c9e804024a69
4
+ data.tar.gz: 8047c8e3dc136437d3cf1a5c5aac75e68802bad1aee72695b09c16b7a3cb8f30
5
5
  SHA512:
6
- metadata.gz: c99bf11116b0540146b3e3a56ed3778e47595e98e5faec3032d4511a6c8f58a53a2eedfee689f9c008d79fcbac600f2a986169ecb4a70ca4660c4c2355ee0e9a
7
- data.tar.gz: 0d4a4adfe97ad70d3d6bbb645d1b6ee389ac4eea2f3a50f2ef7272f3958b54748b2413d90ee4a063a4dde9e46d4d460700bf4e9bb83b53b45d1a47ea29b69f6b
6
+ metadata.gz: 857659348f5b1aa080f594d44f12a4bb82f0fcb74410d09558764af42fc3b259059435f318ed9ab1fc335a114e157a498b74136f47accf28eae2af2663cea202
7
+ data.tar.gz: 96622dbd854bdd13b4e2d1f19cf6f7731258d92e474e6dfcd8220422d94aeb1bf29d8f036f5907bc82ecdf3dc81328ec5ba5d4f3966e58e28d3b7c7ecab34de7
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveAct
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
@@ -0,0 +1,15 @@
1
+ require "rails/generators/named_base"
2
+
3
+ module ActiveAct
4
+ module Generators
5
+ class ActionGenerator < Rails::Generators::NamedBase
6
+ source_root File.expand_path("templates", __dir__)
7
+
8
+ desc "Creates a new action inheriting from ActiveAct::ApplicationAction."
9
+
10
+ def create_action_file
11
+ template "action.rb.tt", File.join("app/actions", class_path, "#{file_name}.rb")
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ class <%= class_name %> < ActiveAct::ApplicationAction
4
+ # Uncomment and customize the initializer if needed
5
+ # def initialize(args)
6
+ # @args = args
7
+ # end
8
+
9
+ def call
10
+ # Implement your business logic here
11
+ raise NotImplementedError, "You must implement the #call method in <%= class_name %>"
12
+ end
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_act
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magdiel Cardoso
@@ -29,6 +29,8 @@ files:
29
29
  - lib/active_act/application_action.rb
30
30
  - lib/active_act/engine.rb
31
31
  - lib/active_act/version.rb
32
+ - lib/generators/active_act/action/action_generator.rb
33
+ - lib/generators/active_act/action/templates/action.rb.tt
32
34
  - lib/generators/active_act/install/install_generator.rb
33
35
  - lib/generators/active_act/install/templates/active_act.rb
34
36
  - lib/generators/active_act/install/templates/application_action.rb