Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite #36

Merged
merged 41 commits into from
Jan 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
cd61297
Initial commit to rewrite of Athena
Blacksmoke16 Nov 26, 2019
f2c6646
First pass of argument parsing
Blacksmoke16 Nov 27, 2019
57dea0f
Refactor exception classes
Blacksmoke16 Nov 28, 2019
ab6b1e2
Some minor cleanup
Blacksmoke16 Nov 28, 2019
bf7d642
Initial exception handling implementation
Blacksmoke16 Nov 29, 2019
5164ef5
Support optional services within DI
Blacksmoke16 Dec 1, 2019
68ba7f7
Support resolving services within an array
Blacksmoke16 Dec 6, 2019
78f0f30
Support param converters again
Blacksmoke16 Dec 7, 2019
63cf295
Move routing annotations to their own file
Blacksmoke16 Dec 8, 2019
e21cdb8
Refactor how param converters work
Blacksmoke16 Dec 9, 2019
6e7dd9f
Better handle param converters
Blacksmoke16 Dec 12, 2019
1440d94
Remove legacy specs
Blacksmoke16 Dec 12, 2019
5dd02cb
Initial spec
Blacksmoke16 Dec 14, 2019
36c75e9
Refactor argument_resolver specs
Blacksmoke16 Dec 14, 2019
e8f6624
Add additional specs
Blacksmoke16 Dec 14, 2019
2f615c4
Fix some lint issues
Blacksmoke16 Dec 14, 2019
844bdbc
Support named or positional annotation args
Blacksmoke16 Dec 15, 2019
38d17dd
Make controllers classes again :S
Blacksmoke16 Dec 15, 2019
1b19071
Fix specs
Blacksmoke16 Dec 15, 2019
de3a709
Change implementation of route prefixes
Blacksmoke16 Dec 16, 2019
5baae3f
Initial CORS listener work
Blacksmoke16 Dec 21, 2019
5fa86ea
Support having access to the response in an action
Blacksmoke16 Dec 29, 2019
af071c2
implement configurationResolver into the cors listener
Blacksmoke16 Jan 1, 2020
ede63a1
Add spec for cors listener requests
Blacksmoke16 Jan 1, 2020
3241c03
Add specs for the response listener
Blacksmoke16 Jan 2, 2020
bc6e237
Fix lint issue
Blacksmoke16 Jan 2, 2020
da94386
Add some more specs for routing component
Blacksmoke16 Jan 2, 2020
ac4a1a4
Fix request store logic
Blacksmoke16 Jan 2, 2020
68bd235
Update config dep
Blacksmoke16 Jan 8, 2020
f79a91a
implement athena-di shard
Blacksmoke16 Jan 8, 2020
6bf1678
Install deps before running specs
Blacksmoke16 Jan 8, 2020
89ec146
Add support for PATCH endpoints
Blacksmoke16 Jan 8, 2020
2db1a4e
Add HEAD request for each GET request
Blacksmoke16 Jan 9, 2020
bbc721c
Support query param constraints
Blacksmoke16 Jan 10, 2020
5c54fd9
Refactor param converters to use an interface (module)
Blacksmoke16 Jan 11, 2020
8e7cfc3
Cors => CORS
Blacksmoke16 Jan 11, 2020
37a1308
Refactors param conversion to be more simple/flexible
Blacksmoke16 Jan 12, 2020
e5fd792
Use param versus name in ART::ParamConverter
Blacksmoke16 Jan 12, 2020
655a84a
Reraise the exception if in the development env and it's a 500
Blacksmoke16 Jan 12, 2020
9ddf23a
Update deps to use versions
Blacksmoke16 Jan 12, 2020
fd9cc01
Mention HEAD request on GET requests
Blacksmoke16 Jan 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
branches:
- '*/*'
- '*'
- '!master'
schedule:
- cron: '0 21 * * *'

jobs:
check_format:
runs-on: ubuntu-latest
container:
image: crystallang/crystal
steps:
- uses: actions/checkout@v1
- name: Format
run: crystal tool format --check
coding_standards:
runs-on: ubuntu-latest
container:
image: crystallang/crystal
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: shards install
- name: Ameba
run: ./bin/ameba
test_latest:
runs-on: ubuntu-latest
container:
image: crystallang/crystal
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: shards install
- name: Specs
run: crystal spec --order random --error-on-warnings
test_nightly:
runs-on: ubuntu-latest
container:
image: crystallang/crystal:nightly
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: shards install
- name: Specs
run: crystal spec --order random --error-on-warnings
22 changes: 22 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Deployment

on:
push:
branches:
- master

jobs:
deploy_docs:
runs-on: ubuntu-latest
container:
image: crystallang/crystal
steps:
- uses: actions/checkout@v1
- name: Build
run: crystal docs lib/athena-event_dispatcher/src/athena-event_dispatcher.cr lib/athena-config/src/athena-config.cr lib/athena-di/src/athena-di.cr src/athena.cr
- name: Deploy
uses: JamesIves/github-pages-deploy-action@2.0.1
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: docs
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*.dwarf
/.shards/
/bin/
/doc/
/docs/
/lib/
/logs/

Expand Down
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Blacksmoke16
Copyright (c) 2020 Blacksmoke16

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
31 changes: 13 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,34 @@
# Athena
[![Build Status](https://travis-ci.org/Blacksmoke16/athena.svg?branch=master)](https://travis-ci.org/Blacksmoke16/athena)
[![Latest release](https://img.shields.io/github/release/Blacksmoke16/athena.svg?style=flat-square)](https://github.com/Blacksmoke16/athena/releases)

Modular annotation based web framework with built in param conversion inspired by [Symfony Routing](https://symfony.com/doc/current/routing.html).
[![Build Status](https://img.shields.io/github/workflow/status/blacksmoke16/athena/CI)](https://github.com/blacksmoke16/athena/actions)
[![Latest release](https://img.shields.io/github/release/blacksmoke16/athena.svg?style=flat-square)](https://github.com/blacksmoke16/athena/releases)

## Goals

- Extensible and customizable to fit all use cases.
- Be easy to adopt and start using effectively.
- Remove unneeded boilerplate code to convert route/body params to correct type.
- Easy serialization via [CrSerializer](https://github.com/Blacksmoke16/CrSerializer).
- Decrease bloat. Only include what you need.

## Documentation

[Documentation](./docs)
A web framework comprised of reusable, independent components.

## Installation

Add this to your application's `shard.yml`:
1. Add the dependency to your `shard.yml`:

```yaml
dependencies:
athena:
github: Blacksmoke16/athena
github: blacksmoke16/athena
```

2. Run `shards install`

## Documentation

Everything is documented in the [API Docs](https://blacksmoke16.github.io/athena/Athena/Routing.html).

## Contributing

1. Fork it (<https://github.com/Blacksmoke16/athena/fork>)
1. Fork it (https://github.com/blacksmoke16/athena/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## Contributors

- [Blacksmoke16](https://github.com/Blacksmoke16) Blacksmoke16 - creator, maintainer
- [Blacksmoke16](https://github.com/blacksmoke16) - creator and maintainer
19 changes: 0 additions & 19 deletions athena.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1 @@
# Config file for Athena.
---
environments:
development: &development
routing:
cors:
enabled: false
strategy: blacklist
defaults: &defaults
allow_origin: https://yourdomain.com
expose_headers: []
max_age: 0
allow_credentials: false
allow_methods: []
allow_headers: []
groups: {}
test: &test
<<: *development
production: &production
<<: *development
77 changes: 0 additions & 77 deletions docs/cli.md

This file was deleted.