hobby 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/hobby.gemspec +1 -1
- data/lib/hobby.rb +6 -5
- data/readme.adoc +0 -11
- data/spec/app_spec.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a09d8721fee0c8b802dfc4137a45d746024a10d
|
4
|
+
data.tar.gz: b5eebe2c4534c37f43bfde807e243606747bb9b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f985469d665eb47e06ed8fdfcfb248c08365987b07a010570cef81c2bdad00711012fa99171bccc9218482e5728215dc6146c4ea263583895282d8d13ef35826
|
7
|
+
data.tar.gz: 6344ca6071eb2e297b42b3171902abeb34cb3f7ecb4d148499849ab87d0ee15cca2cf9c5dfdf248e9a91365324e7620e71129cc7a1be9b675895f44bf14822cc
|
data/hobby.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'hobby'
|
7
|
-
spec.version = '0.0.
|
7
|
+
spec.version = '0.0.8'
|
8
8
|
spec.authors = ['Anatoly Chernow']
|
9
9
|
spec.email = ['chertoly@gmail.com']
|
10
10
|
spec.summary = %q{A minimal DSL over rack}
|
data/lib/hobby.rb
CHANGED
@@ -40,11 +40,8 @@ module Hobby
|
|
40
40
|
catch :halt do
|
41
41
|
route = self.class.router.route_for (@env = env)
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
else
|
46
|
-
response.status = 404
|
47
|
-
end
|
43
|
+
body = route ? (instance_exec &route) : not_found
|
44
|
+
response.write body
|
48
45
|
|
49
46
|
response
|
50
47
|
end
|
@@ -68,4 +65,8 @@ module Hobby
|
|
68
65
|
def halt
|
69
66
|
throw :halt, response
|
70
67
|
end
|
68
|
+
|
69
|
+
def not_found
|
70
|
+
response.status = 404
|
71
|
+
end
|
71
72
|
end
|
data/readme.adoc
CHANGED
@@ -123,17 +123,6 @@ Or, if you are using Rails, you can mount it in `config/routes.rb` with:
|
|
123
123
|
mount C.new('Hobby') => '/some_path'
|
124
124
|
----
|
125
125
|
|
126
|
-
[[features]]
|
127
|
-
Features
|
128
|
-
~~~~~~~~
|
129
|
-
|
130
|
-
* DSL inspired by http://www.sinatrarb.com/[Sinatra].
|
131
|
-
* https://github.com/luislavena/bench-micro[Speed].
|
132
|
-
* Extensible with standard ruby classes and modules, with no extra
|
133
|
-
logic. See https://github.com/ch1c0t/hobby-auth[hobby-auth] and
|
134
|
-
https://github.com/ch1c0t/hobby-json[hobby-json].
|
135
|
-
* Zero configuration.
|
136
|
-
|
137
126
|
[[routes]]
|
138
127
|
== Routes
|
139
128
|
|
data/spec/app_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hobby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anatoly Chernow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|