hobby 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e94efedb075ca089d085a994e9ecedb030f7abc5
4
- data.tar.gz: 2310fa22a7721635a2c908c107c09389b0f72f79
3
+ metadata.gz: 7cee023bb96c263672473ee68ae46e802e33de12
4
+ data.tar.gz: 03d6f7a16251048b78eb8182bee854f0d8143a27
5
5
  SHA512:
6
- metadata.gz: 04f4c02193c556faf6a89460471fbaafcbdc079a41f0c5775e5967963661720985a3229fd3191aca391305cf6722ea5bea1c1b37b91eb27114dc9a56b07b1467
7
- data.tar.gz: 7fdce123c7f0b9a8c7ebbc1e3135b568ae09c9aa2915ef2011a402e1d2960f27ddcf88faf1d2bbe2735f680926bbb892feb32ac0b9ece61071c61db6ba3e353b
6
+ metadata.gz: afdef3c73494576b125a3a3d35804028b2d4db8e39c466ff13e6cbc792a086cc534c9f632d17612055b065140028189ded61497f18848ec01c6c4b6f5a6dcc6e
7
+ data.tar.gz: 44c6872c0a4d8fccf6ba709bddd6908cc787927abace513d09bc4d575799d9100cd3ed0c89e95a20ac32490e4dc6380ca541177b251d0fe9876ea203374b1989
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.4'
7
+ spec.version = '0.0.5'
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
@@ -37,17 +37,15 @@ module Hobby
37
37
 
38
38
  protected
39
39
  def handle env
40
- catch :halt do
41
- route = self.class.router.route_for (@env = env)
40
+ route = self.class.router.route_for (@env = env)
42
41
 
43
- if route
44
- response.write instance_exec &route
45
- else
46
- response.status = 404
47
- end
48
-
49
- response
42
+ if route
43
+ response.write instance_exec &route
44
+ else
45
+ response.status = 404
50
46
  end
47
+
48
+ response
51
49
  end
52
50
 
53
51
  private
data/spec/app_spec.rb CHANGED
@@ -149,12 +149,5 @@ describe Hobby::App do
149
149
  assert { last_response.body == 'GET:initial:/route' }
150
150
  end
151
151
  end
152
-
153
- describe Throw do
154
- it do
155
- get '/'
156
- assert { last_response.status == 400 }
157
- end
158
- end
159
152
  end
160
153
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anatoly Chernow
@@ -50,7 +50,6 @@ files:
50
50
  - spec/apps/Map.rb
51
51
  - spec/apps/Nested.rb
52
52
  - spec/apps/OneRouteRouter.rb
53
- - spec/apps/Throw.rb
54
53
  - spec/apps/Use.rb
55
54
  - spec/apps/WithoutPath.rb
56
55
  - spec/helper.rb
@@ -88,7 +87,6 @@ test_files:
88
87
  - spec/apps/Map.rb
89
88
  - spec/apps/Nested.rb
90
89
  - spec/apps/OneRouteRouter.rb
91
- - spec/apps/Throw.rb
92
90
  - spec/apps/Use.rb
93
91
  - spec/apps/WithoutPath.rb
94
92
  - spec/helper.rb
data/spec/apps/Throw.rb DELETED
@@ -1,4 +0,0 @@
1
- get do
2
- response.status = 400
3
- throw :halt, response
4
- end