hobbit 0.6.0 → 0.6.1

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: f8fea5a3ee747290419ad304a7468743ae765533
4
- data.tar.gz: 4eb29b6427502b999924fd293dcc88d93e3204aa
3
+ metadata.gz: 955052a79f1864e1a2e188c5e758652aad77f2ce
4
+ data.tar.gz: a3b18d9e834d3827e00cbdcfdad2df90cf66b448
5
5
  SHA512:
6
- metadata.gz: 182223ff3e7dbc5fad224842851803d2fb6c72ee88077fbe790a733edfef827d712845c33162a8291d82168b8e380fe928e9031a9c0190f5ce898352c8ede349
7
- data.tar.gz: 10ad33ce30a2a7bb9edd21737c33defbb6dd3d0db14e769064c8cb74258ff270b1ef03a6071d1ac0b60da222cb32d8771091b7c43d62cbe831d7d34a9475d146
6
+ metadata.gz: d6ff56e5e29fa8e87c726dd57a9560b380989a7fdd9e6439ca7620871da6f70291fb72755e2a6719bc399d52755ee617d25df7105b26d436bd4abfa4c362792b
7
+ data.tar.gz: c6012e2be205f21e09bb3bfb5a7b0a54df3219f6dc16f8b7012b0a45adbbca3c70fbf1bca3756e0ea73f454a91511983c949c3b9d03bc918b97a820c00ae9d2e
data/README.md CHANGED
@@ -42,7 +42,7 @@ its extensions instead of providing such functionality.
42
42
 
43
43
  Hobbit applications are just instances of classes that inherits from
44
44
  `Hobbit::Base`, which complies the
45
- [Rack SPEC](http://rack.rubyforge.org/doc/SPEC.html).
45
+ [Rack SPEC](http://rubydoc.info/github/rack/rack/master/file/SPEC).
46
46
 
47
47
  ### Hello World example
48
48
 
@@ -360,6 +360,11 @@ Sinatra-like error handling.
360
360
  * [Wiki](https://github.com/patriciomacadden/hobbit/wiki): Guides, how-tos and recipes
361
361
  * IRC: [#hobbitrb](irc://chat.freenode.net/#hobbitrb) on [http://freenode.net](http://freenode.net)
362
362
 
363
+ ## Presentations
364
+
365
+ * Building web applications in Ruby, by [Krzysztof Wawer](https://github.com/wafcio)
366
+ ([english](https://speakerdeck.com/wafcio/hobbit-english), [polish](https://speakerdeck.com/wafcio/hobbit))
367
+
363
368
  ## Contributing
364
369
 
365
370
  1. Fork it
@@ -21,7 +21,9 @@ module Hobbit
21
21
  end
22
22
 
23
23
  def finish
24
- headers['Content-Length'] = @length.to_s
24
+ unless (100..199).include?(status) || status == 204
25
+ headers['Content-Length'] = @length.to_s
26
+ end
25
27
  [status, headers, body]
26
28
  end
27
29
 
@@ -1,3 +1,3 @@
1
1
  module Hobbit
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
@@ -96,6 +96,12 @@ scope Hobbit::Response do
96
96
  assert_includes h, 'Content-Length'
97
97
  assert_equal '0', h['Content-Length']
98
98
  end
99
+
100
+ test 'does not calculate the Content-Length of the body for statuses that do not allow Content-Length headers' do
101
+ response = Hobbit::Response.new '', 204, {}
102
+ s, h, b = response.finish
103
+ assert !h.key?('Content-Length')
104
+ end
99
105
  end
100
106
 
101
107
  scope '#redirect' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patricio Mac Adden
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-12 00:00:00.000000000 Z
11
+ date: 2016-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  requirements: []
155
155
  rubyforge_project:
156
- rubygems_version: 2.2.2
156
+ rubygems_version: 2.4.5.1
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: A minimalistic microframework built on top of rack