Skip to content

Commit 4142b6d

Browse files
authored
Merge pull request #74 from kengallego/v0.3.0-update
V0.3.0 update
2 parents 2d6f588 + b9647bf commit 4142b6d

14 files changed

Lines changed: 250 additions & 157 deletions

File tree

.brakeman.ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"ignored_warnings": [
3+
{
4+
"warning_type": "Cross-Site Request Forgery",
5+
"warning_code": 7,
6+
"fingerprint": "8467757e84ea0d7ea13884e1bebb9cd69913885cc43c455f2d71bd8b8c92c5c7",
7+
"check_name": "ForgerySetting",
8+
"message": "`protect_from_forgery` should be called in `ApplicationController`",
9+
"file": "site/app/controllers/application_controller.rb",
10+
"line": 3,
11+
"link": "https://brakemanscanner.org/docs/warning_types/cross-site_request_forgery/",
12+
"code": null,
13+
"render_path": null,
14+
"location": {
15+
"type": "controller",
16+
"controller": "ApplicationController"
17+
},
18+
"user_input": null,
19+
"confidence": "High",
20+
"note": "The `site/` path is meant for development and testing ONLY. It is never deployed to production and has no real users or sessions."
21+
}
22+
]
23+
}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
bundler-cache: true
2121

2222
- name: Scan for common Rails security vulnerabilities using static analysis
23-
run: bin/brakeman --no-pager
23+
run: bin/brakeman --no-pager -i .brakeman.ignore
2424

2525
scan_js:
2626
runs-on: ubuntu-latest

.rubocop.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Lint/MissingSuper:
2121

2222
Naming/VariableNumber:
2323
EnforcedStyle: snake_case
24+
Exclude:
25+
- 'config/initializers/**/*'
2426

2527
Metrics/MethodLength:
2628
Enabled: false
@@ -39,3 +41,12 @@ Metrics/ParameterLists:
3941
- 'app/components/**/*'
4042
- 'site/app/previews/**/*'
4143
- 'spec/components/previews/**/*'
44+
45+
Metrics/ClassLength:
46+
Exclude:
47+
- 'site/app/previews/**/*'
48+
49+
Rails/OutputSafety:
50+
Exclude:
51+
- 'site/app/previews/**/*'
52+
- 'spec/**/*'

AGENT.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Agent Guide
2+
3+
Essence is a Rails 8 engine that ships Beyond UI as ViewComponents with Stimulus/Turbo; Lookbook preview lives in `site/`.
4+
5+
Stack quickref
6+
- Ruby >= 3.3 with Bundler
7+
- ViewComponent + SimpleForm; importmap + Propshaft assets; Stimulus controllers in `app/javascript/essence/controllers`
8+
- Components in `app/components/essence`; styles/images under `app/assets/essence`
9+
10+
Setup
11+
- `bundle install`
12+
- Preview app: `cd site && bin/setup --skip-server` to install deps and prep the sqlite DB
13+
- Start Lookbook: `cd site && bin/rails server` (or run `site/bin/setup` without `--skip-server` to boot via `bin/dev`)
14+
15+
Everyday dev
16+
- Subclass `Essence::ApplicationComponent`; pair `*_component.rb` with `*_component.html.erb`
17+
- JS entry: `app/javascript/essence/application.js`; register controllers via `controllers/index.js`; add importmap pins in `config/importmap.rb` when needed
18+
- CSS/design tokens in `app/assets/stylesheets/essence`; images in `app/assets/images/essence`
19+
- Previews/examples live in `site/app/previews/**`; mirror new props and states there
20+
- Shared helpers and form inputs are under `app/helpers` and `app/inputs`; reuse existing utilities before adding new ones
21+
22+
Quality gates
23+
- Specs: `bundle exec rspec`
24+
- Lint: `bundle exec rubocop`
25+
- Security: `bundle exec brakeman`
26+
- Gem sanity: `bundle exec rake build` (bundler gem tasks)
27+
28+
Notes for changes
29+
- Keep HTML semantics and ARIA intact; components are consumed by storefront apps
30+
- Avoid bundling external JS/CSS; rely on importmap + Stimulus
31+
- Preserve backward compatibility; prefer deprecations to breaking changes
32+
- Update previews and documentation when behaviour or UI shifts

0 commit comments

Comments
 (0)