Skip to content

Commit

Permalink
fix: ameba + gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mdwagner committed Oct 17, 2023
1 parent ad9cf48 commit 9a0da55
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 39 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ jobs:
run: shards install
- name: Format
run: crystal tool format --check
- name: Lint
run: ./bin/ameba
- name: Crystal Ameba Linter
id: crystal-ameba
uses: crystal-ameba/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
specs:
strategy:
fail-fast: false
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/docs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ For more examples on creating a Breeze extension, look at the `BreezeCarbon` ext

## Development

Install shards `shards install`, and start making changes. Be sure to run `./bin/ameba`, and the crystal formatter `crystal tool format spec src`.
Install shards `shards install`, and start making changes. Be sure to run [`ameba`](https://github.com/crystal-ameba/ameba), and the crystal formatter `crystal tool format spec src`.

Read through the issues for things you can work on. If you have an idea, feel free to open a new issue!

Expand Down
3 changes: 0 additions & 3 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ dependencies:
version: ~> 0.1

development_dependencies:
ameba:
github: crystal-ameba/ameba
version: ~> 1.5
lucky_cli:
github: luckyframework/lucky_cli
version: ~> 1.0
Expand Down
2 changes: 1 addition & 1 deletion spec/support/with_project_cleanup.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module WithProjectCleanup
private def with_project_cleanup(project_directory = "test-project", skip_db_drop = false)
private def with_project_cleanup(project_directory = "test-project", skip_db_drop = false, &)
yield

FileUtils.cd(project_directory) {
Expand Down
17 changes: 9 additions & 8 deletions src/breeze/actions/mixins/action_helpers.cr
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,15 @@ module Breeze::ActionHelpers

private def store_breeze_response
if allow_breeze(context)
req = Fiber.current.breeze_request.not_nil!
spawn(name: "Create Breeze::SaveBreezeResponse") do
Breeze::SaveBreezeResponse.create!(
breeze_request_id: req.id,
status: response.status_code,
session: JSON.parse(session.to_json),
headers: JSON.parse(response.headers.to_h.to_json)
)
if req = Fiber.current.breeze_request
spawn(name: "Create Breeze::SaveBreezeResponse") do
Breeze::SaveBreezeResponse.create!(
breeze_request_id: req.id,
status: response.status_code,
session: JSON.parse(session.to_json),
headers: JSON.parse(response.headers.to_h.to_json)
)
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/breeze/components/breeze/panel.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Breeze::Panel < Breeze::BreezeComponent
def render
def render(&)
div class: "mb-12 bg-white rounded-lg shadow-lg overflow-hidden" do
yield
end
Expand Down

0 comments on commit 9a0da55

Please sign in to comment.