roqua-support 0.3.0 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b7684543b65ccc1553042df3e832dba5f40a8f42d0ff15fa31f42d865755b32
4
- data.tar.gz: 3ba17388d2c2b947756ddb1ca3b4172a6bcbde85bef76b0c70a5eb9fe7fe16d5
3
+ metadata.gz: 32f750bb036e58d68411a3a96f126a551cb4766811fb7fa0daea753a6d7d3613
4
+ data.tar.gz: 4895312bd0ab8055da376681c894d32a62dbb9885d923d6a452cf3688ee076fb
5
5
  SHA512:
6
- metadata.gz: 880ee19112ad1e4f596a451228b7b3b6f5b07ad381f0d1706ee00c42b070af2c8dd3048a26363183c09ba9ceb2f7e34c72b3289b11f8829ee0e02a613e173742
7
- data.tar.gz: fa8da4fcb52839b129019a08f4ba852cc629af98944c9aef9add34c4ef2244ace706e59f53765b551c95da8a6231bed7a096afeb0e4dacfa7e7a1d02a5f14f17
6
+ metadata.gz: '0187621d35a2c8b8e379eb330f6b91a5a34856b6fe411fa2837850af5fb885ce97cb8f69cd2720ce5908b2e081b72f2445fee91a8216d3836be5f3571864ae19'
7
+ data.tar.gz: 6148e080d64301dd0cb410ed4c5d0337018411cea03041b865e6c239936ed12f6a7032b451704dbecac984a1c66e5340d87fb69632b184f0fbdaa807f6292765
@@ -2,25 +2,12 @@ variables:
2
2
  RAILS_ENV: "test"
3
3
 
4
4
  before_script:
5
+ - if [ -x "$(command -v apk)" ]; then apk add sqlite-dev; fi
5
6
  - export BUNDLE_PATH=$CI_PROJECT_DIR/.gems
6
7
  - bundle --jobs 2 --retry 3
7
8
  - bundle exec appraisal
8
9
  - bundle --jobs 2 --retry 3
9
10
 
10
- .ruby_23: &ruby_23
11
- image: registry.roqua.nl/roqua/roqua-build-images:ruby-2.3-rails-base-test
12
- cache:
13
- key: ruby_23
14
- paths:
15
- - .gems
16
-
17
- .ruby_24: &ruby_24
18
- image: registry.roqua.nl/roqua/roqua-build-images:ruby-2.4-rails-base-test
19
- cache:
20
- key: ruby_24
21
- paths:
22
- - .gems
23
-
24
11
  .ruby_25: &ruby_25
25
12
  image: registry.roqua.nl/roqua/docker-base-images:ruby-2.5
26
13
  cache:
@@ -28,52 +15,34 @@ before_script:
28
15
  paths:
29
16
  - .gems
30
17
 
31
- rails_42_ruby_23:
32
- <<: *ruby_23
33
- script:
34
- - bundle exec appraisal rails42 bundle exec rspec
35
-
36
- rails_50_ruby_23:
37
- <<: *ruby_23
38
- script:
39
- - bundle exec appraisal rails50 bundle exec rspec
40
-
41
- rails_50_ruby_24:
42
- <<: *ruby_24
43
- script:
44
- - bundle exec appraisal rails50 bundle exec rspec
45
-
46
- rails_50_ruby_25:
47
- <<: *ruby_25
48
- script:
49
- - bundle exec appraisal rails50 bundle exec rspec
50
-
51
- rails_51_ruby_23:
52
- <<: *ruby_23
53
- script:
54
- - bundle exec appraisal rails51 bundle exec rspec
55
-
56
- rails_51_ruby_24:
57
- <<: *ruby_24
58
- script:
59
- - bundle exec appraisal rails51 bundle exec rspec
18
+ .ruby_26: &ruby_26
19
+ image: registry.roqua.nl/roqua/docker-base-images:ruby-2.6-builder
20
+ cache:
21
+ key: ruby_26
22
+ paths:
23
+ - .gems
60
24
 
61
25
  rails_51_ruby_25:
62
26
  <<: *ruby_25
63
27
  script:
64
28
  - bundle exec appraisal rails51 bundle exec rspec
65
29
 
66
- rails_52_ruby_23:
67
- <<: *ruby_23
30
+ rails_52_ruby_25:
31
+ <<: *ruby_25
68
32
  script:
69
33
  - bundle exec appraisal rails52 bundle exec rspec
70
34
 
71
- rails_52_ruby_24:
72
- <<: *ruby_24
35
+ rails_52_ruby_26:
36
+ <<: *ruby_26
73
37
  script:
74
38
  - bundle exec appraisal rails52 bundle exec rspec
75
39
 
76
- rails_52_ruby_25:
40
+ rails_60_ruby_25:
77
41
  <<: *ruby_25
78
42
  script:
