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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22022f1f6aaee5a5548c7c72be37583baf9d0349c74cdba06c01c9e804024a69
|
4
|
+
data.tar.gz: 8047c8e3dc136437d3cf1a5c5aac75e68802bad1aee72695b09c16b7a3cb8f30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 857659348f5b1aa080f594d44f12a4bb82f0fcb74410d09558764af42fc3b259059435f318ed9ab1fc335a114e157a498b74136f47accf28eae2af2663cea202
|
7
|
+
data.tar.gz: 96622dbd854bdd13b4e2d1f19cf6f7731258d92e474e6dfcd8220422d94aeb1bf29d8f036f5907bc82ecdf3dc81328ec5ba5d4f3966e58e28d3b7c7ecab34de7
|
data/lib/active_act/version.rb
CHANGED
@@ -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.
|
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
|