falcon 0.34.4 → 0.34.5

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
2
  SHA256:
3
- metadata.gz: 36eedcd95d634d7932afa71585259c9cdce1826784b9803b9677c11080f674a1
4
- data.tar.gz: 172c9c7a90cfb1fe113c9671e8b3e3b7ef91b3deaedb8c034e862880eeaaadb7
3
+ metadata.gz: 2f640e30a68a5dd3b923da93eafd29efde45370c6bad1c3cf92d0a43e11dd016
4
+ data.tar.gz: 23cc00d9299c5d0ae67f9fa12746fc263c003f300b9d598048b46faf6064476c
5
5
  SHA512:
6
- metadata.gz: 6df4a5606f0616d33b54874d4235360e19cd8a3be22172be045baa3cd29b4948b4c97b37c52da2ae81c4294423906a0a93abb384fc01d37096d67befd4a62f9c
7
- data.tar.gz: 59ef087e02bc950e08b1dc7645481a8b16f4743e64446a9cfdbf002660978d340273e5e3b7228ece9979862ebf37fd781fafc2270c7af6ce9e3388a43318d1be
6
+ metadata.gz: 97e38f0048e75ca73ceb06c18a5bc80d66f8d9624216cd76a7fe7fac65444758f17dbffb28e10581d8c7b90a9e0c12ad6a17538efa4d994904699c135868c191
7
+ data.tar.gz: 0da2a193a2f63ea1f48b7d328ae51b5745777fb688799347caf4697dfea233b6c5a09fa42207464d326c4bf052336eb932ac051d1016c49fa64efbccf4e794a4
data/README.md CHANGED
@@ -8,6 +8,7 @@ Falcon is a multi-process, multi-fiber rack-compatible HTTP server built on top
8
8
  [![Code Climate](https://codeclimate.com/github/socketry/falcon.svg)](https://codeclimate.com/github/socketry/falcon)
9
9
  [![Coverage Status](https://coveralls.io/repos/socketry/falcon/badge.svg)](https://coveralls.io/r/socketry/falcon)
10
10
  [![Gitter](https://badges.gitter.im/join.svg)](https://gitter.im/socketry/falcon)
11
+ [![Open Source Helpers](https://www.codetriage.com/socketry/falcon/badges/users.svg)](https://www.codetriage.com/socketry/falcon)
11
12
 
12
13
  [async]: https://github.com/socketry/async
13
14
  [async-io]: https://github.com/socketry/async-io
@@ -309,6 +310,7 @@ We take the security of our systems seriously, and we value input from the secur
309
310
  Websites below are listed in alphabetical order.
310
311
 
311
312
  - iCook - [https://icook.tw](https://icook.tw)
313
+ - RubyAPI - [https://rubyapi.org](https://rubyapi.org)
312
314
 
313
315
  You're welcome to file a PR if you want to add your sites here.
314
316
 
@@ -0,0 +1,38 @@
1
+
2
+ class Allocations
3
+ def initialize(app)
4
+ @app = app
5
+ end
6
+
7
+ def allocations
8
+ counts = Hash.new{|h,k| h[k] = 0}
9
+
10
+ ObjectSpace.each_object do |object|
11
+ counts[object.class] += 1
12
+ end
13
+
14
+ return counts
15
+ end
16
+
17
+ def print_allocations(minimum = 100)
18
+ buffer = StringIO.new
19
+
20
+ total = allocations.values.sum
21
+
22
+ allocations.select{|k,v| v >= minimum}.sort_by{|k,v| -v}.each do |key, value|
23
+ buffer.puts "#{key}: #{value} allocations"
24
+ end
25
+
26
+ buffer.puts "** Total: #{total} allocations."
27
+
28
+ return buffer.string
29
+ end
30
+
31
+ def call(env)
32
+ if env["PATH_INFO"] == "/allocations"
33
+ return [200, [], [print_allocations]]
34
+ else
35
+ return @app.call(env)
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,13 @@
1
+
2
+ require_relative 'allocations'
3
+
4
+ use Allocations
5
+
6
+ run lambda{|env| [404, [], []]}
7
+
8
+ # % curl --insecure https://localhost:9292/allocations
9
+ # String: 32179 allocations
10
+ # Array: 10228 allocations
11
+ # Hash: 1299 allocations
12
+ # Class: 1118 allocations
13
+ # ** Total: 50162 allocations.
@@ -24,7 +24,7 @@ GEM
24
24
  mapping (1.1.1)
25
25
  mustermann (1.0.2)
26
26
  nio4r (2.3.1)
27
- rack (2.0.5)
27
+ rack (2.0.8)
28
28
  rack-protection (2.0.3)
29
29
  rack
30
30
  rainbow (2.2.2)
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.add_dependency "async", "~> 1.13"
23
23
  spec.add_dependency "async-io", "~> 1.22"
24
- spec.add_dependency "async-http", "~> 0.49.0"
24
+ spec.add_dependency "async-http", "~> 0.50.0"
25
25
  spec.add_dependency "async-container", "~> 0.14.0"
26
26
 
27
27
  spec.add_dependency "rack", ">= 1.0"
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Falcon
22
- VERSION = "0.34.4"
22
+ VERSION = "0.34.5"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falcon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.4
4
+ version: 0.34.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-26 00:00:00.000000000 Z
11
+ date: 2020-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.49.0
47
+ version: 0.50.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.49.0
54
+ version: 0.50.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: async-container
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -248,6 +248,8 @@ files:
248
248
  - examples/hello/config.ru
249
249
  - examples/hello/falcon.rb
250
250
  - examples/internet/config.ru
251
+ - examples/memory/allocations.rb
252
+ - examples/memory/config.ru
251
253
  - examples/push/client.rb
252
254
  - examples/push/config.ru
253
255
  - examples/push/index.html
@@ -317,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
317
319
  - !ruby/object:Gem::Version
318
320
  version: '0'
319
321
  requirements: []
320
- rubygems_version: 3.0.6
322
+ rubygems_version: 3.1.2
321
323
  signing_key:
322
324
  specification_version: 4
323
325
  summary: A fast, asynchronous, rack-compatible web server.