Skip to content

Commit

Permalink
Nil root okay (#131)
Browse files Browse the repository at this point in the history
* Allow nil for root

* Fix / in path handling

* Update gemspec with doc reference

* Update docs and path
  • Loading branch information
ohler55 authored Jun 5, 2024
1 parent b7556c4 commit ae72146
Show file tree
Hide file tree
Showing 13 changed files with 591 additions and 536 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ jobs:
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby:
- head
- '3.0'
- '3.2'
- '2.7'
- '2.6'
- '2.5'
os:
- ubuntu
- macos
Expand Down
12 changes: 12 additions & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--title "Agoo API Documentation"
--readme README.md
--charset utf-8
-
misc/flymd.md
misc/glue.md
misc/optimize.md
misc/push.md
misc/rails.md
misc/song.md
CHANGELOG.md
LICENSE
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All changes to the Agoo gem are documented here. Releases follow semantic versioning.

## [2.15.11] - 2024-06-04

### Fixed

- The server root parameter (asset root) no longer raises and error when `nil`.
- The server path handling behavior around the use of `/` has been improved.

## [2.15.10] - 2024-04-14

### Added
Expand Down
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A High Performance HTTP Server for Ruby
```ruby
require 'agoo'

Agoo::Server.init(6464, 'root')
Agoo::Server.init(6464, './root')

class MyHandler
def call(req)
Expand Down Expand Up @@ -50,7 +50,7 @@ class Schema
end
end

Agoo::Server.init(6464, 'root', thread_count: 1, graphql: '/graphql')
Agoo::Server.init(6464, './root', thread_count: 1, graphql: '/graphql')
Agoo::Server.start()
Agoo::GraphQL.schema(Schema.new) {
Agoo::GraphQL.load(%^type Query { hello: String }^)
Expand All @@ -68,7 +68,7 @@ sleep
gem install agoo
```

## Using agoo as server for rails
## Using Agoo as a server for Rails

As agoo supports rack compatible apps you can use it for rails applications:

Expand Down Expand Up @@ -111,6 +111,22 @@ use of rack compatible gems such as Hanami and Rails. Agoo also supports WebSock

Agoo is not available on Windows.

## Getting Started

Some examples can be found in the `example` directory. Some other
documented walk through examples of using Agoo are in the `misc`
directory. These examples are described in markdown files. Some like
the [song](misc/song.md) example are simple while others like the
[glue](misc/glue.md) are more complex. The documented walk through
examples are:

- [flymd](misc/flymd.md) - realtime push
- [glue](misc/glue.md) - publish and subscribe
- [optimize](misc/optimize.md) - optimizing static asset use
- [push](misc/push.md) - push with Rack
- [rails](misc/rails.md) - faster rails
- [song](misc/song.md) - fun and simple GraphQL

## News

- Version 2.11.0 supports GraphQL subscriptions. TLS (SSL,HTTPS)
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 2.11.1 | :white_check_mark: |
| 2.15 | :white_check_mark: |

## Reporting a Vulnerability

Expand Down
7 changes: 6 additions & 1 deletion agoo.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Gem::Specification.new do |s|
s.description = 'A fast HTTP server supporting rack.'
s.licenses = ['MIT']
s.metadata = {
'bug_tracker_uri' => 'https://github.com/ohler55/agoo/issues',
'changelog_uri' => 'https://github.com/ohler55/agoo/CHANGELOG.md',
'documentation_uri' => 'http://www.ohler.com/agoo/index.html',
'source_code_uri' => 'https://github.com/ohler55/agoo',
'homepage' => 'https://github.com/ohler55/agoo'
}
Expand All @@ -22,7 +24,10 @@ Gem::Specification.new do |s|
s.test_files = Dir["test/**/*.rb"]
s.extensions = ["ext/agoo/extconf.rb"]

s.extra_rdoc_files = ['README.md', 'CHANGELOG.md', 'LICENSE'] + Dir["pages/*.md"]
s.extra_rdoc_files = ['README.md', 'CHANGELOG.md', 'LICENSE'] +
Dir["pages/*.md"] +
Dir["misc/*.md"] +
["misc/glue-diagram.svg"]
s.rdoc_options = ['-t', 'Agoo', '-m', 'README.md', '-x', '"test/*"', '-x', '"example/*"', '-x', 'extconf.rb']

s.bindir = 'bin'
Expand Down
Loading

0 comments on commit ae72146

Please sign in to comment.