errgonomic 0.4.1 → 0.5.0

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: 192c8cce7040865055883faf48c4a7ad2967ec73415ca2ba5b1cd767da365058
4
- data.tar.gz: 1b11f5872f4ec6ecc37ad3e9e22cf5ed05e86ecef42abd05949d8d1411210592
3
+ metadata.gz: a07fce97adead2a0d6b77c83f0c80c06d6ecb6633193f61454d961bea1a4acf2
4
+ data.tar.gz: c6c66f5a03d8bea908b6b68cbe76c69f724012313348c3563bade4932946acc8
5
5
  SHA512:
6
- metadata.gz: 07b576e17f1b8f0b08c2e53b5b93fb7f8a6678f06063496e1a80beaa7b0d9aba1be308e71dfd7bb72af2ebb98d8281fbdad376c25c82164459aa36bec04fffb2
7
- data.tar.gz: 8ce5f108d65a55285e1422e248e206a357c1d82d73edddd0047167691192f9cd5861d5f3900a3201f2fe4734973e4bc8b7dad83f7fa19b811303d8bacb20b7d7
6
+ metadata.gz: 8d6d7dbac95eeea0d1fcb1bade820a2c7ba83e464dda0d79052a7beee9f9a67bc4c53c1b87b38256189ffd8f8d6bf0e8f40dc2055db1395f2bc227c30a2075bf
7
+ data.tar.gz: 522f8e75d45b543d1d8762be130d6a625dac1b8ac47a7b3eae5729649afedd8d0e493ecbb885b1aef42a887fc6a4a8ab4461ab0fd615d40d413b91da93da6ebf
data/gemset.nix CHANGED
@@ -1,14 +1,102 @@
1
1
  {
2
+ action_text-trix = {
3
+ dependencies = ["railties"];
4
+ groups = ["default" "development"];
5
+ platforms = [];
6
+ source = {
7
+ remotes = ["https://rubygems.org"];
8
+ sha256 = "12isf17cd4xyx5vg97nzxsi92703yh40fxyns6gl9f11331a4ign";
9
+ type = "gem";
10
+ };
11
+ version = "2.1.16";
12
+ };
13
+ actioncable = {
14
+ dependencies = ["actionpack" "activesupport" "nio4r" "websocket-driver" "zeitwerk"];
15
+ groups = ["default" "development"];
16
+ platforms = [];
17
+ source = {
18
+ remotes = ["https://rubygems.org"];
19
+ sha256 = "0s8rp5zpcxqkpj610whkrnjhwk119f5xn7b9bkydx76a9k1yycfw";
20
+ type = "gem";
21
+ };
22
+ version = "8.1.2";
23
+ };
24
+ actionmailbox = {
25
+ dependencies = ["actionpack" "activejob" "activerecord" "activestorage" "activesupport" "mail"];
26
+ groups = ["default" "development"];
27
+ platforms = [];
28
+ source = {
29
+ remotes = ["https://rubygems.org"];
30
+ sha256 = "16w8h4awh3k1v6b2anix20qjdij5zby7am379y4mlp8fk2qjz2q5";
31
+ type = "gem";
32
+ };
33
+ version = "8.1.2";
34
+ };
35
+ actionmailer = {
36
+ dependencies = ["actionpack" "actionview" "activejob" "activesupport" "mail" "rails-dom-testing"];
37
+ groups = ["default" "development"];
38
+ platforms = [];
39
+ source = {
40
+ remotes = ["https://rubygems.org"];
41
+ sha256 = "1sbmj65nzqzjh9ji94p91mkpjlhf3jkcbzd7ia8gwfv51w3d5hgl";
42
+ type = "gem";
43
+ };
44
+ version = "8.1.2";
45
+ };
46
+ actionpack = {
47
+ dependencies = ["actionview" "activesupport" "nokogiri" "rack" "rack-session" "rack-test" "rails-dom-testing" "rails-html-sanitizer" "useragent"];
48
+ groups = ["default" "development"];
49
+ platforms = [];
50
+ source = {
51
+ remotes = ["https://rubygems.org"];
52
+ sha256 = "08w49zj1skvviyakjy2cazfklkgx2dsnfzxb9fmaznphl53l3myf";
53
+ type = "gem";
54
+ };
55
+ version = "8.1.2";
56
+ };
57
+ actiontext = {
58
+ dependencies = ["action_text-trix" "actionpack" "activerecord" "activestorage" "activesupport" "globalid" "nokogiri"];
59
+ groups = ["default" "development"];
60
+ platforms = [];
61
+ source = {
62
+ remotes = ["https://rubygems.org"];
63
+ sha256 = "0b9dilsjx9saqqz7dwj0fqfbacdyar5f4g4wfxqdj6cw5ai7vx8b";
64
+ type = "gem";
65
+ };
66
+ version = "8.1.2";
67
+ };
68
+ actionview = {
69
+ dependencies = ["activesupport" "builder" "erubi" "rails-dom-testing" "rails-html-sanitizer"];
70
+ groups = ["default" "development"];
71
+ platforms = [];
72
+ source = {
73
+ remotes = ["https://rubygems.org"];
74
+ sha256 = "0nrf7qn2p6r645427whfh071az6bv8728bf2rrr9n74ii0jmnic0";
75
+ type = "gem";
76
+ };
77
+ version = "8.1.2";
78
+ };
79
+ activejob = {
80
+ dependencies = ["activesupport" "globalid"];
81
+ groups = ["default" "development"];
82
+ platforms = [];
83
+ source = {
84
+ remotes = ["https://rubygems.org"];
85
+ sha256 = "09gq0bivkb9qfmg69k1jqbsbs1vb2ps1jn1p6saqa0di2cvsp3ch";
86
+ type = "gem";
87
+ };
88
+ version = "8.1.2";
89
+ };
2
90
  activemodel = {
3
91
  dependencies = ["activesupport"];
4
92
  groups = ["default" "development"];
5
93
  platforms = [];
6
94
  source = {
7
95
  remotes = ["https://rubygems.org"];
8
- sha256 = "0v35y2jzqlfy1wnrzlzj2cxylhnz09vykaa1l2dnkq7sl5zzpq8a";
96
+ sha256 = "0gpkph1mq78yg1cl0vkc8js0gh3vjxjf9drqk0zyv2p63k0mh4z2";
9
97
  type = "gem";
10
98
  };
11
- version = "8.0.2";
99
+ version = "8.1.2";
12
100
  };
13
101
  activerecord = {
14
102
  dependencies = ["activemodel" "activesupport" "timeout"];
@@ -16,21 +104,32 @@
16
104
  platforms = [];
17
105
  source = {
18
106
  remotes = ["https://rubygems.org"];
19
- sha256 = "02nrya34qviawdkssyahb3mg08kqdc461b320a6ikr245jwp0d3r";
107
+ sha256 = "0i6c9g3q0lx4bca5gvz0p8p6ibhwn176zzhih0hgll6cvz5f1yxc";
108
+ type = "gem";
109
+ };
110
+ version = "8.1.2";
111
+ };
112
+ activestorage = {
113
+ dependencies = ["actionpack" "activejob" "activerecord" "activesupport" "marcel"];
114
+ groups = ["default" "development"];
115
+ platforms = [];
116
+ source = {
117
+ remotes = ["https://rubygems.org"];
118
+ sha256 = "0xms9z8asdpqw5ybl6n4bk1iys4l7y0iyi2rdbifxjlr766a8qwa";
20
119
  type = "gem";
21
120
  };
22
- version = "8.0.2";
121
+ version = "8.1.2";
23
122
  };
24
123
  activesupport = {
25
- dependencies = ["base64" "benchmark" "bigdecimal" "concurrent-ruby" "connection_pool" "drb" "i18n" "logger" "minitest" "securerandom" "tzinfo" "uri"];
124
+ dependencies = ["base64" "bigdecimal" "concurrent-ruby" "connection_pool" "drb" "i18n" "json" "logger" "minitest" "securerandom" "tzinfo" "uri"];
26
125
  groups = ["default" "development"];
27
126
  platforms = [];
28
127
  source = {
29
128
  remotes = ["https://rubygems.org"];
30
- sha256 = "0pm40y64wfc50a9sj87kxvil2102rmpdcbv82zf0r40vlgdwsrc5";
129
+ sha256 = "1bpxnr83z1x78h3jxvmga7vrmzmc8b4fic49h9jhzm6hriw2b148";
31
130
  type = "gem";
32
131
  };
33
- version = "8.0.2";
132
+ version = "8.1.2";
34
133
  };
35
134
  ast = {
36
135
  groups = ["default" "development"];
@@ -82,6 +181,16 @@
82
181
  };
83
182
  version = "3.2.2";
84
183
  };
