axn 0.1.0.pre.alpha.1

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.
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Axn
4
+ VERSION = "0.1.0-alpha.1"
5
+ end
data/lib/axn.rb ADDED
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Axn; end
4
+ require_relative "axn/version"
5
+
6
+ require "interactor"
7
+
8
+ require "active_support"
9
+
10
+ require_relative "action/exceptions"
11
+ require_relative "action/logging"
12
+ require_relative "action/configuration"
13
+ require_relative "action/top_level_around_hook"
14
+ require_relative "action/contract"
15
+ require_relative "action/swallow_exceptions"
16
+ require_relative "action/hoist_errors"
17
+
18
+ require_relative "action/organizer"
19
+ require_relative "action/enqueueable"
20
+
21
+ module Action
22
+ def self.included(base)
23
+ base.class_eval do
24
+ include Interactor
25
+
26
+ # Include first so other modules can assume `log` is available
27
+ include Logging
28
+
29
+ # NOTE: include before any others that set hooks (like contract validation), so we
30
+ # can include those hook executions in any traces set from this hook.
31
+ include TopLevelAroundHook
32
+
33
+ include Contract
34
+ include SwallowExceptions
35
+
36
+ include HoistErrors
37
+
38
+ include Enqueueable
39
+
40
+ # Allow additional automatic includes to be configured
41
+ Array(Action.config.additional_includes).each { |mod| include mod }
42
+
43
+ # ----
44
+
45
+ # ALPHA: Everything below here is to support inheritance
46
+
47
+ base.define_singleton_method(:inherited) do |base_klass|
48
+ return super(base_klass) if Interactor::Hooks::ClassMethods.private_method_defined?(:ancestor_hooks)
49
+
50
+ raise StepsRequiredForInheritanceSupportError
51
+ end
52
+ end
53
+ end
54
+ end
data/package.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "devDependencies": {
3
+ "vitepress": "^1.6.3"
4
+ },
5
+ "scripts": {
6
+ "docs:dev": "vitepress dev docs",
7
+ "docs:build": "vitepress build docs",
8
+ "docs:preview": "vitepress preview docs"
9
+ }
10
+ }