metrician 0.0.9 → 0.0.10

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
  SHA1:
3
- metadata.gz: 50753f3c05fa7176d026cb28dad17d914eaba6dd
4
- data.tar.gz: a2488841dfdf26f306eee4f874e59ab9e065506e
3
+ metadata.gz: a83deae6837d2eb16e8f36b352bfeebeccc41138
4
+ data.tar.gz: 3b698ec7a2b20f6afc688ba8f3b7d904316dface
5
5
  SHA512:
6
- metadata.gz: cf88d35020ebcc9294f25c3933097f8627d6dec8c5d3658e035382df7ba96899dc84cc18040a9ce40755bd286923b5cb23522c28689ed17f68d854748cc760c7
7
- data.tar.gz: 3b3a1bcf966aef58b7bec42d246ad461e022f42b13f1952c6a78949c68dd208463767c7ba03657fc075ef7bc87670e69aab76fd93b0d101e9281c8783743fd06
6
+ metadata.gz: 28d988ff9268492fa52801cac87ec8760a7989f3aae0c6d86d47c67b57f4339255740c7803e95cf302f0ac9caaa5c5e15d16f2a0f25c96fd2d3f601e72a7ed48
7
+ data.tar.gz: 6c928de3e629ca94e4f79837aae9281ebeb9b6c84610cd28030defb0309c0d75e5c1736e1faaede4fcf8071116d193c0c838ac3bc161910f740bc4486d8314b8
@@ -11,6 +11,7 @@ rvm:
11
11
  gemfile:
12
12
  - gemfiles/Gemfile.4.2.sidekiq-4
13
13
  - gemfiles/Gemfile.5.0.pg
14
+ - gemfiles/Gemfile.dalli_not_memcached
14
15
 
15
16
  matrix:
16
17
  exclude:
@@ -1,3 +1,6 @@
1
+ ### 0.0.10 [August 17, 2017]
2
+ * Fix issue with cache lib detection
3
+
1
4
  ### 0.0.9 [August 16, 2017]
2
5
  * Rename some metrics and add common prefix