184
+ builder = {
185
+ groups = ["default" "development"];
186
+ platforms = [];
187
+ source = {
188
+ remotes = ["https://rubygems.org"];
189
+ sha256 = "0pw3r2lyagsxkm71bf44v5b74f7l9r7di22brbyji9fwz791hya9";
190
+ type = "gem";
191
+ };
192
+ version = "3.3.0";
193
+ };
85
194
  concurrent-ruby = {
86
195
  groups = ["default" "development"];
87
196
  platforms = [];
@@ -102,6 +211,26 @@
102
211
  };
103
212
  version = "2.5.3";
104
213
  };
214
+ crass = {
215
+ groups = ["default" "development"];
216
+ platforms = [];
217
+ source = {
218
+ remotes = ["https://rubygems.org"];
219
+ sha256 = "0pfl5c0pyqaparxaqxi6s4gfl21bdldwiawrc0aknyvflli60lfw";
220
+ type = "gem";
221
+ };
222
+ version = "1.0.6";
223
+ };
224
+ date = {
225
+ groups = ["default" "development"];
226
+ platforms = [];
227
+ source = {
228
+ remotes = ["https://rubygems.org"];
229
+ sha256 = "1h0db8r2v5llxdbzkzyllkfniqw9gm092qn7cbaib73v9lw0c3bm";
230
+ type = "gem";
231
+ };
232
+ version = "3.5.1";
233
+ };
105
234
  diff-lcs = {
106
235
  groups = ["default" "development"];
107
236
  platforms = [];
@@ -122,6 +251,16 @@
122
251
  };
