rulezilla 0.4.8 → 0.4.10
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/.github/dependabot.yml +14 -0
- data/.github/workflows/dobby-actions.yml +21 -4
- data/.rubocop.yml +6 -0
- data/.rubocop_todo.yml +14 -36
- data/lib/rulezilla/dsl.rb +3 -3
- data/lib/rulezilla/version.rb +1 -1
- data/rulezilla.gemspec +4 -3
- data/spec/features/step_definitions/rulezilla_dsl_framework_steps.rb +1 -1
- data/spec/spec_helper.rb +6 -6
- metadata +13 -14
- 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: d44c48b049fb1f13c6cc089ebb1af1ed4a113762129281cc672ab6e778e9426a
|
4
|
+
data.tar.gz: f5d181ef71005a118d514dbdc3fde6a2abb44a7dafdb5100977f19e614a8aa55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d34a858d6034509ab63e7773d9d68a72abe3e4bcd3a3bc44161ada74a61e9ec2d38fc3dc241b5d8fc20d6c27faeee3ed07ca875ab236aa5f14b34b3a5bf00ba
|
7
|
+
data.tar.gz: ac94c2580f3564883e9f24c361805cd7e93f369d8aa448bdbc9b59471fc7e613e7f4b49b19d396ef7f28419638fdc31c7b2fa98b50af1b5be49c8c08ca577971
|
@@ -0,0 +1,14 @@
|
|
1
|
+
version: 2
|
2
|
+
updates:
|
3
|
+
- package-ecosystem: bundler
|
4
|
+
directory: "/"
|
5
|
+
schedule:
|
6
|
+
interval: daily
|
7
|
+
time: "08:00"
|
8
|
+
open-pull-requests-limit: 99
|
9
|
+
- package-ecosystem: github-actions
|
10
|
+
directory: "/"
|
11
|
+
schedule:
|
12
|
+
interval: daily
|
13
|
+
time: "08:00"
|
14
|
+
open-pull-requests-limit: 99
|
@@ -5,9 +5,26 @@ on:
|
|
5
5
|
types: [created]
|
6
6
|
permissions:
|
7
7
|
contents: read
|
8
|
+
|
8
9
|
jobs:
|
9
10
|
pr_commented:
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
if: startsWith(github.event.comment.body, '/dobby')
|
13
|
+
env:
|
14
|
+
BUNDLE_WITHOUT: "development:test"
|
15
|
+
steps:
|
16
|
+
- name: Checkout action
|
17
|
+
uses: actions/checkout@v4
|
18
|
+
with:
|
19
|
+
repository: "simplybusiness/dobby"
|
20
|
+
ref: "v4"
|
21
|
+
- name: Set up ruby
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
bundler-cache: true
|
25
|
+
- name: Bump version
|
26
|
+
uses: simplybusiness/dobby@v4
|
27
|
+
env:
|
28
|
+
DOBBY_APP_ID: ${{ secrets.DOBBY_APP_ID }}
|
29
|
+
DOBBY_PRIVATE_KEY: ${{ secrets.DOBBY_PRIVATE_KEY }}
|
30
|
+
VERSION_FILE_PATH: ./lib/rulezilla/version.rb
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,60 +1,38 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2025-
|
3
|
+
# on 2025-07-21 13:19:34 UTC using RuboCop version 1.78.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
10
|
-
|
11
|
-
# Include: **/*.gemspec
|
12
|
-
Gemspec/RequiredRubyVersion:
|
9
|
+
# Offense count: 2
|
10
|
+
CustomCops/DefineMethod:
|
13
11
|
Exclude:
|
14
|
-
- 'rulezilla.
|
12
|
+
- 'lib/rulezilla/dsl.rb'
|
13
|
+
|
14
|
+
# Offense count: 3
|
15
|
+
CustomCops/InstanceEval:
|
16
|
+
Exclude:
|
17
|
+
- 'lib/rulezilla/dsl.rb'
|
18
|
+
- 'lib/rulezilla/node.rb'
|
15
19
|
|
16
20
|
# Offense count: 1
|
17
21
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
18
22
|
Metrics/AbcSize:
|
19
23
|
Max: 20
|
20
24
|
|
21
|
-
# Offense count: 2
|
22
|
-
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
23
|
-
# AllowedMethods: refine
|
24
|
-
Metrics/BlockLength:
|
25
|
-
Max: 32
|
26
|
-
|
27
25
|
# Offense count: 2
|
28
26
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
29
27
|
Metrics/MethodLength:
|
30
28
|
Max: 19
|
31
29
|
|
32
|
-
# Offense count:
|
33
|
-
|
34
|
-
# NamePrefix: is_, has_, have_
|
35
|
-
# ForbiddenPrefixes: is_, has_, have_
|
36
|
-
# AllowedMethods: is_a?
|
37
|
-
# MethodDefinitionMacros: define_method, define_singleton_method
|
38
|
-
Naming/PredicateName:
|
39
|
-
Exclude:
|
40
|
-
- 'spec/**/*'
|
41
|
-
- 'lib/rulezilla/node.rb'
|
42
|
-
- 'lib/rulezilla/tree.rb'
|
43
|
-
|
44
|
-
# Offense count: 5
|
45
|
-
# Configuration parameters: AllowedConstants.
|
46
|
-
Style/Documentation:
|
30
|
+
# Offense count: 6
|
31
|
+
RSpec/RemoveConst:
|
47
32
|
Exclude:
|
48
|
-
- 'spec
|
49
|
-
- 'test/**/*'
|
50
|
-
- 'lib/rulezilla/basic_support.rb'
|
51
|
-
- 'lib/rulezilla/dsl.rb'
|
52
|
-
- 'lib/rulezilla/node.rb'
|
53
|
-
- 'lib/rulezilla/tree.rb'
|
33
|
+
- 'spec/spec_helper.rb'
|
54
34
|
|
55
35
|
# Offense count: 2
|
56
|
-
|
57
|
-
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
|
58
|
-
Style/GuardClause:
|
36
|
+
Style/OpenStructUse:
|
59
37
|
Exclude:
|
60
38
|
- 'lib/rulezilla/dsl.rb'
|
data/lib/rulezilla/dsl.rb
CHANGED
@@ -34,7 +34,7 @@ module Rulezilla
|
|
34
34
|
|
35
35
|
define_method(:initialize) do |record|
|
36
36
|
record = OpenStruct.new(record) if record.is_a?(Hash)
|
37
|
-
instance_variable_set(
|
37
|
+
instance_variable_set(:@record, record)
|
38
38
|
end
|
39
39
|
|
40
40
|
define_method(:method_missing) do |meth, *args, &block|
|
@@ -112,10 +112,10 @@ module Rulezilla
|
|
112
112
|
@mandatory_attributes = mandatory_attributes | fields
|
113
113
|
end
|
114
114
|
|
115
|
-
def define(name = nil, &
|
115
|
+
def define(name = nil, &)
|
116
116
|
tree.create_and_move_to_child(name)
|
117
117
|
|
118
|
-
instance_eval(&
|
118
|
+
instance_eval(&)
|
119
119
|
tree.go_up
|
120
120
|
end
|
121
121
|
alias group define
|
data/lib/rulezilla/version.rb
CHANGED
data/rulezilla.gemspec
CHANGED
@@ -16,11 +16,12 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.require_paths = ['lib']
|
17
17
|
gem.version = Rulezilla::VERSION
|
18
18
|
gem.license = 'MIT'
|
19
|
+
gem.required_ruby_version = '>= 3.2.0'
|
19
20
|
|
20
|
-
gem.
|
21
|
-
gem.add_runtime_dependency('rspec')
|
21
|
+
gem.add_dependency('ostruct')
|
22
22
|
gem.add_development_dependency('pry')
|
23
23
|
gem.add_development_dependency('pry-doc')
|
24
|
-
gem.add_development_dependency('
|
24
|
+
gem.add_development_dependency('rspec')
|
25
|
+
gem.add_development_dependency('simplycop', '~> 2.23')
|
25
26
|
gem.add_development_dependency('turnip')
|
26
27
|
end
|
@@ -11,7 +11,7 @@ step 'the rule is:' do |rules|
|
|
11
11
|
end
|
12
12
|
|
13
13
|
step 'our rule is:' do |rules|
|
14
|
-
@rule_klass = Object.const_set(
|
14
|
+
@rule_klass = Object.const_set(:DummyRule, Class.new)
|
15
15
|
@rule_klass.class_eval('include Rulezilla::DSL', __FILE__, __LINE__)
|
16
16
|
@rule_klass.class_eval(rules.to_s)
|
17
17
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -6,19 +6,19 @@ require 'pry'
|
|
6
6
|
Dir.glob('spec/features/step_definitions/**/*steps.rb') { |f| load f, true }
|
7
7
|
|
8
8
|
RSpec.configure do |config|
|
9
|
-
config.after
|
9
|
+
config.after do
|
10
10
|
begin
|
11
|
-
Object.send(:remove_const,
|
11
|
+
Object.send(:remove_const, :DummyRule)
|
12
12
|
rescue StandardError
|
13
13
|
NameError
|
14
14
|
end
|
15
15
|
begin
|
16
|
-
Object.send(:remove_const,
|
16
|
+
Object.send(:remove_const, :DummyRuleRecord)
|
17
17
|
rescue StandardError
|
18
18
|
NameError
|
19
19
|
end
|
20
20
|
begin
|
21
|
-
Object.send(:remove_const,
|
21
|
+
Object.send(:remove_const, :DummyRuleSupport)
|
22
22
|
rescue StandardError
|
23
23
|
NameError
|
24
24
|
end
|
@@ -28,12 +28,12 @@ RSpec.configure do |config|
|
|
28
28
|
NameError
|
29
29
|
end
|
30
30
|
begin
|
31
|
-
Object.send(:remove_const, "#{@rule_klass_name}Record"
|
31
|
+
Object.send(:remove_const, :"#{@rule_klass_name}Record")
|
32
32
|
rescue StandardError
|
33
33
|
NameError
|
34
34
|
end
|
35
35
|
begin
|
36
|
-
Object.send(:remove_const, "#{@support_name}Support"
|
36
|
+
Object.send(:remove_const, :"#{@support_name}Support")
|
37
37
|
rescue StandardError
|
38
38
|
NameError
|
39
39
|
end
|
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.10
|
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-07-21 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: ostruct
|
@@ -24,13 +24,13 @@ dependencies:
|
|
24
24
|
- !ruby/object:Gem::Version
|
25
25
|
version: '0'
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
|
-
name:
|
27
|
+
name: pry
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '0'
|
33
|
-
type: :
|
33
|
+
type: :development
|
34
34
|
prerelease: false
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '0'
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
|
-
name: pry
|
41
|
+
name: pry-doc
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
|
-
name:
|
55
|
+
name: rspec
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - ">="
|
@@ -66,19 +66,19 @@ dependencies:
|
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
|
-
name:
|
69
|
+
name: simplycop
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - "
|
72
|
+
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '2.23'
|
75
75
|
type: :development
|
76
76
|
prerelease: false
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - "
|
79
|
+
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
81
|
+
version: '2.23'
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: turnip
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,11 +100,11 @@ executables: []
|
|
100
100
|
extensions: []
|
101
101
|
extra_rdoc_files: []
|
102
102
|
files:
|
103
|
+
- ".github/dependabot.yml"
|
103
104
|
- ".github/workflows/ci.yaml"
|
104
105
|
- ".github/workflows/codeql-analysis.yaml"
|
105
106
|
- ".github/workflows/dobby-actions.yml"
|
106
107
|
- ".github/workflows/gem-publish.yaml"
|
107
|
-
- ".github/workflows/publish-docs.yaml"
|
108
108
|
- ".github/workflows/version-forget-me-not.yaml"
|
109
109
|
- ".gitignore"
|
110
110
|
- ".rspec"
|
@@ -115,7 +115,6 @@ files:
|
|
115
115
|
- Gemfile
|
116
116
|
- LICENSE.txt
|
117
117
|
- README.md
|
118
|
-
- _pipeline/stage_publishdocs.yml
|
119
118
|
- catalog-info.yaml
|
120
119
|
- docs/index.md
|
121
120
|
- lib/rulezilla.rb
|
@@ -141,7 +140,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
140
|
requirements:
|
142
141
|
- - ">="
|
143
142
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
143
|
+
version: 3.2.0
|
145
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
145
|
requirements:
|
147
146
|
- - ">="
|
@@ -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 }}
|