roo_on_rails 1.4.0 → 1.5.0

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: 492f0bf2a7f3112cd466416f709a18c3d3f6180d
4
- data.tar.gz: dd2ca58474719751987b21b17d8d65214ed097ad
3
+ metadata.gz: 2ba8eb4d84b665c4b2f1c7fe68cb01c6c15d49c1
4
+ data.tar.gz: f977b309d3d38618ef4e420c2bb54cefae60318f
5
5
  SHA512:
6
- metadata.gz: 3d86029410dca537fd459beb22ee499624c292b02e710627e88a356bb1879949e8e22d1039af3077824d99a7171de76a26534e581d5f36f7483f8ceb2245456e
7
- data.tar.gz: d4e3b5635b332ae8d0a238a3ceac0c10c8ef665449d136597344207289b508a26fc2dc405209b9d8bac942ec596b1a85b35fc82e4adee7c2740734b5afb936dd
6
+ metadata.gz: 7537e1034c9e303b4f85dc17e53d88b536f9477ba9379163d2442f7e4427091396c528dfb4f7471542f59cbe8082de9dd8faa2f2b22173b7a11b8fff7044d5be
7
+ data.tar.gz: 2760a62a00f82913bb3e93ab9020cde196502476b347a1c541b1b75291fb3d9bf9ed7877898ce73405a0851e210a1478342e61af06e0c767f4fbf3a703cad197
data/Appraisals CHANGED
@@ -11,7 +11,7 @@ appraise 'rails-4' do
11
11
  end
12
12
 
13
13
  appraise 'rails-5' do
14
- gem 'rails', '~> 5.0'
14
+ gem 'rails', '~> 5.0.0'
15
15
  gem 'sqlite3'
16
16
  gem 'pg'
17
17
  end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # v1.5.0 (2017-06-19)
