tarquinn 0.5.0 → 1.0.0
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/.circleci/config.yml +21 -10
- data/.claude/agents/architect.md +45 -0
- data/.claude/agents/ruby.md +39 -0
- data/.claude/scripts/check_ruby.sh +8 -0
- data/.github/commit_message_template-2.0.md +32 -0
- data/.github/commit_message_template.md +10 -0
- data/.github/copilot-instructions.md +1 -188
- data/.github/pull_request_template.md +17 -0
- data/.github/tarquinn-usage.md +152 -0
- data/.gitignore +1 -0
- data/AGENTS.md +221 -0
- data/CLAUDE.md +1 -0
- data/Dockerfile +2 -2
- data/Gemfile +12 -12
- data/README.md +3 -3
- data/docs/agents/arcanum-split-issue.md +9 -0
- data/docs/agents/architecture.md +20 -0
- data/docs/agents/contributing.md +150 -0
- data/docs/agents/flow.md +5 -0
- data/docs/agents/folder-structure.md +14 -0
- data/docs/agents/issue-enhancement.md +10 -0
- data/docs/agents/issues/.gitkeep +1 -0
- data/docs/agents/plans/.gitkeep +1 -0
- data/lib/tarquinn/class_methods.rb +3 -3
- data/lib/tarquinn/version.rb +1 -1
- data/scripts/bump_version.sh +62 -0
- data/spec/dummy/app/controllers/tarquinn/dummy_controller.rb +2 -2
- data/spec/dummy/app/controllers/tarquinn/dummy_route_controller.rb +1 -1
- data/spec/dummy/config/initializers/content_security_policy.rb +1 -0
- data/spec/dummy/config/initializers/inflections.rb +1 -0
- data/spec/dummy/config/initializers/permissions_policy.rb +1 -0
- data/spec/lib/tarquinn/condition/method_caller_spec.rb +5 -5
- data/spec/lib/tarquinn/redirection_handler_spec.rb +4 -4
- data/spec/lib/tarquinn_spec.rb +3 -3
- data/tarquinn.gemspec +2 -2
- metadata +27 -12
|
@@ -7,7 +7,7 @@ describe Tarquinn::Condition::MethodCaller do
|
|
|
7
7
|
let(:controller) { Tarquinn::Controller.new(dummy_controller) }
|
|
8
8
|
|
|
9
9
|
context 'when initialized with a single method' do
|
|
10
|
-
let(:method) { :true }
|
|
10
|
+
let(:method) { :true? }
|
|
11
11
|
let(:subject) { described_class.new(method) }
|
|
12
12
|
|
|
13
13
|
context 'when method returns true' do
|
|
@@ -17,7 +17,7 @@ describe Tarquinn::Condition::MethodCaller do
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
context 'when method returns true' do
|
|
20
|
-
let(:method) { :false }
|
|
20
|
+
let(:method) { :false? }
|
|
21
21
|
|
|
22
22
|
it do
|
|
23
23
|
expect(subject.check?(controller)).to be_falsey
|
|
@@ -26,7 +26,7 @@ describe Tarquinn::Condition::MethodCaller do
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
context 'when initialized with more methods' do
|
|
29
|
-
let(:methods) { %i[true false] }
|
|
29
|
+
let(:methods) { %i[true? false?] }
|
|
30
30
|
let(:subject) { described_class.new(methods) }
|
|
31
31
|
|
|
32
32
|
context 'when one return true and the other false' do
|
|
@@ -36,14 +36,14 @@ describe Tarquinn::Condition::MethodCaller do
|
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
context 'when all return true' do
|
|
39
|
-
let(:methods) { %i[true true] }
|
|
39
|
+
let(:methods) { %i[true? true?] }
|
|
40
40
|
it do
|
|
41
41
|
expect(subject.check?(controller)).to be_truthy
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
context 'when all return false' do
|
|
46
|
-
let(:methods) { %i[false false] }
|
|
46
|
+
let(:methods) { %i[false? false?] }
|
|
47
47
|
it do
|
|
48
48
|
expect(subject.check?(controller)).to be_falsey
|
|
49
49
|
end
|
|
@@ -70,7 +70,7 @@ describe Tarquinn::RedirectionHandler do
|
|
|
70
70
|
context 'when passing a method name for evaluation' do
|
|
71
71
|
context 'when method returns true' do
|
|
72
72
|
before do
|
|
73
|
-
config.add_redirection_rules :true
|
|
73
|
+
config.add_redirection_rules :true?
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
it do
|
|
@@ -79,7 +79,7 @@ describe Tarquinn::RedirectionHandler do
|
|
|
79
79
|
|
|
80
80
|
context 'but some grant a skip' do
|
|
81
81
|
before do
|
|
82
|
-
config.add_skip_rules :true
|
|
82
|
+
config.add_skip_rules :true?
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
it do
|
|
@@ -90,7 +90,7 @@ describe Tarquinn::RedirectionHandler do
|
|
|
90
90
|
|
|
91
91
|
context 'when method returns false' do
|
|
92
92
|
before do
|
|
93
|
-
config.add_redirection_rules :false
|
|
93
|
+
config.add_redirection_rules :false?
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
it do
|
|
@@ -99,7 +99,7 @@ describe Tarquinn::RedirectionHandler do
|
|
|
99
99
|
|
|
100
100
|
context 'but some do not grant a skip' do
|
|
101
101
|
before do
|
|
102
|
-
config.add_skip_rules :false
|
|
102
|
+
config.add_skip_rules :false?
|
|
103
103
|
end
|
|
104
104
|
|
|
105
105
|
it do
|
data/spec/lib/tarquinn_spec.rb
CHANGED
|
@@ -160,7 +160,7 @@ describe Tarquinn, type: :controller do
|
|
|
160
160
|
describe '.skip_redirection' do
|
|
161
161
|
context 'when there is only one skip condition' do
|
|
162
162
|
controller(Tarquinn::DummyRouteController) do
|
|
163
|
-
redirection_rule :redirection, :always_redirect
|
|
163
|
+
redirection_rule :redirection, :always_redirect?
|
|
164
164
|
skip_redirection_rule :redirection, :should_skip?
|
|
165
165
|
end
|
|
166
166
|
|
|
@@ -185,7 +185,7 @@ describe Tarquinn, type: :controller do
|
|
|
185
185
|
|
|
186
186
|
context 'when there are more than oneskip condition' do
|
|
187
187
|
controller(Tarquinn::DummyRouteController) do
|
|
188
|
-
redirection_rule :redirection, :always_redirect
|
|
188
|
+
redirection_rule :redirection, :always_redirect?
|
|
189
189
|
skip_redirection_rule :redirection, :should_skip?, :do_skip?
|
|
190
190
|
end
|
|
191
191
|
|
|
@@ -219,7 +219,7 @@ describe Tarquinn, type: :controller do
|
|
|
219
219
|
|
|
220
220
|
describe '.skip_redirection_rule' do
|
|
221
221
|
controller(Tarquinn::DummyRouteController) do
|
|
222
|
-
redirection_rule :redirection, :always_redirect
|
|
222
|
+
redirection_rule :redirection, :always_redirect?
|
|
223
223
|
skip_redirection :redirection, :index, :delete
|
|
224
224
|
end
|
|
225
225
|
|
data/tarquinn.gemspec
CHANGED
|
@@ -18,8 +18,8 @@ Gem::Specification.new do |gem|
|
|
|
18
18
|
gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
19
19
|
gem.require_paths = ['lib']
|
|
20
20
|
|
|
21
|
-
gem.add_dependency 'activesupport'
|
|
22
|
-
gem.add_dependency 'sinclair',
|
|
21
|
+
gem.add_dependency 'activesupport', '~> 7.2.x'
|
|
22
|
+
gem.add_dependency 'sinclair', '>= 3.2.0'
|
|
23
23
|
|
|
24
24
|
gem.metadata['rubygems_mfa_required'] = 'true'
|
|
25
25
|
end
|
metadata
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tarquinn
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- DarthJee
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
|
-
- - "
|
|
16
|
+
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
18
|
+
version: 7.2.x
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
|
-
- - "
|
|
23
|
+
- - "~>"
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
25
|
+
version: 7.2.x
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: sinclair
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
30
|
- - ">="
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 3.0
|
|
32
|
+
version: 3.2.0
|
|
34
33
|
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - ">="
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 3.0
|
|
39
|
+
version: 3.2.0
|
|
41
40
|
description: Gem for easy redirection controll
|
|
42
41
|
email:
|
|
43
42
|
- darthjee@gmail.com
|
|
@@ -46,11 +45,20 @@ extensions: []
|
|
|
46
45
|
extra_rdoc_files: []
|
|
47
46
|
files:
|
|
48
47
|
- ".circleci/config.yml"
|
|
48
|
+
- ".claude/agents/architect.md"
|
|
49
|
+
- ".claude/agents/ruby.md"
|
|
50
|
+
- ".claude/scripts/check_ruby.sh"
|
|
51
|
+
- ".github/commit_message_template-2.0.md"
|
|
52
|
+
- ".github/commit_message_template.md"
|
|
49
53
|
- ".github/copilot-instructions.md"
|
|
54
|
+
- ".github/pull_request_template.md"
|
|
55
|
+
- ".github/tarquinn-usage.md"
|
|
50
56
|
- ".gitignore"
|
|
51
57
|
- ".rspec"
|
|
52
58
|
- ".rubocop.yml"
|
|
53
59
|
- ".rubocop_todo.yml"
|
|
60
|
+
- AGENTS.md
|
|
61
|
+
- CLAUDE.md
|
|
54
62
|
- Dockerfile
|
|
55
63
|
- Gemfile
|
|
56
64
|
- LICENSE
|
|
@@ -62,6 +70,14 @@ files:
|
|
|
62
70
|
- config/yardstick.rb
|
|
63
71
|
- config/yardstick.yml
|
|
64
72
|
- docker-compose.yml
|
|
73
|
+
- docs/agents/arcanum-split-issue.md
|
|
74
|
+
- docs/agents/architecture.md
|
|
75
|
+
- docs/agents/contributing.md
|
|
76
|
+
- docs/agents/flow.md
|
|
77
|
+
- docs/agents/folder-structure.md
|
|
78
|
+
- docs/agents/issue-enhancement.md
|
|
79
|
+
- docs/agents/issues/.gitkeep
|
|
80
|
+
- docs/agents/plans/.gitkeep
|
|
65
81
|
- lib/tarquinn.rb
|
|
66
82
|
- lib/tarquinn/class_methods.rb
|
|
67
83
|
- lib/tarquinn/condition.rb
|
|
@@ -77,6 +93,7 @@ files:
|
|
|
77
93
|
- lib/tarquinn/request_handler.rb
|
|
78
94
|
- lib/tarquinn/request_handler_builder.rb
|
|
79
95
|
- lib/tarquinn/version.rb
|
|
96
|
+
- scripts/bump_version.sh
|
|
80
97
|
- spec/dummy/Rakefile
|
|
81
98
|
- spec/dummy/app/assets/images/.keep
|
|
82
99
|
- spec/dummy/app/assets/stylesheets/application.css
|
|
@@ -150,7 +167,6 @@ homepage: https://github.com/darthje/tarquinn
|
|
|
150
167
|
licenses: []
|
|
151
168
|
metadata:
|
|
152
169
|
rubygems_mfa_required: 'true'
|
|
153
|
-
post_install_message:
|
|
154
170
|
rdoc_options: []
|
|
155
171
|
require_paths:
|
|
156
172
|
- lib
|
|
@@ -165,8 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
165
181
|
- !ruby/object:Gem::Version
|
|
166
182
|
version: '0'
|
|
167
183
|
requirements: []
|
|
168
|
-
rubygems_version:
|
|
169
|
-
signing_key:
|
|
184
|
+
rubygems_version: 4.0.23
|
|
170
185
|
specification_version: 4
|
|
171
186
|
summary: Gem for easy redirection controll
|
|
172
187
|
test_files: []
|