79
- - bundle exec appraisal rails52 bundle exec rspec
43
+ - bundle exec appraisal rails60 bundle exec rspec
44
+
45
+ rails_60_ruby_26:
46
+ <<: *ruby_26
47
+ script:
48
+ - bundle exec appraisal rails60 bundle exec rspec
data/Appraisals CHANGED
@@ -1,15 +1,16 @@
1
- appraise "rails42" do
2
- gem "activesupport", "~> 4.2.10"
3
- end
4
-
5
- appraise "rails50" do
6
- gem "activesupport", "~> 5.0.0"
7
- end
8
-
9
1
  appraise "rails51" do
10
2
  gem "activesupport", "~> 5.1.0"
3
+ gem 'sqlite3', '~> 1.3.6'
11
4
  end
12
5
 
13
6
  appraise "rails52" do
14
7
  gem "activesupport", "~> 5.2.0"
8
+ gem 'sqlite3', '~> 1.4'
9
+ gem 'appsignal', '~> 2.9.8' # test each minor versions we support
10
+ end
11
+
12
+ appraise "rails60" do
13
+ gem "activesupport", "~> 6.0.0"
14
+ gem 'sqlite3', '~> 1.4'
15
+ gem 'appsignal', '~> 2.10.6'
15
16
  end
@@ -1,3 +1,24 @@
1
+ ## 0.3.5
2
+
3
+ * Update AppSignal gauge for every minute the probe runs
4
+
5
+ ## 0.3.4
6
+
7
+ * gemspec and tests: Removed rails 4.2 and 5.0, remove ruby 2.3 and 2.4, added ruby 2.6, allow appsignal 2.10
8
+
9
+ ## 0.3.3
10
+
11
+ * Added support for hl7 namespace when reporting errors
12
+
13
+ ## 0.3.2
14
+
15
+ * Use tags for better appsignal metrics
16
+ * Require Appsignal 2.9 to avoid probe registration problems
17
+
18
+ ## 0.3.1
19
+
20
+ * Added Appsignal counters for probe calls and scheduling probe call tasks in particular.
21
+
1
22
  ## 0.3.0
2
23
 
3
24
  * Support for Ruby 2.5
data/Gemfile CHANGED
@@ -9,12 +9,12 @@ gem 'roqua_styleguide', git: 'https://gitlab.roqua.nl/roqua/styleguide.git'
9
9
  group :test do
10
10
  gem 'actionpack', '>= 4.0'
11
11
  gem 'active_interaction', '~> 3.0'
12
- gem 'appsignal', '~> 2.9.6'
13
12
  gem 'climate_control' # For ENV modification in specs
14
- gem 'combustion', '~> 0.5.2'
13
+ gem 'combustion', '~> 1.1.1'
15
14
  gem 'fakefs', require: 'fakefs/safe'
16
15
  gem 'guard-rspec', '~> 4.2.6'
17
16
  gem 'responders'
18
17
  gem 'rspec-instrumentation-matcher'
19
18
  gem 'rspec-rails'
20
- end
19
+ gem 'pry'
20
+ end
@@ -1,78 +1,80 @@
1
1
  GIT
2
2
  remote: https://gitlab.roqua.nl/roqua/styleguide.git
3
- revision: e1fbbb611484e295719ed91c4eef889753ac8d8f
3
+ revision: 6d98107ef10d2dc5a4a785a4b0977f100475e007
4
4
  specs:
5
- roqua_styleguide (0.0.6)
6
- rubocop (~> 0.50.0)
5
+ roqua_styleguide (0.0.8)
6
+ rubocop (~> 0.80.0)
7
+ rubocop-rails
7
8
 
8
9
  PATH
9
10
  remote: .
10
11
  specs:
11
- roqua-support (0.3.0)
12
+ roqua-support (0.3.5)
12
13
  active_interaction (~> 3.0)
13
- activesupport (>= 3.2, < 6)
14
+ activesupport (>= 5.1, < 6.1)
15
+ appsignal (>= 2.9, < 2.11)
14
16
  naught (~> 1.0)
15
17
  with_advisory_lock (~> 3.2)
16
18
 
17
19
  GEM
18
20
  remote: https://rubygems.org/
19
21
  specs:
20
- actionpack (5.0.1)
21
- actionview (= 5.0.1)
22
- activesupport (= 5.0.1)
23
- rack (~> 2.0)
24
- rack-test (~> 0.6.3)
22
+ actionpack (6.0.2.2)
23
+ actionview (= 6.0.2.2)
24
+ activesupport (= 6.0.2.2)
25
+ rack (~> 2.0, >= 2.0.8)
26
+ rack-test (>= 0.6.3)
25
27
  rails-dom-testing (~> 2.0)
26
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
- actionview (5.0.1)
28
- activesupport (= 5.0.1)
28
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
29
+ actionview (6.0.2.2)
30
+ activesupport (= 6.0.2.2)
29
31
  builder (~> 3.1)
30
- erubis (~> 2.7.0)
32
+ erubi (~> 1.4)
31
33
  rails-dom-testing (~> 2.0)