123
252
  version = "2.2.3";
124
253
  };
254
+ erb = {
255
+ groups = ["default" "development"];
256
+ platforms = [];
257
+ source = {
258
+ remotes = ["https://rubygems.org"];
259
+ sha256 = "0ar4nmvk1sk7drjigqyh9nnps3mxg625b8chfk42557p8i6jdrlz";
260
+ type = "gem";
261
+ };
262
+ version = "6.0.2";
263
+ };
125
264
  errgonomic = {
126
265
  dependencies = ["concurrent-ruby"];
127
266
  groups = ["default"];
@@ -130,7 +269,28 @@
130
269
  path = ./.;
131
270
  type = "path";
132
271
  };
133
- version = "0.4.0";
272
+ version = "0.5.0";
273
+ };
274
+ erubi = {
275
+ groups = ["default" "development"];
276
+ platforms = [];
277
+ source = {
278
+ remotes = ["https://rubygems.org"];
279
+ sha256 = "1naaxsqkv5b3vklab5sbb9sdpszrjzlfsbqpy7ncbnw510xi10m0";
280
+ type = "gem";
281
+ };
282
+ version = "1.13.1";
283
+ };
284
+ globalid = {
285
+ dependencies = ["activesupport"];
286
+ groups = ["default" "development"];
287
+ platforms = [];
288
+ source = {
289
+ remotes = ["https://rubygems.org"];
290
+ sha256 = "04gzhqvsm4z4l12r9dkac9a75ah45w186ydhl0i4andldsnkkih5";
291
+ type = "gem";
292
+ };
293
+ version = "1.3.0";
134
294
  };
135
295
  i18n = {
136
296
  dependencies = ["concurrent-ruby"];
@@ -143,6 +303,27 @@
143
303
  };
144
304
  version = "1.14.7";
145
305
  };
306
+ io-console = {
307
+ groups = ["default" "development"];
308
+ platforms = [];
309
+ source = {
310
+ remotes = ["https://rubygems.org"];
311
+ sha256 = "1k0lk3pwadm2myvpg893n8jshmrf2sigrd4ki15lymy7gixaxqyn";
312
+ type = "gem";
313
+ };
314
+ version = "0.8.2";
315
+ };
316
+ irb = {
317
+ dependencies = ["pp" "prism" "rdoc" "reline"];
318
+ groups = ["default" "development"];
319
+ platforms = [];
320
+ source = {
321
+ remotes = ["https://rubygems.org"];
322
+ sha256 = "1bishrxfn2anwlagw8rzly7i2yicjnr947f48nh638yqjgdlv30n";
323
+ type = "gem";
324
+ };
325
+ version = "1.17.0";
326
+ };
146
327
  jaro_winkler = {
147
328
  groups = ["default" "development"];
148
329
  platforms = [];
@@ -215,6 +396,48 @@
215
396
  };
