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.
- data/VERSION.yml +1 -1
- data/lib/taps/data_stream.rb +1 -1
- data/lib/taps/server.rb +7 -2
- data/lib/vendor/okjson.rb +1 -2
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/taps/data_stream.rb
CHANGED
@@ -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
|
data/lib/taps/server.rb
CHANGED
@@ -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 >=
|
38
|
-
halt 417, "Taps >= v#{Taps.compatible_version}.
|
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
|
|
data/lib/vendor/okjson.rb
CHANGED
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.
|
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-
|
13
|
+
date: 2011-04-04 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|