stenotype 0.1.15 → 0.1.19

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: a42b44b8b7a3c69fe9bfc179aaef8e274c67ace47d3609edda524358ff59d6ec
4
- data.tar.gz: 58b3185d8391de7473da08bc9ffb4de8ca9ca37e8d948b8c7d26b14d3bd1a928
3
+ metadata.gz: f17a696163cfddf536ffa3c9da47c3e8fe445768ae258eb26117547f04f3080b
4
+ data.tar.gz: 664096da0a3cd70456aad58216fe5169ac862dcf944163a2ffa66aaffae866bd
5
5
  SHA512:
6
- metadata.gz: 3578df8a2213ad6bfff4c8be71f902fba440ceed806e7b2cd4a3a7c443194e5abf11cc624f1466768f1a845e6a3696e108879e1524de5be553435b5fc443cc37
7
- data.tar.gz: 2550d63b410c460b663562d453b97659dc014fde50cd250949530e210d9dc80cd251964858f90aa331de3303fb3b534f1601444c1208fdd7739ec309bb505e3c
6
+ metadata.gz: 3e48c0b6807988406b8d49d6acd4f343d39fd6074bfb611e8123d37b44dc5d2263b1edc15da94af3a3e590fd90e36e14a6d6a0d3c976980c87d4c4fd68c6ea72
7
+ data.tar.gz: 4010b437d38323daf91a066e2cbe829ed3fc8245d67398e185be5e5615d7c6290fb32862df3798db6d53dfe38e61d3892e48e1274cf5610e33f45b02bebf1dd7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ### 0.1.16
4
+ * Add rspec matchers to use in client code.
5
+
3
6
  ### 0.1.15
4
7
  * Updates readme.
5
8
 