216
397
  version = "1.7.0";
217
398
  };
399
+ loofah = {
400
+ dependencies = ["crass" "nokogiri"];
401
+ groups = ["default" "development"];
402
+ platforms = [];
403
+ source = {
404
+ remotes = ["https://rubygems.org"];
405
+ sha256 = "1rk0n13c9nmk8di2x5gqk5r04vf8bkp7ff6z0b44wsmc7fndfpnz";
406
+ type = "gem";
407
+ };
408
+ version = "2.25.0";
409
+ };
410
+ mail = {
411
+ dependencies = ["logger" "mini_mime" "net-imap" "net-pop" "net-smtp"];
412
+ groups = ["default" "development"];
413
+ platforms = [];
414
+ source = {
415
+ remotes = ["https://rubygems.org"];
416
+ sha256 = "0ha9sgkfqna62c1basc17dkx91yk7ppgjq32k4nhrikirlz6g9kg";
417
+ type = "gem";
418
+ };
419
+ version = "2.9.0";
420
+ };
421
+ marcel = {
422
+ groups = ["default" "development"];
423
+ platforms = [];
424
+ source = {
425
+ remotes = ["https://rubygems.org"];
426
+ sha256 = "1vhb1sbzlq42k2pzd9v0w5ws4kjx184y8h4d63296bn57jiwzkzx";
427
+ type = "gem";
428
+ };
429
+ version = "1.1.0";
430
+ };
431
+ mini_mime = {
432
+ groups = ["default" "development"];
433
+ platforms = [];
434
+ source = {
435
+ remotes = ["https://rubygems.org"];
436
+ sha256 = "1vycif7pjzkr29mfk4dlqv3disc5dn0va04lkwajlpr1wkibg0c6";
437
+ type = "gem";
438
+ };
439
+ version = "1.1.5";
440
+ };
218
441
  mini_portile2 = {
219
442
  groups = ["default" "development"];
220
443
  platforms = [];
@@ -235,6 +458,60 @@
235
458
  };
236
459
  version = "5.25.5";
237
460
  };
461
+ net-imap = {
462
+ dependencies = ["date" "net-protocol"];
463
+ groups = ["default" "development"];
464
+ platforms = [];
465
+ source = {
466
+ remotes = ["https://rubygems.org"];
467
+ sha256 = "1bgjhb65r1bl52wdym6wpbb0r3j7va8s44grggp0jvarfvw7bawv";
468
+ type = "gem";
469
+ };
470
+ version = "0.6.3";
471
+ };
472
+ net-pop = {
473
+ dependencies = ["net-protocol"];
474
+ groups = ["default" "development"];
475
+ platforms = [];
476
+ source = {
477
+ remotes = ["https://rubygems.org"];
478
+ sha256 = "1wyz41jd4zpjn0v1xsf9j778qx1vfrl24yc20cpmph8k42c4x2w4";
479
+ type = "gem";
480
+ };
481
+ version = "0.1.2";
482
+ };
483
+ net-protocol = {
484
+ dependencies = ["timeout"];
485
+ groups = ["default" "development"];
486
+ platforms = [];
487
+ source = {
488
+ remotes = ["https://rubygems.org"];
489
+ sha256 = "1a32l4x73hz200cm587bc29q8q9az278syw3x6fkc9d1lv5y0wxa";
490
+ type = "gem";
491
+ };
492
+ version = "0.2.2";
493
+ };
494
+ net-smtp = {
495
+ dependencies = ["net-protocol"];
496
+ groups = ["default" "development"];
497
+ platforms = [];
498
+ source = {
499
+ remotes = ["https://rubygems.org"];
500
+ sha256 = "0dh7nzjp0fiaqq1jz90nv4nxhc2w359d7c199gmzq965cfps15pd";
501
+ type = "gem";
502
+ };
503
+ version = "0.5.1";
504
+ };
505
+ nio4r = {
506
+ groups = ["default" "development"];
507
+ platforms = [];
508
+ source = {
509
+ remotes = ["https://rubygems.org"];
510
+ sha256 = "18fwy5yqnvgixq3cn0h63lm8jaxsjjxkmj8rhiv8wpzv9271d43c";
511
+ type = "gem";
512
+ };
513
+ version = "2.7.5";
514
+ };
238
515
  nokogiri = {
239
516
  dependencies = ["mini_portile2" "racc"];
240
517
  groups = ["default" "development"];
@@ -287,6 +564,27 @@
287
564
  };