32
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
33
- active_interaction (3.4.0)
34
- activemodel (>= 4, < 6)
35
- activemodel (5.0.1)
36
- activesupport (= 5.0.1)
37
- activerecord (5.0.1)
38
- activemodel (= 5.0.1)
39
- activesupport (= 5.0.1)
40
- arel (~> 7.0)
41
- activesupport (5.0.1)
34
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
35
+ active_interaction (3.8.2)
36
+ activemodel (>= 4, < 7)
37
+ activemodel (6.0.2.2)
38
+ activesupport (= 6.0.2.2)
39
+ activerecord (6.0.2.2)
40
+ activemodel (= 6.0.2.2)
41
+ activesupport (= 6.0.2.2)
42
+ activesupport (6.0.2.2)
42
43
  concurrent-ruby (~> 1.0, >= 1.0.2)
43
- i18n (~> 0.7)
44
+ i18n (>= 0.7, < 2)
44
45
  minitest (~> 5.1)
45
46
  tzinfo (~> 1.1)
46
- appraisal (2.1.0)
47
+ zeitwerk (~> 2.2)
48
+ appraisal (2.2.0)
47
49
  bundler
48
50
  rake
49
51
  thor (>= 0.14.0)
50
- appsignal (2.9.6)
52
+ appsignal (2.10.12)
51
53
  rack
52
- arel (7.1.4)
53
- ast (2.3.0)
54
- builder (3.2.3)
54
+ ast (2.4.0)
55
+ builder (3.2.4)
55
56
  climate_control (0.2.0)
56
- coderay (1.1.1)
57
- combustion (0.5.5)
57
+ coderay (1.1.2)
58
+ combustion (1.1.2)
58
59
  activesupport (>= 3.0.0)
59
60
  railties (>= 3.0.0)
60
61
  thor (>= 0.14.6)
61
- concurrent-ruby (1.0.4)
62
- delayed_job (4.1.4)
63
- activesupport (>= 3.0, < 5.2)
64
- delayed_job_active_record (4.1.2)
65
- activerecord (>= 3.0, < 5.2)
62
+ concurrent-ruby (1.1.6)
63
+ crass (1.0.6)
64
+ delayed_job (4.1.8)
65
+ activesupport (>= 3.0, < 6.1)
66
+ delayed_job_active_record (4.1.4)
67
+ activerecord (>= 3.0, < 6.1)
66
68
  delayed_job (>= 3.0, < 5)
67
69
  diff-lcs (1.3)
68
- erubis (2.7.0)
69
- fakefs (0.15.0)
70
- ffi (1.9.17)
70
+ erubi (1.9.0)
71
+ fakefs (1.2.2)
72
+ ffi (1.12.2)
71
73
  formatador (0.2.5)
72
- guard (2.14.0)
74
+ guard (2.16.2)
73
75
  formatador (>= 0.2.4)
74
76
  listen (>= 2.7, < 4.0)
75
- lumberjack (~> 1.0)
77
+ lumberjack (>= 1.0.12, < 2.0)
76
78
  nenv (~> 0.1)
77
79
  notiffany (~> 0.0)
78
80
  pry (>= 0.9.12)
@@ -81,98 +83,102 @@ GEM
81
83
  guard-rspec (4.2.10)
82
84
  guard (~> 2.1)
83
85
  rspec (>= 2.14, < 4.0)
84
- i18n (0.7.0)
85
- listen (3.1.5)
86
- rb-fsevent (~> 0.9, >= 0.9.4)
87
- rb-inotify (~> 0.9, >= 0.9.7)
88
- ruby_dep (~> 1.2)
89
- loofah (2.0.3)
86
+ i18n (1.8.2)
87
+ concurrent-ruby (~> 1.0)
88
+ jaro_winkler (1.5.4)
89
+ listen (3.2.1)
90
+ rb-fsevent (~> 0.10, >= 0.10.3)
91
+ rb-inotify (~> 0.9, >= 0.9.10)
92
+ loofah (2.5.0)
93
+ crass (~> 1.0.2)
90
94
  nokogiri (>= 1.5.9)
91
- lumberjack (1.0.11)
92
- method_source (0.8.2)
93
- mini_portile2 (2.1.0)
94
- minitest (5.10.1)
95
+ lumberjack (1.2.4)
96
+ method_source (1.0.0)
97
+ mini_portile2 (2.4.0)
98
+ minitest (5.14.0)
95
99
  naught (1.1.0)
96
100
  nenv (0.3.0)
97
- nokogiri (1.7.0.1)
98
- mini_portile2 (~> 2.1.0)
99
- notiffany (0.1.1)
101
+ nokogiri (1.10.9)
102
+ mini_portile2 (~> 2.4.0)
103
+ notiffany (0.1.3)
100
104
  nenv (~> 0.1)
101
105
  shellany (~> 0.0)
