soar_sc_routing 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -2
- data/lib/soar_sc_routing/router_meta.rb +1 -0
- data/lib/soar_sc_routing/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 891ece3dcea44d840af6368216d9e21ddbdecf74
|
4
|
+
data.tar.gz: 6592a06ade0f0db34f191cd3be9e9cf20373fb87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02f58e8fe7f9d8b773d800f80e7b4dec71436d33623df0dbe77f257eb1ea50bb8143a163ba91812987cb515e6fb1cf903047ff24fae88883ed0bc822300ec106
|
7
|
+
data.tar.gz: 2dd5b2a535ec82ddcafc97825ebe6f72ab63ae16410b276ab673d11644952d4d52e8525f626719ac7e29757be1a47faca0f31f64306f4c4d2ed2afbdf30831a4
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
## Features
|
4
4
|
|
5
5
|
### RouterMeta
|
6
|
-
This library facilitates the registration of routes and their meta for use by a router. The SOAR reference implementation uses this library to register routes and meta for soar_sc routers.
|
6
|
+
This library facilitates the registration of routes and their meta for use by a router. The SOAR reference implementation uses this library to register routes and meta for soar_sc routers.
|
7
7
|
|
8
8
|
When a route is registered, control is delegated as appropriate to the controller, renderer and access manager indicated in the meta.
|
9
9
|
|
@@ -123,6 +123,12 @@ class SoarScRouter < SoarScRouting::BaseRouter
|
|
123
123
|
end
|
124
124
|
```
|
125
125
|
|
126
|
+
## Testing
|
127
|
+
|
128
|
+
Testing can be performed:
|
129
|
+
|
130
|
+
$ bundle exec rspec -cfd spec/*
|
131
|
+
|
126
132
|
## Contributing
|
127
133
|
|
128
134
|
Please send feedback and comments to the author at:
|
@@ -134,4 +140,3 @@ This gem is sponsored by Hetzner (Pty) Ltd - http://hetzner.co.za
|
|
134
140
|
## License
|
135
141
|
|
136
142
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
137
|
-
|
@@ -83,6 +83,7 @@ module SoarScRouting
|
|
83
83
|
def validate_detail(detail)
|
84
84
|
raise ArgumentError.new("detail must not be nil") if detail.nil?
|
85
85
|
raise ArgumentError.new("path must be provided") if detail['path'].nil?
|
86
|
+
raise ArgumentError.new("path must start with /") if detail['path'][0] != '/'
|
86
87
|
raise ArgumentError.new("description must be provided") if detail['description'].nil?
|
87
88
|
raise ArgumentError.new("method must be provided") if detail['method'].nil?
|
88
89
|
raise ArgumentError.new("service_name must be provided") if detail['service_name'].nil?
|