288
565
  version = "3.3.8.0";
289
566
  };
567
+ pp = {
568
+ dependencies = ["prettyprint"];
569
+ groups = ["default" "development"];
570
+ platforms = [];
571
+ source = {
572
+ remotes = ["https://rubygems.org"];
573
+ sha256 = "1xlxmg86k5kifci1xvlmgw56x88dmqf04zfzn7zcr4qb8ladal99";
574
+ type = "gem";
575
+ };
576
+ version = "0.6.3";
577
+ };
578
+ prettyprint = {
579
+ groups = ["default" "development"];
580
+ platforms = [];
581
+ source = {
582
+ remotes = ["https://rubygems.org"];
583
+ sha256 = "14zicq3plqi217w6xahv7b8f7aj5kpxv1j1w98344ix9h5ay3j9b";
584
+ type = "gem";
585
+ };
586
+ version = "0.2.0";
587
+ };
290
588
  prism = {
291
589
  groups = ["default" "development"];
292
590
  platforms = [];
@@ -297,6 +595,17 @@
297
595
  };
298
596
  version = "1.4.0";
299
597
  };
598
+ psych = {
599
+ dependencies = ["date" "stringio"];
600
+ groups = ["default" "development"];
601
+ platforms = [];
602
+ source = {
603
+ remotes = ["https://rubygems.org"];
604
+ sha256 = "0x0r3gc66abv8i4dw0x0370b5hrshjfp6kpp7wbp178cy775fypb";
605
+ type = "gem";
606
+ };
607
+ version = "5.3.1";
608
+ };
300
609
  racc = {
301
610
  groups = ["default" "development"];
302
611
  platforms = [];
@@ -307,6 +616,93 @@
307
616
  };
308
617
  version = "1.8.1";
309
618
  };
619
+ rack = {
620
+ groups = ["default" "development"];
621
+ platforms = [];
622
+ source = {
623
+ remotes = ["https://rubygems.org"];
624
+ sha256 = "1lyn3rh71rlf50p44xmsbha0pip4c95004j8kc9pm7xpq1s0kgac";
625
+ type = "gem";
626
+ };
627
+ version = "3.2.5";
628
+ };
629
+ rack-session = {
630
+ dependencies = ["base64" "rack"];
631
+ groups = ["default" "development"];
632
+ platforms = [];
633
+ source = {
634
+ remotes = ["https://rubygems.org"];
635
+ sha256 = "1sg4laz2qmllxh1c5sqlj9n1r7scdn08p3m4b0zmhjvyx9yw0v8b";
636
+ type = "gem";
637
+ };
638
+ version = "2.1.1";
639
+ };
640
+ rack-test = {
641
+ dependencies = ["rack"];
642
+ groups = ["default" "development"];
643
+ platforms = [];
644
+ source = {
645
+ remotes = ["https://rubygems.org"];
646
+ sha256 = "0qy4ylhcfdn65a5mz2hly7g9vl0g13p5a0rmm6sc0sih5ilkcnh0";
647
+ type = "gem";
648
+ };
649
+ version = "2.2.0";
650
+ };
651
+ rackup = {
652
+ dependencies = ["rack"];
653
+ groups = ["default" "development"];
654
+ platforms = [];
655
+ source = {
656
+ remotes = ["https://rubygems.org"];
657
+ sha256 = "0s48d2a0z5f0cg4npvzznf933vipi6j7gmk16yc913kpadkw4ybc";
658
+ type = "gem";
659
+ };
660
+ version = "2.3.1";
661
+ };
662
+ rails = {
663
+ dependencies = ["actioncable" "actionmailbox" "actionmailer" "actionpack" "actiontext" "actionview" "activejob" "activemodel" "activerecord" "activestorage" "activesupport" "railties"];
664
+ groups = ["development"];
665
+ platforms = [];
666
+ source = {
667
+ remotes = ["https://rubygems.org"];
668
+ sha256 = "15bxpa0acs5qc9ls4y1i21cp6wimkn5swn81kxmp1a6z4cdhcsah";
669
+ type = "gem";
670
+ };
671
+ version = "8.1.2";
672
+ };
673
+ rails-dom-testing = {
674
+ dependencies = ["activesupport" "minitest" "nokogiri"];
675
+ groups = ["default" "development"];
676
+ platforms = [];
677
+ source = {
678
+ remotes = ["https://rubygems.org"];
679
+ sha256 = "07awj8bp7jib54d0khqw391ryw8nphvqgw4bb12cl4drlx9pkk4a";
680
+ type = "gem";
681
+ };
682
+ version = "2.3.0";
683
+ };
684
+ rails-html-sanitizer = {
685
+ dependencies = ["loofah" "nokogiri"];
686
+ groups = ["default" "development"];
687
+ platforms = [];
688
+ source = {
689
+ remotes = ["https://rubygems.org"];
690
+ sha256 = "128y5g3fyi8fds41jasrr4va1jrs7hcamzklk1523k7rxb64bc98";
691
+ type = "gem";
692
+ };
693
+ version = "1.7.0";
694
+ };
695
+ railties = {
696
+ dependencies = ["actionpack" "activesupport" "irb" "rackup" "rake" "thor" "tsort" "zeitwerk"];
697
+ groups = ["default" "development"];
698
+ platforms = [];
699
+ source = {
700
+ remotes = ["https://rubygems.org"];
701
+ sha256 = "0mc0kz2vhld3gn5m91ddy98qfnrbk765aznh8vy6hxjgdgkyr28j";
702
+ type = "gem";
703
+ };
704
+ version = "8.1.2";
705
+ };
310
706
  rainbow = {
311
707
  groups = ["default" "development"];
312
708
  platforms = [];
@@ -338,6 +734,17 @@
338
734
  };
339
735
  version = "3.9.4";
340
736
  };
737
+ rdoc = {
738
+ dependencies = ["erb" "psych" "tsort"];
739
+ groups = ["default" "development"];
740
+ platforms = [];
741
+ source = {
742
+ remotes = ["https://rubygems.org"];
743
+ sha256 = "14iiyb4yi1chdzrynrk74xbhmikml3ixgdayjma3p700singfl46";
744
+ type = "gem";
745
+ };
746
+ version = "7.2.0";
747
+ };
341
748
  regexp_parser = {
342
749
  groups = ["default" "development"];
343
750
  platforms = [];
@@ -348,6 +755,17 @@
348
755
  };
349
756
  version = "2.10.0";
350
757
  };
758
+ reline = {
759
+ dependencies = ["io-console"];
760
+ groups = ["default" "development"];
761
+ platforms = [];
762
+ source = {
763
+ remotes = ["https://rubygems.org"];
764
+ sha256 = "0d8q5c4nh2g9pp758kizh8sfrvngynrjlm0i1zn3cnsnfd4v160i";
765
+ type = "gem";
766
+ };
767
+ version = "0.6.3";
768
+ };
351
769
  reverse_markdown = {
352
770
  dependencies = ["nokogiri"];
353
771
  groups = ["default" "development"];
@@ -498,6 +916,16 @@
498
916
  };
499
917
  version = "2.7.2";
500
918
  };
919
+ stringio = {
920
+ groups = ["default" "development"];
921
+ platforms = [];
922
+ source = {
923
+ remotes = ["https://rubygems.org"];
924
+ sha256 = "1q92y9627yisykyscv0bdsrrgyaajc2qr56dwlzx7ysgigjv4z63";
925
+ type = "gem";
926
+ };
927
+ version = "3.2.0";
928
+ };
501
929
  thor = {
502
930
  groups = ["default" "development"];
503
931
  platforms = [];
@@ -528,6 +956,16 @@
528
956
  };
529
957
  version = "0.4.3";
530
958
  };
959
+ tsort = {
960
+ groups = ["default" "development"];
961
+ platforms = [];
962
+ source = {
963
+ remotes = ["https://rubygems.org"];
964
+ sha256 = "17q8h020dw73wjmql50lqw5ddsngg67jfw8ncjv476l5ys9sfl4n";
965
+ type = "gem";
966
+ };
967
+ version = "0.2.0";
968
+ };
531
969
  tzinfo = {
532
970
  dependencies = ["concurrent-ruby"];
533
971
  groups = ["default" "development"];
@@ -570,6 +1008,37 @@
570
1008
  };
