gctools 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZDEyYzcxODZkNjQ4NDA4ZDg0NDA4ZDZhZGM3Y2RkOTcwOWYzYTM0MA==
5
- data.tar.gz: !binary |-
6
- NTBhOWZkOTRkOTg2NzJjODhlNWNhZjk1ZWQ0MWFkYWYzOWIxODAzNQ==
2
+ SHA1:
3
+ metadata.gz: f4967df7a7cb184fdf034a54233ba70112f79731
4
+ data.tar.gz: ffbd8ab9e2ba64f98e00658c58bb951769b27b61
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YzNjMTMyMzZmMjVjMDA3OTUwNGU5YTY3NmVhZjg0OTU2NTMyZWQ4Mjc1ODNj
10
- OWYwMDZiNGMxNjNmMTRkNzMwNmM2YmJkYTAyODM4NTQyNmJmMTZmOTU2NGFi
11
- NWYyNzQ1NTVmYWZlNzJmODEzYjc2MGRmNzljZWNkMDNlNmIxMDA=
12
- data.tar.gz: !binary |-
13
- N2IxZTJiYWY3YTUxYmNjZjcyZTMwZGQzNDQ4ZmM1MTllMTY2NmZhMmZlODlj
14
- ODVlYjgyODZiZTFiOGNkMDQ0OTY1ZDVjZTBjYjI1ZjE2Y2IyYTZkMWJmNTBi
15
- ZTZiNWE5MTQ5YmE2OWNjYzQwMmM0NGJjNjJkYTRmNTQ2ZGU4Zjc=
6
+ metadata.gz: 6d19b9953f15264fcf4572bdfcdc65e1b8780656b65cceb2c4363c8e93efe484c576a9d47bc6938383897587bc7866c2e795f112642418d81607d252e2a12eef
7
+ data.tar.gz: 195626fb2e7251ec27239dc0b4c54a4aaa89cdbd404c06f4f25e6f72dc0427ecb3f62bfb21c359d45edef82062a6cab01623b1abbb7b7f61f9713fc7b41eca4b
data/README.md CHANGED
@@ -16,9 +16,14 @@ built on new apis and events offered in ruby 2.1:
16
16
 
17
17
  #### logger
18
18
 
19
+ ``` ruby
19
20
  require 'gctools/logger'
21
+ ```
20
22
 
21
23
  #### oobgc
22
24
 
25
+ ``` ruby
23
26
  require 'gctools/oobgc'
24
- GC::OOB.run
27
+ GC::OOB.run # after every request
28
+ use(GC::OOB::UnicornMiddleware) # in config.ru for unicorn
29
+ ```
@@ -184,6 +184,8 @@ void
184
184
  Init_oobgc()
185
185
  {
186
186
  mOOB = rb_define_module_under(rb_mGC, "OOB");
187
+ rb_autoload(mOOB, rb_intern_const("UnicornMiddleware"), "gctools/oobgc/unicorn_middleware.rb");
188
+
187
189
  rb_define_singleton_method(mOOB, "setup", install, 0);
188
190
  rb_define_singleton_method(mOOB, "run", oobgc, 0);
189
191
  rb_define_singleton_method(mOOB, "stat", oobgc_stat, 1);
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'gctools'
3
- s.version = '0.2.1'
3
+ s.version = '0.2.2'
4
4
  s.summary = 'rgengc tools for ruby 2.1+'
5
5
  s.description = 'gc debugger, logger and profiler for rgengc in ruby 2.1'
6
6
 
@@ -0,0 +1,18 @@
1
+ require 'gctools/oobgc'
2
+
3
+ module GC
4
+ module OOB
5
+ class UnicornMiddleware
6
+ def self.new(app)
7
+ ObjectSpace.each_object(Unicorn::HttpServer) do |s|
8
+ s.extend(self)
9
+ end
10
+ app # pretend to be Rack middleware since it was in the past
11
+ end
12
+ def process_client(client)
13
+ super(client) # Unicorn::HttpServer#process_client
14
+ GC::OOB.run
15
+ end
16
+ end
17
+ end
18
+ end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gctools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aman Gupta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-09 00:00:00.000000000 Z
11
+ date: 2014-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.9'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.9'
27
27
  description: gc debugger, logger and profiler for rgengc in ruby 2.1
@@ -32,7 +32,7 @@ extensions:
32
32
  - ext/oobgc/extconf.rb
33
33
  extra_rdoc_files: []
34
34
  files:
35
- - .gitignore
35
+ - ".gitignore"
36
36
  - Gemfile
37
37
  - Gemfile.lock
38
38
  - README.md
@@ -43,6 +43,7 @@ files:
43
43
  - ext/oobgc/oobgc.c
44
44
  - gctools.gemspec
45
45
  - lib/gctools/logger.rb
46
+ - lib/gctools/oobgc/unicorn_middleware.rb
46
47
  - test/test_gcprof.rb
47
48
  - test/test_oobgc.rb
48
49
  homepage: https://github.com/tmm1/gctools
@@ -55,19 +56,18 @@ require_paths:
55
56
  - lib
56
57
  required_ruby_version: !ruby/object:Gem::Requirement
57
58
  requirements:
58
- - - ! '>='
59
+ - - ">="
59
60
  - !ruby/object:Gem::Version
60
61
  version: '0'
61
62
  required_rubygems_version: !ruby/object:Gem::Requirement
62
63
  requirements:
63
- - - ! '>='
64
+ - - ">="
64
65
  - !ruby/object:Gem::Version
65
66
  version: '0'
66
67
  requirements: []
67
68
  rubyforge_project:
68
- rubygems_version: 2.1.11
69
+ rubygems_version: 2.2.0
69
70
  signing_key:
70
71
  specification_version: 4
71
72
  summary: rgengc tools for ruby 2.1+
72
73
  test_files: []
73
- has_rdoc: