yabeda-rails 0.1.1 → 0.1.2

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: aa7de0e49e6d7ec219880b9cac720b691118fe263ad5cdac3400627f82e35409
4
- data.tar.gz: 0b220d9d05316e537622d9eba39f26fb1570e7b5979817b8dce05f172c3b5039
3
+ metadata.gz: fa6080838a84371c2f8b813d8f2e613f15dbdddeb2c4281b63eff6368a26aae0
4
+ data.tar.gz: bba458511569e406752c603e5d897415227dac7edb84c58ae80148c88beaa352
5
5
  SHA512:
6
- metadata.gz: bdce37215d1e3f562018d011fa446492587bbc4cabb694db9d73d7d7056c73e4b4e64aff3bd11dfdcec0dbe2024da8f587ab5f7cde988de721aab0b834b95cd3
7
- data.tar.gz: 13bbdce6455f6b5af379034f895809320f585ecb144906837a01e06e23477ff767e26f538249d833201a088a33f42f588248a42dfe39d1e01c74462b3781dfac
6
+ metadata.gz: 3df4bbd07f750e0d32d6b84a894ac74c130fc64844dce69bd8ad9b3e445f7ca61972308528ebadd78d4a0b67198199b203e7b9b881f37ef0d8baae06baac2fb4
7
+ data.tar.gz: 41dd0f1141cd22e182b2e0c4461a712aa1ecb9de97d233b4b03d726345c93c82cb863c1b1752525d05d4e0195d1d3486a0bd9f43c5567eb7ae9fd824407fcf40
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
+
8
+
9
+ ## 0.1.2 - 2019-01-19
10
+
11
+ ### Added
12
+
13
+ - Support for Puma application server. @daffydowden
14
+
15
+ ## 0.1.1 - 2018-10-17
16
+
17
+ ### Changed
18
+
19
+ - Renamed evil-metrics-rails gem to yabeda-rails. @Envek
20
+
21
+ ## 0.1.0 - 2018-10-03
22
+
23
+ - Initial release of evil-metrics-rails gem. @Envek
24
+
25
+ Basic metrics for request durations by controller, action, status, format, and method. ActiveRecord and ActionView timings.
data/README.md CHANGED
@@ -18,6 +18,23 @@ And then execute:
18
18
 
19
19
  $ bundle
20
20
 
21
+ ### Registering metrics on server process start
22
+
23
+ Currently, yabeda-rails automatically registers rails metrics when a server is started via `rails server` or `puma -C config/puma.rb`. However, other application servers or launching via `rackup` aren't supported at the moment.
24
+
25
+ A possible workaround is to detect server process and manually activate yabeda-rails in an initializer:
26
+
27
+ ```ruby
28
+ # config/initializers/yabeda.rb
29
+
30
+ if your_app_server_process? # Your logic here
31
+ Yabeda::Rails.install!
32
+ end
33
+ ```
34
+
35
+ You always can add support for your app server to [lib/yabeda/rails/railtie.rb](). Pull Requests are always welcome!
36
+
37
+
21
38
  ## Metrics
22
39
 
23
40
  - Total web requests received: `rails_requests_total`
@@ -4,10 +4,18 @@ module Yabeda
4
4
  module Rails
5
5
  class Railtie < ::Rails::Railtie # :nodoc:
6
6
  config.after_initialize do
7
- next unless ::Rails.const_defined?(:Server)
7
+ next unless rails_server? || puma_server?
8
8
 
9
9
  ::Yabeda::Rails.install!
10
10
  end
11
+
12
+ def rails_server?
13
+ ::Rails.const_defined?(:Server)
14
+ end
15
+
16
+ def puma_server?
17
+ ::Rails.const_defined?('Puma::CLI')
18
+ end
11
19
  end
12
20
  end
13
21
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yabeda
4
4
  module Rails
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yabeda-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Novikov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-17 00:00:00.000000000 Z
11
+ date: 2019-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yabeda
@@ -91,6 +91,7 @@ files:
91
91
  - ".rspec"
92
92
  - ".rubocop.yml"
93
93
  - ".travis.yml"
94
+ - CHANGELOG.md
94
95
  - Gemfile
95
96
  - LICENSE.txt
96
97
  - README.md
@@ -120,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
121
  - !ruby/object:Gem::Version
121
122
  version: '0'
122
123
  requirements: []
123
- rubyforge_project:
124
- rubygems_version: 2.7.6
124
+ rubygems_version: 3.0.1
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: Extensible metrics for monitoring Ruby on Rails application