571
1009
  version = "1.0.3";
572
1010
  };
1011
+ useragent = {
1012
+ groups = ["default" "development"];
1013
+ platforms = [];
1014
+ source = {
1015
+ remotes = ["https://rubygems.org"];
1016
+ sha256 = "0i1q2xdjam4d7gwwc35lfnz0wyyzvnca0zslcfxm9fabml9n83kh";
1017
+ type = "gem";
1018
+ };
1019
+ version = "0.16.11";
1020
+ };
1021
+ websocket-driver = {
1022
+ dependencies = ["base64" "websocket-extensions"];
1023
+ groups = ["default" "development"];
1024
+ platforms = [];
1025
+ source = {
1026
+ remotes = ["https://rubygems.org"];
1027
+ sha256 = "0qj9dmkmgahmadgh88kydb7cv15w13l1fj3kk9zz28iwji5vl3gd";
1028
+ type = "gem";
1029
+ };
1030
+ version = "0.8.0";
1031
+ };
1032
+ websocket-extensions = {
1033
+ groups = ["default" "development"];
1034
+ platforms = [];
1035
+ source = {
1036
+ remotes = ["https://rubygems.org"];
1037
+ sha256 = "0hc2g9qps8lmhibl5baa91b4qx8wqw872rgwagml78ydj8qacsqw";
1038
+ type = "gem";
1039
+ };
1040
+ version = "0.1.5";
1041
+ };
573
1042
  yard = {
574
1043
  groups = ["development"];
575
1044
  platforms = [];
@@ -602,4 +1071,14 @@
602
1071
  };
603
1072
  version = "0.1.0";
604
1073
  };
1074
+ zeitwerk = {
1075
+ groups = ["default" "development"];
1076
+ platforms = [];
1077
+ source = {
1078
+ remotes = ["https://rubygems.org"];
1079
+ sha256 = "1pbkiwwla5gldgb3saamn91058nl1sq1344l5k36xsh9ih995nnq";
1080
+ type = "gem";
1081
+ };
1082
+ version = "2.7.5";
1083
+ };
605
1084
  }
@@ -321,6 +321,26 @@ module Errgonomic
321
321
  Some(other)
322
322
  end
323
323
 
324
+ # Refuse to serialize an unwrapped Option as a String. Options must be
325
+ # correctly handled to access their inner value.
326
+ #
327
+ # @example
328
+ # None().to_s # => raise Errgonomic::SerializeError, "cannot serialize an unwrapped Option"
329
+ def to_s
330
+ raise Errgonomic::SerializeError, 'cannot serialize an unwrapped Option'
331
+ end
332
+
333
+ # Refuse to serialize an unwrapped Option as JSON. Not only should we
334
+ # require that options be correctly handled to access their inner value,
335
+ # but without this we will get undefined structures from default
336
+ # Object#to_json implementations.
337
+ #
338
+ # @example
339
+ # None().to_json # => raise Errgonomic::SerializeError, "cannot serialize an unwrapped Option"
340
+ def to_json(*_args)
341
+ raise Errgonomic::SerializeError, 'cannot serialize an unwrapped Option'
342
+ end
343
+
324
344
  # filter
325
345
  # xor
326
346
  # insert
@@ -53,20 +53,12 @@ module Errgonomic
53
53
  delegate :marked_for_destruction?, to: :value
54
54
  delegate :persisted?, to: :value
55
55
  delegate :touch_later, to: :value
56
-
57
- def to_s
58
- raise "Attempted to convert Some to String, please use Option API to safely work with internal value -- #{value}"
59
- end
60
56
  end
61
57
 
62
58
  class None
63
59
  def nil?
64
60
  true
65
61
  end
66
-
67
- def to_s
68
- raise 'Cannot convert None to String - please use Option API to safely work with internal value'
69
- end
70
62
  end
71
63
  end
72
64
  end
@@ -97,3 +89,18 @@ class Object
97
89
  Some(self)
98
90
  end
99
91
  end
92
+
93
+ module Errgonomic
94
+ module Rails
95
+ module ActiveRecordQuoting
96
+ def quote(value)
97
+ return super(value) unless value.is_a?(Errgonomic::Option::Any)
98
+
99
+ value.map { |val| super(val) }
100
+ .unwrap_or_else { super(nil) }
101
+ end
102
+ end
103
+ end
104
+ end
105
+
106
+ ActiveRecord::ConnectionAdapters::Quoting.prepend(Errgonomic::Rails::ActiveRecordQuoting)
@@ -2,6 +2,8 @@ require_relative 'option'
2
2
  require_relative 'rails/active_record_optional'
3
3
  require_relative 'rails/active_record_delegate_optional'
4
4
 
5
+ require 'rails/railtie'
6
+
5
7
  module Errgonomic
6
8
  # Slightly more convenient access to the setup functions:
7
9
  # Errgonomic::Rails.setup_before and Errgonomic::Rails.setup_after
@@ -17,17 +19,7 @@ module Errgonomic
17
19
  # the class is first evaluated, so that it can define its associations for
18
20
  # later reflection.
19
21
  def self.setup_after
20
- Zeitwerk::Loader.eager_load_all
21
- setupable = defined?(ApplicationRecord) ? ApplicationRecord : ActiveRecord::Base
22
- setupable.descendants.each do |model|
23
- next unless begin
24
- model.table_exists?
25
- rescue StandardError
26
- false
27
- end
28
-
29
- model.include Errgonomic::Rails::ActiveRecordOptional
30
- end
22
+ # todo
31
23
  end
32
24
  end
33
25
 
@@ -50,11 +50,9 @@ module Errgonomic
50
50
  # Err(:a).ok_and? { |_| true } # => false
51
51
  # Err(:b).ok_and? { |_| false } # => false
52
52
  def ok_and?(&block)
53
- if ok?
54
- !!block.call(value)
55
- else
56
- false
57
- end
53
+ return false if err?
54
+
55
+ !!block.call(value)
58
56
  end
59
57
 
60
58
  # Return true if the inner value is an Err and the result of the block is
@@ -254,6 +252,28 @@ module Errgonomic
254
252
  @value = block.call(value)
255
253
  self
256
254
  end
255
+
256
+ # Refuse to serialize an unwrapped Result as a String. Results must be
257
+ # correctly handled to access their inner value.
258
+ #
259
+ # @example
260
+ # Ok("").to_s # => raise Errgonomic::SerializeError, "cannot serialize an unwrapped Result"
261
+ # Err("").to_s # => raise Errgonomic::SerializeError, "cannot serialize an unwrapped Result"
262
+ def to_s
263
+ raise Errgonomic::SerializeError, 'cannot serialize an unwrapped Result'
264
+ end
265
+
266
+ # Refuse to serialize an unwrapped Result as JSON. Not only should we
267
+ # require that Results be correctly handled to access their inner value,
268
+ # but without this we will get undefined structures from default
269
+ # Object#to_json implementations.
270
+ #
271
+ # @example
272
+ # Ok("").to_json # => raise Errgonomic::SerializeError, "cannot serialize an unwrapped Result"
273
+ # Err("").to_json # => raise Errgonomic::SerializeError, "cannot serialize an unwrapped Result"
274
+ def to_json(*_args)
275
+ raise Errgonomic::SerializeError, 'cannot serialize an unwrapped Result'
276
+ end
257
277
  end
258
278
 
259
279
  # The Ok variant.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Errgonomic
4
- VERSION = '0.4.1'
4
+ VERSION = '0.5.0'
5
5
  end
data/lib/errgonomic.rb CHANGED
@@ -23,9 +23,11 @@ require_relative 'errgonomic/rails' if defined?(Rails::Railtie)
23
23
  module Errgonomic
24
24
  class Error < StandardError; end
25
25
 
26
+ class TypeError < ::TypeError; end
27
+
26
28
  class NotPresentError < Error; end
27
29
 
28
- class TypeMismatchError < Error; end
30
+ class TypeMismatchError < TypeError; end
29
31
 
30
32
  class UnwrapError < Error
31
33
  def initialize(msg, value)
@@ -42,6 +44,8 @@ module Errgonomic
42
44
 
43
45
  class NotComparableError < StandardError; end
44
46
 
47
+ class SerializeError < TypeError; end
48
+
45
49
  # A little bit of control over how pedantic we are in our runtime type checks.
46
50
  def self.give_me_ambiguous_downstream_errors?
47
51
  @give_me_ambiguous_downstream_errors || true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: errgonomic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Zadrozny