appsignal 2.11.9-java → 2.11.10-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semaphore/semaphore.yml +55 -169
- data/CHANGELOG.md +4 -0
- data/Rakefile +13 -3
- data/appsignal.gemspec +24 -2
- data/build_matrix.yml +18 -20
- data/gemfiles/capistrano2.gemfile +0 -1
- data/gemfiles/capistrano3.gemfile +0 -1
- data/gemfiles/grape.gemfile +0 -1
- data/gemfiles/no_dependencies.gemfile +4 -1
- data/gemfiles/rails-3.2.gemfile +2 -0
- data/gemfiles/rails-4.2.gemfile +6 -0
- data/gemfiles/resque-2.gemfile +0 -4
- data/gemfiles/sequel-435.gemfile +0 -1
- data/gemfiles/sequel.gemfile +0 -1
- data/gemfiles/sinatra.gemfile +0 -1
- data/lib/appsignal/extension.rb +50 -0
- data/lib/appsignal/transaction.rb +1 -1
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/extension_install_failure_spec.rb +0 -7
- data/spec/lib/appsignal/extension_spec.rb +43 -9
- data/spec/lib/appsignal/transaction_spec.rb +17 -0
- data/spec/lib/appsignal/utils/data_spec.rb +133 -87
- data/spec/spec_helper.rb +22 -0
- data/spec/support/testing.rb +11 -1
- data/support/install_deps +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f459ee333cb6c489c9b87304f36d28f3b19afa043ebda292d47b03205a76eec4
|
4
|
+
data.tar.gz: 005e8940811ee1ce786110f0190abb99f173d52ee25b1f4fd2bf36a71c273254
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d438e3363e0a06472fd22897c90f42c3c0dd4d37de8635e5ad88f680241d0ba0b51a4c2334ad38ff3d2edade7333dc00a42e06522462aabb8b685bbc8f39a86
|
7
|
+
data.tar.gz: 0a03bc7a32afb7cf911e684e13eb2357817edb81d8fec6f3de2ca95bcc71b74685502c641633269d6c23650f24c7ea0a310592397da2039a193d3e3559261dda
|
data/.semaphore/semaphore.yml
CHANGED
@@ -32,6 +32,7 @@ global_job_config:
|
|
32
32
|
commands:
|
33
33
|
- checkout
|
34
34
|
- rm -f $HOME/.rbenv/plugins/rbenv-gem-rehash/etc/rbenv.d/exec/~gem-rehash.bash
|
35
|
+
- if [ -n "$_C_VERSION" ]; then sem-version c $_C_VERSION; fi
|
35
36
|
- sem-version ruby $RUBY_VERSION
|
36
37
|
- "./support/check_versions"
|
37
38
|
- cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)
|
@@ -133,66 +134,6 @@ blocks:
|
|
133
134
|
commands:
|
134
135
|
- "./support/bundler_wrapper exec rake extension:install"
|
135
136
|
jobs:
|
136
|
-
- name: Ruby 2.0.0-p648 for capistrano2
|
137
|
-
env_vars:
|
138
|
-
- name: RUBY_VERSION
|
139
|
-
value: 2.0.0-p648
|
140
|
-
- name: GEMSET
|
141
|
-
value: capistrano2
|
142
|
-
- name: BUNDLE_GEMFILE
|
143
|
-
value: gemfiles/capistrano2.gemfile
|
144
|
-
- name: _RUBYGEMS_VERSION
|
145
|
-
value: 2.7.8
|
146
|
-
- name: _BUNDLER_VERSION
|
147
|
-
value: 1.17.3
|
148
|
-
commands:
|
149
|
-
- "./support/bundler_wrapper exec rake test"
|
150
|
-
- "./support/bundler_wrapper exec rake test:failure"
|
151
|
-
- name: Ruby 2.0.0-p648 for capistrano3
|
152
|
-
env_vars:
|
153
|
-
- name: RUBY_VERSION
|
154
|
-
value: 2.0.0-p648
|
155
|
-
- name: GEMSET
|
156
|
-
value: capistrano3
|
157
|
-
- name: BUNDLE_GEMFILE
|
158
|
-
value: gemfiles/capistrano3.gemfile
|
159
|
-
- name: _RUBYGEMS_VERSION
|
160
|
-
value: 2.7.8
|
161
|
-
- name: _BUNDLER_VERSION
|
162
|
-
value: 1.17.3
|
163
|
-
commands:
|
164
|
-
- "./support/bundler_wrapper exec rake test"
|
165
|
-
- "./support/bundler_wrapper exec rake test:failure"
|
166
|
-
- name: Ruby 2.0.0-p648 for grape
|
167
|
-
env_vars:
|
168
|
-
- name: RUBY_VERSION
|
169
|
-
value: 2.0.0-p648
|
170
|
-
- name: GEMSET
|
171
|
-
value: grape
|
172
|
-
- name: BUNDLE_GEMFILE
|
173
|
-
value: gemfiles/grape.gemfile
|
174
|
-
- name: _RUBYGEMS_VERSION
|
175
|
-
value: 2.7.8
|
176
|
-
- name: _BUNDLER_VERSION
|
177
|
-
value: 1.17.3
|
178
|
-
commands:
|
179
|
-
- "./support/bundler_wrapper exec rake test"
|
180
|
-
- "./support/bundler_wrapper exec rake test:failure"
|
181
|
-
- name: Ruby 2.0.0-p648 for que
|
182
|
-
env_vars:
|
183
|
-
- name: RUBY_VERSION
|
184
|
-
value: 2.0.0-p648
|
185
|
-
- name: GEMSET
|
186
|
-
value: que
|
187
|
-
- name: BUNDLE_GEMFILE
|
188
|
-
value: gemfiles/que.gemfile
|
189
|
-
- name: _RUBYGEMS_VERSION
|
190
|
-
value: 2.7.8
|
191
|
-
- name: _BUNDLER_VERSION
|
192
|
-
value: 1.17.3
|
193
|
-
commands:
|
194
|
-
- "./support/bundler_wrapper exec rake test"
|
195
|
-
- "./support/bundler_wrapper exec rake test:failure"
|
196
137
|
- name: Ruby 2.0.0-p648 for rails-3.2
|
197
138
|
env_vars:
|
198
139
|
- name: RUBY_VERSION
|
@@ -223,81 +164,6 @@ blocks:
|
|
223
164
|
commands:
|
224
165
|
- "./support/bundler_wrapper exec rake test"
|
225
166
|
- "./support/bundler_wrapper exec rake test:failure"
|
226
|
-
- name: Ruby 2.0.0-p648 for resque-1
|
227
|
-
env_vars:
|
228
|
-
- name: RUBY_VERSION
|
229
|
-
value: 2.0.0-p648
|
230
|
-
- name: GEMSET
|
231
|
-
value: resque-1
|
232
|
-
- name: BUNDLE_GEMFILE
|
233
|
-
value: gemfiles/resque-1.gemfile
|
234
|
-
- name: _RUBYGEMS_VERSION
|
235
|
-
value: 2.7.8
|
236
|
-
- name: _BUNDLER_VERSION
|
237
|
-
value: 1.17.3
|
238
|
-
commands:
|
239
|
-
- "./support/bundler_wrapper exec rake test"
|
240
|
-
- "./support/bundler_wrapper exec rake test:failure"
|
241
|
-
- name: Ruby 2.0.0-p648 for sequel
|
242
|
-
env_vars:
|
243
|
-
- name: RUBY_VERSION
|
244
|
-
value: 2.0.0-p648
|
245
|
-
- name: GEMSET
|
246
|
-
value: sequel
|
247
|
-
- name: BUNDLE_GEMFILE
|
248
|
-
value: gemfiles/sequel.gemfile
|
249
|
-
- name: _RUBYGEMS_VERSION
|
250
|
-
value: 2.7.8
|
251
|
-
- name: _BUNDLER_VERSION
|
252
|
-
value: 1.17.3
|
253
|
-
commands:
|
254
|
-
- "./support/bundler_wrapper exec rake test"
|
255
|
-
- "./support/bundler_wrapper exec rake test:failure"
|
256
|
-
- name: Ruby 2.0.0-p648 for sequel-435
|
257
|
-
env_vars:
|
258
|
-
- name: RUBY_VERSION
|
259
|
-
value: 2.0.0-p648
|
260
|
-
- name: GEMSET
|
261
|
-
value: sequel-435
|
262
|
-
- name: BUNDLE_GEMFILE
|
263
|
-
value: gemfiles/sequel-435.gemfile
|
264
|
-
- name: _RUBYGEMS_VERSION
|
265
|
-
value: 2.7.8
|
266
|
-
- name: _BUNDLER_VERSION
|
267
|
-
value: 1.17.3
|
268
|
-
commands:
|
269
|
-
- "./support/bundler_wrapper exec rake test"
|
270
|
-
- "./support/bundler_wrapper exec rake test:failure"
|
271
|
-
- name: Ruby 2.0.0-p648 for sinatra
|
272
|
-
env_vars:
|
273
|
-
- name: RUBY_VERSION
|
274
|
-
value: 2.0.0-p648
|
275
|
-
- name: GEMSET
|
276
|
-
value: sinatra
|
277
|
-
- name: BUNDLE_GEMFILE
|
278
|
-
value: gemfiles/sinatra.gemfile
|
279
|
-
- name: _RUBYGEMS_VERSION
|
280
|
-
value: 2.7.8
|
281
|
-
- name: _BUNDLER_VERSION
|
282
|
-
value: 1.17.3
|
283
|
-
commands:
|
284
|
-
- "./support/bundler_wrapper exec rake test"
|
285
|
-
- "./support/bundler_wrapper exec rake test:failure"
|
286
|
-
- name: Ruby 2.0.0-p648 for webmachine
|
287
|
-
env_vars:
|
288
|
-
- name: RUBY_VERSION
|
289
|
-
value: 2.0.0-p648
|
290
|
-
- name: GEMSET
|
291
|
-
value: webmachine
|
292
|
-
- name: BUNDLE_GEMFILE
|
293
|
-
value: gemfiles/webmachine.gemfile
|
294
|
-
- name: _RUBYGEMS_VERSION
|
295
|
-
value: 2.7.8
|
296
|
-
- name: _BUNDLER_VERSION
|
297
|
-
value: 1.17.3
|
298
|
-
commands:
|
299
|
-
- "./support/bundler_wrapper exec rake test"
|
300
|
-
- "./support/bundler_wrapper exec rake test:failure"
|
301
167
|
- name: Ruby 2.1.10
|
302
168
|
dependencies:
|
303
169
|
- Validation
|
@@ -993,7 +859,7 @@ blocks:
|
|
993
859
|
commands:
|
994
860
|
- "./support/bundler_wrapper exec rake test"
|
995
861
|
- "./support/bundler_wrapper exec rake test:failure"
|
996
|
-
- name: Ruby 3.0.
|
862
|
+
- name: Ruby 3.0.1
|
997
863
|
dependencies:
|
998
864
|
- Validation
|
999
865
|
task:
|
@@ -1001,10 +867,10 @@ blocks:
|
|
1001
867
|
commands:
|
1002
868
|
- "./support/bundler_wrapper exec rake extension:install"
|
1003
869
|
jobs:
|
1004
|
-
- name: Ruby 3.0.
|
870
|
+
- name: Ruby 3.0.1 for no_dependencies
|
1005
871
|
env_vars:
|
1006
872
|
- name: RUBY_VERSION
|
1007
|
-
value: 3.0.
|
873
|
+
value: 3.0.1
|
1008
874
|
- name: GEMSET
|
1009
875
|
value: no_dependencies
|
1010
876
|
- name: BUNDLE_GEMFILE
|
@@ -1016,18 +882,18 @@ blocks:
|
|
1016
882
|
commands:
|
1017
883
|
- "./support/bundler_wrapper exec rake test"
|
1018
884
|
- "./support/bundler_wrapper exec rake test:failure"
|
1019
|
-
- name: Ruby 3.0.
|
885
|
+
- name: Ruby 3.0.1 - Gems
|
1020
886
|
dependencies:
|
1021
|
-
- Ruby 3.0.
|
887
|
+
- Ruby 3.0.1
|
1022
888
|
task:
|
1023
889
|
prologue:
|
1024
890
|
commands:
|
1025
891
|
- "./support/bundler_wrapper exec rake extension:install"
|
1026
892
|
jobs:
|
1027
|
-
- name: Ruby 3.0.
|
893
|
+
- name: Ruby 3.0.1 for capistrano2
|
1028
894
|
env_vars:
|
1029
895
|
- name: RUBY_VERSION
|
1030
|
-
value: 3.0.
|
896
|
+
value: 3.0.1
|
1031
897
|
- name: GEMSET
|
1032
898
|
value: capistrano2
|
1033
899
|
- name: BUNDLE_GEMFILE
|
@@ -1039,10 +905,10 @@ blocks:
|
|
1039
905
|
commands:
|
1040
906
|
- "./support/bundler_wrapper exec rake test"
|
1041
907
|
- "./support/bundler_wrapper exec rake test:failure"
|
1042
|
-
- name: Ruby 3.0.
|
908
|
+
- name: Ruby 3.0.1 for capistrano3
|
1043
909
|
env_vars:
|
1044
910
|
- name: RUBY_VERSION
|
1045
|
-
value: 3.0.
|
911
|
+
value: 3.0.1
|
1046
912
|
- name: GEMSET
|
1047
913
|
value: capistrano3
|
1048
914
|
- name: BUNDLE_GEMFILE
|
@@ -1054,10 +920,10 @@ blocks:
|
|
1054
920
|
commands:
|
1055
921
|
- "./support/bundler_wrapper exec rake test"
|
1056
922
|
- "./support/bundler_wrapper exec rake test:failure"
|
1057
|
-
- name: Ruby 3.0.
|
923
|
+
- name: Ruby 3.0.1 for grape
|
1058
924
|
env_vars:
|
1059
925
|
- name: RUBY_VERSION
|
1060
|
-
value: 3.0.
|
926
|
+
value: 3.0.1
|
1061
927
|
- name: GEMSET
|
1062
928
|
value: grape
|
1063
929
|
- name: BUNDLE_GEMFILE
|
@@ -1069,10 +935,10 @@ blocks:
|
|
1069
935
|
commands:
|
1070
936
|
- "./support/bundler_wrapper exec rake test"
|
1071
937
|
- "./support/bundler_wrapper exec rake test:failure"
|
1072
|
-
- name: Ruby 3.0.
|
938
|
+
- name: Ruby 3.0.1 for padrino
|
1073
939
|
env_vars:
|
1074
940
|
- name: RUBY_VERSION
|
1075
|
-
value: 3.0.
|
941
|
+
value: 3.0.1
|
1076
942
|
- name: GEMSET
|
1077
943
|
value: padrino
|
1078
944
|
- name: BUNDLE_GEMFILE
|
@@ -1084,10 +950,10 @@ blocks:
|
|
1084
950
|
commands:
|
1085
951
|
- "./support/bundler_wrapper exec rake test"
|
1086
952
|
- "./support/bundler_wrapper exec rake test:failure"
|
1087
|
-
- name: Ruby 3.0.
|
953
|
+
- name: Ruby 3.0.1 for que
|
1088
954
|
env_vars:
|
1089
955
|
- name: RUBY_VERSION
|
1090
|
-
value: 3.0.
|
956
|
+
value: 3.0.1
|
1091
957
|
- name: GEMSET
|
1092
958
|
value: que
|
1093
959
|
- name: BUNDLE_GEMFILE
|
@@ -1099,10 +965,10 @@ blocks:
|
|
1099
965
|
commands:
|
1100
966
|
- "./support/bundler_wrapper exec rake test"
|
1101
967
|
- "./support/bundler_wrapper exec rake test:failure"
|
1102
|
-
- name: Ruby 3.0.
|
968
|
+
- name: Ruby 3.0.1 for que_beta
|
1103
969
|
env_vars:
|
1104
970
|
- name: RUBY_VERSION
|
1105
|
-
value: 3.0.
|
971
|
+
value: 3.0.1
|
1106
972
|
- name: GEMSET
|
1107
973
|
value: que_beta
|
1108
974
|
- name: BUNDLE_GEMFILE
|
@@ -1114,10 +980,10 @@ blocks:
|
|
1114
980
|
commands:
|
1115
981
|
- "./support/bundler_wrapper exec rake test"
|
1116
982
|
- "./support/bundler_wrapper exec rake test:failure"
|
1117
|
-
- name: Ruby 3.0.
|
983
|
+
- name: Ruby 3.0.1 for rails-6.0
|
1118
984
|
env_vars:
|
1119
985
|
- name: RUBY_VERSION
|
1120
|
-
value: 3.0.
|
986
|
+
value: 3.0.1
|
1121
987
|
- name: GEMSET
|
1122
988
|
value: rails-6.0
|
1123
989
|
- name: BUNDLE_GEMFILE
|
@@ -1129,10 +995,10 @@ blocks:
|
|
1129
995
|
commands:
|
1130
996
|
- "./support/bundler_wrapper exec rake test"
|
1131
997
|
- "./support/bundler_wrapper exec rake test:failure"
|
1132
|
-
- name: Ruby 3.0.
|
998
|
+
- name: Ruby 3.0.1 for resque-2
|
1133
999
|
env_vars:
|
1134
1000
|
- name: RUBY_VERSION
|
1135
|
-
value: 3.0.
|
1001
|
+
value: 3.0.1
|
1136
1002
|
- name: GEMSET
|
1137
1003
|
value: resque-2
|
1138
1004
|
- name: BUNDLE_GEMFILE
|
@@ -1144,10 +1010,10 @@ blocks:
|
|
1144
1010
|
commands:
|
1145
1011
|
- "./support/bundler_wrapper exec rake test"
|
1146
1012
|
- "./support/bundler_wrapper exec rake test:failure"
|
1147
|
-
- name: Ruby 3.0.
|
1013
|
+
- name: Ruby 3.0.1 for sequel
|
1148
1014
|
env_vars:
|
1149
1015
|
- name: RUBY_VERSION
|
1150
|
-
value: 3.0.
|
1016
|
+
value: 3.0.1
|
1151
1017
|
- name: GEMSET
|
1152
1018
|
value: sequel
|
1153
1019
|
- name: BUNDLE_GEMFILE
|
@@ -1159,10 +1025,10 @@ blocks:
|
|
1159
1025
|
commands:
|
1160
1026
|
- "./support/bundler_wrapper exec rake test"
|
1161
1027
|
- "./support/bundler_wrapper exec rake test:failure"
|
1162
|
-
- name: Ruby 3.0.
|
1028
|
+
- name: Ruby 3.0.1 for sinatra
|
1163
1029
|
env_vars:
|
1164
1030
|
- name: RUBY_VERSION
|
1165
|
-
value: 3.0.
|
1031
|
+
value: 3.0.1
|
1166
1032
|
- name: GEMSET
|
1167
1033
|
value: sinatra
|
1168
1034
|
- name: BUNDLE_GEMFILE
|
@@ -1174,10 +1040,10 @@ blocks:
|
|
1174
1040
|
commands:
|
1175
1041
|
- "./support/bundler_wrapper exec rake test"
|
1176
1042
|
- "./support/bundler_wrapper exec rake test:failure"
|
1177
|
-
- name: Ruby 3.0.
|
1043
|
+
- name: Ruby 3.0.1 for webmachine
|
1178
1044
|
env_vars:
|
1179
1045
|
- name: RUBY_VERSION
|
1180
|
-
value: 3.0.
|
1046
|
+
value: 3.0.1
|
1181
1047
|
- name: GEMSET
|
1182
1048
|
value: webmachine
|
1183
1049
|
- name: BUNDLE_GEMFILE
|
@@ -1189,7 +1055,7 @@ blocks:
|
|
1189
1055
|
commands:
|
1190
1056
|
- "./support/bundler_wrapper exec rake test"
|
1191
1057
|
- "./support/bundler_wrapper exec rake test:failure"
|
1192
|
-
- name: Ruby jruby-9.
|
1058
|
+
- name: Ruby jruby-9.2.19.0
|
1193
1059
|
dependencies:
|
1194
1060
|
- Validation
|
1195
1061
|
task:
|
@@ -1197,10 +1063,10 @@ blocks:
|
|
1197
1063
|
commands:
|
1198
1064
|
- "./support/bundler_wrapper exec rake extension:install"
|
1199
1065
|
jobs:
|
1200
|
-
- name: Ruby jruby-9.
|
1066
|
+
- name: Ruby jruby-9.2.19.0 for no_dependencies
|
1201
1067
|
env_vars:
|
1202
1068
|
- name: RUBY_VERSION
|
1203
|
-
value: jruby-9.
|
1069
|
+
value: jruby-9.2.19.0
|
1204
1070
|
- name: GEMSET
|
1205
1071
|
value: no_dependencies
|
1206
1072
|
- name: BUNDLE_GEMFILE
|
@@ -1209,21 +1075,24 @@ blocks:
|
|
1209
1075
|
value: latest
|
1210
1076
|
- name: _BUNDLER_VERSION
|
1211
1077
|
value: latest
|
1078
|
+
- &1
|
1079
|
+
name: _C_VERSION
|
1080
|
+
value: '8'
|
1212
1081
|
commands:
|
1213
1082
|
- "./support/bundler_wrapper exec rake test"
|
1214
1083
|
- "./support/bundler_wrapper exec rake test:failure"
|
1215
|
-
- name: Ruby jruby-9.
|
1084
|
+
- name: Ruby jruby-9.2.19.0 - Gems
|
1216
1085
|
dependencies:
|
1217
|
-
- Ruby jruby-9.
|
1086
|
+
- Ruby jruby-9.2.19.0
|
1218
1087
|
task:
|
1219
1088
|
prologue:
|
1220
1089
|
commands:
|
1221
1090
|
- "./support/bundler_wrapper exec rake extension:install"
|
1222
1091
|
jobs:
|
1223
|
-
- name: Ruby jruby-9.
|
1092
|
+
- name: Ruby jruby-9.2.19.0 for rails-5.2
|
1224
1093
|
env_vars:
|
1225
1094
|
- name: RUBY_VERSION
|
1226
|
-
value: jruby-9.
|
1095
|
+
value: jruby-9.2.19.0
|
1227
1096
|
- name: GEMSET
|
1228
1097
|
value: rails-5.2
|
1229
1098
|
- name: BUNDLE_GEMFILE
|
@@ -1232,6 +1101,23 @@ blocks:
|
|
1232
1101
|
value: latest
|
1233
1102
|
- name: _BUNDLER_VERSION
|
1234
1103
|
value: latest
|
1104
|
+
- *1
|
1105
|
+
commands:
|
1106
|
+
- "./support/bundler_wrapper exec rake test"
|
1107
|
+
- "./support/bundler_wrapper exec rake test:failure"
|
1108
|
+
- name: Ruby jruby-9.2.19.0 for rails-6.0
|
1109
|
+
env_vars:
|
1110
|
+
- name: RUBY_VERSION
|
1111
|
+
value: jruby-9.2.19.0
|
1112
|
+
- name: GEMSET
|
1113
|
+
value: rails-6.0
|
1114
|
+
- name: BUNDLE_GEMFILE
|
1115
|
+
value: gemfiles/rails-6.0.gemfile
|
1116
|
+
- name: _RUBYGEMS_VERSION
|
1117
|
+
value: latest
|
1118
|
+
- name: _BUNDLER_VERSION
|
1119
|
+
value: latest
|
1120
|
+
- *1
|
1235
1121
|
commands:
|
1236
1122
|
- "./support/bundler_wrapper exec rake test"
|
1237
1123
|
- "./support/bundler_wrapper exec rake test:failure"
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
# 2.11.10
|
4
|
+
- Backport extension fallbacks on extension installation failure, that caused
|
5
|
+
NoMethodErrors. PR #736
|
6
|
+
|
3
7
|
# 2.11.9
|
4
8
|
- Fix and simplify Ruby method delegation for object method instrumentation in
|
5
9
|
the different Ruby versions. PR #706
|
data/Rakefile
CHANGED
@@ -73,7 +73,7 @@ namespace :build_matrix do
|
|
73
73
|
|
74
74
|
job = {
|
75
75
|
"name" => "Ruby #{ruby_version} for #{gem["gem"]}",
|
76
|
-
"env_vars" => env,
|
76
|
+
"env_vars" => env + ruby.fetch("env_vars", []),
|
77
77
|
"commands" => [
|
78
78
|
"./support/bundler_wrapper exec rake test",
|
79
79
|
"./support/bundler_wrapper exec rake test:failure"
|
@@ -387,10 +387,20 @@ begin
|
|
387
387
|
end
|
388
388
|
|
389
389
|
namespace :test do
|
390
|
-
|
391
|
-
RSpec::Core::RakeTask.new :failure do |t|
|
390
|
+
RSpec::Core::RakeTask.new :rspec_failure do |t|
|
392
391
|
t.rspec_opts = "#{exclude_pattern} --tag extension_installation_failure"
|
393
392
|
end
|
393
|
+
|
394
|
+
desc "Intentionally fail the extension installation"
|
395
|
+
task :prepare_failure do
|
396
|
+
# ENV var to make sure installation fails on purpurse
|
397
|
+
ENV["_TEST_APPSIGNAL_EXTENSION_FAILURE"] = "true"
|
398
|
+
# Run extension installation with intentional failure
|
399
|
+
`rake extension:install`
|
400
|
+
end
|
401
|
+
|
402
|
+
desc "Run the Appsignal gem test in an extension failure scenario"
|
403
|
+
task :failure => [:prepare_failure, :rspec_failure]
|
394
404
|
end
|
395
405
|
rescue LoadError # rubocop:disable Lint/HandleExceptions
|
396
406
|
# When running rake install, there is no RSpec yet.
|
data/appsignal.gemspec
CHANGED
@@ -42,9 +42,31 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
|
|
42
42
|
gem.add_development_dependency "timecop"
|
43
43
|
gem.add_development_dependency "webmock"
|
44
44
|
gem.add_development_dependency "yard", ">= 0.9.20"
|
45
|
-
|
46
|
-
|
45
|
+
|
46
|
+
ruby_version = Gem::Version.new(RUBY_VERSION)
|
47
|
+
if ruby_version >= Gem::Version.new("2.0.0")
|
47
48
|
gem.add_development_dependency "pry"
|
48
49
|
gem.add_development_dependency "rubocop", "0.50.0"
|
49
50
|
end
|
51
|
+
|
52
|
+
# Dependencies that need to be locked to a specific version in developement
|
53
|
+
if ruby_version < Gem::Version.new("2.0.0")
|
54
|
+
# The rexml gem use keyword arguments with optional arguments which
|
55
|
+
# work in Ruby 2.1 and newer. Lock crack to a version without rexml.
|
56
|
+
gem.add_development_dependency "crack", "0.4.4"
|
57
|
+
elsif ruby_version < Gem::Version.new("2.1.0")
|
58
|
+
# The rexml gem use keyword arguments with optional arguments which
|
59
|
+
# work in Ruby 2.1 and newer.
|
60
|
+
gem.add_development_dependency "rexml", "3.2.4"
|
61
|
+
end
|
62
|
+
if ruby_version < Gem::Version.new("2.0.0")
|
63
|
+
# public_suffix 2.0 and newer don't support Ruby < 2.0
|
64
|
+
gem.add_development_dependency "public_suffix", "~> 1.4.6"
|
65
|
+
elsif ruby_version < Gem::Version.new("2.1.0")
|
66
|
+
# public_suffix 3.0 and newer don't support Ruby < 2.1
|
67
|
+
gem.add_development_dependency "public_suffix", "~> 2.0.5"
|
68
|
+
elsif ruby_version < Gem::Version.new("2.3.0")
|
69
|
+
# public_suffix 4.0 and newer don't support Ruby < 2.3
|
70
|
+
gem.add_development_dependency "public_suffix", "~> 3.1.1"
|
71
|
+
end
|
50
72
|
end
|
data/build_matrix.yml
CHANGED
@@ -33,6 +33,7 @@ semaphore: # Default `.semaphore/semaphore.yml` contents
|
|
33
33
|
commands:
|
34
34
|
- checkout
|
35
35
|
- rm -f $HOME/.rbenv/plugins/rbenv-gem-rehash/etc/rbenv.d/exec/~gem-rehash.bash
|
36
|
+
- "if [ -n \"$_C_VERSION\" ]; then sem-version c $_C_VERSION; fi"
|
36
37
|
- sem-version ruby $RUBY_VERSION
|
37
38
|
- ./support/check_versions
|
38
39
|
- cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)
|
@@ -88,6 +89,10 @@ matrix:
|
|
88
89
|
gemsets: # By default all gems are tested
|
89
90
|
none:
|
90
91
|
- "no_dependencies"
|
92
|
+
old_rails:
|
93
|
+
- "no_dependencies"
|
94
|
+
- "rails-3.2"
|
95
|
+
- "rails-4.2"
|
91
96
|
minimal:
|
92
97
|
- "no_dependencies"
|
93
98
|
- "rails-5.2"
|
@@ -101,6 +106,7 @@ matrix:
|
|
101
106
|
- ruby: "2.0.0-p648"
|
102
107
|
rubygems: "2.7.8"
|
103
108
|
bundler: "1.17.3"
|
109
|
+
gems: "old_rails"
|
104
110
|
- ruby: "2.1.10"
|
105
111
|
rubygems: "2.7.8"
|
106
112
|
bundler: "1.17.3"
|
@@ -117,74 +123,66 @@ matrix:
|
|
117
123
|
gems: "minimal"
|
118
124
|
- ruby: "2.6.5"
|
119
125
|
- ruby: "2.7.1"
|
120
|
-
- ruby: "3.0.
|
121
|
-
- ruby: "jruby-9.
|
126
|
+
- ruby: "3.0.1"
|
127
|
+
- ruby: "jruby-9.2.19.0"
|
122
128
|
gems: "minimal"
|
129
|
+
env_vars:
|
130
|
+
- name: "_C_VERSION"
|
131
|
+
value: "8"
|
123
132
|
gems:
|
124
133
|
- gem: "no_dependencies"
|
125
134
|
- gem: "capistrano2"
|
126
135
|
- gem: "capistrano3"
|
127
136
|
- gem: "grape"
|
128
137
|
- gem: "padrino"
|
129
|
-
exclude:
|
130
|
-
ruby:
|
131
|
-
- "2.0.0-p648"
|
132
138
|
- gem: "que"
|
133
139
|
- gem: "que_beta"
|
134
|
-
exclude:
|
135
|
-
ruby:
|
136
|
-
- "2.0.0-p648"
|
137
140
|
- gem: "rails-3.2"
|
138
141
|
bundler: "1.17.3"
|
139
142
|
exclude:
|
140
143
|
ruby:
|
141
144
|
- "2.6.5"
|
142
145
|
- "2.7.1"
|
143
|
-
- "3.0.
|
146
|
+
- "3.0.1"
|
144
147
|
- gem: "rails-4.2"
|
145
148
|
bundler: "1.17.3"
|
146
149
|
exclude:
|
147
150
|
ruby:
|
148
151
|
- "2.6.5"
|
149
152
|
- "2.7.1"
|
150
|
-
- "3.0.
|
153
|
+
- "3.0.1"
|
151
154
|
- gem: "rails-5.0"
|
152
155
|
exclude:
|
153
156
|
ruby:
|
154
157
|
- "2.0.0-p648"
|
155
|
-
- "3.0.
|
158
|
+
- "3.0.1"
|
156
159
|
- gem: "rails-5.1"
|
157
160
|
exclude:
|
158
161
|
ruby:
|
159
162
|
- "2.0.0-p648"
|
160
|
-
- "3.0.
|
163
|
+
- "3.0.1"
|
161
164
|
- gem: "rails-5.2"
|
162
165
|
exclude:
|
163
166
|
ruby:
|
164
167
|
- "2.0.0-p648"
|
165
|
-
- "3.0.
|
168
|
+
- "3.0.1"
|
166
169
|
- gem: "rails-6.0"
|
167
170
|
exclude:
|
168
171
|
ruby:
|
169
|
-
- "2.0.0-p648"
|
170
172
|
- "2.1.10"
|
171
173
|
- "2.2.10"
|
172
174
|
- "2.3.8"
|
173
175
|
- "2.4.9"
|
174
|
-
- "jruby-9.1.17.0"
|
175
176
|
- gem: "resque-1"
|
176
177
|
bundler: "1.17.3"
|
177
178
|
exclude:
|
178
179
|
ruby:
|
179
|
-
- "3.0.
|
180
|
+
- "3.0.1"
|
180
181
|
- gem: "resque-2"
|
181
|
-
exclude:
|
182
|
-
ruby:
|
183
|
-
- "2.0.0-p648"
|
184
182
|
- gem: "sequel"
|
185
183
|
- gem: "sequel-435"
|
186
184
|
exclude:
|
187
185
|
ruby:
|
188
|
-
- "3.0.
|
186
|
+
- "3.0.1"
|
189
187
|
- gem: "sinatra"
|
190
188
|
- gem: "webmachine"
|
data/gemfiles/grape.gemfile
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
|
3
|
+
ruby_version = Gem::Version.new(RUBY_VERSION)
|
4
|
+
if ruby_version < Gem::Version.new("2.3.0")
|
5
|
+
gem 'rack', '~> 1.6'
|
6
|
+
end
|
4
7
|
|
5
8
|
ruby_version = Gem::Version.new(RUBY_VERSION)
|
6
9
|
if ruby_version < Gem::Version.new("2.0.0")
|
data/gemfiles/rails-3.2.gemfile
CHANGED
data/gemfiles/rails-4.2.gemfile
CHANGED
@@ -13,5 +13,11 @@ end
|
|
13
13
|
if ruby_version < Gem::Version.new("2.1.0")
|
14
14
|
gem 'nokogiri', '~> 1.6.0'
|
15
15
|
end
|
16
|
+
if ruby_version < Gem::Version.new("2.5.0")
|
17
|
+
gem 'sprockets', '~> 3.7.2'
|
18
|
+
end
|
19
|
+
|
20
|
+
gem "minitest", "5.12.0"
|
21
|
+
gem "connection_pool", "2.2.3"
|
16
22
|
|
17
23
|
gemspec :path => '../'
|
data/gemfiles/resque-2.gemfile
CHANGED
data/gemfiles/sequel-435.gemfile
CHANGED
data/gemfiles/sequel.gemfile
CHANGED
data/gemfiles/sinatra.gemfile
CHANGED
data/lib/appsignal/extension.rb
CHANGED
@@ -40,6 +40,16 @@ module Appsignal
|
|
40
40
|
def method_missing(m, *args, &block)
|
41
41
|
super if Appsignal.testing?
|
42
42
|
end
|
43
|
+
|
44
|
+
unless Appsignal.extension_loaded?
|
45
|
+
def data_map_new
|
46
|
+
Appsignal::Extension::MockData.new
|
47
|
+
end
|
48
|
+
|
49
|
+
def data_array_new
|
50
|
+
Appsignal::Extension::MockData.new
|
51
|
+
end
|
52
|
+
end
|
43
53
|
end
|
44
54
|
|
45
55
|
if Appsignal::System.jruby?
|
@@ -62,5 +72,45 @@ module Appsignal
|
|
62
72
|
"#<#{self.class.name}:#{object_id} #{self}>"
|
63
73
|
end
|
64
74
|
end
|
75
|
+
|
76
|
+
# Mock of the {Data} class. This mock is used when the extension cannot be
|
77
|
+
# loaded. This mock listens to all method calls and does nothing, and
|
78
|
+
# prevents NoMethodErrors from being raised.
|
79
|
+
#
|
80
|
+
# Disabled in testing so we can make sure that we don't miss an extension
|
81
|
+
# function implementation.
|
82
|
+
#
|
83
|
+
# This class inherits from the {Data} class so that it passes type checks.
|
84
|
+
class MockData < Data
|
85
|
+
def initialize(*_args)
|
86
|
+
# JRuby extension requirement, as it sends a pointer to the Data object
|
87
|
+
# when creating it
|
88
|
+
end
|
89
|
+
|
90
|
+
def method_missing(_method, *_args, &_block)
|
91
|
+
super if Appsignal.testing?
|
92
|
+
end
|
93
|
+
|
94
|
+
def to_s
|
95
|
+
"{}"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# Mock of the {Transaction} class. This mock is used when the extension
|
100
|
+
# cannot be loaded. This mock listens to all method calls and does nothing,
|
101
|
+
# and prevents NoMethodErrors from being raised.
|
102
|
+
#
|
103
|
+
# Disabled in testing so we can make sure that we don't miss an extension
|
104
|
+
# function implementation.
|
105
|
+
class MockTransaction
|
106
|
+
def initialize(*_args)
|
107
|
+
# JRuby extension requirement, as it sends a pointer to the Transaction
|
108
|
+
# object when creating it
|
109
|
+
end
|
110
|
+
|
111
|
+
def method_missing(_method, *_args, &_block)
|
112
|
+
super if Appsignal.testing?
|
113
|
+
end
|
114
|
+
end
|
65
115
|
end
|
66
116
|
end
|
data/lib/appsignal/version.rb
CHANGED
@@ -1,13 +1,6 @@
|
|
1
1
|
describe Appsignal::Extension, :extension_installation_failure do
|
2
2
|
context "when the extension library cannot be loaded" do
|
3
|
-
# This test breaks the installation on purpose and is not run by default.
|
4
|
-
# See `rake test:failure`. If this test was run, run `rake
|
5
|
-
# extension:install` again to fix the extension installation.
|
6
3
|
it "prints and logs an error" do
|
7
|
-
# ENV var to make sure installation fails on purpurse
|
8
|
-
ENV["_TEST_APPSIGNAL_EXTENSION_FAILURE"] = "true"
|
9
|
-
`rake extension:install` # Run installation
|
10
|
-
|
11
4
|
require "open3"
|
12
5
|
_stdout, stderr, _status = Open3.capture3("bin/appsignal --version")
|
13
6
|
expect(stderr).to include("ERROR: AppSignal failed to load extension")
|
@@ -119,22 +119,56 @@ describe Appsignal::Extension do
|
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
122
|
-
context "when the extension library cannot be loaded" do
|
123
|
-
|
122
|
+
context "when the extension library cannot be loaded", :extension_installation_failure do
|
123
|
+
let(:ext) { Appsignal::Extension }
|
124
124
|
|
125
|
-
|
126
|
-
|
127
|
-
allow(Appsignal).to receive(:testing?).and_return(false)
|
125
|
+
around do |example|
|
126
|
+
Appsignal::Testing.without_testing { example.run }
|
128
127
|
end
|
129
128
|
|
130
129
|
it "should indicate that the extension is not loaded" do
|
131
130
|
expect(Appsignal.extension_loaded?).to be_falsy
|
132
131
|
end
|
133
132
|
|
134
|
-
it "
|
135
|
-
|
136
|
-
|
137
|
-
|
133
|
+
it "does not raise errors when methods are called" do
|
134
|
+
ext.appsignal_start
|
135
|
+
ext.something
|
136
|
+
end
|
137
|
+
|
138
|
+
describe Appsignal::Extension::MockData do
|
139
|
+
it "does not error on missing data_map_new extension method calls" do
|
140
|
+
map = ext.data_map_new
|
141
|
+
expect(map).to be_kind_of(Appsignal::Extension::MockData)
|
142
|
+
# Does not raise errors any arbitrary method call that does not exist
|
143
|
+
map.set_string("key", "value")
|
144
|
+
map.set_int("key", 123)
|
145
|
+
map.something
|
146
|
+
end
|
147
|
+
|
148
|
+
it "does not error on missing data_array_new extension method calls" do
|
149
|
+
array = ext.data_array_new
|
150
|
+
expect(array).to be_kind_of(Appsignal::Extension::MockData)
|
151
|
+
# Does not raise errors any arbitrary method call that does not exist
|
152
|
+
array.append_string("value")
|
153
|
+
array.append_int(123)
|
154
|
+
array.something
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
describe Appsignal::Extension::MockTransaction do
|
159
|
+
it "does not error on missing transaction extension method calls" do
|
160
|
+
transaction = described_class.new
|
161
|
+
|
162
|
+
transaction.start_event(0)
|
163
|
+
transaction.finish_event(
|
164
|
+
"name",
|
165
|
+
"title",
|
166
|
+
"body",
|
167
|
+
Appsignal::EventFormatter::DEFAULT,
|
168
|
+
0
|
169
|
+
)
|
170
|
+
transaction.something
|
171
|
+
end
|
138
172
|
end
|
139
173
|
end
|
140
174
|
end
|
@@ -246,6 +246,23 @@ describe Appsignal::Transaction do
|
|
246
246
|
expect(transaction.ext).to_not be_nil
|
247
247
|
end
|
248
248
|
|
249
|
+
context "when extension is not loaded", :extension_installation_failure do
|
250
|
+
around do |example|
|
251
|
+
Appsignal::Testing.without_testing { example.run }
|
252
|
+
end
|
253
|
+
|
254
|
+
it "does not error on missing extension method calls" do
|
255
|
+
expect(transaction.ext).to be_kind_of(Appsignal::Extension::MockTransaction)
|
256
|
+
transaction.start_event
|
257
|
+
transaction.finish_event(
|
258
|
+
"name",
|
259
|
+
"title",
|
260
|
+
"body",
|
261
|
+
Appsignal::EventFormatter::DEFAULT
|
262
|
+
)
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
249
266
|
it "sets the transaction id" do
|
250
267
|
expect(transaction.transaction_id).to eq "1"
|
251
268
|
end
|
@@ -4,110 +4,156 @@ describe Appsignal::Utils::Data do
|
|
4
4
|
describe ".generate" do
|
5
5
|
subject { Appsignal::Utils::Data.generate(body) }
|
6
6
|
|
7
|
-
context "
|
8
|
-
|
9
|
-
{
|
10
|
-
"the" => "payload",
|
11
|
-
"int" => 1, # Fixnum
|
12
|
-
"int61" => 1 << 61, # Fixnum
|
13
|
-
"int62" => 1 << 62, # Bignum, this one still works
|
14
|
-
"int63" => 1 << 63, # Bignum, turnover point for C, too big for long
|
15
|
-
"int64" => 1 << 64, # Bignum
|
16
|
-
"float" => 1.0,
|
17
|
-
1 => true,
|
18
|
-
nil => "test",
|
19
|
-
:foo => [1, 2, "three", { "foo" => "bar" }],
|
20
|
-
"bar" => nil,
|
21
|
-
"baz" => { "foo" => "bʊr", "arr" => [1, 2] }
|
22
|
-
}
|
7
|
+
context "when extension is not loaded", :extension_installation_failure do
|
8
|
+
around do |example|
|
9
|
+
Appsignal::Testing.without_testing { example.run }
|
23
10
|
end
|
24
11
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
expect(subject.to_s).to
|
31
|
-
%("1":true,) +
|
32
|
-
%("bar":null,) +
|
33
|
-
%("baz":{"arr":[1,2],"foo":"bʊr"},) +
|
34
|
-
%("float":1.0,) +
|
35
|
-
%("foo":[1,2,"three",{"foo":"bar"}],) +
|
36
|
-
%("int":1,) +
|
37
|
-
%("int61":#{1 << 61},) +
|
38
|
-
%("int62":#{1 << 62},) +
|
39
|
-
%("int63":"bigint:#{1 << 63}",) +
|
40
|
-
%("int64":"bigint:#{1 << 64}",) +
|
41
|
-
%("the":"payload"})
|
12
|
+
context "with valid hash body" do
|
13
|
+
let(:body) { hash_body }
|
14
|
+
|
15
|
+
it "does not error and returns MockData class" do
|
16
|
+
expect(subject).to be_kind_of(Appsignal::Extension::MockData)
|
17
|
+
expect(subject.to_s).to eql("{}")
|
42
18
|
end
|
43
19
|
end
|
44
|
-
end
|
45
20
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
1, # Fixnum
|
54
|
-
1.0, # Float
|
55
|
-
1 << 61, # Fixnum
|
56
|
-
1 << 62, # Bignum, this one still works
|
57
|
-
1 << 63, # Bignum, turnover point for C, too big for long
|
58
|
-
1 << 64, # Bignum
|
59
|
-
{ "arr" => [1, 2, "three"], "foo" => "bʊr" }
|
60
|
-
]
|
21
|
+
context "with valid array body" do
|
22
|
+
let(:body) { array_body }
|
23
|
+
|
24
|
+
it "does not error and returns MockData class" do
|
25
|
+
expect(subject).to be_kind_of(Appsignal::Extension::MockData)
|
26
|
+
expect(subject.to_s).to eql("{}")
|
27
|
+
end
|
61
28
|
end
|
62
29
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
%(false,) +
|
71
|
-
%(\"string\",) +
|
72
|
-
%(1,) +
|
73
|
-
%(1.0,) +
|
74
|
-
%(#{1 << 61},) +
|
75
|
-
%(#{1 << 62},) +
|
76
|
-
%("bigint:#{1 << 63}",) +
|
77
|
-
%("bigint:#{1 << 64}",) +
|
78
|
-
%({\"arr\":[1,2,\"three\"],\"foo\":\"bʊr\"}])
|
30
|
+
context "with an invalid body" do
|
31
|
+
let(:body) { "body" }
|
32
|
+
|
33
|
+
it "raise a type error" do
|
34
|
+
expect do
|
35
|
+
subject
|
36
|
+
end.to raise_error TypeError
|
79
37
|
end
|
80
38
|
end
|
81
39
|
end
|
82
40
|
|
83
|
-
context "
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
41
|
+
context "when extension is loaded" do
|
42
|
+
context "with a valid hash body" do
|
43
|
+
let(:body) { hash_body }
|
44
|
+
|
45
|
+
it "returns a valid Data object" do
|
46
|
+
is_expected.to eq Appsignal::Utils::Data.generate(body)
|
47
|
+
is_expected.to_not eq Appsignal::Utils::Data.generate({})
|
48
|
+
end
|
49
|
+
|
50
|
+
describe "#to_s" do
|
51
|
+
it "returns a serialized hash" do
|
52
|
+
expect(subject.to_s).to eq %({"":"test",) +
|
53
|
+
%("1":true,) +
|
54
|
+
%("bar":null,) +
|
55
|
+
%("baz":{"arr":[1,2],"foo":"bʊr"},) +
|
56
|
+
%("float":1.0,) +
|
57
|
+
%("foo":[1,2,"three",{"foo":"bar"}],) +
|
58
|
+
%("int":1,) +
|
59
|
+
%("int61":#{1 << 61},) +
|
60
|
+
%("int62":#{1 << 62},) +
|
61
|
+
%("int63":"bigint:#{1 << 63}",) +
|
62
|
+
%("int64":"bigint:#{1 << 64}",) +
|
63
|
+
%("the":"payload"})
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
context "with a valid array body" do
|
69
|
+
let(:body) { array_body }
|
70
|
+
|
71
|
+
it "returns a valid Data object" do
|
72
|
+
is_expected.to eq Appsignal::Utils::Data.generate(body)
|
73
|
+
is_expected.to_not eq Appsignal::Utils::Data.generate({})
|
74
|
+
end
|
75
|
+
|
76
|
+
describe "#to_s" do
|
77
|
+
it "returns a serialized array" do
|
78
|
+
expect(subject.to_s).to eq %([null,) +
|
79
|
+
%(true,) +
|
80
|
+
%(false,) +
|
81
|
+
%(\"string\",) +
|
82
|
+
%(1,) +
|
83
|
+
%(1.0,) +
|
84
|
+
%(#{1 << 61},) +
|
85
|
+
%(#{1 << 62},) +
|
86
|
+
%("bigint:#{1 << 63}",) +
|
87
|
+
%("bigint:#{1 << 64}",) +
|
88
|
+
%({\"arr\":[1,2,\"three\"],\"foo\":\"bʊr\"}])
|
89
|
+
end
|
90
|
+
end
|
96
91
|
end
|
97
92
|
|
98
|
-
|
99
|
-
|
93
|
+
context "with a body that contains strings with invalid utf-8 content" do
|
94
|
+
let(:string_with_invalid_utf8) { [0x61, 0x61, 0x85].pack("c*") }
|
95
|
+
let(:body) do
|
96
|
+
{
|
97
|
+
"field_one" => [0x61, 0x61].pack("c*"),
|
98
|
+
:field_two => string_with_invalid_utf8,
|
99
|
+
"field_three" => [
|
100
|
+
"one", string_with_invalid_utf8
|
101
|
+
],
|
102
|
+
"field_four" => {
|
103
|
+
"one" => string_with_invalid_utf8
|
104
|
+
}
|
105
|
+
}
|
106
|
+
end
|
107
|
+
|
108
|
+
describe "#to_s" do
|
109
|
+
it "returns a JSON representation in a String" do
|
110
|
+
expect(subject.to_s).to eq %({"field_four":{"one":"aa�"},"field_one":"aa","field_three":["one","aa�"],"field_two":"aa�"})
|
111
|
+
end
|
112
|
+
end
|
100
113
|
end
|
101
|
-
end
|
102
114
|
|
103
|
-
|
104
|
-
|
115
|
+
context "with an invalid body" do
|
116
|
+
let(:body) { "body" }
|
105
117
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
118
|
+
it "raises a type error" do
|
119
|
+
expect do
|
120
|
+
subject
|
121
|
+
end.to raise_error TypeError
|
122
|
+
end
|
110
123
|
end
|
111
124
|
end
|
112
125
|
end
|
126
|
+
|
127
|
+
def hash_body
|
128
|
+
{
|
129
|
+
"the" => "payload",
|
130
|
+
"int" => 1, # Fixnum
|
131
|
+
"int61" => 1 << 61, # Fixnum
|
132
|
+
"int62" => 1 << 62, # Bignum, this one still works
|
133
|
+
"int63" => 1 << 63, # Bignum, turnover point for C, too big for long
|
134
|
+
"int64" => 1 << 64, # Bignum
|
135
|
+
"float" => 1.0,
|
136
|
+
1 => true,
|
137
|
+
nil => "test",
|
138
|
+
:foo => [1, 2, "three", { "foo" => "bar" }],
|
139
|
+
"bar" => nil,
|
140
|
+
"baz" => { "foo" => "bʊr", "arr" => [1, 2] }
|
141
|
+
}
|
142
|
+
end
|
143
|
+
|
144
|
+
def array_body
|
145
|
+
[
|
146
|
+
nil,
|
147
|
+
true,
|
148
|
+
false,
|
149
|
+
"string",
|
150
|
+
1, # Fixnum
|
151
|
+
1.0, # Float
|
152
|
+
1 << 61, # Fixnum
|
153
|
+
1 << 62, # Bignum, this one still works
|
154
|
+
1 << 63, # Bignum, turnover point for C, too big for long
|
155
|
+
1 << 64, # Bignum
|
156
|
+
{ "arr" => [1, 2, "three"], "foo" => "bʊr" }
|
157
|
+
]
|
158
|
+
end
|
113
159
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -131,6 +131,28 @@ RSpec.configure do |config|
|
|
131
131
|
allow(Appsignal::Config).to receive(:system_tmp_dir).and_return(spec_system_tmp_dir)
|
132
132
|
end
|
133
133
|
|
134
|
+
# These tests are not run by default. They require a failed extension
|
135
|
+
# installation. See the `rake test:failure` task. If a test with this tag was
|
136
|
+
# run, run `rake extension:install` again to fix the extension installation
|
137
|
+
# before running other tests.
|
138
|
+
config.before :extension_installation_failure => true do
|
139
|
+
next unless Appsignal.extension_loaded?
|
140
|
+
|
141
|
+
raise "Extension is loaded, please run the following task and rerun the test." \
|
142
|
+
"\n\n rake test:prepare_failure"
|
143
|
+
end
|
144
|
+
|
145
|
+
# Check to see if the extension is loaded before running the specs. If the
|
146
|
+
# extension is not loaded it can result in unexpected behavior.
|
147
|
+
config.before do |example|
|
148
|
+
next if Appsignal.extension_loaded?
|
149
|
+
next if example.metadata[:extension_installation_failure]
|
150
|
+
|
151
|
+
puts "\nWARNING: The AppSignal extension is not loaded, please run the "\
|
152
|
+
"following task and rerun the test." \
|
153
|
+
"\n\n rake extension:install\n"
|
154
|
+
end
|
155
|
+
|
134
156
|
config.after do
|
135
157
|
Appsignal::Testing.clear!
|
136
158
|
clear_current_transaction!
|
data/spec/support/testing.rb
CHANGED
@@ -1,16 +1,26 @@
|
|
1
1
|
module Appsignal
|
2
2
|
class << self
|
3
|
+
attr_writer :testing
|
3
4
|
remove_method :testing?
|
4
5
|
|
5
6
|
# @api private
|
6
7
|
def testing?
|
7
|
-
true
|
8
|
+
@testing = true unless defined?(@testing)
|
9
|
+
@testing
|
8
10
|
end
|
9
11
|
end
|
10
12
|
|
11
13
|
# @api private
|
12
14
|
module Testing
|
13
15
|
class << self
|
16
|
+
def without_testing
|
17
|
+
original_testing = Appsignal.testing?
|
18
|
+
Appsignal.testing = false
|
19
|
+
yield
|
20
|
+
ensure
|
21
|
+
Appsignal.testing = original_testing
|
22
|
+
end
|
23
|
+
|
14
24
|
def transactions
|
15
25
|
@transactions ||= []
|
16
26
|
end
|
data/support/install_deps
CHANGED
@@ -9,18 +9,22 @@ fi
|
|
9
9
|
|
10
10
|
case "${_RUBYGEMS_VERSION-"latest"}" in
|
11
11
|
"latest")
|
12
|
+
echo "Updating rubygems"
|
12
13
|
gem update $gem_args --system
|
13
14
|
;;
|
14
15
|
*)
|
16
|
+
echo "Updating rubygems to $_RUBYGEMS_VERSION}"
|
15
17
|
gem update $gem_args --system $_RUBYGEMS_VERSION
|
16
18
|
;;
|
17
19
|
esac
|
18
20
|
|
19
21
|
case "${_BUNDLER_VERSION-"latest"}" in
|
20
22
|
"latest")
|
23
|
+
echo "Updating bundler"
|
21
24
|
gem update bundler $gem_args
|
22
25
|
;;
|
23
26
|
*)
|
27
|
+
echo "Updating bundler to $_BUNDLER_VERSION"
|
24
28
|
gem install bundler $gem_args --version $_BUNDLER_VERSION
|
25
29
|
;;
|
26
30
|
esac
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.11.
|
4
|
+
version: 2.11.10
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-07-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -432,7 +432,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
432
432
|
- !ruby/object:Gem::Version
|
433
433
|
version: '0'
|
434
434
|
requirements: []
|
435
|
-
rubygems_version: 3.2.
|
435
|
+
rubygems_version: 3.2.17
|
436
436
|
signing_key:
|
437
437
|
specification_version: 4
|
438
438
|
summary: Logs performance and exception data from your app to appsignal.com
|