102
- parallel (1.12.0)
103
- parser (2.4.0.0)
104
- ast (~> 2.2)
105
- powerpack (0.1.1)
106
- pry (0.10.4)
107
- coderay (~> 1.1.0)
108
- method_source (~> 0.8.1)
109
- slop (~> 3.4)
110
- rack (2.0.1)
111
- rack-test (0.6.3)
112
- rack (>= 1.0)
113
- rails-dom-testing (2.0.2)
114
- activesupport (>= 4.2.0, < 6.0)
115
- nokogiri (~> 1.6)
116
- rails-html-sanitizer (1.0.3)
117
- loofah (~> 2.0)
118
- railties (5.0.1)
119
- actionpack (= 5.0.1)
120
- activesupport (= 5.0.1)
106
+ parallel (1.19.1)
107
+ parser (2.7.1.2)
108
+ ast (~> 2.4.0)
109
+ pry (0.13.1)
110
+ coderay (~> 1.1)
111
+ method_source (~> 1.0)
112
+ rack (2.2.2)
113
+ rack-test (1.1.0)
114
+ rack (>= 1.0, < 3)
115
+ rails-dom-testing (2.0.3)
116
+ activesupport (>= 4.2.0)
117
+ nokogiri (>= 1.6)
118
+ rails-html-sanitizer (1.3.0)
119
+ loofah (~> 2.3)
120
+ railties (6.0.2.2)
121
+ actionpack (= 6.0.2.2)
122
+ activesupport (= 6.0.2.2)
121
123
  method_source
122
124
  rake (>= 0.8.7)
123
- thor (>= 0.18.1, < 2.0)
124
- rainbow (2.2.2)
125
- rake
126
- rake (12.1.0)
127
- rb-fsevent (0.9.8)
128
- rb-inotify (0.9.7)
129
- ffi (>= 0.5.0)
130
- responders (2.3.0)
131
- railties (>= 4.2.0, < 5.1)
132
- rspec (3.5.0)
133
- rspec-core (~> 3.5.0)
134
- rspec-expectations (~> 3.5.0)
135
- rspec-mocks (~> 3.5.0)
136
- rspec-core (3.5.4)
137
- rspec-support (~> 3.5.0)
138
- rspec-expectations (3.5.0)
125
+ thor (>= 0.20.3, < 2.0)
126
+ rainbow (3.0.0)
127
+ rake (13.0.1)
128
+ rb-fsevent (0.10.4)
129
+ rb-inotify (0.10.1)
130
+ ffi (~> 1.0)
131
+ responders (3.0.0)
132
+ actionpack (>= 5.0)
133
+ railties (>= 5.0)
134
+ rexml (3.2.4)
135
+ rspec (3.9.0)
136
+ rspec-core (~> 3.9.0)
137
+ rspec-expectations (~> 3.9.0)
138
+ rspec-mocks (~> 3.9.0)
139
+ rspec-core (3.9.2)
140
+ rspec-support (~> 3.9.3)
141
+ rspec-expectations (3.9.1)
139
142
  diff-lcs (>= 1.2.0, < 2.0)
140
- rspec-support (~> 3.5.0)
141
- rspec-instrumentation-matcher (0.0.4)
143
+ rspec-support (~> 3.9.0)
144
+ rspec-instrumentation-matcher (0.0.9)
142
145
  activesupport
143
146
  rspec-expectations
144
- rspec-mocks (3.5.0)
147
+ rspec-mocks (3.9.1)
145
148
  diff-lcs (>= 1.2.0, < 2.0)
146
- rspec-support (~> 3.5.0)
147
- rspec-rails (3.5.2)
148
- actionpack (>= 3.0)
149
- activesupport (>= 3.0)
150
- railties (>= 3.0)
151
- rspec-core (~> 3.5.0)
152
- rspec-expectations (~> 3.5.0)
153
- rspec-mocks (~> 3.5.0)
154
- rspec-support (~> 3.5.0)
155
- rspec-support (3.5.0)
156
- rubocop (0.50.0)
149
+ rspec-support (~> 3.9.0)
150
+ rspec-rails (4.0.0)
151
+ actionpack (>= 4.2)
152
+ activesupport (>= 4.2)
153
+ railties (>= 4.2)
154
+ rspec-core (~> 3.9)
155
+ rspec-expectations (~> 3.9)
156
+ rspec-mocks (~> 3.9)
157
+ rspec-support (~> 3.9)
158
+ rspec-support (3.9.3)
159
+ rubocop (0.80.1)
160
+ jaro_winkler (~> 1.5.1)
157
161
  parallel (~> 1.10)
158
- parser (>= 2.3.3.1, < 3.0)
159
- powerpack (~> 0.1)
160
- rainbow (>= 2.2.2, < 3.0)
162
+ parser (>= 2.7.0.1)
163
+ rainbow (>= 2.2.2, < 4.0)
164
+ rexml
161
165
  ruby-progressbar (~> 1.7)
162
- unicode-display_width (~> 1.0, >= 1.0.1)
163
- ruby-progressbar (1.8.3)
164
- ruby_dep (1.5.0)
166
+ unicode-display_width (>= 1.4.0, < 1.7)
167
+ rubocop-rails (2.5.2)
168
+ activesupport
169
+ rack (>= 1.1)
170
+ rubocop (>= 0.72.0)
171
+ ruby-progressbar (1.10.1)
165
172
  shellany (0.0.1)
166
- slop (3.6.0)
167
- sqlite3 (1.3.13)
168
- thor (0.19.4)
169
- thread_safe (0.3.5)
173
+ thor (1.0.1)
174
+ thread_safe (0.3.6)
170
175
  timecop (0.9.1)
171
- tzinfo (1.2.2)
176
+ tzinfo (1.2.7)
172
177
  thread_safe (~> 0.1)
173
- unicode-display_width (1.3.0)
178
+ unicode-display_width (1.6.1)
174
179
  with_advisory_lock (3.2.0)
175
180
  activerecord (>= 3.2)
181
+ zeitwerk (2.3.0)
176
182
 
177
183
  PLATFORMS
178
184
  ruby
@@ -181,13 +187,13 @@ DEPENDENCIES
181
187
  actionpack (>= 4.0)
182
188
  active_interaction (~> 3.0)
183
189
  appraisal
184
- appsignal (~> 2.9.6)
185
- bundler (~> 1.0)
190
+ bundler (~> 2.0)
186
191
  climate_control
187
- combustion (~> 0.5.2)
192
+ combustion (~> 1.1.1)
188
193
  delayed_job_active_record
189
194
  fakefs
190
195
  guard-rspec (~> 4.2.6)
196
+ pry
191
197
  rake
192
198
  responders
193
199
  roqua-support!
@@ -195,8 +201,7 @@ DEPENDENCIES
195
201
  rspec (>= 2.12.0, < 4.0)
196
202
  rspec-instrumentation-matcher
197
203
  rspec-rails
198
- sqlite3 (~> 1.3.6)
199
204
  timecop
200
205
 
201
206
  BUNDLED WITH
202
- 1.16.6
207
+ 2.1.4
@@ -3,20 +3,21 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal"
6
- gem "roqua_styleguide", :git => "https://gitlab.roqua.nl/roqua/styleguide.git"
6
+ gem "roqua_styleguide", git: "https://gitlab.roqua.nl/roqua/styleguide.git"
7
7
  gem "activesupport", "~> 5.1.0"
8
+ gem "sqlite3", "~> 1.3.6"
8
9
 
9
10
  group :test do
10
11
  gem "actionpack", ">= 4.0"
11
12
  gem "active_interaction", "~> 3.0"
12
- gem "appsignal"
13
13
  gem "climate_control"
14
- gem "combustion", "~> 0.5.2"
15
- gem "fakefs", :require => "fakefs/safe"
14
+ gem "combustion", "~> 1.1.1"
15
+ gem "fakefs", require: "fakefs/safe"
16
16
  gem "guard-rspec", "~> 4.2.6"
17
17
  gem "responders"
18
18
  gem "rspec-instrumentation-matcher"
19
19
  gem "rspec-rails"
20
+ gem "pry"
20
21
  end
21
22
 
22
- gemspec :path => "../"
23
+ gemspec path: "../"
@@ -3,20 +3,22 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal"
6
- gem "roqua_styleguide", :git => "https://gitlab.roqua.nl/roqua/styleguide.git"
6
+ gem "roqua_styleguide", git: "https://gitlab.roqua.nl/roqua/styleguide.git"
7
7
  gem "activesupport", "~> 5.2.0"
8
+ gem "sqlite3", "~> 1.4"
9
+ gem "appsignal", "~> 2.9.8"
8
10
 
9
11
  group :test do
10
12
  gem "actionpack", ">= 4.0"
11
13
  gem "active_interaction", "~> 3.0"
12
- gem "appsignal"
13
14
  gem "climate_control"
14
- gem "combustion", "~> 0.5.2"
15
- gem "fakefs", :require => "fakefs/safe"
15
+ gem "combustion", "~> 1.1.1"
16
+ gem "fakefs", require: "fakefs/safe"
16
17
  gem "guard-rspec", "~> 4.2.6"
17
18
  gem "responders"
18
19
  gem "rspec-instrumentation-matcher"
19
20
  gem "rspec-rails"
21
+ gem "pry"
20
22
  end
21
23
 
22
- gemspec :path => "../"
24
+ gemspec path: "../"
@@ -3,20 +3,22 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal"
6
- gem "roqua_styleguide", :git => "https://gitlab.roqua.nl/roqua/styleguide.git"
7
- gem "activesupport", "~> 4.2.10"
6
+ gem "roqua_styleguide", git: "https://gitlab.roqua.nl/roqua/styleguide.git"
7
+ gem "activesupport", "~> 6.0.0"
8
+ gem "sqlite3", "~> 1.4"
9
+ gem "appsignal", "~> 2.10.6"
8
10
 
9
11
  group :test do
10
12
  gem "actionpack", ">= 4.0"