data/Gemfile.lock CHANGED
@@ -1,279 +1,332 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stenotype (0.1.15)
5
- activesupport (>= 5.0.0)
6
- google-cloud-pubsub (~> 1.0.0)
4
+ stenotype (0.1.19)
5
+ activesupport (>= 6.1.0)
6
+ google-cloud-pubsub (~> 2.4.0)
7
7
  spicery (>= 0.22.0, < 1.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actioncable (5.2.4)
13
- actionpack (= 5.2.4)
12
+ actioncable (6.1.6.1)
13
+ actionpack (= 6.1.6.1)
14
+ activesupport (= 6.1.6.1)
14
15
  nio4r (~> 2.0)
15
16
  websocket-driver (>= 0.6.1)
16
- actionmailer (5.2.4)
17
- actionpack (= 5.2.4)
18
- actionview (= 5.2.4)
19
- activejob (= 5.2.4)
17
+ actionmailbox (6.1.6.1)
18
+ actionpack (= 6.1.6.1)
19
+ activejob (= 6.1.6.1)
20
+ activerecord (= 6.1.6.1)
21
+ activestorage (= 6.1.6.1)
22
+ activesupport (= 6.1.6.1)
23
+ mail (>= 2.7.1)
24
+ actionmailer (6.1.6.1)
25
+ actionpack (= 6.1.6.1)
26
+ actionview (= 6.1.6.1)
27
+ activejob (= 6.1.6.1)
28
+ activesupport (= 6.1.6.1)
20
29
  mail (~> 2.5, >= 2.5.4)
21
30
  rails-dom-testing (~> 2.0)
22
- actionpack (5.2.4)
23
- actionview (= 5.2.4)
24
- activesupport (= 5.2.4)
25
- rack (~> 2.0)
31
+ actionpack (6.1.6.1)
32
+ actionview (= 6.1.6.1)
33
+ activesupport (= 6.1.6.1)
34
+ rack (~> 2.0, >= 2.0.9)
26
35
  rack-test (>= 0.6.3)
27
36
  rails-dom-testing (~> 2.0)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- actionview (5.2.4)
30
- activesupport (= 5.2.4)
37
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
38
+ actiontext (6.1.6.1)
39
+ actionpack (= 6.1.6.1)
40
+ activerecord (= 6.1.6.1)
41
+ activestorage (= 6.1.6.1)
42
+ activesupport (= 6.1.6.1)
43
+ nokogiri (>= 1.8.5)
44
+ actionview (6.1.6.1)
45
+ activesupport (= 6.1.6.1)
31
46
  builder (~> 3.1)
32
47
  erubi (~> 1.4)
33
48
  rails-dom-testing (~> 2.0)
34
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
35
- activejob (5.2.4)
36
- activesupport (= 5.2.4)
49
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
50
+ activejob (6.1.6.1)
51
+ activesupport (= 6.1.6.1)
37
52
  globalid (>= 0.3.6)
38
- activemodel (5.2.4)
39
- activesupport (= 5.2.4)
40
- activerecord (5.2.4)
41
- activemodel (= 5.2.4)
42
- activesupport (= 5.2.4)
43
- arel (>= 9.0)
44
- activestorage (5.2.4)
45
- actionpack (= 5.2.4)
46
- activerecord (= 5.2.4)
47
- marcel (~> 0.3.1)
48
- activesupport (5.2.4)
53
+ activemodel (6.1.6.1)
54
+ activesupport (= 6.1.6.1)
55
+ activerecord (6.1.6.1)
56
+ activemodel (= 6.1.6.1)
57
+ activesupport (= 6.1.6.1)
58
+ activestorage (6.1.6.1)
59
+ actionpack (= 6.1.6.1)
60
+ activejob (= 6.1.6.1)
61
+ activerecord (= 6.1.6.1)
62
+ activesupport (= 6.1.6.1)
63
+ marcel (~> 1.0)
64
+ mini_mime (>= 1.1.0)
65
+ activesupport (6.1.6.1)
49
66
  concurrent-ruby (~> 1.0, >= 1.0.2)
50
- i18n (>= 0.7, < 2)
51
- minitest (~> 5.1)
52
- tzinfo (~> 1.1)
53
- addressable (2.7.0)
54
- public_suffix (>= 2.0.2, < 5.0)
55
- arel (9.0.0)
56
- around_the_world (0.22.4)
67
+ i18n (>= 1.6, < 2)
68
+ minitest (>= 5.1)
69
+ tzinfo (~> 2.0)
70
+ zeitwerk (~> 2.3)
71
+ addressable (2.8.1)
72
+ public_suffix (>= 2.0.2, < 6.0)
73
+ around_the_world (0.29.1)
57
74
  activesupport (>= 5.2.1)
58
- ast (2.4.0)
59
- builder (3.2.3)
60
- coderay (1.1.2)
61
- collectible (0.22.4)
75
+ ast (2.4.2)
76
+ builder (3.2.4)
77
+ coderay (1.1.3)
78
+ collectible (0.29.1)
62
79
  activesupport (>= 5.2.1)
63
- short_circu_it (= 0.22.4)
64
- tablesalt (= 0.22.4)
65
- concurrent-ruby (1.1.5)
66
- conjunction (0.22.4)
80
+ short_circu_it (= 0.29.1)
81
+ tablesalt (= 0.29.1)
82
+ concurrent-ruby (1.1.10)
83
+ conjunction (0.29.1)
67
84
  activemodel (>= 5.2.1)
68
85
  activesupport (>= 5.2.1)
69
- spicerack (= 0.22.4)
70
- crass (1.0.5)
71
- diff-lcs (1.3)
72
- directive (0.22.4)
86
+ directive (= 0.29.1)
87
+ connection_pool (2.2.5)
88
+ crass (1.0.6)
89
+ diff-lcs (1.5.0)
90
+ directive (0.29.1)
91
+ activemodel (>= 5.2.1)
73
92
  activesupport (>= 5.2.1)
74
- docile (1.3.2)
75
- erubi (1.9.0)
76
- facet (0.22.4)
93
+ substance (= 0.29.1)
94
+ docile (1.4.0)
95
+ erubi (1.11.0)
96
+ facet (0.29.1)
77
97
  activesupport (>= 5.2.1)
78
- short_circu_it (= 0.22.4)
79
- tablesalt (= 0.22.4)
80
- faker (1.9.6)
81
- i18n (>= 0.7)
82
- faraday (0.17.3)
83
- multipart-post (>= 1.2, < 3)
84
- github-markup (3.0.4)
85
- globalid (0.4.2)
86
- activesupport (>= 4.2.0)
87
- google-cloud-core (1.5.0)
98
+ short_circu_it (= 0.29.1)
99
+ tablesalt (= 0.29.1)
100
+ faker (2.22.0)
101
+ i18n (>= 1.8.11, < 2)
102
+ faraday (2.5.2)
103
+ faraday-net_http (>= 2.0, < 3.1)
104
+ ruby2_keywords (>= 0.0.4)
105
+ faraday-net_http (3.0.0)
106
+ faraday-retry (2.0.0)
107
+ faraday (~> 2.0)
108
+ gapic-common (0.11.1)
109
+ faraday (>= 1.9, < 3.a)
110
+ faraday-retry (>= 1.0, < 3.a)
111
+ google-protobuf (~> 3.14)
112
+ googleapis-common-protos (>= 1.3.12, < 2.a)
113
+ googleapis-common-protos-types (>= 1.3.1, < 2.a)
114
+ googleauth (~> 1.0)
115
+ grpc (~> 1.36)
116
+ github-markup (3.0.5)
117
+ globalid (1.0.0)
118
+ activesupport (>= 5.0)
119
+ google-cloud-core (1.6.0)
88
120
  google-cloud-env (~> 1.0)
89
121
  google-cloud-errors (~> 1.0)
90
- google-cloud-env (1.3.0)
91
- faraday (~> 0.11)
92
- google-cloud-errors (1.0.0)
93
- google-cloud-pubsub (1.0.2)
122
+ google-cloud-env (1.6.0)
123
+ faraday (>= 0.17.3, < 3.0)
124
+ google-cloud-errors (1.2.0)
125
+ google-cloud-pubsub (2.4.0)
94
126
  concurrent-ruby (~> 1.1)
95
- google-cloud-core (~> 1.2)
96
- google-gax (~> 1.7)
97
- googleapis-common-protos (>= 1.3.9, < 2.0)
98
- grpc-google-iam-v1 (~> 0.6.9)
99
- google-gax (1.8.1)
100
- google-protobuf (~> 3.9)
101
- googleapis-common-protos (>= 1.3.9, < 2.0)
102
- googleauth (~> 0.9)
103
- grpc (~> 1.24)
104
- rly (~> 0.2.3)
105
- google-protobuf (3.11.4-universal-darwin)
106
- googleapis-common-protos (1.3.9)
107
- google-protobuf (~> 3.0)
108
- googleapis-common-protos-types (~> 1.0)
109
- grpc (~> 1.0)
110
- googleapis-common-protos-types (1.0.4)
111
- google-protobuf (~> 3.0)
112
- googleauth (0.11.0)
113
- faraday (>= 0.17.3, < 2.0)
127
+ google-cloud-core (~> 1.5)
128
+ google-cloud-pubsub-v1 (~> 0.0)
129
+ google-cloud-pubsub-v1 (0.11.0)
130
+ gapic-common (>= 0.10, < 2.a)
131
+ google-cloud-errors (~> 1.0)
132
+ grpc-google-iam-v1 (~> 1.1)
133
+ google-protobuf (3.21.5)
134
+ googleapis-common-protos (1.3.12)
135
+ google-protobuf (~> 3.14)
136
+ googleapis-common-protos-types (~> 1.2)
137
+ grpc (~> 1.27)
138
+ googleapis-common-protos-types (1.4.0)
139
+ google-protobuf (~> 3.14)
140
+ googleauth (1.2.0)
141
+ faraday (>= 0.17.3, < 3.a)
114
142
  jwt (>= 1.4, < 3.0)
115
143
  memoist (~> 0.16)
116
144
  multi_json (~> 1.11)
117
145
  os (>= 0.9, < 2.0)
118
- signet (~> 0.12)
119
- grpc (1.27.0-universal-darwin)
120
- google-protobuf (~> 3.11)
146
+ signet (>= 0.16, < 2.a)
147
+ grpc (1.48.0)
148
+ google-protobuf (~> 3.19)
121
149
  googleapis-common-protos-types (~> 1.0)
122
- grpc-google-iam-v1 (0.6.9)
123
- googleapis-common-protos (>= 1.3.1, < 2.0)
124
- grpc (~> 1.0)
125
- i18n (1.7.0)
150
+ grpc-google-iam-v1 (1.2.0)
151
+ google-protobuf (~> 3.14)
152
+ googleapis-common-protos (>= 1.3.12, < 2.0)
153
+ grpc (~> 1.27)
154
+ i18n (1.12.0)
126
155
  concurrent-ruby (~> 1.0)
127
- jaro_winkler (1.5.4)
128
- json (2.2.0)
129
- jwt (2.2.1)
130
- loofah (2.4.0)
156
+ json (2.6.2)
157
+ jwt (2.5.0)
158
+ loofah (2.18.0)
131
159
  crass (~> 1.0.2)
132
160
  nokogiri (>= 1.5.9)
133
161
  mail (2.7.1)
134
162
  mini_mime (>= 0.1.1)
135
- marcel (0.3.3)
136
- mimemagic (~> 0.3.2)
163
+ marcel (1.0.2)
137
164
  memoist (0.16.2)
138
- method_source (0.9.2)
139
- mimemagic (0.3.3)
140
- mini_mime (1.0.2)
141
- mini_portile2 (2.4.0)
142
- minitest (5.13.0)
143
- multi_json (1.14.1)
144
- multipart-post (2.1.1)
145
- nio4r (2.5.2)
146
- nokogiri (1.10.7)
147
- mini_portile2 (~> 2.4.0)
148
- os (1.0.1)
149
- parallel (1.19.1)
150
- parser (2.6.5.0)
151
- ast (~> 2.4.0)
152
- pry (0.12.2)
153
- coderay (~> 1.1.0)
154
- method_source (~> 0.9.0)
155
- public_suffix (4.0.3)
156
- rack (2.0.8)
157
- rack-test (1.1.0)
158
- rack (>= 1.0, < 3)
159
- rails (5.2.4)
160
- actioncable (= 5.2.4)
161
- actionmailer (= 5.2.4)
162
- actionpack (= 5.2.4)
163
- actionview (= 5.2.4)
164
- activejob (= 5.2.4)
165
- activemodel (= 5.2.4)
166
- activerecord (= 5.2.4)
167
- activestorage (= 5.2.4)
168
- activesupport (= 5.2.4)
169
- bundler (>= 1.3.0)
170
- railties (= 5.2.4)
165
+ method_source (1.0.0)
166
+ mini_mime (1.1.2)
167
+ mini_portile2 (2.8.0)
168
+ minitest (5.16.3)
169
+ multi_json (1.15.0)
170
+ nio4r (2.5.8)
171
+ nokogiri (1.13.8)
172
+ mini_portile2 (~> 2.8.0)
173
+ racc (~> 1.4)
174
+ os (1.1.4)
175
+ parallel (1.22.1)
176
+ parser (3.1.2.1)
177
+ ast (~> 2.4.1)
178
+ pry (0.14.1)
179
+ coderay (~> 1.1)
180
+ method_source (~> 1.0)
181
+ public_suffix (5.0.0)
182
+ racc (1.6.0)
183
+ rack (2.2.4)
184
+ rack-test (2.0.2)
185
+ rack (>= 1.3)
186
+ rails (6.1.6.1)
187
+ actioncable (= 6.1.6.1)
188
+ actionmailbox (= 6.1.6.1)
189
+ actionmailer (= 6.1.6.1)
190
+ actionpack (= 6.1.6.1)
191
+ actiontext (= 6.1.6.1)
192
+ actionview (= 6.1.6.1)
193
+ activejob (= 6.1.6.1)
194
+ activemodel (= 6.1.6.1)
195
+ activerecord (= 6.1.6.1)
196
+ activestorage (= 6.1.6.1)
197
+ activesupport (= 6.1.6.1)
198
+ bundler (>= 1.15.0)
199
+ railties (= 6.1.6.1)
171
200
  sprockets-rails (>= 2.0.0)
172
201
  rails-dom-testing (2.0.3)
173
202
  activesupport (>= 4.2.0)
174
203
  nokogiri (>= 1.6)
175
- rails-html-sanitizer (1.3.0)
204
+ rails-html-sanitizer (1.4.3)
176
205
  loofah (~> 2.3)
177
- railties (5.2.4)
178
- actionpack (= 5.2.4)
179
- activesupport (= 5.2.4)
206
+ railties (6.1.6.1)
207
+ actionpack (= 6.1.6.1)
208
+ activesupport (= 6.1.6.1)
180
209
  method_source
181
- rake (>= 0.8.7)
182
- thor (>= 0.19.0, < 2.0)
183
- rainbow (3.0.0)
184
- rake (10.5.0)
185
- redcarpet (3.5.0)
186
- redis (4.1.3)
187
- redis_hash (0.22.4)
210
+ rake (>= 12.2)
211
+ thor (~> 1.0)
212
+ rainbow (3.1.1)
213
+ rake (13.0.6)
214
+ redcarpet (3.5.1)
215
+ redis (5.0.1)
216
+ redis-client (~> 0.7)
217
+ redis-client (0.7.1)
218
+ connection_pool
219
+ redis_hash (0.29.1)
188
220
  activesupport (>= 5.2.1)
189
221
  redis (>= 3.0)
190
- tablesalt (= 0.22.4)
191
- rly (0.2.3)
192
- rspec (3.9.0)
193
- rspec-core (~> 3.9.0)
194
- rspec-expectations (~> 3.9.0)
195
- rspec-mocks (~> 3.9.0)
196
- rspec-core (3.9.0)
197
- rspec-support (~> 3.9.0)
198
- rspec-expectations (3.9.0)
222
+ tablesalt (= 0.29.1)
223
+ regexp_parser (2.5.0)
224
+ rexml (3.2.5)
225
+ rspec (3.11.0)
226
+ rspec-core (~> 3.11.0)
227
+ rspec-expectations (~> 3.11.0)
228
+ rspec-mocks (~> 3.11.0)
229
+ rspec-core (3.11.0)
230
+ rspec-support (~> 3.11.0)
231
+ rspec-expectations (3.11.0)
199
232
  diff-lcs (>= 1.2.0, < 2.0)
200
- rspec-support (~> 3.9.0)
201
- rspec-mocks (3.9.0)
233
+ rspec-support (~> 3.11.0)
234
+ rspec-mocks (3.11.1)
202
235
  diff-lcs (>= 1.2.0, < 2.0)
203
- rspec-support (~> 3.9.0)
204
- rspec-support (3.9.0)
205
- rspice (0.19.2)
206
- faker (>= 1.8, < 2.0)
236
+ rspec-support (~> 3.11.0)
237
+ rspec-support (3.11.0)
238
+ rspice (0.29.1)
239
+ faker (>= 1.8, < 3.0)
207
240
  rspec (~> 3.0)
208
- rubocop (0.74.0)
209
- jaro_winkler (~> 1.5.1)
241
+ rubocop (1.35.1)
242
+ json (~> 2.3)
210
243
  parallel (~> 1.10)
211
- parser (>= 2.6)
244
+ parser (>= 3.1.2.1)
212
245
  rainbow (>= 2.2.2, < 4.0)
246
+ regexp_parser (>= 1.8, < 3.0)
247
+ rexml (>= 3.2.5, < 4.0)
248
+ rubocop-ast (>= 1.20.1, < 2.0)
213
249
  ruby-progressbar (~> 1.7)
214
- unicode-display_width (>= 1.4.0, < 1.7)
215
- rubocop-performance (1.4.1)
216
- rubocop (>= 0.71.0)
217
- rubocop-rails (2.3.0)
250
+ unicode-display_width (>= 1.4.0, < 3.0)
251
+ rubocop-ast (1.21.0)
252
+ parser (>= 3.1.1.0)
253
+ rubocop-performance (1.14.3)
254
+ rubocop (>= 1.7.0, < 2.0)
255
+ rubocop-ast (>= 0.4.0)
256
+ rubocop-rails (2.15.2)
257
+ activesupport (>= 4.2.0)
218
258
  rack (>= 1.1)
219
- rubocop (>= 0.72.0)
220
- rubocop-rspec (1.35.0)
221
- rubocop (>= 0.60.0)
222
- ruby-progressbar (1.10.1)
223
- short_circu_it (0.22.4)
259
+ rubocop (>= 1.7.0, < 2.0)
260
+ rubocop-rake (0.6.0)
261
+ rubocop (~> 1.0)
262
+ rubocop-rspec (2.12.1)
263
+ rubocop (~> 1.31)
264
+ ruby-progressbar (1.11.0)
265
+ ruby2_keywords (0.0.5)
266
+ short_circu_it (0.29.1)
224
267
  activesupport (>= 5.2.1)
225
- around_the_world (= 0.22.4)
226
- signet (0.13.0)
227
- addressable (~> 2.3)
228
- faraday (>= 0.17.3, < 2.0)
268
+ around_the_world (= 0.29.1)
269
+ signet (0.17.0)
270
+ addressable (~> 2.8)
271
+ faraday (>= 0.17.5, < 3.a)
229
272
  jwt (>= 1.5, < 3.0)
230
273
  multi_json (~> 1.10)
231
- simplecov (0.17.1)
274
+ simplecov (0.21.2)
232
275
  docile (~> 1.1)
233
- json (>= 1.8, < 3)
234
- simplecov-html (~> 0.10.0)
235
- simplecov-html (0.10.2)
236
- spicerack (0.22.4)
237
- around_the_world (= 0.22.4)
238
- directive (= 0.22.4)
239
- redis_hash (= 0.22.4)
240
- short_circu_it (= 0.22.4)
241
- tablesalt (= 0.22.4)
242
- technologic (= 0.22.4)
243
- spicerack-styleguide (0.19.2)
244
- rubocop (= 0.74)
245
- rubocop-performance (= 1.4.1)
246
- rubocop-rails (= 2.3.0)
247
- rubocop-rspec (= 1.35.0)
248
- spicery (0.22.4)
249
- collectible (= 0.22.4)
250
- conjunction (= 0.22.4)
251
- facet (= 0.22.4)
252
- spicerack (= 0.22.4)
253
- sprockets (4.0.0)
276
+ simplecov-html (~> 0.11)
277
+ simplecov_json_formatter (~> 0.1)
278
+ simplecov-html (0.12.3)
279
+ simplecov_json_formatter (0.1.4)
280
+ spicerack (0.29.1)
281
+ around_the_world (= 0.29.1)
282
+ directive (= 0.29.1)
283
+ redis_hash (= 0.29.1)
284
+ short_circu_it (= 0.29.1)
285
+ substance (= 0.29.1)
286
+ tablesalt (= 0.29.1)
287
+ technologic (= 0.29.1)
288
+ spicerack-styleguide (0.29.1)
289
+ rubocop (~> 1.7)
290
+ rubocop-performance (~> 1.13)
291
+ rubocop-rails (~> 2.11)
292
+ rubocop-rake (~> 0.6)
293
+ rubocop-rspec (~> 2.4)
294
+ spicery (0.29.1)
295
+ collectible (= 0.29.1)
296
+ conjunction (= 0.29.1)
297
+ facet (= 0.29.1)
298
+ spicerack (= 0.29.1)
299
+ sprockets (4.1.1)
254
300
  concurrent-ruby (~> 1.0)
255
301
  rack (> 1, < 3)
256
- sprockets-rails (3.2.1)
257
- actionpack (>= 4.0)
258
- activesupport (>= 4.0)
302
+ sprockets-rails (3.4.2)
303
+ actionpack (>= 5.2)
304
+ activesupport (>= 5.2)
259
305
  sprockets (>= 3.0.0)
260
- tablesalt (0.22.4)
306
+ substance (0.29.1)
307
+ activemodel (>= 5.2.1)
308
+ activesupport (>= 5.2.1)
309
+ short_circu_it (= 0.29.1)
310
+ tablesalt (= 0.29.1)
311
+ technologic (= 0.29.1)
312
+ tablesalt (0.29.1)
261
313
  activemodel (>= 5.2.1)
262
314
  activesupport (>= 5.2.1)
263
- technologic (0.22.4)
315
+ technologic (0.29.1)
264
316
  activesupport (>= 5.2.1)
265
- railties (>= 5.2.1)
266
- short_circu_it (= 0.22.4)
267
- thor (0.20.3)
268
- thread_safe (0.3.6)
269
- timecop (0.9.1)
270
- tzinfo (1.2.5)
271
- thread_safe (~> 0.1)
272
- unicode-display_width (1.6.0)
273
- websocket-driver (0.7.1)
317
+ short_circu_it (= 0.29.1)
318
+ thor (1.2.1)
319
+ timecop (0.9.5)
320
+ tzinfo (2.0.5)
321
+ concurrent-ruby (~> 1.0)
322
+ unicode-display_width (2.2.0)
323
+ webrick (1.7.0)
324
+ websocket-driver (0.7.5)
274
325
  websocket-extensions (>= 0.1.0)
275
- websocket-extensions (0.1.4)
276
- yard (0.9.20)
326
+ websocket-extensions (0.1.5)
327
+ yard (0.9.28)
328
+ webrick (~> 1.7.0)
329
+ zeitwerk (2.6.0)
277
330
 
278
331
  PLATFORMS
279
332
  ruby
@@ -282,8 +335,8 @@ DEPENDENCIES
282
335
  bundler (~> 2.0)
283
336
  github-markup (~> 3.0)
284
337
  pry (~> 0.12)
285
- rails (~> 5.2.3)
286
- rake (~> 10.0)
338
+ rails (~> 6.1.6)
339
+ rake (~> 13.0)
287
340
  redcarpet (~> 3.5)
288
341
  rspec (~> 3.0)
289
342
  rspice
@@ -294,4 +347,4 @@ DEPENDENCIES
294
347
  yard (~> 0.9)
295
348
 
296
349
  BUNDLED WITH
297
- 2.0.2
350
+ 2.2.31
data/README.md CHANGED
@@ -275,6 +275,48 @@ end
275
275
 
276
276
  You do not have to manually register the context handler since it happens upon inheriting from `Stenotype::ContextHandlers::Base`
277
277
 
278
+ ## Testing
279
+
280
+ Stenotype currently supports RSpec integration. To be able to test even emission you can use a predefined matcher by adding the following to spec helper:
281
+
282
+ ```ruby
283
+ RSpec.configure do |config|
284
+ config.around(:each, type: :stenotype_event) do |example|
285
+ require 'stenotype/adapters/test_adapter'
286
+
287
+ config.include Stenotype::Test::Matchers
288
+
289
+ RSpec::Mocks.with_temporary_scope do
290
+ allow(Stenotype.config).to receive(:targets).and_return(Array.wrap(Stenotype::Adapters::TestAdapter.new))
291
+ example.run
292
+ allow(Stenotype.config).to receive(:targets).and_call_original
293
+ end
294
+ end
295
+ end
296
+ ```
297
+
298
+ After adding the configuration you can use the matchers:
299
+ ```ruby
300
+ class Example
301
+ include Stenotype::Emitter
302
+
303
+ def trigger
304
+ emit_event(:user_subscription)
305
+ end
306
+ end
307
+
308
+ RSpec.describe Stenotype::Emitter do
309
+ describe "POST #create" do
310
+ subject(:post) { Example.new.trigger }
311
+
312
+ it "emits a user_subscription event", type: :stenotype_event do
313
+ expect { post }.to emit_an_event(:user_subscription).
314
+ with_arguments_including({ uuid: "abcd" }).
315
+ exactly(1).times
316
+ end
317
+ end
318
+ end
319
+ ```
278
320
 
279
321
  ## Development
280
322
 
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stenotype
4
+ module Adapters
5
+ class TestAdapter < Base
6
+ attr_reader :buffer
7
+
8
+ def initialize(*_)
9
+ @buffer = Array.new
10
+ super()
11
+ end
12
+
13
+ #
14
+ # @param event_data {Sting} The data to be published
15
+ # @param additional_attrs {Hash} The list of additional event attributes
16
+ #
17
+ def publish(event_data, **additional_attrs)
18
+ buffer << parse(event_data)
19
+ end
20
+
21
+ #
22
+ # Clears the buffer
23
+ #
24
+ def flush!
25
+ buffer.clear
26
+ end
27
+
28
+ private
29
+
30
+ def parse(event_data)
31
+ JSON.parse(event_data)
32
+ end
33
+ end
34
+ end
35
+ end
@@ -24,7 +24,7 @@ module Stenotype
24
24
  # @todo What is really the name here?
25
25
  #
26
26
  def _record_freshly_event(name)
27
- Stenotype::Event.emit!(name, { type: "controller_action" }, { eval_context: { controller: self }})
27
+ Stenotype::Event.emit!(name, { type: "controller_action" }, **{ eval_context: { controller: self }})
28
28
  end
29
29
 
30
30
  #
@@ -37,7 +37,7 @@ module Stenotype
37
37
  Stenotype::Event.emit!(
38
38
  "active_job_#{self.class.name}",
39
39
  { type: "active_job" },
40
- { eval_context: { active_job: self }},
40
+ **{ eval_context: { active_job: self }},
41
41
  )
42
42
  super(*args, **rest_args, &block)
43
43
  end
@@ -0,0 +1,145 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "spec_helper"
4
+ module Stenotype
5
+ module Test
6
+ module Matchers
7
+ extend RSpec::Matchers::DSL
8
+
9
+ class DiffSizeMatchesExpectation
10
+ attr_reader :matching_events, :expected_count
11
+
12
+ def initialize(matching_events, expected_count)
13
+ @matching_events = matching_events
14
+ @expected_count = expected_count
15
+ end
16
+
17
+ def failure_message
18
+ "expected to see #{expected_count} event(s) but got #{matching_events.count} event(s)."
19
+ end
20
+
21
+ def matches?
22
+ matching_events.count == expected_count
23
+ end
24
+ end
25
+
26
+ class EventHasExpectedArguments
27
+ attr_reader :matching_events, :expected_arguments
28
+
29
+ def initialize(matching_events, expected_arguments)
30
+ @matching_events = matching_events
31
+ @expected_arguments = stringify_keys(expected_arguments)
32
+ end
33
+
34
+ def matches?
35
+ return false if multiple_events?
36
+
37
+ (expected_arguments.to_a - matching_event.to_a).empty?
38
+ end
39
+
40
+ def failure_message
41
+ if multiple_events?
42
+ "more than one event with given event name has been emitted. Can not match event arguments"
43
+ else
44
+ "expected to see all attributes from #{expected_arguments} to be included in event attributes but got #{matching_event}"
45
+ end
46
+ end
47
+
48
+ private
49
+
50
+ def multiple_events?
51
+ matching_events.size > 1
52
+ end
53
+
54
+ def matching_event
55
+ matching_events.first
56
+ end
57
+
58
+ def stringify_keys(hash)
59
+ hash.transform_keys(&:to_s)
60
+ end
61
+ end
62
+
63
+ class EventEmitted
64
+ attr_reader :matching_events, :expected_event_name
65
+
66
+ def initialize(matching_events, expected_event_name)
67
+ @matching_events = matching_events
68
+ @expected_event_name = expected_event_name
69
+ end
70
+
71
+ def matches?
72
+ matching_events.any?
73
+ end
74
+
75
+ def failure_message
76
+ "expected to see a '#{expected_event_name}' event but got nothing"
77
+ end
78
+ end
79
+
80
+ matcher :emit_an_event do |expected_event_name, *_|
81
+ supports_block_expectations
82
+
83
+ match do |emitting_event_block|
84
+ @emitting_event_block = emitting_event_block
85
+
86
+ partial_matchers << EventEmitted.new(matching_events, expected_event_name)
87
+ partial_matchers << EventHasExpectedArguments.new(matching_events, @arguments_should_include) if should_validate_events_count?
88
+ partial_matchers << DiffSizeMatchesExpectation.new(matching_events, @matching_events_count) if should_validate_attributes?
89
+
90
+ return first_failure.nil?
91
+ end
92
+
93
+ chain(:with_arguments_including) { |**args| @arguments_should_include = args }
94
+ chain(:exactly) { |times| @matching_events_count = times }
95
+
96
+ # noop for syntatic sugar
97
+ chain(:times) {}
98
+ chain(:time) {}
99
+
100
+ def matching_events
101
+ @matching_events ||= begin
102
+ buffer_before_emit = stenotype_event_buffer.dup
103
+ @emitting_event_block.call
104
+ buffer_after_emit = stenotype_event_buffer.dup
105
+
106
+ diff = buffer_after_emit - buffer_before_emit
107
+ diff.select { |event| event["name"] == expected_event_name.to_s }
108
+ end
109
+ end
110
+
111
+ def partial_matchers
112
+ @partial_matchers ||= []
113
+ end
114
+
115
+ def first_failure
116
+ @first_failure ||= partial_matchers.detect { |matcher| !matcher.matches? }
117
+ end
118
+
119
+ failure_message do
120
+ return super() unless first_failure
121
+
122
+ first_failure.failure_message
123
+ end
124
+
125
+ private
126
+
127
+ def should_validate_events_count?
128
+ @matching_events_count.present?
129
+ end
130
+
131
+ def should_validate_attributes?
132
+ @arguments_should_include.present?
133
+ end
134
+
135
+ def stenotype_event_buffer
136
+ stenotype_event_target.buffer
137
+ end
138
+
139
+ def stenotype_event_target
140
+ Stenotype.config.targets.first
141
+ end
142
+ end
143
+ end
144
+ end
145
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Stenotype
4
4
  # :nodoc:
5
- VERSION = "0.1.15"
5
+ VERSION = "0.1.19"
6
6
  # :nodoc:
7
7
  end
data/stenotype.gemspec CHANGED
@@ -29,22 +29,22 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
 
32
- spec.add_dependency "activesupport", ">= 5.0.0"
33
- spec.add_dependency "google-cloud-pubsub", "~> 1.0.0"
32
+ spec.add_dependency "activesupport", ">= 6.1.0"
33
+ spec.add_dependency "google-cloud-pubsub", "~> 2.4.0"
34
34
 
35
35
  spec.add_runtime_dependency "spicery", ">= 0.22.0", "< 1.0"
36
36
 
37
37
  spec.add_development_dependency "bundler", "~> 2.0"
38
38
  spec.add_development_dependency "github-markup", "~> 3.0"
39
- spec.add_development_dependency "rake", "~> 10.0"
39
+ spec.add_development_dependency "rake", "~> 13.0"
40
40
  spec.add_development_dependency "redcarpet", "~> 3.5"
41
41
  spec.add_development_dependency "yard", "~> 0.9"
42
42
 
43
- spec.add_development_dependency "rspice", ">= 0.19.0", "< 1.0"
43
+ spec.add_development_dependency "rspice", ">= 0.27.0", "< 1.0"
44
44
  spec.add_development_dependency "spicerack-styleguide", ">= 0.19.0", "< 1.0"
45
45
 
46
46
  spec.add_development_dependency "pry", "~> 0.12"
47
- spec.add_development_dependency "rails", "~> 5.2.3"
47
+ spec.add_development_dependency "rails", "~> 6.1.6"
48
48
  spec.add_development_dependency "rspec", "~> 3.0"
49
49
  spec.add_development_dependency "simplecov", "~> 0.17"
50
50
  spec.add_development_dependency "timecop", "~> 0.9"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stenotype
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Kapitonov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-20 00:00:00.000000000 Z
11
+ date: 2022-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.0.0
19
+ version: 6.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 5.0.0
26
+ version: 6.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-pubsub
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0
33
+ version: 2.4.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.0
40
+ version: 2.4.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: spicery
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '10.0'
95
+ version: '13.0'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '10.0'
102
+ version: '13.0'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: redcarpet
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -134,7 +134,7 @@ dependencies:
134
134
  requirements:
135
135
  - - ">="
136
136
  - !ruby/object:Gem::Version
137
- version: 0.19.0
137
+ version: 0.27.0
138
138
  - - "<"
139
139
  - !ruby/object:Gem::Version
140
140
  version: '1.0'
@@ -144,7 +144,7 @@ dependencies:
144
144
  requirements:
145
145
  - - ">="
146
146
  - !ruby/object:Gem::Version
147
- version: 0.19.0
147
+ version: 0.27.0
148
148
  - - "<"
149
149
  - !ruby/object:Gem::Version
150
150
  version: '1.0'
@@ -188,14 +188,14 @@ dependencies:
188
188
  requirements:
189
189
  - - "~>"
190
190
  - !ruby/object:Gem::Version
191
- version: 5.2.3
191
+ version: 6.1.6
192
192
  type: :development
193
193
  prerelease: false
194
194
  version_requirements: !ruby/object:Gem::Requirement
195
195
  requirements:
196
196
  - - "~>"
197
197
  - !ruby/object:Gem::Version
198
- version: 5.2.3
198
+ version: 6.1.6
199
199
  - !ruby/object:Gem::Dependency
200
200
  name: rspec
201
201
  requirement: !ruby/object:Gem::Requirement
@@ -268,6 +268,7 @@ files:
268
268
  - lib/stenotype/adapters/base.rb
269
269
  - lib/stenotype/adapters/google_cloud.rb
270
270
  - lib/stenotype/adapters/stdout_adapter.rb
271
+ - lib/stenotype/adapters/test_adapter.rb
271
272
  - lib/stenotype/at_exit.rb
272
273
  - lib/stenotype/configuration.rb
273
274
  - lib/stenotype/context_handlers.rb
@@ -283,6 +284,7 @@ files:
283
284
  - lib/stenotype/frameworks/rails/action_controller.rb
284
285
  - lib/stenotype/frameworks/rails/active_job.rb
285
286
  - lib/stenotype/railtie.rb
287
+ - lib/stenotype/test/matchers.rb
286
288
  - lib/stenotype/version.rb
287
289
  - stenotype.gemspec
288
290
  homepage: https://github.com/Freshly/stenotype
@@ -292,7 +294,7 @@ metadata:
292
294
  homepage_uri: https://github.com/Freshly/stenotype
293
295
  source_code_uri: https://github.com/Freshly/stenotype
294
296
  changelog_uri: https://github.com/Freshly/stenotype/CHANGELOG.md
295
- post_install_message:
297
+ post_install_message:
296
298
  rdoc_options: []
297
299
  require_paths:
298
300
  - lib
@@ -307,8 +309,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
307
309
  - !ruby/object:Gem::Version
308
310
  version: '0'
309
311
  requirements: []
310
- rubygems_version: 3.0.3
311
- signing_key:
312
+ rubygems_version: 3.3.7
313
+ signing_key:
312
314
  specification_version: 4
313
315
  summary: Gem for emitting events and sending them to an external system.
314
316
  test_files: []