rulezilla 0.4.9 → 0.4.11
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 +4 -4
- data/lib/rulezilla/dsl.rb +18 -8
- data/lib/rulezilla/version.rb +1 -1
- metadata +2 -4
- data/.github/workflows/publish-docs.yaml +0 -30
- data/_pipeline/stage_publishdocs.yml +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1e20112814a4c66225a9aa87042999c98d669c1dec575eef927db835dc1f0b8
|
4
|
+
data.tar.gz: 93da091a13464a6e973eff0fff41782230211616b44a3cbe6f2f8837214bccb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d061b9debff8fc71f3b0862c4a4ed56bd280668f44192b47682e1c6dc4380ba249884c255ac1ba46944a7072027ba758cf28a72461dd3212faf7aadb6851163
|
7
|
+
data.tar.gz: 6e2c37ba42c1e17e681ffdffe1183ce8e66c07b1f9279a925229c49f17a4e8769a6bbe613b79f16683e5a1e4285dcf84f9fdc6bc5c291f2c76b3877713a0d67f
|
data/lib/rulezilla/dsl.rb
CHANGED
@@ -19,19 +19,28 @@ module Rulezilla
|
|
19
19
|
|
20
20
|
def self.create_klass(parent_klass)
|
21
21
|
klass_name = parent_klass.name
|
22
|
+
klass = create_record_class(parent_klass, klass_name)
|
23
|
+
setup_record_class(klass, klass_name)
|
24
|
+
klass
|
25
|
+
end
|
22
26
|
|
23
|
-
|
27
|
+
def self.create_record_class(parent_klass, klass_name)
|
28
|
+
get_super(parent_klass).const_set("#{demodulize_klass_name(klass_name)}Record", Class.new)
|
29
|
+
end
|
24
30
|
|
31
|
+
def self.setup_record_class(klass, klass_name)
|
25
32
|
klass.class_eval do
|
26
33
|
include Rulezilla::BasicSupport
|
27
|
-
|
28
|
-
include Object.const_get("#{klass_name}Support")
|
29
|
-
rescue StandardError
|
30
|
-
NameError
|
31
|
-
end
|
34
|
+
include Object.const_get("#{klass_name}Support") if Object.const_defined?("#{klass_name}Support")
|
32
35
|
|
33
36
|
attr_reader :record
|
37
|
+
end
|
34
38
|
|
39
|
+
define_record_methods(klass)
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.define_record_methods(klass)
|
43
|
+
klass.class_eval do
|
35
44
|
define_method(:initialize) do |record|
|
36
45
|
record = OpenStruct.new(record) if record.is_a?(Hash)
|
37
46
|
instance_variable_set(:@record, record)
|
@@ -41,10 +50,11 @@ module Rulezilla
|
|
41
50
|
record.send(meth, *args, &block)
|
42
51
|
end
|
43
52
|
end
|
44
|
-
|
45
|
-
private_class_method :create_klass, :get_super, :demodulize_klass_name
|
46
53
|
end
|
47
54
|
|
55
|
+
private_class_method :create_klass, :get_super, :demodulize_klass_name, :create_record_class,
|
56
|
+
:setup_record_class, :define_record_methods
|
57
|
+
|
48
58
|
module ClassMethods
|
49
59
|
def mandatory_attributes
|
50
60
|
@mandatory_attributes ||= []
|
data/lib/rulezilla/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rulezilla
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simply Business
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-08-15 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: ostruct
|
@@ -105,7 +105,6 @@ files:
|
|
105
105
|
- ".github/workflows/codeql-analysis.yaml"
|
106
106
|
- ".github/workflows/dobby-actions.yml"
|
107
107
|
- ".github/workflows/gem-publish.yaml"
|
108
|
-
- ".github/workflows/publish-docs.yaml"
|
109
108
|
- ".github/workflows/version-forget-me-not.yaml"
|
110
109
|
- ".gitignore"
|
111
110
|
- ".rspec"
|
@@ -116,7 +115,6 @@ files:
|
|
116
115
|
- Gemfile
|
117
116
|
- LICENSE.txt
|
118
117
|
- README.md
|
119
|
-
- _pipeline/stage_publishdocs.yml
|
120
118
|
- catalog-info.yaml
|
121
119
|
- docs/index.md
|
122
120
|
- lib/rulezilla.rb
|
@@ -1,30 +0,0 @@
|
|
1
|
-
name: Huxley TechDocs
|
2
|
-
|
3
|
-
on:
|
4
|
-
workflow_dispatch:
|
5
|
-
push:
|
6
|
-
branches: main
|
7
|
-
paths:
|
8
|
-
- "docs/**"
|
9
|
-
- "mkdocs.yml"
|
10
|
-
- ".github/workflows/publish-docs.yaml"
|
11
|
-
pull_request:
|
12
|
-
branches: main
|
13
|
-
paths:
|
14
|
-
- "docs/**"
|
15
|
-
- "mkdocs.yaml"
|
16
|
-
- ".github/workflows/publish-docs.yaml"
|
17
|
-
schedule:
|
18
|
-
- cron: "15 3 1 * *"
|
19
|
-
|
20
|
-
concurrency: huxley-techdocs-${{ github.ref }}
|
21
|
-
|
22
|
-
jobs:
|
23
|
-
publish-techdocs:
|
24
|
-
uses: simplybusiness/github-action-reusable-workflows/.github/workflows/techdocs.yaml@v1
|
25
|
-
with:
|
26
|
-
repo: "github-action-reusable-workflows"
|
27
|
-
secrets:
|
28
|
-
region: ${{ secrets.AWS_LIVE_CICD_REGION }}
|
29
|
-
aws-access-key-id: ${{ secrets.AWS_LIVE_CICD_ACCESS_KEY_ID }}
|
30
|
-
aws-secret-access-key: ${{ secrets.AWS_LIVE_CICD_SECRET_ACCESS_KEY }}
|