11
13
  gem "active_interaction", "~> 3.0"
12
- gem "appsignal"
13
14
  gem "climate_control"
14
- gem "combustion", "~> 0.5.2"
15
- gem "fakefs", :require => "fakefs/safe"
15
+ gem "combustion", "~> 1.1.1"
16
+ gem "fakefs", require: "fakefs/safe"
16
17
  gem "guard-rspec", "~> 4.2.6"
17
18
  gem "responders"
18
19
  gem "rspec-instrumentation-matcher"
19
20
  gem "rspec-rails"
21
+ gem "pry"
20
22
  end
21
23
 
22
- gemspec :path => "../"
24
+ gemspec path: "../"
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module Support
3
- VERSION = '0.3.0'.freeze
3
+ VERSION = '0.3.5'.freeze
4
4
  end
5
5
  end
@@ -1,12 +1,24 @@
1
+ require 'active_support/concern'
2
+
1
3
  module Roqua
2
4
  module Probes
3
5
  module BaseProbe
4
- def enable
5
- new.tap do |probe|
6
- probe_sym = probe.class.to_s.to_sym
7
- Appsignal::Minutely.probes.register(probe_sym, probe) unless Appsignal::Minutely.probes[probe_sym]
6
+ extend ActiveSupport::Concern
7
+
8
+ class_methods do
9
+ def enable
10
+ new.tap do |probe|
11
+ probe_sym = probe.class.to_s.to_sym
12
+ Appsignal::Minutely.probes.register(probe_sym, probe) unless Appsignal::Minutely.probes[probe_sym]
13
+ end
8
14
  end
9
15
  end
16
+
17
+ # do not override me, implement probes by implementing the #run method
18
+ def call
19
+ run
20
+ Appsignal.increment_counter("probe.call.completed", 1, probe_name: self.class.name.demodulize.underscore)
21
+ end
10
22
  end
11
23
  end
12
24
  end
@@ -3,13 +3,13 @@ require_relative 'base_probe'
3
3
  module Roqua
4
4
  module Probes
5
5
  class DelayedJobProbe
6
- extend BaseProbe
6
+ include BaseProbe
7
7
 
8
8
  def backlog_count
9
9
  Delayed::Job.where(locked_at: nil).where('run_at < ?', Time.zone.now).count
10
10
  end
11
11
 
12
- def call
12
+ def run
13
13
  Appsignal.set_gauge('delayed_job_backlog_count', backlog_count)
14
14
  end
15
15
  end
@@ -3,7 +3,7 @@ require_relative 'base_probe'
3
3
  module Roqua
4
4
  module Probes
5
5
  class MonitoringProbe
6
- extend BaseProbe
6
+ include BaseProbe
7
7
 
8
8
  def incomplete_jobs
9
9
  Roqua::Scheduling::CronJob.where('completed_at IS NULL OR completed_at < next_run_at')
@@ -19,7 +19,7 @@ module Roqua
19
19
  (longest_delay_in_seconds / 1.minute).to_i
20
20
  end
21
21
 
22
- def call
22
+ def run
23
23
  Appsignal.set_gauge('scheduler_delay_in_minutes', longest_delay_in_minutes)
24
24
  end
25
25
  end
@@ -3,9 +3,9 @@ require_relative 'base_probe'
3
3
  module Roqua
4
4
  module Probes
5
5
  class SchedulingProbe
6
- extend BaseProbe
6
+ include BaseProbe
7
7
 
8
- def call
8
+ def run
9
9
  ActiveRecord::Base.establish_connection
10
10
  require_relative Rails.root.join('config', 'schedule.rb')
11
11
  Roqua::Scheduling::Scheduler.new.ping
@@ -11,6 +11,8 @@ class Roqua::Scheduling::Scheduler
11
11
  raise ex if Rails.env.test?
12
12
  end
13
13
  end
14
+
15
+ Appsignal.increment_counter("scheduler.completed", 1)
14
16
  end
15
17
  end
16
18
 
@@ -42,6 +44,7 @@ class Roqua::Scheduling::Scheduler
42
44
  task = schedule.tasks[cron_job.name]
43
45
  task.run
44
46
 
47
+ Appsignal.increment_counter("scheduler.run_task.completed", 1, task_name: task.name)
45
48
  cron_job.update completed_at: Time.now, next_run_at: task.next_run_at
46
49
  end
47
50
  end
@@ -33,6 +33,7 @@ module Roqua
33
33
  case category
34
34
  when :background then Appsignal::Transaction::BACKGROUND_JOB
35
35
  when :web then Appsignal::Transaction::HTTP_REQUEST
36
+ when :hl7 then 'hl7'
36
37
  else Appsignal::Transaction::BLANK
37
38
  end
38
39
  end
@@ -18,16 +18,16 @@ Gem::Specification.new do |gem|
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
19
  gem.require_paths = ["lib"]
20
20
 
21
+ gem.required_ruby_version = '>= 2.5'
21
22
  gem.add_dependency 'active_interaction', '~> 3.0'
