toto 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/toto.rb +4 -1
  3. data/toto.gemspec +1 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
data/lib/toto.rb CHANGED
@@ -195,7 +195,7 @@ module Toto
195
195
  else
196
196
  self[:body].match(/(.{1,#{length}}.*?)(\n|\Z)/m).to_s
197
197
  end
198
- markdown(sum.length == self[:body].length ? sum : sum.strip.sub(/\.$/, '…'))
198
+ markdown(sum.length == self[:body].length ? sum : sum.strip.sub(/\.\Z/, '…'))
199
199
  end
200
200
 
201
201
  def url
@@ -283,6 +283,9 @@ module Toto
283
283
  @response['Etag'] = Digest::SHA1.hexdigest(response[:body])
284
284
 
285
285
  @response.status = response[:status]
286
+ rescue
287
+ return [500, {}, []]
288
+ else
286
289
  @response.finish
287
290
  end
288
291
  end
data/toto.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{toto}
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["cloudhead"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - cloudhead