Sha256: 743f11ae249300d008cdd9d6d535e18a58587b4d879bc81f1c7a9addb02d2978

Contents?: true

Size: 713 Bytes

Versions: 28

Compression:

Stored size: 713 Bytes

Contents

This is an almost complete rewrite of https://github.com/delvedor/find-my-way.

Currrently, the only constraint supported is the `host` constraint. Regexp constraints are likely to be added. Custom/lambda constraints are unlikely to be added.

Compared to the Rails router, the most notable difference except constraints is that a wildcard segment can only be in the last section of the path and cannot be named.

```ruby
Rage.routes.draw do
  get "photos/:id", to: "photos#show", constraints: { host: /myhost/ }

  scope path: "api/v1", module: "api/v1" do
    get "photos/:id", to: "photos#show"
  end

  root to: "photos#index"

  get "*", to: ->(env) { [404, {}, [{ message: "Not Found" }.to_json]] }
end
```

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rage-rb-1.14.0 lib/rage/router/README.md
rage-rb-1.13.0 lib/rage/router/README.md
rage-rb-1.12.0 lib/rage/router/README.md
rage-rb-1.11.0 lib/rage/router/README.md
rage-rb-1.10.1 lib/rage/router/README.md
rage-rb-1.10.0 lib/rage/router/README.md
rage-rb-1.9.0 lib/rage/router/README.md
rage-rb-1.8.0 lib/rage/router/README.md
rage-rb-1.7.0 lib/rage/router/README.md
rage-rb-1.6.0 lib/rage/router/README.md
rage-rb-1.4.0 lib/rage/router/README.md
rage-rb-1.3.0 lib/rage/router/README.md
rage-rb-1.2.2 lib/rage/router/README.md
rage-rb-1.2.1 lib/rage/router/README.md
rage-rb-1.2.0 lib/rage/router/README.md
rage-rb-1.1.0 lib/rage/router/README.md
rage-rb-1.0.0 lib/rage/router/README.md
rage-rb-0.7.0 lib/rage/router/README.md
rage-rb-0.6.0 lib/rage/router/README.md
rage-rb-0.5.2 lib/rage/router/README.md