2
+
3
+ Features:
4
+
5
+ - Adds Datadog integration (#35)
6
+ - Adds `Sidekiq::MetricsWorker` to publish queue/process metrics (#35)
7
+ - Inserts Sidekiq STATSD middleware if Sidekiq Pro is available (#35)
8
+
1
9
  # v1.4.0 (2017-06-05)
2
10
 
3
11
  Features:
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- roo_on_rails (1.4.0)
4
+ roo_on_rails (1.5.0)
5
+ dogstatsd-ruby
5
6
  dotenv-rails (~> 2.1)
6
7
  hashie (~> 3.4)
7
8
  hirefire-resource
@@ -61,12 +62,13 @@ GEM
61
62
  connection_pool (2.2.1)
62
63
  diff-lcs (1.3)
63
64
  docile (1.1.5)
65
+ dogstatsd-ruby (3.0.0)
64
66
  dotenv (2.2.1)
65
67
  dotenv-rails (2.2.1)
66
68
  dotenv (= 2.2.1)
67
69
  railties (>= 3.2, < 5.2)
68
70
  erubis (2.7.0)
69
- excon (0.56.0)
71
+ excon (0.57.0)
70
72
  faraday (0.12.1)
71
73
  multipart-post (>= 1.2, < 3)
72
74
  ffi (1.9.18)
@@ -92,14 +94,14 @@ GEM
92
94
  multi_json (>= 1.9.2)
93
95
  hike (1.2.3)
94
96
  hirefire-resource (0.4.2)
95
- i18n (0.8.1)
97
+ i18n (0.8.4)
96
98
  journey (1.0.4)
97
99
  json (1.8.6)
98
100
  listen (3.1.5)
99
101
  rb-fsevent (~> 0.9, >= 0.9.4)
100
102
  rb-inotify (~> 0.9, >= 0.9.7)
101
103
  ruby_dep (~> 1.2)
102
- lumberjack (1.0.11)
104
+ lumberjack (1.0.12)
103
105
  mail (2.5.4)
104
106
  mime-types (~> 1.16)
105
107
  treetop (~> 1.4.8)
@@ -132,7 +134,7 @@ GEM
132
134
  rack (1.4.7)
133
135
  rack-cache (1.7.0)
134
136
  rack (>= 0.4)
135
- rack-protection (1.5.3)
137
+ rack-protection (2.0.0)
136
138
  rack
137
139
  rack-ssl (1.3.4)
138
140
  rack
@@ -162,19 +164,19 @@ GEM
162
164
  rdoc (3.12.2)
163
165
  json (~> 1.4)
164
166
  redis (3.3.3)
165
- rspec (3.5.0)
166
- rspec-core (~> 3.5.0)
167
- rspec-expectations (~> 3.5.0)
168
- rspec-mocks (~> 3.5.0)
169
- rspec-core (3.5.4)
170
- rspec-support (~> 3.5.0)
171
- rspec-expectations (3.5.0)
167
+ rspec (3.6.0)
168
+ rspec-core (~> 3.6.0)
169
+ rspec-expectations (~> 3.6.0)
170
+ rspec-mocks (~> 3.6.0)
171
+ rspec-core (3.6.0)
172
+ rspec-support (~> 3.6.0)
173
+ rspec-expectations (3.6.0)
172
174
  diff-lcs (>= 1.2.0, < 2.0)
173
- rspec-support (~> 3.5.0)
174
- rspec-mocks (3.5.0)
175
+ rspec-support (~> 3.6.0)
176
+ rspec-mocks (3.6.0)
175
177
  diff-lcs (>= 1.2.0, < 2.0)
176
- rspec-support (~> 3.5.0)
177
- rspec-support (3.5.0)
178
+ rspec-support (~> 3.6.0)
179
+ rspec-support (3.6.0)
178
180
  ruby_dep (1.5.0)
179
181
  sawyer (0.8.1)
180
182
  addressable (>= 2.3.5, < 2.6)
@@ -189,7 +191,7 @@ GEM
189
191
  docile (~> 1.1.0)
190
192
  json (>= 1.8, < 3)
191
193
  simplecov-html (~> 0.10.0)
192
- simplecov-html (0.10.0)
194
+ simplecov-html (0.10.1)
193
195
  slop (3.6.0)
194
196
  sprockets (2.2.3)
195
197
  hike (~> 1.2)
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- roo_on_rails (1.4.0)
4
+ roo_on_rails (1.5.0)
5
+ dogstatsd-ruby
5
6
  dotenv-rails (~> 2.1)
6
7
  hashie (~> 3.4)
7
8
  hirefire-resource
@@ -68,12 +69,13 @@ GEM
68
69
  connection_pool (2.2.1)
69
70
  diff-lcs (1.3)
70
71
  docile (1.1.5)
72
+ dogstatsd-ruby (3.0.0)
71
73
  dotenv (2.2.1)
72
74
  dotenv-rails (2.2.1)
73
75
  dotenv (= 2.2.1)
74
76
  railties (>= 3.2, < 5.2)
75
77
  erubis (2.7.0)
76
- excon (0.56.0)
78
+ excon (0.57.0)
77
79
  faraday (0.12.1)
78
80
  multipart-post (>= 1.2, < 3)
79
81
  ffi (1.9.18)
@@ -100,7 +102,7 @@ GEM
100
102
  excon
101
103
  multi_json (>= 1.9.2)
102
104
  hirefire-resource (0.4.2)
103
- i18n (0.8.1)
105
+ i18n (0.8.4)
104
106
  json (2.1.0)
105
107
  listen (3.1.5)
106
108
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -108,23 +110,23 @@ GEM
108
110
  ruby_dep (~> 1.2)
109
111
  loofah (2.0.3)
110
112
  nokogiri (>= 1.5.9)
111
- lumberjack (1.0.11)
112
- mail (2.6.4)
113
+ lumberjack (1.0.12)
114
+ mail (2.6.5)
113
115
  mime-types (>= 1.16, < 4)
114
116
  memfs (1.0.0)
115
117
  method_source (0.8.2)
116
118
  mime-types (3.1)
117
119
  mime-types-data (~> 3.2015)
118
120
  mime-types-data (3.2016.0521)
119
- mini_portile2 (2.1.0)
120
- minitest (5.10.1)
121
+ mini_portile2 (2.2.0)
122
+ minitest (5.10.2)
121
123
  moneta (0.8.1)
122
124
  multi_json (1.12.1)
123
125
  multipart-post (2.0.0)
124
126
  nenv (0.3.0)
125
127
  newrelic_rpm (3.18.1.330)
126
- nokogiri (1.7.1)
127
- mini_portile2 (~> 2.1.0)
128
+ nokogiri (1.8.0)
129
+ mini_portile2 (~> 2.2.0)
128
130
  notiffany (0.1.1)
129
131
  nenv (~> 0.1)
130
132
  shellany (~> 0.0)
@@ -142,7 +144,7 @@ GEM
142
144
  byebug (~> 9.0)
143
145
  pry (~> 0.10)
144
146
  public_suffix (2.0.5)
145
- rack (1.6.5)
147
+ rack (1.6.8)
146
148
  rack-protection (2.0.0)
147
149
  rack
148
150
  rack-ssl-enforcer (0.2.9)
@@ -178,25 +180,25 @@ GEM
178
180
  rb-inotify (0.9.8)
179
181
  ffi (>= 0.5.0)
180
182
  redis (3.3.3)
181
- rspec (3.5.0)
182
- rspec-core (~> 3.5.0)
183
- rspec-expectations (~> 3.5.0)
184
- rspec-mocks (~> 3.5.0)
185
- rspec-core (3.5.4)
186
- rspec-support (~> 3.5.0)
187
- rspec-expectations (3.5.0)
183
+ rspec (3.6.0)
184
+ rspec-core (~> 3.6.0)
185
+ rspec-expectations (~> 3.6.0)
186
+ rspec-mocks (~> 3.6.0)
187
+ rspec-core (3.6.0)
188
+ rspec-support (~> 3.6.0)
189
+ rspec-expectations (3.6.0)
188
190
  diff-lcs (>= 1.2.0, < 2.0)
189
- rspec-support (~> 3.5.0)
190
- rspec-mocks (3.5.0)
191
+ rspec-support (~> 3.6.0)
192
+ rspec-mocks (3.6.0)
191
193
  diff-lcs (>= 1.2.0, < 2.0)
192
- rspec-support (~> 3.5.0)
193
- rspec-support (3.5.0)
194
+ rspec-support (~> 3.6.0)
195
+ rspec-support (3.6.0)
194
196
  ruby_dep (1.5.0)
195
197
  sawyer (0.8.1)
196
198
  addressable (>= 2.3.5, < 2.6)
197
199
  faraday (~> 0.8, < 1.0)
198
200
  shellany (0.0.1)
199
- sidekiq (5.0.0)
201
+ sidekiq (5.0.3)
200
202
  concurrent-ruby (~> 1.0)
201
203
  connection_pool (~> 2.2, >= 2.2.0)
202
204
  rack-protection (>= 1.5.0)
@@ -205,7 +207,7 @@ GEM
205
207
  docile (~> 1.1.0)
206
208
  json (>= 1.8, < 3)
207
209
  simplecov-html (~> 0.10.0)
208
- simplecov-html (0.10.0)
210
+ simplecov-html (0.10.1)
209
211
  slop (3.6.0)
210
212
  sprockets (3.7.1)
211
213
  concurrent-ruby (~> 1.0)
@@ -7,6 +7,6 @@ gem "guard-rspec"
7
7
  gem "appraisal"
8
8
  gem "pg"
9
9
  gem "sqlite3"
10
- gem "rails", "~> 5.0"
10
+ gem "rails", "~> 5.0.0"
11
11
 
12
12
  gemspec path: "../"
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- roo_on_rails (1.4.0)
4
+ roo_on_rails (1.5.0)
5
+ dogstatsd-ruby
5
6
  dotenv-rails (~> 2.1)
6
7
  hashie (~> 3.4)
7
8
  hirefire-resource
@@ -16,39 +17,39 @@ PATH
16
17
  GEM
17
18
  remote: https://rubygems.org/
18
19
  specs:
19
- actioncable (5.0.2)
20
- actionpack (= 5.0.2)
20
+ actioncable (5.0.3)
21
+ actionpack (= 5.0.3)
21
22
  nio4r (>= 1.2, < 3.0)
22
23
  websocket-driver (~> 0.6.1)
23
- actionmailer (5.0.2)
24
- actionpack (= 5.0.2)
25
- actionview (= 5.0.2)
26
- activejob (= 5.0.2)
24
+ actionmailer (5.0.3)
25
+ actionpack (= 5.0.3)
26
+ actionview (= 5.0.3)
27
+ activejob (= 5.0.3)
27
28
  mail (~> 2.5, >= 2.5.4)
28
29
  rails-dom-testing (~> 2.0)
29
- actionpack (5.0.2)
30
- actionview (= 5.0.2)
31
- activesupport (= 5.0.2)
30
+ actionpack (5.0.3)
31
+ actionview (= 5.0.3)
32
+ activesupport (= 5.0.3)
32
33
  rack (~> 2.0)
33
34
  rack-test (~> 0.6.3)
34
35
  rails-dom-testing (~> 2.0)
35
36
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
36
- actionview (5.0.2)
37
- activesupport (= 5.0.2)
37
+ actionview (5.0.3)
38
+ activesupport (= 5.0.3)
38
39
  builder (~> 3.1)
39
40
  erubis (~> 2.7.0)
40
41
  rails-dom-testing (~> 2.0)
41
42
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
42
- activejob (5.0.2)
43
- activesupport (= 5.0.2)
43
+ activejob (5.0.3)
44
+ activesupport (= 5.0.3)
44
45
  globalid (>= 0.3.6)
45
- activemodel (5.0.2)
46
- activesupport (= 5.0.2)
47
- activerecord (5.0.2)
48
- activemodel (= 5.0.2)
49
- activesupport (= 5.0.2)
46
+ activemodel (5.0.3)
47
+ activesupport (= 5.0.3)
48
+ activerecord (5.0.3)
49
+ activemodel (= 5.0.3)
50
+ activesupport (= 5.0.3)
50
51
  arel (~> 7.0)
51
- activesupport (5.0.2)
52
+ activesupport (5.0.3)
52
53
  concurrent-ruby (~> 1.0, >= 1.0.2)
53
54
  i18n (~> 0.7)
54
55
  minitest (~> 5.1)
@@ -71,12 +72,13 @@ GEM
71
72
  connection_pool (2.2.1)
72
73
  diff-lcs (1.3)
73
74
  docile (1.1.5)
75
+ dogstatsd-ruby (3.0.0)
74
76
  dotenv (2.2.1)
75
77
  dotenv-rails (2.2.1)
76
78
  dotenv (= 2.2.1)
77
79
  railties (>= 3.2, < 5.2)
78
80
  erubis (2.7.0)
79
- excon (0.56.0)
81
+ excon (0.57.0)
80
82
  faraday (0.12.1)
81
83
  multipart-post (>= 1.2, < 3)
82
84
  ffi (1.9.18)
@@ -103,7 +105,7 @@ GEM
103
105
  excon
104
106
  multi_json (>= 1.9.2)
105
107
  hirefire-resource (0.4.2)
106
- i18n (0.8.1)
108
+ i18n (0.8.4)
107
109
  json (2.1.0)
108
110
  listen (3.1.5)
109
111
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -111,24 +113,24 @@ GEM
111
113
  ruby_dep (~> 1.2)
112
114
  loofah (2.0.3)
113
115
  nokogiri (>= 1.5.9)
114
- lumberjack (1.0.11)
115
- mail (2.6.4)
116
+ lumberjack (1.0.12)
117
+ mail (2.6.5)
116
118
  mime-types (>= 1.16, < 4)
117
119
  memfs (1.0.0)
118
120
  method_source (0.8.2)
119
121
  mime-types (3.1)
120
122
  mime-types-data (~> 3.2015)
121
123
  mime-types-data (3.2016.0521)
122
- mini_portile2 (2.1.0)
123
- minitest (5.10.1)
124
+ mini_portile2 (2.2.0)
125
+ minitest (5.10.2)
124
126
  moneta (0.8.1)
125
127
  multi_json (1.12.1)
126
128
  multipart-post (2.0.0)
127
129
  nenv (0.3.0)
128
130
  newrelic_rpm (3.18.1.330)
129
- nio4r (2.0.0)
130
- nokogiri (1.7.1)
131
- mini_portile2 (~> 2.1.0)
131
+ nio4r (2.1.0)
132
+ nokogiri (1.8.0)
133
+ mini_portile2 (~> 2.2.0)
132
134
  notiffany (0.1.1)
133
135
  nenv (~> 0.1)
134
136
  shellany (~> 0.0)
@@ -146,33 +148,33 @@ GEM
146
148
  byebug (~> 9.0)
147
149
  pry (~> 0.10)
148
150
  public_suffix (2.0.5)
149
- rack (2.0.1)
151
+ rack (2.0.3)
150
152
  rack-protection (2.0.0)
151
153
  rack
152
154
  rack-ssl-enforcer (0.2.9)
153
155
  rack-test (0.6.3)
154
156
  rack (>= 1.0)
155
157
  rack-timeout (0.4.2)
156
- rails (5.0.2)
157
- actioncable (= 5.0.2)
158
- actionmailer (= 5.0.2)
159
- actionpack (= 5.0.2)
160
- actionview (= 5.0.2)
161
- activejob (= 5.0.2)
162
- activemodel (= 5.0.2)
163
- activerecord (= 5.0.2)
164
- activesupport (= 5.0.2)
158
+ rails (5.0.3)
159
+ actioncable (= 5.0.3)
160
+ actionmailer (= 5.0.3)
161
+ actionpack (= 5.0.3)
162
+ actionview (= 5.0.3)
163
+ activejob (= 5.0.3)
164
+ activemodel (= 5.0.3)
165
+ activerecord (= 5.0.3)
166
+ activesupport (= 5.0.3)
165
167
  bundler (>= 1.3.0, < 2.0)
166
- railties (= 5.0.2)
168
+ railties (= 5.0.3)
167
169
  sprockets-rails (>= 2.0.0)
168
- rails-dom-testing (2.0.2)
169
- activesupport (>= 4.2.0, < 6.0)
170
- nokogiri (~> 1.6)
170
+ rails-dom-testing (2.0.3)
171
+ activesupport (>= 4.2.0)
172
+ nokogiri (>= 1.6)
171
173
  rails-html-sanitizer (1.0.3)
172
174
  loofah (~> 2.0)
173
- railties (5.0.2)
174
- actionpack (= 5.0.2)
175
- activesupport (= 5.0.2)
175
+ railties (5.0.3)
176
+ actionpack (= 5.0.3)
177
+ activesupport (= 5.0.3)
176
178
  method_source
177
179
  rake (>= 0.8.7)
178
180
  thor (>= 0.18.1, < 2.0)
@@ -181,25 +183,25 @@ GEM
181
183
  rb-inotify (0.9.8)
182
184
  ffi (>= 0.5.0)
183
185
  redis (3.3.3)
184
- rspec (3.5.0)
185
- rspec-core (~> 3.5.0)
186
- rspec-expectations (~> 3.5.0)
187
- rspec-mocks (~> 3.5.0)
188
- rspec-core (3.5.4)
189
- rspec-support (~> 3.5.0)
190
- rspec-expectations (3.5.0)
186
+ rspec (3.6.0)
187
+ rspec-core (~> 3.6.0)
188
+ rspec-expectations (~> 3.6.0)
189
+ rspec-mocks (~> 3.6.0)
190
+ rspec-core (3.6.0)
191
+ rspec-support (~> 3.6.0)
192
+ rspec-expectations (3.6.0)
191
193
  diff-lcs (>= 1.2.0, < 2.0)
192
- rspec-support (~> 3.5.0)
193
- rspec-mocks (3.5.0)
194
+ rspec-support (~> 3.6.0)
195
+ rspec-mocks (3.6.0)
194
196
  diff-lcs (>= 1.2.0, < 2.0)
195
- rspec-support (~> 3.5.0)
196
- rspec-support (3.5.0)
197
+ rspec-support (~> 3.6.0)
198
+ rspec-support (3.6.0)
197
199
  ruby_dep (1.5.0)
198
200
  sawyer (0.8.1)
199
201
  addressable (>= 2.3.5, < 2.6)
200
202
  faraday (~> 0.8, < 1.0)
201
203
  shellany (0.0.1)
202
- sidekiq (5.0.0)
204
+ sidekiq (5.0.3)
203
205
  concurrent-ruby (~> 1.0)
204
206
  connection_pool (~> 2.2, >= 2.2.0)
205
207
  rack-protection (>= 1.5.0)
@@ -208,7 +210,7 @@ GEM
208
210
  docile (~> 1.1.0)
209
211
  json (>= 1.8, < 3)
210
212
  simplecov-html (~> 0.10.0)
211
- simplecov-html (0.10.0)
213
+ simplecov-html (0.10.1)
212
214
  slop (3.6.0)
213
215
  sprockets (3.7.1)
214
216
  concurrent-ruby (~> 1.0)
@@ -239,7 +241,7 @@ DEPENDENCIES
239
241
  memfs
240
242
  pg
241
243
  pry-byebug
242
- rails (~> 5.0)
244
+ rails (~> 5.0.0)
243
245
  rake (~> 10.0)
244
246
  roo_on_rails!
245
247
  rspec (~> 3.0)
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- roo_on_rails (1.4.0)
4
+ roo_on_rails (1.5.0)
5
+ dogstatsd-ruby
5
6
  dotenv-rails (~> 2.1)
6
7
  hashie (~> 3.4)
7
8
  hirefire-resource
@@ -16,39 +17,39 @@ PATH
16
17
  GEM
17
18
  remote: https://rubygems.org/
18
19
  specs:
19
- actioncable (5.1.0)
20
- actionpack (= 5.1.0)
20
+ actioncable (5.1.1)
21
+ actionpack (= 5.1.1)
21
22
  nio4r (~> 2.0)
22
23
  websocket-driver (~> 0.6.1)
23
- actionmailer (5.1.0)
24
- actionpack (= 5.1.0)
25
- actionview (= 5.1.0)
26
- activejob (= 5.1.0)
24
+ actionmailer (5.1.1)
25
+ actionpack (= 5.1.1)
26
+ actionview (= 5.1.1)
27
+ activejob (= 5.1.1)
27
28
  mail (~> 2.5, >= 2.5.4)
28
29
  rails-dom-testing (~> 2.0)
29
- actionpack (5.1.0)
30
- actionview (= 5.1.0)
31
- activesupport (= 5.1.0)
30
+ actionpack (5.1.1)
31
+ actionview (= 5.1.1)
32
+ activesupport (= 5.1.1)
32
33
  rack (~> 2.0)
33
34
  rack-test (~> 0.6.3)
34
35
  rails-dom-testing (~> 2.0)
35
36
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
36
- actionview (5.1.0)
37
- activesupport (= 5.1.0)
37
+ actionview (5.1.1)
38
+ activesupport (= 5.1.1)
38
39
  builder (~> 3.1)
39
40
  erubi (~> 1.4)
40
41
  rails-dom-testing (~> 2.0)
41
42
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
42
- activejob (5.1.0)
43
- activesupport (= 5.1.0)
43
+ activejob (5.1.1)
44
+ activesupport (= 5.1.1)
44
45
  globalid (>= 0.3.6)
45
- activemodel (5.1.0)
46
- activesupport (= 5.1.0)
47
- activerecord (5.1.0)
48
- activemodel (= 5.1.0)
49
- activesupport (= 5.1.0)
46
+ activemodel (5.1.1)
47
+ activesupport (= 5.1.1)
48
+ activerecord (5.1.1)
49
+ activemodel (= 5.1.1)
50
+ activesupport (= 5.1.1)
50
51
  arel (~> 8.0)
51
- activesupport (5.1.0)
52
+ activesupport (5.1.1)
52
53
  concurrent-ruby (~> 1.0, >= 1.0.2)
53
54
  i18n (~> 0.7)
54
55
  minitest (~> 5.1)
@@ -71,13 +72,14 @@ GEM
71
72
  connection_pool (2.2.1)
72
73
  diff-lcs (1.3)
73
74
  docile (1.1.5)
75
+ dogstatsd-ruby (3.0.0)
74
76
  dotenv (2.2.1)
75
77
  dotenv-rails (2.2.1)
76
78
  dotenv (= 2.2.1)
77
79
  railties (>= 3.2, < 5.2)
78
80
  erubi (1.6.0)
79
81
  erubis (2.7.0)
80
- excon (0.56.0)
82
+ excon (0.57.0)
81
83
  faraday (0.12.1)
82
84
  multipart-post (>= 1.2, < 3)
83
85
  ffi (1.9.18)
@@ -104,7 +106,7 @@ GEM
104
106
  excon
105
107
  multi_json (>= 1.9.2)
106
108
  hirefire-resource (0.4.2)
107
- i18n (0.8.1)
109
+ i18n (0.8.4)
108
110
  json (2.1.0)
109
111
  listen (3.1.5)
110
112
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -112,7 +114,7 @@ GEM
112
114
  ruby_dep (~> 1.2)
113
115
  loofah (2.0.3)
114
116
  nokogiri (>= 1.5.9)
115
- lumberjack (1.0.11)
117
+ lumberjack (1.0.12)
116
118
  mail (2.6.5)
117
119
  mime-types (>= 1.16, < 4)
118
120
  memfs (1.0.0)
@@ -120,16 +122,16 @@ GEM
120
122
  mime-types (3.1)
121
123
  mime-types-data (~> 3.2015)
122
124
  mime-types-data (3.2016.0521)
123
- mini_portile2 (2.1.0)
124
- minitest (5.10.1)
125
+ mini_portile2 (2.2.0)
126
+ minitest (5.10.2)
125
127
  moneta (0.8.1)
126
128
  multi_json (1.12.1)
127
129
  multipart-post (2.0.0)
128
130
  nenv (0.3.0)
129
131
  newrelic_rpm (3.18.1.330)
130
- nio4r (2.0.0)
131
- nokogiri (1.7.1)
132
- mini_portile2 (~> 2.1.0)
132
+ nio4r (2.1.0)
133
+ nokogiri (1.8.0)
134
+ mini_portile2 (~> 2.2.0)
133
135
  notiffany (0.1.1)
134
136
  nenv (~> 0.1)
135
137
  shellany (~> 0.0)
@@ -147,33 +149,33 @@ GEM
147
149
  byebug (~> 9.0)
148
150
  pry (~> 0.10)
149
151
  public_suffix (2.0.5)
150
- rack (2.0.1)
152
+ rack (2.0.3)
151
153
  rack-protection (2.0.0)
152
154
  rack
153
155
  rack-ssl-enforcer (0.2.9)
154
156
  rack-test (0.6.3)
155
157
  rack (>= 1.0)
156
158
  rack-timeout (0.4.2)
157
- rails (5.1.0)
158
- actioncable (= 5.1.0)
159
- actionmailer (= 5.1.0)
160
- actionpack (= 5.1.0)
161
- actionview (= 5.1.0)
162
- activejob (= 5.1.0)
163
- activemodel (= 5.1.0)
164
- activerecord (= 5.1.0)
165
- activesupport (= 5.1.0)
159
+ rails (5.1.1)
160
+ actioncable (= 5.1.1)
161
+ actionmailer (= 5.1.1)
162
+ actionpack (= 5.1.1)
163
+ actionview (= 5.1.1)
164
+ activejob (= 5.1.1)
165
+ activemodel (= 5.1.1)
166
+ activerecord (= 5.1.1)
167
+ activesupport (= 5.1.1)
166
168
  bundler (>= 1.3.0, < 2.0)
167
- railties (= 5.1.0)
169
+ railties (= 5.1.1)
168
170
  sprockets-rails (>= 2.0.0)
169
- rails-dom-testing (2.0.2)
170
- activesupport (>= 4.2.0, < 6.0)
171
- nokogiri (~> 1.6)
171
+ rails-dom-testing (2.0.3)
172
+ activesupport (>= 4.2.0)
173
+ nokogiri (>= 1.6)
172
174
  rails-html-sanitizer (1.0.3)
173
175
  loofah (~> 2.0)
174
- railties (5.1.0)
175
- actionpack (= 5.1.0)
176
- activesupport (= 5.1.0)
176
+ railties (5.1.1)
177
+ actionpack (= 5.1.1)
178
+ activesupport (= 5.1.1)
177
179
  method_source
178
180
  rake (>= 0.8.7)
179
181
  thor (>= 0.18.1, < 2.0)
@@ -182,25 +184,25 @@ GEM
182
184
  rb-inotify (0.9.8)
183
185
  ffi (>= 0.5.0)
184
186
  redis (3.3.3)
185
- rspec (3.5.0)
186
- rspec-core (~> 3.5.0)
187
- rspec-expectations (~> 3.5.0)
188
- rspec-mocks (~> 3.5.0)
189
- rspec-core (3.5.4)
190
- rspec-support (~> 3.5.0)
191
- rspec-expectations (3.5.0)
187
+ rspec (3.6.0)
188
+ rspec-core (~> 3.6.0)
189
+ rspec-expectations (~> 3.6.0)
190
+ rspec-mocks (~> 3.6.0)
191
+ rspec-core (3.6.0)
192
+ rspec-support (~> 3.6.0)
193
+ rspec-expectations (3.6.0)
192
194
  diff-lcs (>= 1.2.0, < 2.0)
193
- rspec-support (~> 3.5.0)
194
- rspec-mocks (3.5.0)
195
+ rspec-support (~> 3.6.0)
196
+ rspec-mocks (3.6.0)
195
197
  diff-lcs (>= 1.2.0, < 2.0)
196
- rspec-support (~> 3.5.0)
197
- rspec-support (3.5.0)
198
+ rspec-support (~> 3.6.0)
199
+ rspec-support (3.6.0)
198
200
  ruby_dep (1.5.0)
199
201
  sawyer (0.8.1)
200
202
  addressable (>= 2.3.5, < 2.6)
201
203
  faraday (~> 0.8, < 1.0)
202
204
  shellany (0.0.1)
203
- sidekiq (5.0.0)
205
+ sidekiq (5.0.3)
204
206
  concurrent-ruby (~> 1.0)
205
207
  connection_pool (~> 2.2, >= 2.2.0)
206
208
  rack-protection (>= 1.5.0)
@@ -209,7 +211,7 @@ GEM
209
211
  docile (~> 1.1.0)
210
212
  json (>= 1.8, < 3)
211
213
  simplecov-html (~> 0.10.0)
212
- simplecov-html (0.10.0)
214
+ simplecov-html (0.10.1)
213
215
  slop (3.6.0)
214
216
  sprockets (3.7.1)
215
217
  concurrent-ruby (~> 1.0)
@@ -17,10 +17,12 @@ module RooOnRails
17
17
  ::Rack::Timeout
18
18
  )
19
19
 
20
+ middleware_to_insert_before = Rails::VERSION::MAJOR < 4 ? ::ActionDispatch::Cookies : ::Rack::Head
21
+
20
22
  # This needs to be inserted low in the stack, before Rails returns the
21
23
  # thread-current connection to the pool.
22
24
  app.config.middleware.insert_before(
23
- ActionDispatch::Cookies,
25
+ middleware_to_insert_before,
24
26
  RooOnRails::Rack::SafeTimeouts
25
27
  )
26
28
 
@@ -31,7 +33,7 @@ module RooOnRails
31
33
  # Don't use SslEnforcer in test environment as it breaks Capybara
32
34
  unless Rails.env.test?
33
35
  app.config.middleware.insert_before(
34
- ActionDispatch::Cookies,
36
+ middleware_to_insert_before,
35
37
  ::Rack::SslEnforcer
36
38
  )
37
39
  end
@@ -1,4 +1,5 @@
1
1
  require 'sidekiq'
2
+ require 'roo_on_rails/statsd'
2
3
  require 'roo_on_rails/sidekiq/settings'
3
4
  require 'roo_on_rails/sidekiq/sla_metric'
4
5
 
@@ -8,9 +9,11 @@ module RooOnRails
8
9
  initializer 'roo_on_rails.sidekiq' do |app|
9
10
  require 'hirefire-resource'
10
11
  $stderr.puts 'initializer roo_on_rails.sidekiq'
11
- break unless ENV.fetch('SIDEKIQ_ENABLED', 'true').to_s =~ /\A(YES|TRUE|ON|1)\Z/i
12
- config_sidekiq
13
- config_hirefire(app)
12
+ if ENV.fetch('SIDEKIQ_ENABLED', 'true').to_s =~ /\A(YES|TRUE|ON|1)\Z/i
13
+ config_sidekiq
14
+ config_sidekiq_metrics
15
+ config_hirefire(app)
16
+ end
14
17
  end
15
18
 
16
19
  def config_hirefire(app)
@@ -28,6 +31,18 @@ module RooOnRails
28
31
  end
29
32
  end
30
33
 
34
+ def config_sidekiq_metrics
35
+ require 'sidekiq/middleware/server/statsd'
36
+
37
+ ::Sidekiq.configure_server do |x|
38
+ x.server_middleware do |chain|
39
+ chain.add ::Sidekiq::Middleware::Server::Statsd, client: RooOnRails.statsd
40
+ end
41
+ end
42
+ rescue LoadError
43
+ $stderr.puts 'Sidekiq metrics unavailable without Sidekiq Pro'
44
+ end
45
+
31
46
  def add_middleware(app)
32
47
  $stderr.puts 'HIREFIRE_TOKEN set'
33
48
  app.middleware.use HireFire::Middleware
@@ -0,0 +1,40 @@
1
+ require 'sidekiq/api'
2
+ require 'roo_on_rails/sidekiq/queue_latency'
3
+ require 'roo_on_rails/sidekiq/process_scaling'
4
+ require 'roo_on_rails/statsd'
5
+
6
+ module RooOnRails
7
+ module Sidekiq
8
+ class MetricsWorker
9
+ include ::Sidekiq::Worker
10
+
11
+ sidekiq_options queue: 'monitoring', retry: false
12
+
13
+ def perform
14
+ RooOnRails.statsd.batch do |stats|
15
+ queues = ::Sidekiq::Queue.all.map { |q| QueueLatency.new(q) }
16
+ queue_stats(stats, queues)
17
+ process_stats(stats, queues)
18
+ end
19
+ end
20
+
21
+ private
22
+
23
+ def queue_stats(stats, queues)
24
+ queues.each do |queue|
25
+ tags = ["queue:#{queue.name}"]
26
+ stats.gauge('jobs.queue.size', queue.size, tags: tags)
27
+ stats.gauge('jobs.queue.latency', queue.latency, tags: tags)
28
+ stats.gauge('jobs.queue.normalised_latency', queue.normalised_latency, tags: tags)
29
+ end
30
+ end
31
+
32
+ def process_stats(stats, queues)
33
+ process_stats = ProcessScaling.new(queues)
34
+ stats.gauge('jobs.processes.max_normalised_latency', process_stats.max_normalised_latency)
35
+ stats.gauge('jobs.processes.requested', process_stats.requested_processes)
36
+ stats.gauge('jobs.processes.current', process_stats.current_processes)
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,39 @@
1
+ require 'sidekiq/api'
2
+
3
+ module RooOnRails
4
+ module Sidekiq
5
+ class ProcessScaling
6
+ def initialize(queue_latencies)
7
+ @queue_latencies = queue_latencies
8
+ end
9
+
10
+ def current_processes
11
+ ::Sidekiq::ProcessSet.new.count
12
+ end
13
+
14
+ def max_normalised_latency
15
+ @queue_latencies.any? ? @queue_latencies.map(&:normalised_latency).max : 0
16
+ end
17
+
18
+ def requested_processes
19
+ if max_normalised_latency > increasing_latency
20
+ current_processes + 1
21
+ elsif max_normalised_latency < decreasing_latency
22
+ [current_processes - 1, 1].max
23
+ else
24
+ current_processes
25
+ end
26
+ end
27
+
28
+ protected
29
+
30
+ def increasing_latency
31
+ ENV.fetch('WORKER_INCREASE_THRESHOLD', 0.5).to_f
32
+ end
33
+
34
+ def decreasing_latency
35
+ ENV.fetch('WORKER_DECREASE_THRESHOLD', 0.1).to_f
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,31 @@
1
+ require 'active_support/core_ext/numeric'
2
+
3
+ module RooOnRails
4
+ module Sidekiq
5
+ class QueueLatency
6
+ extend Forwardable
7
+
8
+ def_delegators :@queue, :size, :latency, :name
9
+ attr_reader :queue
10
+
11
+ def initialize(queue)
12
+ @queue = queue
13
+ end
14
+
15
+ def normalised_latency
16
+ metric = queue.latency.to_f / permitted_latency
17
+ metric.round(3)
18
+ end
19
+
20
+ def permitted_latency
21
+ prefix, number, unit = queue.name.partition(/[0-9]+/)
22
+ case prefix
23
+ when 'monitoring', 'realtime' then 10.seconds.to_i
24
+ when 'default' then 1.day.to_i
25
+ when 'within' then number.to_i.public_send(unit.to_sym).to_i
26
+ else raise "Cannot determine permitted latency for queue #{queue.name}"
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -1,75 +1,18 @@
1
- # Returns stats on the current SLA performance of queues in a sidekiq instance.
2
- # Assumes workers are not bound to queues
3
1
  require 'sidekiq/api'
4
- require 'active_support'
5
- require 'active_support/core_ext/numeric'
2
+ require 'roo_on_rails/sidekiq/queue_latency'
3
+ require 'roo_on_rails/sidekiq/process_scaling'
4
+
6
5
  module RooOnRails
7
6
  module Sidekiq
7
+ # Returns stats on the current SLA performance of queues in a Sidekiq instance.
8
+ #
9
+ # Assumes workers are not bound to queues.
8
10
  class SlaMetric
9
11
  def self.queue
10
- queues = ::Sidekiq::Queue.all.map { |q| SidekiqQueueMetrics.new(q) }
11
- global_stats = SidekiqWorkerCount.new(queues)
12
+ queues = ::Sidekiq::Queue.all.map { |q| QueueLatency.new(q) }
13
+ global_stats = ProcessScaling.new(queues)
12
14
  global_stats.requested_processes
13
15
  end
14
-
15
- class SidekiqQueueMetrics
16
- extend Forwardable
17
- def_delegators :@queue, :size, :latency, :name
18
- attr_reader :queue
19
-
20
- def initialize(queue)
21
- @queue = queue
22
- end
23
-
24
- def normalised_latency
25
- metric = queue.latency.to_f / permitted_latency
26
- metric.round(3)
27
- end
28
-
29
- def permitted_latency
30
- prefix, number, unit = queue.name.partition(/[0-9]+/)
31
- case prefix
32
- when 'monitoring', 'realtime' then 10.seconds.to_i
33
- when 'default' then 1.day.to_i
34
- when 'within' then number.to_i.public_send(unit.to_sym).to_i
35
- else raise "Cannot determine permitted latency for queue #{queue.name}"
36
- end
37
- end
38
- end
39
-
40
- class SidekiqWorkerCount
41
- def initialize(metrics)
42
- @metrics = metrics
43
- end
44
-
45
- def current_processes
46
- ::Sidekiq::ProcessSet.new.count
47
- end
48
-
49
- def max_normalised_latency
50
- @metrics.any? ? @metrics.map(&:normalised_latency).max : 0
51
- end
52
-
53
- def requested_processes
54
- if max_normalised_latency > increasing_latency
55
- current_processes + 1
56
- elsif max_normalised_latency < decreasing_latency
57
- [current_processes - 1, 1].max
58
- else
59
- current_processes
60
- end
61
- end
62
-
63
- protected
64
-
65
- def increasing_latency
66
- ENV.fetch('WORKER_INCREASE_THRESHOLD', 0.5).to_f
67
- end
68
-
69
- def decreasing_latency
70
- ENV.fetch('WORKER_DECREASE_THRESHOLD', 0.1).to_f
71
- end
72
- end
73
16
  end
74
17
  end
75
18
  end
@@ -0,0 +1,36 @@
1
+ require 'datadog/statsd'
2
+ require 'singleton'
3
+
4
+ module RooOnRails
5
+ class Statsd
6
+ include Singleton
7
+
8
+ attr_reader :client
9
+
10
+ def initialize
11
+ @client = defined?(::STATSD) ? ::STATSD : ::Datadog::Statsd.new(host, port, tags: tags)
12
+ end
13
+
14
+ private
15
+
16
+ def host
17
+ ENV.fetch('STATSD_HOST', 'localhost')
18
+ end
19
+
20
+ def port
21
+ ENV.fetch('STATSD_PORT', 8125)
22
+ end
23
+
24
+ def tags
25
+ [
26
+ "env:#{ENV.fetch('STATSD_ENV', 'unknown')}",
27
+ "source:#{ENV.fetch('DYNO', 'unknown')}",
28
+ "app:#{ENV.fetch('HEROKU_APP_NAME', 'unknown')}"
29
+ ]
30
+ end
31
+ end
32
+
33
+ def self.statsd
34
+ RooOnRails::Statsd.instance.client
35
+ end
36
+ end
@@ -1,3 +1,3 @@
1
1
  module RooOnRails
2
- VERSION = '1.4.0'.freeze
2
+ VERSION = '1.5.0'.freeze
3
3
  end
data/roo_on_rails.gemspec CHANGED
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_runtime_dependency 'octokit'
32
32
  spec.add_runtime_dependency 'hirefire-resource'
33
33
  spec.add_runtime_dependency 'sidekiq'
34
+ spec.add_runtime_dependency 'dogstatsd-ruby'
34
35
  spec.add_development_dependency 'bundler', '~> 1.13'
35
36
  spec.add_development_dependency 'rake', '~> 10.0'
36
37
  spec.add_development_dependency 'rspec', '~> 3.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roo_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Letessier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-05 00:00:00.000000000 Z
11
+ date: 2017-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv-rails
@@ -156,6 +156,20 @@ dependencies:
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
+ - !ruby/object:Gem::Dependency
160
+ name: dogstatsd-ruby
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :runtime
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
159
173
  - !ruby/object:Gem::Dependency
160
174
  name: bundler
161
175
  requirement: !ruby/object:Gem::Requirement
@@ -336,8 +350,12 @@ files:
336
350
  - lib/roo_on_rails/railties/sidekiq.rb
337
351
  - lib/roo_on_rails/shell.rb
338
352
  - lib/roo_on_rails/sidekiq/loader.rb
353
+ - lib/roo_on_rails/sidekiq/metrics_worker.rb
354
+ - lib/roo_on_rails/sidekiq/process_scaling.rb
355
+ - lib/roo_on_rails/sidekiq/queue_latency.rb
339
356
  - lib/roo_on_rails/sidekiq/settings.rb
340
357
  - lib/roo_on_rails/sidekiq/sla_metric.rb
358
+ - lib/roo_on_rails/statsd.rb
341
359
  - lib/roo_on_rails/tasks/db.rake
342
360
  - lib/roo_on_rails/tasks/newrelic.rake
343
361
  - lib/roo_on_rails/version.rb