3
6
 
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Automatically get metrics for [Instrumental](https://instrumentalapp.com) from your Ruby on Rails (RoR) application.
4
4
 
5
- [![Build Status](https://travis-ci.org/Instrumental/metrician.svg?branch=master)](https://travis-ci.org/Instrumental/metrician)
5
+ [![Build Status](https://travis-ci.org/Instrumental/metrician-ruby.svg?branch=master)](https://travis-ci.org/Instrumental/metrician-ruby)
6
6
 
7
7
  ## Automatic Metrics For Ruby
8
8
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- metrician (0.0.9)
4
+ metrician (0.0.10)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- metrician (0.0.9)
4
+ metrician (0.0.10)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -0,0 +1,26 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Runtime dependencies
4
+ gem 'rails', '~>4.2.0'
5
+
6
+ # Differentiated development dependencies
7
+ gem 'mysql2', '= 0.3.17'
8
+ gem 'sidekiq', '~>4.0', require: 'sidekiq/testing'
9
+ gem 'rspec', '~> 3.4'
10
+
11
+ # Development dependencies
12
+ gem 'instrumental_agent'
13
+ gem 'rake'
14
+ gem 'byebug'
15
+ gem 'gemika'
16
+ gem 'database_cleaner'
17
+ gem 'delayed_job_active_record'
18
+ gem 'resque'
19
+ gem 'redis'
20
+ gem 'dalli', '~>2.6'
21
+ gem 'rack-test'
22
+ gem 'simplecov', :require => false, :group => :test
23
+ gem 'honeybadger'
24
+
25
+ # Gem under test
26
+ gem 'metrician', :path => '..'
@@ -0,0 +1,183 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ metrician (0.0.10)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ actionmailer (4.2.9)
10
+ actionpack (= 4.2.9)
11
+ actionview (= 4.2.9)
12
+ activejob (= 4.2.9)
13
+ mail (~> 2.5, >= 2.5.4)
14
+ rails-dom-testing (~> 1.0, >= 1.0.5)
15
+ actionpack (4.2.9)
16
+ actionview (= 4.2.9)
17
+ activesupport (= 4.2.9)
18
+ rack (~> 1.6)
19
+ rack-test (~> 0.6.2)
20
+ rails-dom-testing (~> 1.0, >= 1.0.5)
21
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
22
+ actionview (4.2.9)
23
+ activesupport (= 4.2.9)
24
+ builder (~> 3.1)
25
+ erubis (~> 2.7.0)
26
+ rails-dom-testing (~> 1.0, >= 1.0.5)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
28
+ activejob (4.2.9)
29
+ activesupport (= 4.2.9)
30
+ globalid (>= 0.3.0)
31
+ activemodel (4.2.9)
32
+ activesupport (= 4.2.9)
33
+ builder (~> 3.1)
34
+ activerecord (4.2.9)
35
+ activemodel (= 4.2.9)
36
+ activesupport (= 4.2.9)
37
+ arel (~> 6.0)
38
+ activesupport (4.2.9)
39
+ i18n (~> 0.7)
40
+ minitest (~> 5.1)
41
+ thread_safe (~> 0.3, >= 0.3.4)
42
+ tzinfo (~> 1.1)
43
+ arel (6.0.4)
44
+ builder (3.2.3)
45
+ byebug (9.0.6)
46
+ concurrent-ruby (1.0.5)
47
+ connection_pool (2.2.1)
48
+ dalli (2.7.6)
49
+ database_cleaner (1.6.1)
50
+ delayed_job (4.1.3)
51
+ activesupport (>= 3.0, < 5.2)
52
+ delayed_job_active_record (4.1.2)
53
+ activerecord (>= 3.0, < 5.2)
54
+ delayed_job (>= 3.0, < 5)
55
+ diff-lcs (1.3)
56
+ docile (1.1.5)
57
+ erubis (2.7.0)
58
+ gemika (0.3.2)
59
+ globalid (0.4.0)
60
+ activesupport (>= 4.2.0)
61
+ honeybadger (3.1.2)
62
+ i18n (0.8.6)
63
+ instrumental_agent (1.0.1)
64
+ json (2.1.0)
65
+ loofah (2.0.3)
66
+ nokogiri (>= 1.5.9)
67
+ mail (2.6.6)
68
+ mime-types (>= 1.16, < 4)
69
+ mime-types (3.1)
70
+ mime-types-data (~> 3.2015)
71
+ mime-types-data (3.2016.0521)
72
+ mini_portile2 (2.2.0)
73
+ minitest (5.10.3)
74
+ mono_logger (1.1.0)
75
+ multi_json (1.12.1)
76
+ mysql2 (0.3.17)
77
+ nokogiri (1.8.0)
78
+ mini_portile2 (~> 2.2.0)
79
+ rack (1.6.8)
80
+ rack-protection (1.5.3)
81
+ rack
82
+ rack-test (0.6.3)
83
+ rack (>= 1.0)
84
+ rails (4.2.9)
85
+ actionmailer (= 4.2.9)
86
+ actionpack (= 4.2.9)
87
+ actionview (= 4.2.9)
88
+ activejob (= 4.2.9)
89
+ activemodel (= 4.2.9)
90
+ activerecord (= 4.2.9)
91
+ activesupport (= 4.2.9)
92
+ bundler (>= 1.3.0, < 2.0)
93
+ railties (= 4.2.9)
94
+ sprockets-rails
95
+ rails-deprecated_sanitizer (1.0.3)
96
+ activesupport (>= 4.2.0.alpha)
97
+ rails-dom-testing (1.0.8)
98
+ activesupport (>= 4.2.0.beta, < 5.0)
99
+ nokogiri (~> 1.6)
100
+ rails-deprecated_sanitizer (>= 1.0.1)
101
+ rails-html-sanitizer (1.0.3)
102
+ loofah (~> 2.0)
103
+ railties (4.2.9)
104
+ actionpack (= 4.2.9)
105
+ activesupport (= 4.2.9)
106
+ rake (>= 0.8.7)
107
+ thor (>= 0.18.1, < 2.0)
108
+ rake (12.0.0)
109
+ redis (3.3.3)
110
+ redis-namespace (1.5.3)
111
+ redis (~> 3.0, >= 3.0.4)
112
+ resque (1.27.4)
113
+ mono_logger (~> 1.0)
114
+ multi_json (~> 1.0)
115
+ redis-namespace (~> 1.3)
116
+ sinatra (>= 0.9.2)
117
+ vegas (~> 0.1.2)
118
+ rspec (3.6.0)
119
+ rspec-core (~> 3.6.0)
120
+ rspec-expectations (~> 3.6.0)
121
+ rspec-mocks (~> 3.6.0)
122
+ rspec-core (3.6.0)
123
+ rspec-support (~> 3.6.0)
124
+ rspec-expectations (3.6.0)
125
+ diff-lcs (>= 1.2.0, < 2.0)
126
+ rspec-support (~> 3.6.0)
127
+ rspec-mocks (3.6.0)
128
+ diff-lcs (>= 1.2.0, < 2.0)
129
+ rspec-support (~> 3.6.0)
130
+ rspec-support (3.6.0)
131
+ sidekiq (4.2.10)
132
+ concurrent-ruby (~> 1.0)
133
+ connection_pool (~> 2.2, >= 2.2.0)
134
+ rack-protection (>= 1.5.0)
135
+ redis (~> 3.2, >= 3.2.1)
136
+ simplecov (0.15.0)
137
+ docile (~> 1.1.0)
138
+ json (>= 1.8, < 3)
139
+ simplecov-html (~> 0.10.0)
140
+ simplecov-html (0.10.2)
141
+ sinatra (1.4.8)
142
+ rack (~> 1.5)
143
+ rack-protection (~> 1.4)
144
+ tilt (>= 1.3, < 3)
145
+ sprockets (3.7.1)
146
+ concurrent-ruby (~> 1.0)
147
+ rack (> 1, < 3)
148
+ sprockets-rails (3.2.0)
149
+ actionpack (>= 4.0)
150
+ activesupport (>= 4.0)
151
+ sprockets (>= 3.0.0)
152
+ thor (0.20.0)
153
+ thread_safe (0.3.6)
154
+ tilt (2.0.8)
155
+ tzinfo (1.2.3)
156
+ thread_safe (~> 0.1)
157
+ vegas (0.1.11)
158
+ rack (>= 1.0.0)
159
+
160
+ PLATFORMS
161
+ ruby
162
+
163
+ DEPENDENCIES
164
+ byebug
165
+ dalli (~> 2.6)
166
+ database_cleaner
167
+ delayed_job_active_record
168
+ gemika
169
+ honeybadger
170
+ instrumental_agent
171
+ metrician!
172
+ mysql2 (= 0.3.17)
173
+ rack-test
174
+ rails (~> 4.2.0)
175
+ rake
176
+ redis
177
+ resque
178
+ rspec (~> 3.4)
179
+ sidekiq (~> 4.0)
180
+ simplecov
181
+
182
+ BUNDLED WITH
183
+ 1.14.2
@@ -13,10 +13,10 @@ module Metrician
13
13
  end
14
14
 
15
15
  def client_classes
16
- [
17
- self.class.memcached_gem? && Memcached,
18
- self.class.dalli_gem? && Dalli::Client,
19
- ].compact
16
+ classes = []
17
+ classes << Memcached if self.class.memcached_gem?
18
+ classes << Dalli::Client if self.class.dalli_gem?
19
+ classes
20
20
  end
21
21
 
22
22
  def self.enabled?
@@ -1,5 +1,5 @@
1
1
  module Metrician
2
2
 
3
- VERSION = "0.0.9".freeze
3
+ VERSION = "0.0.10".freeze
4
4
 
5
5
  end
@@ -26,6 +26,7 @@ if [ $success == "true" ]; then
26
26
  echo "= Passed ="
27
27
  echo "======================================"
28
28
  tput sgr0 # reset to default text
29
+ exit 0
29
30
  else
30
31
  tput bold # bold text
31
32
  tput setaf 1 # red text
@@ -33,4 +34,5 @@ else
33
34
  echo "= FAILED ="
34
35
  echo "======================================"
35
36
  tput sgr0 # reset to default text
37
+ exit 1
36
38
  fi
@@ -270,9 +270,9 @@ RSpec.describe Metrician do
270
270
  end
271
271
 
272
272
  memcached_clients = [
273
- ::Memcached.new("localhost:11211"),
273
+ Gemika::Env.gem?('memcached') ? ::Memcached.new("localhost:11211") : nil, # allow testing only one for Gemfile.dalli_not_memcached
274
274
  ::Dalli::Client.new("localhost:11211"),
275
- ]
275
+ ].compact
276
276
 
277
277
  memcached_clients.each do |client|
278
278
  specify "memcached is instrumented (#{client.class.name})" do
@@ -283,7 +283,8 @@ RSpec.describe Metrician do
283
283
  agent.should_receive(:gauge).with("app.cache.command", anything)
284
284
  begin
285
285
  client.get("foo-#{rand(100_000)}")
286
- rescue Memcached::NotFound
286
+ rescue => ex
287
+ raise unless ex.class.name == "Memcached::NotFound"
287
288
  # memcached raises this when there is no value for "foo-N" set
288
289
  end
289
290
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metrician
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Expected Behavior
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-16 00:00:00.000000000 Z
11
+ date: 2017-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: instrumental_agent
@@ -131,6 +131,8 @@ files:
131
131
  - gemfiles/Gemfile.4.2.sidekiq-4.lock
132
132
  - gemfiles/Gemfile.5.0.pg
133
133
  - gemfiles/Gemfile.5.0.pg.lock
134
+ - gemfiles/Gemfile.dalli_not_memcached
135
+ - gemfiles/Gemfile.dalli_not_memcached.lock
134
136
  - lib/metrician.rb
135
137
  - lib/metrician/configuration.rb
136
138
  - lib/metrician/jobs.rb