taps 0.3.22.pre2 → 0.3.23.pre1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,4 +2,4 @@
2
2
  :build:
3
3
  :major: 0
4
4
  :minor: 3
5
- :patch: 22.pre2
5
+ :patch: 23.pre1
@@ -167,7 +167,7 @@ class DataStream
167
167
  log.debug "DataStream#fetch_from_resource state -> #{state.inspect}"
168
168
  state[:chunksize] = Taps::Utils.calculate_chunksize(state[:chunksize]) do |c|
169
169
  state[:chunksize] = c.to_i
170
- res = resource.post({:state => OkJson.encode(self)}, headers)
170
+ res = resource.post({:state => OkJson.encode(self.to_hash)}, headers)
171
171
  end
172
172
 
173
173
  begin
@@ -12,14 +12,19 @@ class Server < Sinatra::Base
12
12
 
13
13
  use Rack::Deflater unless ENV['NO_DEFLATE']
14
14
 
15
+ set :raise_errors => false
16
+ set :show_exceptions => false
17
+
15
18
  error do
16
19
  e = request.env['sinatra.error']
20
+ puts "ERROR: #{e.class}: #{e.message}"
17
21
  begin
18
22
  require 'hoptoad_notifier'
19
23
  HoptoadNotifier.configure do |config|
20
24
  config.api_key = ENV["HOPTOAD_API_KEY"]
21
25
  end
22
26
  HoptoadNotifier.notify(e)
27
+ puts " notified Hoptoad"
23
28
  rescue LoadError
24
29
  puts "An error occurred but Hoptoad was not notified. To use Hoptoad, please"
25
30
  puts "install the 'hoptoad_notifier' gem and set ENV[\"HOPTOAD_API_KEY\"]"
@@ -34,8 +39,8 @@ class Server < Sinatra::Base
34
39
 
35
40
  before do
36
41
  major, minor, patch = request.env['HTTP_TAPS_VERSION'].split('.') rescue []
37
- unless "#{major}.#{minor}" == Taps.compatible_version && patch.to_i >= 20
38
- halt 417, "Taps >= v#{Taps.compatible_version}.20 is required for this server"
42
+ unless "#{major}.#{minor}" == Taps.compatible_version && patch.to_i >= 22
43
+ halt 417, "Taps >= v#{Taps.compatible_version}.22 is required for this server"
39
44
  end
40
45
  end
41
46
 
@@ -61,8 +61,7 @@ module OkJson
61
61
  case typ
62
62
  when '{' then objparse(ts)
63
63
  when '[' then arrparse(ts)
64
- else
65
- raise OkJson::ParserError, "unexpected #{val.inspect}"
64
+ else valparse(ts)
66
65
  end
67
66
  end
68
67
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: taps
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 7
5
- version: 0.3.22.pre2
5
+ version: 0.3.23.pre1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ricardo Chimal, Jr.
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-01 00:00:00 -04:00
13
+ date: 2011-04-04 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency