slowpoke 0.2.0 → 0.2.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
- SHA1:
3
- metadata.gz: 91db9bc17aea48ff4c981c379dd667128f2c1902
4
- data.tar.gz: ba3a009f49d2ff5c24c855d8351ee42efb2c1a14
2
+ SHA256:
3
+ metadata.gz: 3b602f89b54077d5e970bb549ce1ad3e57db8d1ab6f15bf62ea3dbae868d6ca5
4
+ data.tar.gz: 60cb3a0c463ebadeb4abec48794ffaa2b33b22af406c672ba2ac351f7134fbed
5
5
  SHA512:
6
- metadata.gz: d2e1c852583fa00010cfe4cafbe0c0e4f17ef88318fc1e069fb4e14a5c9dc0e688f393502bc1e7c667784e2daa5dfd92d18232ffca85a857a0ced4a888fb8482
7
- data.tar.gz: ebfe28a37bad757c0da1a762dd94e12db58f885301e695c5686684913230ed692a9e885d37a0d3155781a921631294d6b60e8aaf0723d9f5a3b9ebc7cd980f23
6
+ metadata.gz: 94352be6969f60055f4f6121f9b087fb5a4b2e144014b973fe6aa772cb7c4c9bd4cc5922a51dc3a41ce9a70bcd97f5f1bd0516ec764d002e410a0578cf1ffb25
7
+ data.tar.gz: bf7c814b78e54a679798107f013083a596fab63fab960734fa5d32ba689e35128b33da7430aa560f789c56d3982d6e58f226f960828e985828793db11549e404
@@ -1,3 +1,8 @@
1
+ ## 0.2.1
2
+
3
+ - Don’t kill server in test environment
4
+ - Require rack-timeout < 0.5
5
+
1
6
  ## 0.2.0
2
7
 
3
8
  - Fixed custom error pages for Rails 5.1
data/README.md CHANGED
@@ -69,14 +69,14 @@ To use a different statement timeout for migrations, set:
69
69
  ENV["MIGRATION_STATEMENT_TIMEOUT"] = 60000 # ms
70
70
  ```
71
71
 
72
- Test connect timeouts by setting your database host to an [unroutable IP](http://stackoverflow.com/questions/100841/artificially-create-a-connection-timeout-error).
72
+ Test connect timeouts by setting your database host to an [unroutable IP](https://stackoverflow.com/questions/100841/artificially-create-a-connection-timeout-error).
73
73
 
74
74
  ```yaml
75
75
  development:
76
76
  host: 10.255.255.1
77
77
  ```
78
78
 
79
- Test statement timeouts with the [pg_sleep](http://www.postgresql.org/docs/9.0/static/functions-datetime.html#FUNCTIONS-DATETIME-DELAY) function.
79
+ Test statement timeouts with the [pg_sleep](https://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-DELAY) function.
80
80
 
81
81
  ```sql
82
82
  SELECT pg_sleep(20);
@@ -1,13 +1,13 @@
1
1
  module Slowpoke
2
2
  class Railtie < Rails::Railtie
3
3
  initializer "slowpoke" do |app|
4
- Rack::Timeout.timeout = Slowpoke.timeout
4
+ Rack::Timeout.service_timeout = Slowpoke.timeout
5
5
  if Rails::VERSION::MAJOR >= 5
6
6
  app.config.middleware.insert_after ActionDispatch::DebugExceptions, Rack::Timeout
7
7
  else
8
8
  app.config.middleware.insert_before ActionDispatch::RemoteIp, Rack::Timeout
9
9
  end
10
- app.config.middleware.insert(0, Slowpoke::Middleware) unless Rails.env.development?
10
+ app.config.middleware.insert(0, Slowpoke::Middleware) unless Rails.env.development? || Rails.env.test?
11
11
  end
12
12
  end
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module Slowpoke
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -9,7 +9,6 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Andrew Kane"]
10
10
  spec.email = ["andrew@chartkick.com"]
11
11
  spec.summary = "Rack::Timeout is great. Slowpoke makes it better."
12
- spec.description = "Rack::Timeout is great. Slowpoke makes it better."
13
12
  spec.homepage = "https://github.com/ankane/slowpoke"
14
13
  spec.license = "MIT"
15
14
 
@@ -18,8 +17,9 @@ Gem::Specification.new do |spec|
18
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
18
  spec.require_paths = ["lib"]
20
19
 
21
- spec.add_dependency "rails"
22
- spec.add_dependency "rack-timeout", ">= 0.3.0"
20
+ spec.add_dependency "railties"
21
+ spec.add_dependency "actionpack"
22
+ spec.add_dependency "rack-timeout", ">= 0.3.0", "< 0.5.0"
23
23
 
24
24
  spec.add_development_dependency "bundler"
25
25
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,17 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slowpoke
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-06 00:00:00.000000000 Z
11
+ date: 2018-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: railties
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: actionpack
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - ">="
@@ -31,6 +45,9 @@ dependencies:
31
45
  - - ">="
32
46
  - !ruby/object:Gem::Version
33
47
  version: 0.3.0
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: 0.5.0
34
51
  type: :runtime
35
52
  prerelease: false
36
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,6 +55,9 @@ dependencies:
38
55
  - - ">="
39
56
  - !ruby/object:Gem::Version
40
57
  version: 0.3.0
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: 0.5.0
41
61
  - !ruby/object:Gem::Dependency
42
62
  name: bundler
43
63
  requirement: !ruby/object:Gem::Requirement
@@ -66,7 +86,7 @@ dependencies:
66
86
  - - ">="
67
87
  - !ruby/object:Gem::Version
68
88
  version: '0'
69
- description: Rack::Timeout is great. Slowpoke makes it better.
89
+ description:
70
90
  email:
71
91
  - andrew@chartkick.com
72
92
  executables: []
@@ -107,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
127
  version: '0'
108
128
  requirements: []
109
129
  rubyforge_project:
110
- rubygems_version: 2.6.13
130
+ rubygems_version: 2.7.6
111
131
  signing_key:
112
132
  specification_version: 4
113
133
  summary: Rack::Timeout is great. Slowpoke makes it better.