22
- gem.add_dependency 'activesupport', '>= 3.2', '< 6'
23
+ gem.add_dependency 'activesupport', '>= 5.1', '< 6.1'
23
24
  gem.add_dependency 'naught', '~> 1.0'
24
25
  gem.add_dependency 'with_advisory_lock', '~> 3.2'
26
+ gem.add_dependency 'appsignal', '>= 2.9', '< 2.11'
25
27
 
26
- gem.add_development_dependency 'appsignal', '>= 2.3.1'
27
- gem.add_development_dependency 'bundler', '~> 1.0'
28
+ gem.add_development_dependency 'bundler', '~> 2.0'
28
29
  gem.add_development_dependency 'delayed_job_active_record'
29
30
  gem.add_development_dependency 'rake'
30
31
  gem.add_development_dependency 'rspec', '>= 2.12.0', '< 4.0'
31
- gem.add_development_dependency 'sqlite3', '~> 1.3.6'
32
32
  gem.add_development_dependency 'timecop'
33
33
  end
@@ -7,7 +7,7 @@ require 'roqua/probes/delayed_job_probe'
7
7
  describe Roqua::Probes::DelayedJobProbe do
8
8
  before { Timecop.freeze }
9
9
  after { Timecop.return }
10
- subject(:probe) { Roqua::Probes::DelayedJobProbe.new }
10
+ subject(:probe) { described_class.new }
11
11
 
12
12
  describe 'backlog_count' do
13
13
  context 'if a single job unlocked job exists that has a run_at in the past' do
@@ -24,12 +24,17 @@ describe Roqua::Probes::DelayedJobProbe do
24
24
  end
25
25
  end
26
26
 
27
- describe 'call' do
27
+ describe '#call' do
28
28
  it 'sends the correct metric to Appsignal' do
29
29
  expect(probe).to receive(:backlog_count).and_return(12)
30
30
  expect(Appsignal).to receive(:set_gauge).with('delayed_job_backlog_count', 12)
31
31
  probe.call
32
32
  end
33
+
34
+ it 'increments the probe call counter' do
35
+ expect(Appsignal).to receive(:increment_counter).with('probe.call.completed', 1, probe_name: "delayed_job_probe")
36
+ probe.call
37
+ end
33
38
  end
34
39
 
35
40
  context '.enable' do
@@ -4,21 +4,26 @@ require 'timecop'
4
4
 
5
5
  require 'roqua/probes/delayed_job_probe'
6
6
 
7
- describe Roqua::Probes::DelayedJobProbe do
7
+ describe Roqua::Probes::MonitoringProbe do
8
8
  before { Timecop.freeze }
9
9
  after { Timecop.return }
10
- subject(:probe) { Roqua::Probes::MonitoringProbe.new }
10
+ subject(:probe) { described_class.new }
11
11
 
12
12
  before do
13
13
  Roqua::Scheduling::CronJob.delete_all
14
14
  end
15
15
 
16
- describe 'call' do
16
+ describe '#call' do
17
17
  it 'sends data to AppSignal' do
18
18
  expect(Appsignal).to receive(:set_gauge).with('scheduler_delay_in_minutes', 10)
19
19
  expect(probe).to receive(:longest_delay_in_minutes).and_return(10)
20
20
  probe.call
21
21
  end
22
+
23
+ it 'increments the probe call counter' do
24
+ expect(Appsignal).to receive(:increment_counter).with('probe.call.completed', 1, probe_name: "monitoring_probe")
25
+ probe.call
26
+ end
22
27
  end
23
28
 
24
29
  describe 'longest_delay' do
@@ -72,16 +72,24 @@ describe Roqua::Scheduling::Scheduler do
72
72
  describe 'callbacks' do
73
73
  let(:callback_spy) { spy(:callback) }
74
74
 
75
- it 'get executed' do
75
+ before do
76
76
  Roqua::Scheduling::Schedule.setup do |cron|
77
77
  cron.add_task 'hourly', next_run_at: proc { 1.minute.ago } do
78
78
  callback_spy.execute
79
79
  end
80
80
  end
81
+ end
81
82
 
83
+ it 'get executed' do
82
84
  expect(callback_spy).to receive(:execute)
83
85
  subject.ping
84
86
  end
87
+
88
+ it 'counts task calls' do
89
+ expect(Appsignal).to receive(:increment_counter).with('scheduler.completed', 1)
90
+ expect(Appsignal).to receive(:increment_counter).with('scheduler.run_task.completed', 1, task_name: 'hourly')
91
+ subject.ping
92
+ end
85
93
  end
86
94
 
87
95
  describe 'when running multiple times' do
@@ -94,6 +94,7 @@ describe 'Error reporting' do
94
94
  let(:transaction) { double("transaction") }
95
95
 
96
96
  before do
97
+ Appsignal.config = Appsignal::Config.new(Dir.pwd, "test")
97
98
  allow(Appsignal).to receive(:active?).and_return(true)
