rack-timeout-puma 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a94d99ac7c94c627b2c7f810d009283cc7c9b14f
4
+ data.tar.gz: edda9d25df82ebe3b94a59fdb08c6a99a663be64
5
+ SHA512:
6
+ metadata.gz: b9a67246e1e743acbc65e522156a12d225cc16cc5f5c72634073e4500a46b0d851385424f3e7b1c0b3007e86f313b15761cdcecb75d724175a3f556f1b58ec8d
7
+ data.tar.gz: 57d39c584f7ac74126449dbb34ed1f8ed52466098f3406b5adba1d4c777e4292455310109a73aa144456a54d05eaa652b252d4746d56f7f6c8cdc7489756f17d
@@ -0,0 +1,7 @@
1
+ require 'rack/timeout/puma'
2
+
3
+ if defined?(Rails) && [3,4].include?(Rails::VERSION::MAJOR)
4
+ class Rack::Timeout::Railtie < Rails::Railtie
5
+ initializer('rack-timeout-puma.prepend') { |app| app.config.middleware.insert_before(Rack::Timeout, Rack::Timeout::Puma) }
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ require 'rack-timeout'
2
+
3
+ class Rack::Timeout::Puma
4
+ def initialize(app, options = {})
5
+ @app, @options = app, options
6
+ end
7
+
8
+ class Error < StandardError; end
9
+
10
+ def call(env)
11
+ @app.call(env)
12
+ rescue Rack::Timeout::Error => e
13
+ raise Error, "Original Error: #{e.class.inspect}, #{e.message.inspect}, #{e.backtrace.inspect}"
14
+ end
15
+ end
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rack-timeout-puma
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Zachary Salzbank
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rack-timeout
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.2'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.2.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '0.2'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.2.0
33
+ description: Abort requests that take too long, but don't murder Puma workers in the
34
+ process.
35
+ email: zach@key.me
36
+ executables: []
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - lib/rack-timeout-puma.rb
41
+ - lib/rack/timeout/puma.rb
42
+ homepage: http://github.com/keyme/rack-timeout-puma
43
+ licenses:
44
+ - MIT
45
+ metadata: {}
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project:
62
+ rubygems_version: 2.4.3
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Abort requests that take too long on a Puma server
66
+ test_files: []
67
+ has_rdoc: