rrx_dev 0.1.2 → 8.0.3

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: b5dbc2b1d2a5874af9f98fa5d8541956976943d1541fa3af20161e98891d6e55
4
- data.tar.gz: 202b8b7626d12b3afa0c0f7b2c994aa9cb0dfbde516f575003dd06677dc5a729
3
+ metadata.gz: 1f3a039f5ed32d3aa0775a52aea95494f21a7e6427a96363c2ee223f6012ed0c
4
+ data.tar.gz: a5bb1c050d86ea3219d4f3147d170a51a5924607f12df01ba5ce0ed079212320
5
5
  SHA512:
6
- metadata.gz: 1fc8e427498ddb173624c6652f4b3ea8c927a96b214df866a0388773872710f4e8da22f1485f779669c197a00eb1aa432480b43370f504f5501fd8b072c56989
7
- data.tar.gz: fa69c7fbcf4d23512362903b3ff49229bb3c4a5df4cb46e4daef80bbf8ae8885dcdd3e866711ee6a9ad76e9103adbc073c540e847b9818236fdd6d92afcc435a
6
+ metadata.gz: 75901172924ee1489ee1d0706c430e93cd8de78ffb763991b2342945c3baf4835fde836fea11aaa1aa43af4d204921c114825c2bd8cefec97b83d20eec1f8ca4
7
+ data.tar.gz: 9101eb0180a20be2f40fd64d4c8414e89b98045461dc70feca2b7447161f12bfe067c9b8522f488487a428eaca1b746804477575affa92c682fde70624cd5866
data/.idea/rrx_dev.iml CHANGED
@@ -9,90 +9,98 @@
9
9
  <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
10
  <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
11
  </content>
12
- <orderEntry type="jdk" jdkName="Remote-asdf: ruby-3.2.2 (-p53" jdkType="RUBY_SDK" />
12
+ <orderEntry type="jdk" jdkName="Remote-asdf: ruby-3.2.8-p263" jdkType="RUBY_SDK" />
13
13
  <orderEntry type="sourceFolder" forTests="false" />
14
- <orderEntry type="library" scope="PROVIDED" name="actionpack (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
15
- <orderEntry type="library" scope="PROVIDED" name="actionview (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
16
- <orderEntry type="library" scope="PROVIDED" name="active_record_query_trace (v1.8.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
17
- <orderEntry type="library" scope="PROVIDED" name="activemodel (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
18
- <orderEntry type="library" scope="PROVIDED" name="activerecord (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
19
- <orderEntry type="library" scope="PROVIDED" name="activesupport (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
20
- <orderEntry type="library" scope="PROVIDED" name="addressable (v2.8.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
21
- <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
22
- <orderEntry type="library" scope="PROVIDED" name="base64 (v0.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="bigdecimal (v3.1.5, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="binding_of_caller (v1.0.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
25
- <orderEntry type="library" scope="PROVIDED" name="bootsnap (v1.17.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
26
- <orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
27
- <orderEntry type="library" scope="PROVIDED" name="bundler (v2.4.10, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
28
- <orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
29
- <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.2.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
30
- <orderEntry type="library" scope="PROVIDED" name="connection_pool (v2.4.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
31
- <orderEntry type="library" scope="PROVIDED" name="crass (v1.0.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
32
- <orderEntry type="library" scope="PROVIDED" name="debug (v1.9.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
33
- <orderEntry type="library" scope="PROVIDED" name="debug_inspector (v1.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
34
- <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
35
- <orderEntry type="library" scope="PROVIDED" name="drb (v2.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
36
- <orderEntry type="library" scope="PROVIDED" name="erubi (v1.12.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
37
- <orderEntry type="library" scope="PROVIDED" name="factory_bot (v6.4.4, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
38
- <orderEntry type="library" scope="PROVIDED" name="factory_bot_rails (v6.4.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
39
- <orderEntry type="library" scope="PROVIDED" name="ffi (v1.16.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
40
- <orderEntry type="library" scope="PROVIDED" name="i18n (v1.14.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
41
- <orderEntry type="library" scope="PROVIDED" name="io-console (v0.7.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
42
- <orderEntry type="library" scope="PROVIDED" name="irb (v1.11.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
43
- <orderEntry type="library" scope="PROVIDED" name="json (v2.7.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
44
- <orderEntry type="library" scope="PROVIDED" name="json-schema (v4.1.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
45
- <orderEntry type="library" scope="PROVIDED" name="language_server-protocol (v3.17.0.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
46
- <orderEntry type="library" scope="PROVIDED" name="listen (v3.8.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
47
- <orderEntry type="library" scope="PROVIDED" name="loofah (v2.22.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
48
- <orderEntry type="library" scope="PROVIDED" name="minitest (v5.20.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
49
- <orderEntry type="library" scope="PROVIDED" name="msgpack (v1.7.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
50
- <orderEntry type="library" scope="PROVIDED" name="mutex_m (v0.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
51
- <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.16.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
52
- <orderEntry type="library" scope="PROVIDED" name="parallel (v1.24.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
53
- <orderEntry type="library" scope="PROVIDED" name="parser (v3.2.2.4, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
54
- <orderEntry type="library" scope="PROVIDED" name="proc_to_ast (v0.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
55
- <orderEntry type="library" scope="PROVIDED" name="psych (v5.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
56
- <orderEntry type="library" scope="PROVIDED" name="public_suffix (v5.0.4, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
57
- <orderEntry type="library" scope="PROVIDED" name="racc (v1.7.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
58
- <orderEntry type="library" scope="PROVIDED" name="rack (v3.0.8, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
59
- <orderEntry type="library" scope="PROVIDED" name="rack-session (v2.0.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
60
- <orderEntry type="library" scope="PROVIDED" name="rack-test (v2.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
61
- <orderEntry type="library" scope="PROVIDED" name="rackup (v2.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
62
- <orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
63
- <orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.6.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
64
- <orderEntry type="library" scope="PROVIDED" name="railties (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
65
- <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
66
- <orderEntry type="library" scope="PROVIDED" name="rake (v13.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
67
- <orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.11.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
68
- <orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.10.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
69
- <orderEntry type="library" scope="PROVIDED" name="rdoc (v6.6.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
70
- <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.8.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
71
- <orderEntry type="library" scope="PROVIDED" name="reline (v0.4.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
72
- <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
73
- <orderEntry type="library" scope="PROVIDED" name="rspec (v3.12.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
74
- <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.12.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
75
- <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.12.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
76
- <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.12.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
77
- <orderEntry type="library" scope="PROVIDED" name="rspec-parameterized (v1.0.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
78
- <orderEntry type="library" scope="PROVIDED" name="rspec-parameterized-core (v1.0.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
79
- <orderEntry type="library" scope="PROVIDED" name="rspec-parameterized-table_syntax (v1.0.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
80
- <orderEntry type="library" scope="PROVIDED" name="rspec-rails (v6.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
81
- <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.12.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
82
- <orderEntry type="library" scope="PROVIDED" name="rswag-specs (v2.13.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
83
- <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.59.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
84
- <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.30.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
85
- <orderEntry type="library" scope="PROVIDED" name="rubocop-rails (v2.23.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
86
- <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.13.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
87
- <orderEntry type="library" scope="PROVIDED" name="spring (v4.1.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
88
- <orderEntry type="library" scope="PROVIDED" name="stringio (v3.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
89
- <orderEntry type="library" scope="PROVIDED" name="thor (v1.3.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
90
- <orderEntry type="library" scope="PROVIDED" name="timeout (v0.4.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
91
- <orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
92
- <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.5.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
93
- <orderEntry type="library" scope="PROVIDED" name="unparser (v0.6.10, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
94
- <orderEntry type="library" scope="PROVIDED" name="webrick (v1.8.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
95
- <orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.6.12, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
14
+ <orderEntry type="library" scope="PROVIDED" name="actionpack (v8.0.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="actionview (v8.0.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="active_record_query_trace (v1.8.3, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="activemodel (v8.0.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="activerecord (v8.0.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="activesupport (v8.0.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="addressable (v2.8.6, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="base64 (v0.3.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="benchmark (v0.4.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="bigdecimal (v3.2.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="binding_of_caller (v1.0.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="bootsnap (v1.17.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.4.10, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.3, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.3.5, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="connection_pool (v2.5.3, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="crass (v1.0.6, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
33
+ <orderEntry type="library" scope="PROVIDED" name="debug (v1.9.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
34
+ <orderEntry type="library" scope="PROVIDED" name="debug_inspector (v1.2.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
35
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
36
+ <orderEntry type="library" scope="PROVIDED" name="drb (v2.2.3, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
37
+ <orderEntry type="library" scope="PROVIDED" name="erb (v5.0.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
38
+ <orderEntry type="library" scope="PROVIDED" name="erubi (v1.12.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
39
+ <orderEntry type="library" scope="PROVIDED" name="factory_bot (v6.4.4, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
40
+ <orderEntry type="library" scope="PROVIDED" name="factory_bot_rails (v6.4.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
41
+ <orderEntry type="library" scope="PROVIDED" name="ffi (v1.16.3, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
42
+ <orderEntry type="library" scope="PROVIDED" name="generator_spec (v0.10.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
43
+ <orderEntry type="library" scope="PROVIDED" name="i18n (v1.14.7, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
44
+ <orderEntry type="library" scope="PROVIDED" name="io-console (v0.7.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
45
+ <orderEntry type="library" scope="PROVIDED" name="irb (v1.15.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
46
+ <orderEntry type="library" scope="PROVIDED" name="json (v2.7.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
47
+ <orderEntry type="library" scope="PROVIDED" name="json-schema (v4.1.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
48
+ <orderEntry type="library" scope="PROVIDED" name="language_server-protocol (v3.17.0.3, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
49
+ <orderEntry type="library" scope="PROVIDED" name="listen (v3.8.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
50
+ <orderEntry type="library" scope="PROVIDED" name="logger (v1.7.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
51
+ <orderEntry type="library" scope="PROVIDED" name="loofah (v2.22.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
52
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.25.5, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
53
+ <orderEntry type="library" scope="PROVIDED" name="msgpack (v1.7.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
54
+ <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.16.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
55
+ <orderEntry type="library" scope="PROVIDED" name="parallel (v1.24.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
56
+ <orderEntry type="library" scope="PROVIDED" name="parser (v3.2.2.4, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
57
+ <orderEntry type="library" scope="PROVIDED" name="pp (v0.6.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
58
+ <orderEntry type="library" scope="PROVIDED" name="prettyprint (v0.2.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
59
+ <orderEntry type="library" scope="PROVIDED" name="proc_to_ast (v0.1.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
60
+ <orderEntry type="library" scope="PROVIDED" name="psych (v5.1.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
61
+ <orderEntry type="library" scope="PROVIDED" name="public_suffix (v5.0.4, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
62
+ <orderEntry type="library" scope="PROVIDED" name="racc (v1.7.3, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
63
+ <orderEntry type="library" scope="PROVIDED" name="rack (v3.0.8, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
64
+ <orderEntry type="library" scope="PROVIDED" name="rack-session (v2.0.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
65
+ <orderEntry type="library" scope="PROVIDED" name="rack-test (v2.1.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
66
+ <orderEntry type="library" scope="PROVIDED" name="rackup (v2.1.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
67
+ <orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.2.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
68
+ <orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.6.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
69
+ <orderEntry type="library" scope="PROVIDED" name="railties (v8.0.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
70
+ <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
71
+ <orderEntry type="library" scope="PROVIDED" name="rake (v13.1.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
72
+ <orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.11.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
73
+ <orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.10.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
74
+ <orderEntry type="library" scope="PROVIDED" name="rdoc (v6.14.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
75
+ <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.8.3, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
76
+ <orderEntry type="library" scope="PROVIDED" name="reline (v0.6.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
77
+ <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.6, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
78
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v3.12.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
79
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.12.2, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
80
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.12.3, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
81
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.12.6, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
82
+ <orderEntry type="library" scope="PROVIDED" name="rspec-parameterized (v1.0.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
83
+ <orderEntry type="library" scope="PROVIDED" name="rspec-parameterized-core (v1.0.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
84
+ <orderEntry type="library" scope="PROVIDED" name="rspec-parameterized-table_syntax (v1.0.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
85
+ <orderEntry type="library" scope="PROVIDED" name="rspec-rails (v6.1.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
86
+ <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.12.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
87
+ <orderEntry type="library" scope="PROVIDED" name="rswag-specs (v2.16.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
88
+ <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.59.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
89
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.30.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
90
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-rails (v2.23.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
91
+ <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.13.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
92
+ <orderEntry type="library" scope="PROVIDED" name="securerandom (v0.4.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
93
+ <orderEntry type="library" scope="PROVIDED" name="spring (v4.1.3, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
94
+ <orderEntry type="library" scope="PROVIDED" name="stringio (v3.1.7, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
95
+ <orderEntry type="library" scope="PROVIDED" name="thor (v1.3.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
96
+ <orderEntry type="library" scope="PROVIDED" name="timeout (v0.4.3, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
97
+ <orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.6, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
98
+ <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.5.0, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
99
+ <orderEntry type="library" scope="PROVIDED" name="unparser (v0.6.10, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
100
+ <orderEntry type="library" scope="PROVIDED" name="uri (v1.0.3, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
101
+ <orderEntry type="library" scope="PROVIDED" name="useragent (v0.16.11, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
102
+ <orderEntry type="library" scope="PROVIDED" name="webrick (v1.8.1, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
103
+ <orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.6.12, Remote-asdf: ruby-3.2.8-p263) [gem]" level="application" />
96
104
  </component>
97
105
  <component name="RakeTasksCache">
98
106
  <option name="myRootTask">
data/Gemfile.lock CHANGED
@@ -1,14 +1,15 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rrx_dev (0.1.2)
4
+ rrx_dev (8.0.2)
5
5
  active_record_query_trace
6
- activesupport (~> 7.1.0)
6
+ activesupport (~> 8.0.2)
7
7
  bootsnap
8
8
  debug
9
+ factory_bot
9
10
  factory_bot_rails
10
11
  listen
11
- railties (~> 7.1.0)
12
+ railties (~> 8.0.2)
12
13
  rake (>= 13.0)
13
14
  rspec (>= 3.0)
14
15
  rspec-parameterized
@@ -22,61 +23,65 @@ PATH
22
23
  GEM
23
24
  remote: https://rubygems.org/
24
25
  specs:
25
- actionpack (7.1.2)
26
- actionview (= 7.1.2)
27
- activesupport (= 7.1.2)
26
+ actionpack (8.0.2)
27
+ actionview (= 8.0.2)
28
+ activesupport (= 8.0.2)
28
29
  nokogiri (>= 1.8.5)
29
- racc
30
30
  rack (>= 2.2.4)
31
31
  rack-session (>= 1.0.1)
32
32
  rack-test (>= 0.6.3)
33
33
  rails-dom-testing (~> 2.2)
34
34
  rails-html-sanitizer (~> 1.6)
35
- actionview (7.1.2)
36
- activesupport (= 7.1.2)
35
+ useragent (~> 0.16)
36
+ actionview (8.0.2)
37
+ activesupport (= 8.0.2)
37
38
  builder (~> 3.1)
38
39
  erubi (~> 1.11)
39
40
  rails-dom-testing (~> 2.2)
40
41
  rails-html-sanitizer (~> 1.6)
41
- active_record_query_trace (1.8.2)
42
+ active_record_query_trace (1.8.3)
42
43
  activerecord (>= 6.0.0)
43
- activemodel (7.1.2)
44
- activesupport (= 7.1.2)
45
- activerecord (7.1.2)
46
- activemodel (= 7.1.2)
47
- activesupport (= 7.1.2)
44
+ activemodel (8.0.2)
45
+ activesupport (= 8.0.2)
46
+ activerecord (8.0.2)
47
+ activemodel (= 8.0.2)
48
+ activesupport (= 8.0.2)
48
49
  timeout (>= 0.4.0)
49
- activesupport (7.1.2)
50
+ activesupport (8.0.2)
50
51
  base64
52
+ benchmark (>= 0.3)
51
53
  bigdecimal
52
- concurrent-ruby (~> 1.0, >= 1.0.2)
54
+ concurrent-ruby (~> 1.0, >= 1.3.1)
53
55
  connection_pool (>= 2.2.5)
54
56
  drb
55
57
  i18n (>= 1.6, < 2)
58
+ logger (>= 1.4.2)
56
59
  minitest (>= 5.1)
57
- mutex_m
58
- tzinfo (~> 2.0)
60
+ securerandom (>= 0.3)
61
+ tzinfo (~> 2.0, >= 2.0.5)
62
+ uri (>= 0.13.1)
59
63
  addressable (2.8.6)
60
64
  public_suffix (>= 2.0.2, < 6.0)
61
65
  ast (2.4.2)
62
- base64 (0.2.0)
63
- bigdecimal (3.1.5)
66
+ base64 (0.3.0)
67
+ benchmark (0.4.1)
68
+ bigdecimal (3.2.2)
64
69
  binding_of_caller (1.0.0)
65
70
  debug_inspector (>= 0.0.1)
66
71
  bootsnap (1.17.0)
67
72
  msgpack (~> 1.2)
68
73
  builder (3.2.4)
69
74
  coderay (1.1.3)
70
- concurrent-ruby (1.2.2)
71
- connection_pool (2.4.1)
75
+ concurrent-ruby (1.3.5)
76
+ connection_pool (2.5.3)
72
77
  crass (1.0.6)
73
78
  debug (1.9.1)
74
79
  irb (~> 1.10)
75
80
  reline (>= 0.3.8)
76
81
  debug_inspector (1.2.0)
77
82
  diff-lcs (1.5.0)
78
- drb (2.2.0)
79
- ruby2_keywords
83
+ drb (2.2.3)
84
+ erb (5.0.2)
80
85
  erubi (1.12.0)
81
86
  factory_bot (6.4.4)
82
87
  activesupport (>= 5.0.0)
@@ -84,12 +89,16 @@ GEM
84
89
  factory_bot (~> 6.4)
85
90
  railties (>= 5.0.0)
86
91
  ffi (1.16.3)
87
- i18n (1.14.1)
92
+ generator_spec (0.10.0)
93
+ activesupport (>= 3.0.0)
94
+ railties (>= 3.0.0)
95
+ i18n (1.14.7)
88
96
  concurrent-ruby (~> 1.0)
89
97
  io-console (0.7.1)
90
- irb (1.11.0)
91
- rdoc
92
- reline (>= 0.3.8)
98
+ irb (1.15.2)
99
+ pp (>= 0.6.0)
100
+ rdoc (>= 4.0.0)
101
+ reline (>= 0.4.2)
93
102
  json (2.7.1)
94
103
  json-schema (4.1.1)
95
104
  addressable (>= 2.8)
@@ -97,18 +106,21 @@ GEM
97
106
  listen (3.8.0)
98
107
  rb-fsevent (~> 0.10, >= 0.10.3)
99
108
  rb-inotify (~> 0.9, >= 0.9.10)
109
+ logger (1.7.0)
100
110
  loofah (2.22.0)
101
111
  crass (~> 1.0.2)
102
112
  nokogiri (>= 1.12.0)
103
- minitest (5.20.0)
113
+ minitest (5.25.5)
104
114
  msgpack (1.7.2)
105
- mutex_m (0.2.0)
106
- nokogiri (1.16.0-x86_64-linux)
115
+ nokogiri (1.19.1-x86_64-linux-gnu)
107
116
  racc (~> 1.4)
108
117
  parallel (1.24.0)
109
118
  parser (3.2.2.4)
110
119
  ast (~> 2.4.1)
111
120
  racc
121
+ pp (0.6.2)
122
+ prettyprint
123
+ prettyprint (0.2.0)
112
124
  proc_to_ast (0.1.0)
113
125
  coderay
114
126
  parser
@@ -132,10 +144,10 @@ GEM
132
144
  rails-html-sanitizer (1.6.0)
133
145
  loofah (~> 2.21)
134
146
  nokogiri (~> 1.14)
135
- railties (7.1.2)
136
- actionpack (= 7.1.2)
137
- activesupport (= 7.1.2)
138
- irb
147
+ railties (8.0.2)
148
+ actionpack (= 8.0.2)
149
+ activesupport (= 8.0.2)
150
+ irb (~> 1.13)
139
151
  rackup (>= 1.0.0)
140
152
  rake (>= 12.2)
141
153
  thor (~> 1.0, >= 1.2.2)
@@ -145,10 +157,11 @@ GEM
145
157
  rb-fsevent (0.11.2)
146
158
  rb-inotify (0.10.1)
147
159
  ffi (~> 1.0)
148
- rdoc (6.6.2)
160
+ rdoc (6.14.2)
161
+ erb
149
162
  psych (>= 4.0.0)
150
163
  regexp_parser (2.8.3)
151
- reline (0.4.1)
164
+ reline (0.6.1)
152
165
  io-console (~> 0.5)
153
166
  rexml (3.2.6)
154
167
  rspec (3.12.0)
@@ -183,10 +196,10 @@ GEM
183
196
  rspec-mocks (~> 3.12)
184
197
  rspec-support (~> 3.12)
185
198
  rspec-support (3.12.1)
186
- rswag-specs (2.13.0)
187
- activesupport (>= 3.1, < 7.2)
188
- json-schema (>= 2.2, < 5.0)
189
- railties (>= 3.1, < 7.2)
199
+ rswag-specs (2.16.0)
200
+ activesupport (>= 5.2, < 8.1)
201
+ json-schema (>= 2.2, < 6.0)
202
+ railties (>= 5.2, < 8.1)
190
203
  rspec-core (>= 2.14)
191
204
  rubocop (1.59.0)
192
205
  json (~> 2.3)
@@ -207,17 +220,19 @@ GEM
207
220
  rubocop (>= 1.33.0, < 2.0)
208
221
  rubocop-ast (>= 1.30.0, < 2.0)
209
222
  ruby-progressbar (1.13.0)
210
- ruby2_keywords (0.0.5)
223
+ securerandom (0.4.1)
211
224
  spring (4.1.3)
212
- stringio (3.1.0)
225
+ stringio (3.1.7)
213
226
  thor (1.3.0)
214
- timeout (0.4.1)
227
+ timeout (0.4.3)
215
228
  tzinfo (2.0.6)
216
229
  concurrent-ruby (~> 1.0)
217
230
  unicode-display_width (2.5.0)
218
231
  unparser (0.6.10)
219
232
  diff-lcs (~> 1.3)
220
233
  parser (>= 3.2.2.4)
234
+ uri (1.0.3)
235
+ useragent (0.16.11)
221
236
  webrick (1.8.1)
222
237
  zeitwerk (2.6.12)
223
238
 
@@ -225,6 +240,7 @@ PLATFORMS
225
240
  x86_64-linux
226
241
 
227
242
  DEPENDENCIES
243
+ generator_spec
228
244
  rrx_dev!
229
245
 
230
246
  BUNDLED WITH
data/README.md CHANGED
@@ -4,22 +4,29 @@ Opinionated core development dependencies and configuration for Ruby on Rails pr
4
4
 
5
5
  ## Installation
6
6
 
7
- Install the gem and add to the application's Gemfile by executing:
7
+ To create a new app or gem, use the `rrx_rails` command.
8
8
 
9
- $ bundle add rrx_dev
9
+ ```shell
10
+ gem install rrx_rails
11
+ rrx_rails help
12
+ ```
10
13
 
11
- If bundler is not being used to manage dependencies, install the gem by executing:
14
+ To add `rrx_dev` to an existing Ruby on Rails application or gem:
12
15
 
13
- $ gem install rrx_dev
16
+ ```shell
17
+ bundle add rrx_dev --group "development, test"
18
+ ```
14
19
 
15
- After installation, instrument your project by running `rrx_dev_setup`
20
+ Then run the generator to set up the project:
16
21
 
17
22
  ```shell
18
- # For Rails apps
19
- rrx_dev_setup app
23
+ bundle exec rails g rrx_dev:install
24
+ ```
25
+
26
+ If you intend to use Swagger for API documentation, you can also run:
20
27
 
21
- # For Rails gems
22
- rrx_dev_setup gem
28
+ ```shell
29
+ bundle exec rails g rrx_dev:swagger
23
30
  ```
24
31
 
25
32
  ## Usage
@@ -1,24 +1,25 @@
1
1
  #!/usr/bin/env ruby
2
- require 'rubygems'
3
- require 'thor'
2
+ require 'bundler/setup'
4
3
  require 'pathname'
4
+ require 'thor'
5
5
 
6
6
  class Setup < Thor
7
7
  include Thor::Actions
8
8
 
9
- GEM_SPEC_APP_NAME = 'dummy'
10
- GEM_SPEC_APP_ROOT = 'spec/dummy'
9
+ GEM_SPEC_APP_NAME = 'dummy'.freeze
10
+ GEM_SPEC_APP_ROOT = 'spec/dummy'.freeze
11
+
12
+ add_runtime_options!
11
13
 
12
14
  def self.exit_on_failure?
13
15
  true
14
16
  end
15
17
 
16
18
  def self.source_root
17
- File.join(__dir__, 'sources')
19
+ @source_root = Pathname(__FILE__).parent.join('sources').to_s
18
20
  end
19
21
 
20
22
  desc 'app', 'Initialize a new Rails app'
21
-
22
23
  def app
23
24
  editorconfig
24
25
  rubocop
@@ -28,7 +29,6 @@ class Setup < Thor
28
29
  end
29
30
 
30
31
  desc 'gem', 'Initialize a new Rails gem'
31
-
32
32
  def gem
33
33
  @gem = true
34
34
  app
@@ -40,6 +40,14 @@ class Setup < Thor
40
40
  @gem
41
41
  end
42
42
 
43
+ def quiet?
44
+ options[:quiet]
45
+ end
46
+
47
+ def force?
48
+ options[:force]
49
+ end
50
+
43
51
  def editorconfig
44
52
  copy_file 'editorconfig', '.editorconfig'
45
53
  end
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RrxDev
4
+ class InstallGenerator < Rails::Generators::Base
5
+ GEM_SPEC_APP_NAME = 'dummy'
6
+ GEM_SPEC_APP_ROOT = 'spec/dummy'
7
+
8
+ source_root File.expand_path('templates', __dir__)
9
+
10
+ def install_rules
11
+ copy_file 'editorconfig', '.editorconfig'
12
+ copy_file 'rubocop.yml', '.rubocop.yml'
13
+ end
14
+
15
+ def install_environment
16
+ directory 'config'
17
+ end
18
+
19
+ def install_rspec
20
+ copy_file 'rspec', '.rspec'
21
+ empty_directory 'spec/factories'
22
+ empty_directory 'spec/support'
23
+ empty_directory 'spec/models'
24
+ empty_directory 'spec/requests'
25
+ copy_file 'spec/spec_helper.rb'
26
+ remove_file 'spec/rails_helper.rb'
27
+
28
+ # # Override rails_helper and make sure it loads the Rails environment for the app
29
+ # # or the gem's spec dummy app
30
+ # copy_file 'spec/rails_helper.rb' do |content|
31
+ # content.sub '../config/environment', "../#{app_config}/environment"
32
+ # end
33
+ end
34
+
35
+ def install_spec_app
36
+ return unless gem?
37
+
38
+ in_root do
39
+ unless app_path.exist?
40
+ inside('spec') do
41
+ run 'rails new --api -G --skip-docker -M --skip-active-job --skip-bootsnap -C -A -J -T -B dummy'
42
+ end
43
+ %w[development test production].each do |environment|
44
+ remove_file app_environments.join("#{environment}.rb")
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ private
51
+
52
+ def project_path
53
+ @project_path ||= Pathname(destination_root).freeze
54
+ end
55
+
56
+ def app_path
57
+ @app_path ||= (gem? ? project_path.join(GEM_SPEC_APP_ROOT) : project_path).freeze
58
+ end
59
+
60
+ def app_config
61
+ @app_config ||= app_path.join('config').freeze
62
+ end
63
+
64
+ def app_environments
65
+ @app_environments ||= app_config.join('environments')
66
+ end
67
+
68
+ def gem?
69
+ target_type == :gem
70
+ end
71
+
72
+ def app?
73
+ target_type == :app
74
+ end
75
+
76
+ def target_type
77
+ @target_type ||= begin
78
+ if project_path.glob('*.gemspec').any?
79
+ :gem
80
+ else
81
+ :app
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -1,7 +1,7 @@
1
- require_relative 'base'
2
-
3
1
  module RrxDev
4
- class SwaggerGenerator < Base
2
+ class SwaggerGenerator < Rails::Generators::Base
3
+ source_root File.expand_path('templates', __dir__)
4
+
5
5
  def generate!
6
6
  copy_new_file 'spec/swagger_helper.rb'
7
7
  copy_new_file 'config/initializers/api_docs.rb'
@@ -0,0 +1 @@
1
+ --require spec_helper
@@ -0,0 +1 @@
1
+ require 'rrx_dev/spec'
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Shared context: auth_helpers
4
+ # Provides test authentication helpers for request specs.
5
+ #
6
+ # Usage:
7
+ # RSpec.describe 'Posts', type: :request do
8
+ # include_context :auth_helpers
9
+ # authenticated!
10
+ #
11
+ # it 'returns posts' do
12
+ # get '/posts', headers: request_headers
13
+ # expect(response).to be_successful
14
+ # end
15
+ # end
16
+ #
17
+ # By default +authenticated!+ sets +X-Test-User-Id+ from the +user+ let.
18
+ # Pass a different let name if needed:
19
+ # authenticated! user_let: :admin_user
20
+ RSpec.shared_context :auth_helpers do
21
+ let(:auth_headers) { {} }
22
+ let(:request_headers) { {}.merge!(auth_headers) }
23
+
24
+ def self.authenticated!(user_let: :user)
25
+ before do
26
+ auth_headers['X-Test-User-Id'] = send(user_let).id
27
+ end
28
+ end
29
+ end
@@ -1,4 +1,7 @@
1
+ require 'active_support/testing/assertions'
1
2
  require 'rspec/parameterized'
3
+ require_relative 'matchers'
4
+ require_relative 'auth_helpers'
2
5
 
3
6
  module Global
4
7
  def self.included(other)
@@ -22,4 +25,13 @@ end
22
25
  RSpec.configure do |config|
23
26
  config.include ActiveSupport::Testing::Assertions
24
27
  config.include Global
28
+
29
+ config.expect_with :rspec do |expectations|
30
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
31
+ end
32
+
33
+ config.mock_with :rspec do |mocks|
34
+ mocks.verify_partial_doubles = true
35
+ end
25
36
  end
37
+
@@ -0,0 +1,168 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Shared context: error_matcher
4
+ # Provides a +verify+ matcher for asserting ActiveModel validation errors.
5
+ #
6
+ # Usage:
7
+ # include_context :error_matcher
8
+ # it { is_expected.to verify(:name).present }
9
+ RSpec.shared_context :error_matcher do
10
+ matcher :verify do |attribute|
11
+ match do |actual|
12
+ @actual = actual
13
+ @attribute = attribute
14
+ actual.validate
15
+ if @message
16
+ errors.include?(@message)
17
+ else
18
+ errors.any?
19
+ end
20
+ end
21
+
22
+ def errors
23
+ @errors ||= @actual.errors.errors
24
+ .select { |err| err.attribute == @attribute }
25
+ .map(&:type)
26
+ end
27
+
28
+ description do
29
+ desc = if @message
30
+ "have error :#{@message} on :#{@attribute}"
31
+ else
32
+ "have any error on :#{@attribute}"
33
+ end
34
+
35
+ if errors.present?
36
+ desc << " (errors: #{errors.join(', ')})"
37
+ else
38
+ desc << '. No errors were found.'
39
+ end
40
+
41
+ desc
42
+ end
43
+
44
+ chain :positive do
45
+ @message = :greater_than_or_equal_to
46
+ end
47
+
48
+ chain :numeric do
49
+ @message = :not_a_number
50
+ end
51
+
52
+ chain :present do
53
+ @message = :blank
54
+ end
55
+
56
+ chain :absent do
57
+ @message = :absent
58
+ end
59
+
60
+ chain :with_message do |message|
61
+ @message = message
62
+ end
63
+ end
64
+ end
65
+
66
+ # Shared context: model_matchers
67
+ # Provides helpers for comparing ActiveRecord model instances against response hashes.
68
+ #
69
+ # Usage:
70
+ # include_context :model_matchers
71
+ # it { expect(json_response).to match_model_hash(user) }
72
+ RSpec.shared_context :model_matchers do
73
+ class ModelMatcherResult
74
+ DIFFER = RSpec::Support::Differ.new(color: true) unless defined?(DIFFER)
75
+
76
+ attr_reader :expected, :actual, :matches, :index
77
+
78
+ def initialize(expected, actual, matcher, index = nil)
79
+ @expected = expected
80
+ @actual = actual
81
+ @matches = matcher.call(**expected).matches?(actual)
82
+ @index = index
83
+ end
84
+
85
+ def match? = matches
86
+ def failed? = !matches
87
+
88
+ def diff
89
+ DIFFER.diff(actual, expected).strip
90
+ end
91
+
92
+ def to_s
93
+ if index.nil?
94
+ "Expected result to match: #{diff}"
95
+ else
96
+ "Expected result #{index} to match:#{diff}"
97
+ end
98
+ end
99
+ end
100
+
101
+ matcher :model_matcher do |matcher, model, attrs, extra, extra_block = nil|
102
+ match do |actual|
103
+ matcher_method = matcher.is_a?(Symbol) ? method(matcher) : matcher
104
+
105
+ if model.is_a?(Array)
106
+ @results = model.length.times.map do |i|
107
+ a = actual[i]
108
+ ModelMatcherResult.new(
109
+ expected_attributes(model[i], attrs, extra, extra_block, a),
110
+ a,
111
+ matcher_method,
112
+ i
113
+ )
114
+ end
115
+ @results.all?(&:match?)
116
+ else
117
+ @result = ModelMatcherResult.new(
118
+ expected_attributes(model, attrs, extra, extra_block, actual),
119
+ actual,
120
+ matcher_method
121
+ )
122
+ @result.match?
123
+ end
124
+ end
125
+
126
+ failure_message do |_actual|
127
+ if @results
128
+ @results.select(&:failed?).join("\n")
129
+ else
130
+ @result.to_s
131
+ end
132
+ end
133
+ end
134
+
135
+ # @param attrs [Array<Symbol>, nil] limit comparison to these attributes (all if nil)
136
+ def expected_attributes(model, attrs, extra, extra_block, actual)
137
+ include_type = attrs.blank? || attrs.delete(:type)
138
+
139
+ expected = (attrs.blank? ? model.attributes : model.slice(*attrs)).deep_symbolize_keys
140
+ expected.merge!(extra) if extra
141
+ expected.merge!(extra_block.call(model)) if extra_block
142
+ expected[:type] ||= model.class.name.underscore if include_type
143
+
144
+ if actual.is_a?(Hash)
145
+ expected.transform_values! do |v|
146
+ v.respond_to?(:iso8601) ? v.as_json : v
147
+ end
148
+ end
149
+
150
+ expected
151
+ end
152
+
153
+ def match_model(model, attrs = nil, **extra, &extra_block)
154
+ model_matcher(:have_attributes, model, attrs, extra, extra_block)
155
+ end
156
+
157
+ def match_model_hash(model, attrs = nil, **extra, &extra_block)
158
+ model_matcher(:match, model, attrs, extra, extra_block)
159
+ end
160
+
161
+ def include_model_hash(model, attrs = nil, **extra, &extra_block)
162
+ model_matcher(:include, model, attrs, extra, extra_block)
163
+ end
164
+
165
+ alias match_models match_model
166
+ alias match_models_hashes match_model_hash
167
+ alias include_model_hashes include_model_hash
168
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ def init_rrx_spec_rails!
4
+ loading_helper = caller_locations.find { |loc| loc.path.match?(/[\\\/](spec|rails)_helper.rb/) }
5
+ raise 'rrx_dev/spec must be required by spec_helper.rb or rails_helper.rb' unless loading_helper
6
+
7
+ spec_dir = Pathname.new(loading_helper.path).dirname.freeze
8
+ app_env = (spec_dir.glob('*/config/environment.rb').first || spec_dir.join('../config/environment.rb')).freeze
9
+ raise "Could not find Rails environment file" unless app_env.exist?
10
+
11
+ puts "Loading Rails environment from #{app_env}" if ENV['DEBUG']
12
+
13
+ ENV['RAILS_ENV'] ||= 'test'
14
+ require app_env.expand_path.to_s
15
+
16
+ # Prevent database truncation if the environment is production
17
+ abort('The Rails environment is running in production mode!') if Rails.env.production?
18
+
19
+ require 'rspec/rails'
20
+
21
+ if defined?(ActiveRecord)
22
+ begin
23
+ ActiveRecord::Migration.maintain_test_schema!
24
+ rescue ActiveRecord::PendingMigrationError => e
25
+ Rails.logger.debug e.to_s.strip
26
+ exit 1 # rubocop:disable Rails/Exit
27
+ end
28
+ end
29
+
30
+ # Use spec_dir (the caller's spec/ directory) instead of Rails.root,
31
+ # because Rails.root resolves to spec/dummy which is inside spec/.
32
+ Dir[spec_dir.join('support/**/*.rb')].sort.each { |f| require f }
33
+ end
34
+
35
+ init_rrx_spec_rails!
36
+
37
+ RSpec.configure do |config|
38
+ config.render_views = true
39
+ config.use_transactional_fixtures = true
40
+
41
+ config.infer_spec_type_from_file_location!
42
+ config.filter_rails_from_backtrace!
43
+ end
44
+
data/lib/rrx_dev/spec.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  require_relative 'spec/global'
2
+ require_relative 'spec/rails'
2
3
  require_relative 'spec/factory_bot'
3
4
  require 'rspec/parameterized'
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RrxDev
4
- VERSION = '0.1.2'
5
- RAILS_VERSION = '~> 7.1.0'
4
+ VERSION = '8.0.3'
5
+ RAILS_VERSION = "~> #{VERSION}"
6
6
  end
metadata CHANGED
@@ -1,31 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rrx_dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 8.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Drew
8
- autorequire:
9
- bindir: exe
8
+ bindir: bin
10
9
  cert_chain: []
11
- date: 2024-01-18 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: active_record_query_trace
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '0'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
13
26
  - !ruby/object:Gem::Dependency
14
27
  name: activesupport
15
28
  requirement: !ruby/object:Gem::Requirement
16
29
  requirements:
17
30
  - - "~>"
18
31
  - !ruby/object:Gem::Version
19
- version: 7.1.0
32
+ version: 8.0.3
20
33
  type: :runtime
21
34
  prerelease: false
22
35
  version_requirements: !ruby/object:Gem::Requirement
23
36
  requirements:
24
37
  - - "~>"
25
38
  - !ruby/object:Gem::Version
26
- version: 7.1.0
39
+ version: 8.0.3
27
40
  - !ruby/object:Gem::Dependency
28
- name: active_record_query_trace
41
+ name: bootsnap
29
42
  requirement: !ruby/object:Gem::Requirement
30
43
  requirements:
31
44
  - - ">="
@@ -39,7 +52,7 @@ dependencies:
39
52
  - !ruby/object:Gem::Version
40
53
  version: '0'
41
54
  - !ruby/object:Gem::Dependency
42
- name: bootsnap
55
+ name: debug
43
56
  requirement: !ruby/object:Gem::Requirement
44
57
  requirements:
45
58
  - - ">="
@@ -53,7 +66,7 @@ dependencies:
53
66
  - !ruby/object:Gem::Version
54
67
  version: '0'
55
68
  - !ruby/object:Gem::Dependency
56
- name: debug
69
+ name: factory_bot
57
70
  requirement: !ruby/object:Gem::Requirement
58
71
  requirements:
59
72
  - - ">="
@@ -100,14 +113,14 @@ dependencies:
100
113
  requirements:
101
114
  - - "~>"
102
115
  - !ruby/object:Gem::Version
103
- version: 7.1.0
116
+ version: 8.0.3
104
117
  type: :runtime
105
118
  prerelease: false
106
119
  version_requirements: !ruby/object:Gem::Requirement
107
120
  requirements:
108
121
  - - "~>"
109
122
  - !ruby/object:Gem::Version
110
- version: 7.1.0
123
+ version: 8.0.3
111
124
  - !ruby/object:Gem::Dependency
112
125
  name: rake
113
126
  requirement: !ruby/object:Gem::Requirement
@@ -234,11 +247,23 @@ dependencies:
234
247
  - - ">="
235
248
  - !ruby/object:Gem::Version
236
249
  version: '0'
237
- description:
250
+ - !ruby/object:Gem::Dependency
251
+ name: generator_spec
252
+ requirement: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - ">="
255
+ - !ruby/object:Gem::Version
256
+ version: '0'
257
+ type: :development
258
+ prerelease: false
259
+ version_requirements: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - ">="
262
+ - !ruby/object:Gem::Version
263
+ version: '0'
238
264
  email:
239
265
  - dan.drew@hotmail.com
240
- executables:
241
- - rrx_dev_setup
266
+ executables: []
242
267
  extensions: []
243
268
  extra_rdoc_files: []
244
269
  files:
@@ -257,22 +282,26 @@ files:
257
282
  - README.md
258
283
  - Rakefile
259
284
  - config/rubocop.yml
260
- - exe/rrx_dev_setup
261
- - exe/sources/config/environments/development.rb
262
- - exe/sources/config/environments/production.rb
263
- - exe/sources/config/environments/test.rb
264
- - exe/sources/editorconfig
265
- - exe/sources/rspec
266
- - exe/sources/rubocop.yml
267
- - exe/sources/spec/rails_helper.rb
268
- - exe/sources/spec/spec_helper.rb
269
- - exe/sources/spec/swagger_helper.rb
270
- - lib/generators/swagger_generator.rb
285
+ - exe/rrx_dev
286
+ - lib/generators/rrx_dev/install_generator.rb
287
+ - lib/generators/rrx_dev/swagger_generator.rb
288
+ - lib/generators/rrx_dev/templates/config/environments/development.rb
289
+ - lib/generators/rrx_dev/templates/config/environments/production.rb
290
+ - lib/generators/rrx_dev/templates/config/environments/test.rb
291
+ - lib/generators/rrx_dev/templates/editorconfig
292
+ - lib/generators/rrx_dev/templates/rspec
293
+ - lib/generators/rrx_dev/templates/rubocop.yml
294
+ - lib/generators/rrx_dev/templates/spec/rails_helper.rb
295
+ - lib/generators/rrx_dev/templates/spec/spec_helper.rb
296
+ - lib/generators/rrx_dev/templates/spec/swagger_helper.rb
271
297
  - lib/rrx_dev.rb
272
298
  - lib/rrx_dev/rswag.rb
273
299
  - lib/rrx_dev/spec.rb
300
+ - lib/rrx_dev/spec/auth_helpers.rb
274
301
  - lib/rrx_dev/spec/factory_bot.rb
275
302
  - lib/rrx_dev/spec/global.rb
303
+ - lib/rrx_dev/spec/matchers.rb
304
+ - lib/rrx_dev/spec/rails.rb
276
305
  - lib/rrx_dev/spec/rswag.rb
277
306
  - lib/rrx_dev/version.rb
278
307
  - sig/rrx_dev.rbs
@@ -286,7 +315,7 @@ post_install_message: |2+
286
315
 
287
316
  To complete project setup, please run:
288
317
 
289
- bundle exec rrx_dev_init
318
+ bundle exec rails g rrx_dev:install
290
319
 
291
320
  rdoc_options: []
292
321
  require_paths:
@@ -302,8 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
302
331
  - !ruby/object:Gem::Version
303
332
  version: '0'
304
333
  requirements: []
305
- rubygems_version: 3.4.10
306
- signing_key:
334
+ rubygems_version: 3.6.7
307
335
  specification_version: 4
308
336
  summary: Ruby on Rails core development support
309
337
  test_files: []
data/exe/sources/rspec DELETED
@@ -1 +0,0 @@
1
- --require rails_helper
@@ -1,12 +0,0 @@
1
- # Standard spec_helper.rb
2
- # DO NOT MODIFY
3
-
4
- RSpec.configure do |config|
5
- config.expect_with :rspec do |expectations|
6
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
7
- end
8
-
9
- config.mock_with :rspec do |mocks|
10
- mocks.verify_partial_doubles = true
11
- end
12
- end