98
99
  allow(Appsignal).to receive(:is_ignored_exception?).and_return(false)
99
100
  allow(Appsignal).to receive(:agent).and_return(agent)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roqua-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-06 00:00:00.000000000 Z
11
+ date: 2020-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_interaction
@@ -30,20 +30,20 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.2'
33
+ version: '5.1'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '6'
36
+ version: '6.1'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '3.2'
43
+ version: '5.1'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '6'
46
+ version: '6.1'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: naught
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -78,28 +78,34 @@ dependencies:
78
78
  requirements:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
- version: 2.3.1
82
- type: :development
81
+ version: '2.9'
82
+ - - "<"
83
+ - !ruby/object:Gem::Version
84
+ version: '2.11'
85
+ type: :runtime
83
86
  prerelease: false
84
87
  version_requirements: !ruby/object:Gem::Requirement
85
88
  requirements:
86
89
  - - ">="
87
90
  - !ruby/object:Gem::Version
88
- version: 2.3.1
91
+ version: '2.9'
92
+ - - "<"
93
+ - !ruby/object:Gem::Version
94
+ version: '2.11'
89
95
  - !ruby/object:Gem::Dependency
90
96
  name: bundler
91
97
  requirement: !ruby/object:Gem::Requirement
92
98
  requirements:
93
99
  - - "~>"
94
100
  - !ruby/object:Gem::Version
95
- version: '1.0'
101
+ version: '2.0'
96
102
  type: :development
97
103
  prerelease: false
98
104
  version_requirements: !ruby/object:Gem::Requirement
99
105
  requirements:
100
106
  - - "~>"
101
107
  - !ruby/object:Gem::Version
102
- version: '1.0'
108
+ version: '2.0'
103
109
  - !ruby/object:Gem::Dependency
104
110
  name: delayed_job_active_record
105
111
  requirement: !ruby/object:Gem::Requirement
@@ -148,20 +154,6 @@ dependencies:
148
154
  - - "<"
149
155
  - !ruby/object:Gem::Version
150
156
  version: '4.0'
151
- - !ruby/object:Gem::Dependency
152
- name: sqlite3
153
- requirement: !ruby/object:Gem::Requirement
154
- requirements:
155
- - - "~>"
156
- - !ruby/object:Gem::Version
157
- version: 1.3.6
158
- type: :development
159
- prerelease: false
160
- version_requirements: !ruby/object:Gem::Requirement
161
- requirements:
162
- - - "~>"
163
- - !ruby/object:Gem::Version
164
- version: 1.3.6
165
157
  - !ruby/object:Gem::Dependency
166
158
  name: timecop
167
159
  requirement: !ruby/object:Gem::Requirement
@@ -196,10 +188,9 @@ files:
196
188
  - README.md
197
189
  - Rakefile
198
190
  - circle.yml
199
- - gemfiles/rails42.gemfile
200
- - gemfiles/rails50.gemfile
201
191
  - gemfiles/rails51.gemfile
202
192
  - gemfiles/rails52.gemfile
193
+ - gemfiles/rails60.gemfile
203
194
  - lib/roqua-support.rb
204
195
  - lib/roqua-support/railtie.rb
205
196
  - lib/roqua-support/version.rb
@@ -266,7 +257,7 @@ homepage: https://github.com/roqua/roqua-support
266
257
  licenses:
267
258
  - MIT
268
259
  metadata: {}
269
- post_install_message:
260
+ post_install_message:
270
261
  rdoc_options: []
271
262
  require_paths:
272
263
  - lib
@@ -274,16 +265,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
274
265
  requirements:
275
266
  - - ">="
276
267
  - !ruby/object:Gem::Version
277
- version: '0'
268
+ version: '2.5'
278
269
  required_rubygems_version: !ruby/object:Gem::Requirement
279
270
  requirements:
280
271
  - - ">="
281
272
  - !ruby/object:Gem::Version
282
273
  version: '0'
283
274
  requirements: []
284
- rubyforge_project:
285
- rubygems_version: 2.7.9
286
- signing_key:
275
+ rubygems_version: 3.1.4
276
+ signing_key:
287
277
  specification_version: 4
288
278
  summary: Helper objects and proxies used by a lot of RoQua applications
289
279
  test_files:
@@ -1,22 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal"
6
- gem "roqua_styleguide", :git => "https://gitlab.roqua.nl/roqua/styleguide.git"
7
- gem "activesupport", "~> 5.0.0"
8
-
9
- group :test do
10
- gem "actionpack", ">= 4.0"
11
- gem "active_interaction", "~> 3.0"
12
- gem "appsignal"
13
- gem "climate_control"
14
- gem "combustion", "~> 0.5.2"
15
- gem "fakefs", :require => "fakefs/safe"
16
- gem "guard-rspec", "~> 4.2.6"
17
- gem "responders"
18
- gem "rspec-instrumentation-matcher"
19
- gem "rspec-rails"
20
- end
21
-
22
- gemspec :path => "../"