rrx_config 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ec601c3c455ddac07928729e842a56bdf68169c7c79933a2f9fbf1f4f73ef731
4
+ data.tar.gz: 5c6b2d173c96c364e8a950d8b73629d621bf2efe9ee6c0116e31b62b5249a264
5
+ SHA512:
6
+ metadata.gz: 93bfbb4cd84cf2dd39781d68073c85e76a9dc77e66c64d034395870fb79c4c14d1016890720aa5bc312fdb8d21e91c832b6adbb4879dd8cb4cc9aafced95f5b2
7
+ data.tar.gz: 9241012dda9185d410020eb2ed98fce23ec8061fc5c0821164578d83ef1a6997e893ee5457019ef0d7fee35f4debdcde54e7746691ae8f2c965996f90d47311d
data/.editorconfig ADDED
@@ -0,0 +1,109 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ indent_size = 2
7
+ indent_style = space
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+ max_line_length = 120
11
+ tab_width = 2
12
+ ij_continuation_indent_size = 4
13
+ ij_formatter_off_tag = @formatter:off
14
+ ij_formatter_on_tag = @formatter:on
15
+ ij_formatter_tags_enabled = true
16
+ ij_smart_tabs = false
17
+ ij_visual_guides =
18
+ ij_wrap_on_typing = false
19
+
20
+ [.editorconfig]
21
+ ij_editorconfig_align_group_field_declarations = false
22
+ ij_editorconfig_space_after_colon = false
23
+ ij_editorconfig_space_after_comma = true
24
+ ij_editorconfig_space_before_colon = false
25
+ ij_editorconfig_space_before_comma = false
26
+ ij_editorconfig_spaces_around_assignment_operators = true
27
+
28
+ [{*.bash,*.sh,*.zsh}]
29
+ ij_shell_binary_ops_start_line = false
30
+ ij_shell_keep_column_alignment_padding = false
31
+ ij_shell_minify_program = false
32
+ ij_shell_redirect_followed_by_space = false
33
+ ij_shell_switch_cases_indented = false
34
+ ij_shell_use_unix_line_separator = true
35
+
36
+ [{*.gemspec,*.jbuilder,*.rake,*.rb,*.rbi,*.rbw,*.ru,*.thor,.simplecov,capfile,gemfile,guardfile,isolate,rakefile,steepfile,vagrantfile}]
37
+ ij_ruby_align_group_field_declarations = true
38
+ ij_ruby_align_multiline_parameters = true
39
+ ij_ruby_blank_lines_around_class = 1
40
+ ij_ruby_blank_lines_around_method = 1
41
+ ij_ruby_chain_calls_alignment = 2
42
+ ij_ruby_convert_brace_block_by_enter = true
43
+ ij_ruby_empty_declarations_style = 1
44
+ ij_ruby_force_newlines_around_visibility_mods = true
45
+ ij_ruby_indent_private_methods = false
46
+ ij_ruby_indent_protected_methods = false
47
+ ij_ruby_indent_public_methods = false
48
+ ij_ruby_indent_visibility_modifiers = true
49
+ ij_ruby_indent_when_cases = false
50
+ ij_ruby_keep_blank_lines_in_code = 1
51
+ ij_ruby_keep_blank_lines_in_declarations = 1
52
+ ij_ruby_keep_line_breaks = true
53
+ ij_ruby_parentheses_around_method_arguments = true
54
+ ij_ruby_spaces_around_assignment_operators = true
55
+ ij_ruby_spaces_around_hashrocket = true
56
+ ij_ruby_spaces_around_other_operators = true
57
+ ij_ruby_spaces_around_pow_operators = true
58
+ ij_ruby_spaces_around_range_operators = false
59
+ ij_ruby_spaces_around_relational_operators = true
60
+ ij_ruby_spaces_within_array_initializer_braces = true
61
+ ij_ruby_spaces_within_braces = true
62
+ ij_ruby_spaces_within_pipes = false
63
+ ij_ruby_use_external_formatter = false
64
+
65
+ [{*.har,*.json}]
66
+ ij_json_array_wrapping = split_into_lines
67
+ ij_json_keep_blank_lines_in_code = 0
68
+ ij_json_keep_indents_on_empty_lines = false
69
+ ij_json_keep_line_breaks = true
70
+ ij_json_keep_trailing_comma = false
71
+ ij_json_object_wrapping = split_into_lines
72
+ ij_json_property_alignment = do_not_align
73
+ ij_json_space_after_colon = true
74
+ ij_json_space_after_comma = true
75
+ ij_json_space_before_colon = false
76
+ ij_json_space_before_comma = false
77
+ ij_json_spaces_within_braces = false
78
+ ij_json_spaces_within_brackets = false
79
+ ij_json_wrap_long_lines = false
80
+
81
+ [{*.markdown,*.md}]
82
+ ij_markdown_force_one_space_after_blockquote_symbol = true
83
+ ij_markdown_force_one_space_after_header_symbol = true
84
+ ij_markdown_force_one_space_after_list_bullet = true
85
+ ij_markdown_force_one_space_between_words = true
86
+ ij_markdown_format_tables = true
87
+ ij_markdown_insert_quote_arrows_on_wrap = true
88
+ ij_markdown_keep_indents_on_empty_lines = false
89
+ ij_markdown_keep_line_breaks_inside_text_blocks = true
90
+ ij_markdown_max_lines_around_block_elements = 1
91
+ ij_markdown_max_lines_around_header = 1
92
+ ij_markdown_max_lines_between_paragraphs = 1
93
+ ij_markdown_min_lines_around_block_elements = 1
94
+ ij_markdown_min_lines_around_header = 1
95
+ ij_markdown_min_lines_between_paragraphs = 1
96
+ ij_markdown_wrap_text_if_long = true
97
+ ij_markdown_wrap_text_inside_blockquotes = true
98
+
99
+ [{*.yaml,*.yml}]
100
+ ij_yaml_align_values_properties = do_not_align
101
+ ij_yaml_autoinsert_sequence_marker = true
102
+ ij_yaml_block_mapping_on_new_line = false
103
+ ij_yaml_indent_sequence_value = true
104
+ ij_yaml_keep_indents_on_empty_lines = false
105
+ ij_yaml_keep_line_breaks = true
106
+ ij_yaml_sequence_on_new_line = false
107
+ ij_yaml_space_before_colon = false
108
+ ij_yaml_spaces_within_braces = true
109
+ ij_yaml_spaces_within_brackets = true
data/.idea/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
@@ -0,0 +1,7 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="RbsMissingTypeSignature" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
5
+ <inspection_tool class="RubyMismatchedParameterType" enabled="false" level="WARNING" enabled_by_default="false" />
6
+ </profile>
7
+ </component>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/rrx_config.iml" filepath="$PROJECT_DIR$/.idea/rrx_config.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,183 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="jdk" jdkName="Remote-asdf: ruby-3.2.2 (-p53" jdkType="RUBY_SDK" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="module-library">
15
+ <library name="rrx_dev (v0.1.0) [path][gem]" type="rubylib">
16
+ <properties>
17
+ <option name="version" value="4" />
18
+ </properties>
19
+ <CLASSES>
20
+ <root url="file://$MODULE_DIR$/../rrx_dev/bin" />
21
+ <root url="file://$MODULE_DIR$/../rrx_dev/exe" />
22
+ <root url="file://$MODULE_DIR$/../rrx_dev/lib" />
23
+ <root url="file://$MODULE_DIR$/../rrx_dev/pkg" />
24
+ <root url="file://$MODULE_DIR$/../rrx_dev/sig" />
25
+ <root url="file://$MODULE_DIR$/../rrx_dev/.git" />
26
+ <root url="file://$MODULE_DIR$/../rrx_dev/spec" />
27
+ <root url="file://$MODULE_DIR$/../rrx_dev/.idea" />
28
+ <root url="file://$MODULE_DIR$/../rrx_dev/config" />
29
+ </CLASSES>
30
+ <JAVADOC />
31
+ <SOURCES>
32
+ <root url="file://$MODULE_DIR$/../rrx_dev/bin" />
33
+ <root url="file://$MODULE_DIR$/../rrx_dev/exe" />
34
+ <root url="file://$MODULE_DIR$/../rrx_dev/lib" />
35
+ <root url="file://$MODULE_DIR$/../rrx_dev/pkg" />
36
+ <root url="file://$MODULE_DIR$/../rrx_dev/sig" />
37
+ <root url="file://$MODULE_DIR$/../rrx_dev/.git" />
38
+ <root url="file://$MODULE_DIR$/../rrx_dev/spec" />
39
+ <root url="file://$MODULE_DIR$/../rrx_dev/.idea" />
40
+ <root url="file://$MODULE_DIR$/../rrx_dev/config" />
41
+ </SOURCES>
42
+ <excluded>
43
+ <root url="file://$MODULE_DIR$/../rrx_dev/bin" />
44
+ <root url="file://$MODULE_DIR$/../rrx_dev/exe" />
45
+ <root url="file://$MODULE_DIR$/../rrx_dev/pkg" />
46
+ <root url="file://$MODULE_DIR$/../rrx_dev/.git" />
47
+ <root url="file://$MODULE_DIR$/../rrx_dev/spec" />
48
+ <root url="file://$MODULE_DIR$/../rrx_dev/.idea" />
49
+ </excluded>
50
+ </library>
51
+ </orderEntry>
52
+ <orderEntry type="library" scope="PROVIDED" name="actionpack (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
53
+ <orderEntry type="library" scope="PROVIDED" name="actionview (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
54
+ <orderEntry type="library" scope="PROVIDED" name="active_record_query_trace (v1.8.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
55
+ <orderEntry type="library" scope="PROVIDED" name="activemodel (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
56
+ <orderEntry type="library" scope="PROVIDED" name="activerecord (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
57
+ <orderEntry type="library" scope="PROVIDED" name="activesupport (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
58
+ <orderEntry type="library" scope="PROVIDED" name="addressable (v2.8.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
59
+ <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
60
+ <orderEntry type="library" scope="PROVIDED" name="aws-eventstream (v1.3.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
61
+ <orderEntry type="library" scope="PROVIDED" name="aws-partitions (v1.877.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
62
+ <orderEntry type="library" scope="PROVIDED" name="aws-sdk-core (v3.190.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
63
+ <orderEntry type="library" scope="PROVIDED" name="aws-sdk-secretsmanager (v1.88.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
64
+ <orderEntry type="library" scope="PROVIDED" name="aws-sigv4 (v1.8.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
65
+ <orderEntry type="library" scope="PROVIDED" name="base64 (v0.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
66
+ <orderEntry type="library" scope="PROVIDED" name="bigdecimal (v3.1.5, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
67
+ <orderEntry type="library" scope="PROVIDED" name="binding_of_caller (v1.0.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
68
+ <orderEntry type="library" scope="PROVIDED" name="bootsnap (v1.17.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
69
+ <orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
70
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.4.10, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
71
+ <orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
72
+ <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.2.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
73
+ <orderEntry type="library" scope="PROVIDED" name="connection_pool (v2.4.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
74
+ <orderEntry type="library" scope="PROVIDED" name="crass (v1.0.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
75
+ <orderEntry type="library" scope="PROVIDED" name="debug (v1.9.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
76
+ <orderEntry type="library" scope="PROVIDED" name="debug_inspector (v1.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
77
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
78
+ <orderEntry type="library" scope="PROVIDED" name="drb (v2.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
79
+ <orderEntry type="library" scope="PROVIDED" name="erubi (v1.12.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
80
+ <orderEntry type="library" scope="PROVIDED" name="factory_bot (v6.4.5, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
81
+ <orderEntry type="library" scope="PROVIDED" name="factory_bot_rails (v6.4.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
82
+ <orderEntry type="library" scope="PROVIDED" name="ffi (v1.16.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
83
+ <orderEntry type="library" scope="PROVIDED" name="i18n (v1.14.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
84
+ <orderEntry type="library" scope="PROVIDED" name="io-console (v0.7.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
85
+ <orderEntry type="library" scope="PROVIDED" name="irb (v1.11.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
86
+ <orderEntry type="library" scope="PROVIDED" name="jmespath (v1.6.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
87
+ <orderEntry type="library" scope="PROVIDED" name="json (v2.7.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
88
+ <orderEntry type="library" scope="PROVIDED" name="json-schema (v4.1.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
89
+ <orderEntry type="library" scope="PROVIDED" name="language_server-protocol (v3.17.0.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
90
+ <orderEntry type="library" scope="PROVIDED" name="listen (v3.8.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
91
+ <orderEntry type="library" scope="PROVIDED" name="loofah (v2.22.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
92
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.20.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
93
+ <orderEntry type="library" scope="PROVIDED" name="msgpack (v1.7.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
94
+ <orderEntry type="library" scope="PROVIDED" name="mutex_m (v0.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
95
+ <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.16.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
96
+ <orderEntry type="library" scope="PROVIDED" name="parallel (v1.24.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
97
+ <orderEntry type="library" scope="PROVIDED" name="parser (v3.2.2.4, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
98
+ <orderEntry type="library" scope="PROVIDED" name="proc_to_ast (v0.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
99
+ <orderEntry type="library" scope="PROVIDED" name="psych (v5.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
100
+ <orderEntry type="library" scope="PROVIDED" name="public_suffix (v5.0.4, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
101
+ <orderEntry type="library" scope="PROVIDED" name="racc (v1.7.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
102
+ <orderEntry type="library" scope="PROVIDED" name="rack (v3.0.8, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
103
+ <orderEntry type="library" scope="PROVIDED" name="rack-session (v2.0.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
104
+ <orderEntry type="library" scope="PROVIDED" name="rack-test (v2.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
105
+ <orderEntry type="library" scope="PROVIDED" name="rackup (v2.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
106
+ <orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.2.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
107
+ <orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.6.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
108
+ <orderEntry type="library" scope="PROVIDED" name="railties (v7.1.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
109
+ <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
110
+ <orderEntry type="library" scope="PROVIDED" name="rake (v13.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
111
+ <orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.11.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
112
+ <orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.10.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
113
+ <orderEntry type="library" scope="PROVIDED" name="rdoc (v6.6.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
114
+ <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.8.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
115
+ <orderEntry type="library" scope="PROVIDED" name="reline (v0.4.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
116
+ <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
117
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v3.12.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
118
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.12.2, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
119
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.12.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
120
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.12.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
121
+ <orderEntry type="library" scope="PROVIDED" name="rspec-parameterized (v1.0.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
122
+ <orderEntry type="library" scope="PROVIDED" name="rspec-parameterized-core (v1.0.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
123
+ <orderEntry type="library" scope="PROVIDED" name="rspec-parameterized-table_syntax (v1.0.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
124
+ <orderEntry type="library" scope="PROVIDED" name="rspec-rails (v6.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
125
+ <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.12.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
126
+ <orderEntry type="library" scope="PROVIDED" name="rswag-specs (v2.13.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
127
+ <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.59.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
128
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.30.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
129
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-rails (v2.23.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
130
+ <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.13.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
131
+ <orderEntry type="library" scope="PROVIDED" name="spring (v4.1.3, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
132
+ <orderEntry type="library" scope="PROVIDED" name="sqlite3 (v1.7.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
133
+ <orderEntry type="library" scope="PROVIDED" name="stringio (v3.1.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
134
+ <orderEntry type="library" scope="PROVIDED" name="thor (v1.3.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
135
+ <orderEntry type="library" scope="PROVIDED" name="timeout (v0.4.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
136
+ <orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.6, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
137
+ <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.5.0, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
138
+ <orderEntry type="library" scope="PROVIDED" name="unparser (v0.6.10, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
139
+ <orderEntry type="library" scope="PROVIDED" name="webrick (v1.8.1, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
140
+ <orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.6.12, Remote-asdf: ruby-3.2.2 (-p53) [gem]" level="application" />
141
+ </component>
142
+ <component name="RakeTasksCache">
143
+ <option name="myRootTask">
144
+ <RakeTaskImpl id="rake">
145
+ <subtasks>
146
+ <RakeTaskImpl description="Build rrx_config-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
147
+ <RakeTaskImpl id="build">
148
+ <subtasks>
149
+ <RakeTaskImpl description="Generate SHA512 checksum if rrx_config-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
150
+ </subtasks>
151
+ </RakeTaskImpl>
152
+ <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
153
+ <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
154
+ <RakeTaskImpl description="Build and install rrx_config-0.1.0.gem into system gems" fullCommand="install" id="install" />
155
+ <RakeTaskImpl id="install">
156
+ <subtasks>
157
+ <RakeTaskImpl description="Build and install rrx_config-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
158
+ </subtasks>
159
+ </RakeTaskImpl>
160
+ <RakeTaskImpl description="Create tag v0.1.0 and build and push rrx_config-0.1.0.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
161
+ <RakeTaskImpl description="Run RuboCop" fullCommand="rubocop" id="rubocop" />
162
+ <RakeTaskImpl id="rubocop">
163
+ <subtasks>
164
+ <RakeTaskImpl description="Autocorrect RuboCop offenses (only when it's safe)" fullCommand="rubocop:autocorrect" id="autocorrect" />
165
+ <RakeTaskImpl description="Autocorrect RuboCop offenses (safe and unsafe)" fullCommand="rubocop:autocorrect_all" id="autocorrect_all" />
166
+ <RakeTaskImpl description="" fullCommand="rubocop:auto_correct" id="auto_correct" />
167
+ </subtasks>
168
+ </RakeTaskImpl>
169
+ <RakeTaskImpl description="Run RSpec code examples" fullCommand="spec" id="spec" />
170
+ <RakeTaskImpl description="" fullCommand="default" id="default" />
171
+ <RakeTaskImpl description="" fullCommand="release" id="release" />
172
+ <RakeTaskImpl id="release">
173
+ <subtasks>
174
+ <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
175
+ <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
176
+ <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
177
+ </subtasks>
178
+ </RakeTaskImpl>
179
+ </subtasks>
180
+ </RakeTaskImpl>
181
+ </option>
182
+ </component>
183
+ </module>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require rails_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ inherit_gem:
2
+ rrx_dev: config/rubocop.yml
3
+
4
+ ##
5
+ # Add project specific cops below
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at dan.drew@hotmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+ gemspec
5
+
6
+ gem 'rrx_dev', path: '../rrx_dev'
7
+
8
+ gem 'sqlite3'
9
+ gem 'aws-sdk-secretsmanager'
data/Gemfile.lock ADDED
@@ -0,0 +1,254 @@
1
+ PATH
2
+ remote: ../rrx_dev
3
+ specs:
4
+ rrx_dev (0.1.1)
5
+ active_record_query_trace
6
+ activesupport (~> 7.1.0)
7
+ bootsnap
8
+ debug
9
+ factory_bot_rails
10
+ listen
11
+ railties (~> 7.1.0)
12
+ rake (>= 13.0)
13
+ rspec (>= 3.0)
14
+ rspec-parameterized
15
+ rspec-rails
16
+ rswag-specs
17
+ rubocop (>= 1.21)
18
+ rubocop-rails
19
+ spring
20
+ thor
21
+
22
+ PATH
23
+ remote: .
24
+ specs:
25
+ rrx_config (0.1.0)
26
+ railties
27
+
28
+ GEM
29
+ remote: https://rubygems.org/
30
+ specs:
31
+ actionpack (7.1.2)
32
+ actionview (= 7.1.2)
33
+ activesupport (= 7.1.2)
34
+ nokogiri (>= 1.8.5)
35
+ racc
36
+ rack (>= 2.2.4)
37
+ rack-session (>= 1.0.1)
38
+ rack-test (>= 0.6.3)
39
+ rails-dom-testing (~> 2.2)
40
+ rails-html-sanitizer (~> 1.6)
41
+ actionview (7.1.2)
42
+ activesupport (= 7.1.2)
43
+ builder (~> 3.1)
44
+ erubi (~> 1.11)
45
+ rails-dom-testing (~> 2.2)
46
+ rails-html-sanitizer (~> 1.6)
47
+ active_record_query_trace (1.8.2)
48
+ activerecord (>= 6.0.0)
49
+ activemodel (7.1.2)
50
+ activesupport (= 7.1.2)
51
+ activerecord (7.1.2)
52
+ activemodel (= 7.1.2)
53
+ activesupport (= 7.1.2)
54
+ timeout (>= 0.4.0)
55
+ activesupport (7.1.2)
56
+ base64
57
+ bigdecimal
58
+ concurrent-ruby (~> 1.0, >= 1.0.2)
59
+ connection_pool (>= 2.2.5)
60
+ drb
61
+ i18n (>= 1.6, < 2)
62
+ minitest (>= 5.1)
63
+ mutex_m
64
+ tzinfo (~> 2.0)
65
+ addressable (2.8.6)
66
+ public_suffix (>= 2.0.2, < 6.0)
67
+ ast (2.4.2)
68
+ aws-eventstream (1.3.0)
69
+ aws-partitions (1.877.0)
70
+ aws-sdk-core (3.190.1)
71
+ aws-eventstream (~> 1, >= 1.3.0)
72
+ aws-partitions (~> 1, >= 1.651.0)
73
+ aws-sigv4 (~> 1.8)
74
+ jmespath (~> 1, >= 1.6.1)
75
+ aws-sdk-secretsmanager (1.88.0)
76
+ aws-sdk-core (~> 3, >= 3.188.0)
77
+ aws-sigv4 (~> 1.1)
78
+ aws-sigv4 (1.8.0)
79
+ aws-eventstream (~> 1, >= 1.0.2)
80
+ base64 (0.2.0)
81
+ bigdecimal (3.1.5)
82
+ binding_of_caller (1.0.0)
83
+ debug_inspector (>= 0.0.1)
84
+ bootsnap (1.17.0)
85
+ msgpack (~> 1.2)
86
+ builder (3.2.4)
87
+ coderay (1.1.3)
88
+ concurrent-ruby (1.2.2)
89
+ connection_pool (2.4.1)
90
+ crass (1.0.6)
91
+ debug (1.9.1)
92
+ irb (~> 1.10)
93
+ reline (>= 0.3.8)
94
+ debug_inspector (1.2.0)
95
+ diff-lcs (1.5.0)
96
+ drb (2.2.0)
97
+ ruby2_keywords
98
+ erubi (1.12.0)
99
+ factory_bot (6.4.5)
100
+ activesupport (>= 5.0.0)
101
+ factory_bot_rails (6.4.3)
102
+ factory_bot (~> 6.4)
103
+ railties (>= 5.0.0)
104
+ ffi (1.16.3)
105
+ i18n (1.14.1)
106
+ concurrent-ruby (~> 1.0)
107
+ io-console (0.7.1)
108
+ irb (1.11.0)
109
+ rdoc
110
+ reline (>= 0.3.8)
111
+ jmespath (1.6.2)
112
+ json (2.7.1)
113
+ json-schema (4.1.1)
114
+ addressable (>= 2.8)
115
+ language_server-protocol (3.17.0.3)
116
+ listen (3.8.0)
117
+ rb-fsevent (~> 0.10, >= 0.10.3)
118
+ rb-inotify (~> 0.9, >= 0.9.10)
119
+ loofah (2.22.0)
120
+ crass (~> 1.0.2)
121
+ nokogiri (>= 1.12.0)
122
+ minitest (5.20.0)
123
+ msgpack (1.7.2)
124
+ mutex_m (0.2.0)
125
+ nokogiri (1.16.0-x86_64-linux)
126
+ racc (~> 1.4)
127
+ parallel (1.24.0)
128
+ parser (3.2.2.4)
129
+ ast (~> 2.4.1)
130
+ racc
131
+ proc_to_ast (0.1.0)
132
+ coderay
133
+ parser
134
+ unparser
135
+ psych (5.1.2)
136
+ stringio
137
+ public_suffix (5.0.4)
138
+ racc (1.7.3)
139
+ rack (3.0.8)
140
+ rack-session (2.0.0)
141
+ rack (>= 3.0.0)
142
+ rack-test (2.1.0)
143
+ rack (>= 1.3)
144
+ rackup (2.1.0)
145
+ rack (>= 3)
146
+ webrick (~> 1.8)
147
+ rails-dom-testing (2.2.0)
148
+ activesupport (>= 5.0.0)
149
+ minitest
150
+ nokogiri (>= 1.6)
151
+ rails-html-sanitizer (1.6.0)
152
+ loofah (~> 2.21)
153
+ nokogiri (~> 1.14)
154
+ railties (7.1.2)
155
+ actionpack (= 7.1.2)
156
+ activesupport (= 7.1.2)
157
+ irb
158
+ rackup (>= 1.0.0)
159
+ rake (>= 12.2)
160
+ thor (~> 1.0, >= 1.2.2)
161
+ zeitwerk (~> 2.6)
162
+ rainbow (3.1.1)
163
+ rake (13.1.0)
164
+ rb-fsevent (0.11.2)
165
+ rb-inotify (0.10.1)
166
+ ffi (~> 1.0)
167
+ rdoc (6.6.2)
168
+ psych (>= 4.0.0)
169
+ regexp_parser (2.8.3)
170
+ reline (0.4.1)
171
+ io-console (~> 0.5)
172
+ rexml (3.2.6)
173
+ rspec (3.12.0)
174
+ rspec-core (~> 3.12.0)
175
+ rspec-expectations (~> 3.12.0)
176
+ rspec-mocks (~> 3.12.0)
177
+ rspec-core (3.12.2)
178
+ rspec-support (~> 3.12.0)
179
+ rspec-expectations (3.12.3)
180
+ diff-lcs (>= 1.2.0, < 2.0)
181
+ rspec-support (~> 3.12.0)
182
+ rspec-mocks (3.12.6)
183
+ diff-lcs (>= 1.2.0, < 2.0)
184
+ rspec-support (~> 3.12.0)
185
+ rspec-parameterized (1.0.0)
186
+ rspec-parameterized-core (< 2)
187
+ rspec-parameterized-table_syntax (< 2)
188
+ rspec-parameterized-core (1.0.0)
189
+ parser
190
+ proc_to_ast
191
+ rspec (>= 2.13, < 4)
192
+ unparser
193
+ rspec-parameterized-table_syntax (1.0.1)
194
+ binding_of_caller
195
+ rspec-parameterized-core (< 2)
196
+ rspec-rails (6.1.0)
197
+ actionpack (>= 6.1)
198
+ activesupport (>= 6.1)
199
+ railties (>= 6.1)
200
+ rspec-core (~> 3.12)
201
+ rspec-expectations (~> 3.12)
202
+ rspec-mocks (~> 3.12)
203
+ rspec-support (~> 3.12)
204
+ rspec-support (3.12.1)
205
+ rswag-specs (2.13.0)
206
+ activesupport (>= 3.1, < 7.2)
207
+ json-schema (>= 2.2, < 5.0)
208
+ railties (>= 3.1, < 7.2)
209
+ rspec-core (>= 2.14)
210
+ rubocop (1.59.0)
211
+ json (~> 2.3)
212
+ language_server-protocol (>= 3.17.0)
213
+ parallel (~> 1.10)
214
+ parser (>= 3.2.2.4)
215
+ rainbow (>= 2.2.2, < 4.0)
216
+ regexp_parser (>= 1.8, < 3.0)
217
+ rexml (>= 3.2.5, < 4.0)
218
+ rubocop-ast (>= 1.30.0, < 2.0)
219
+ ruby-progressbar (~> 1.7)
220
+ unicode-display_width (>= 2.4.0, < 3.0)
221
+ rubocop-ast (1.30.0)
222
+ parser (>= 3.2.1.0)
223
+ rubocop-rails (2.23.1)
224
+ activesupport (>= 4.2.0)
225
+ rack (>= 1.1)
226
+ rubocop (>= 1.33.0, < 2.0)
227
+ rubocop-ast (>= 1.30.0, < 2.0)
228
+ ruby-progressbar (1.13.0)
229
+ ruby2_keywords (0.0.5)
230
+ spring (4.1.3)
231
+ sqlite3 (1.7.0-x86_64-linux)
232
+ stringio (3.1.0)
233
+ thor (1.3.0)
234
+ timeout (0.4.1)
235
+ tzinfo (2.0.6)
236
+ concurrent-ruby (~> 1.0)
237
+ unicode-display_width (2.5.0)
238
+ unparser (0.6.10)
239
+ diff-lcs (~> 1.3)
240
+ parser (>= 3.2.2.4)
241
+ webrick (1.8.1)
242
+ zeitwerk (2.6.12)
243
+
244
+ PLATFORMS
245
+ x86_64-linux
246
+
247
+ DEPENDENCIES
248
+ aws-sdk-secretsmanager
249
+ rrx_config!
250
+ rrx_dev!
251
+ sqlite3
252
+
253
+ BUNDLED WITH
254
+ 2.4.10
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 Dan Drew
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # RrxConfig
2
+
3
+
4
+ TODO: Delete this and the text below, and describe your gem
5
+
6
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rrx_config`. To experiment with that code, run `bin/console` for an interactive prompt.
7
+
8
+ ## Installation
9
+
10
+ Install the gem and add to the application's Gemfile by executing:
11
+
12
+ $ bundle add rrx_config
13
+
14
+ If bundler is not being used to manage dependencies, install the gem by executing:
15
+
16
+ $ gem install rrx_config
17
+
18
+ ## Usage
19
+
20
+ This gem loads runtime application configuration from an external source
21
+
22
+ For example, with the JSON config
23
+
24
+ ```json
25
+ {
26
+ "some_config": {
27
+ "value": "foo"
28
+ },
29
+ "other_config_value": "bar"
30
+ }
31
+ ```
32
+
33
+ The config would be accessed like this:
34
+
35
+ ```ruby
36
+ def my_code
37
+ if RrxConfig.some_config.value == 'foo'
38
+ do_something RrxConfig.other_config_value
39
+ end
40
+ end
41
+ ```
42
+
43
+ Configurations are stored as immutable Ruby `Data` objects. You can test for optional values:
44
+
45
+ ```ruby
46
+ optional_stuff if RrxConfig.members.include?(:optional_thing)
47
+ deep_optional_stuff if RrxConfig.optional_thing.members.include?(:deep_thoughts)
48
+
49
+ # Root-level configs can also be tested with the xxxx? syntax
50
+ optional_stuff if RrxConfig.optional_thing?
51
+ ```
52
+
53
+ ### Environment
54
+
55
+ Set the `RRX_CONFIG` environment variable to the required JSON configuration
56
+
57
+ ### AWS
58
+
59
+ Loads configuration from an AWS secret that contains the required JSON configuration. Recommended when deploying on AWS.
60
+ By default will use the implicit AWS context that is assigned by the instance role.
61
+
62
+ Set the `RRX_CONFIG_AWS_SECRET` to the name of the secret to read.
63
+
64
+ For local integration testing, set `RRX_AWS_PROFILE` to use local AWS credentials. The profile must have been
65
+ configured in the local AWS client (typically `~/.aws/credentials`).
66
+
67
+ ## Development
68
+
69
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
70
+
71
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
72
+
73
+ ## Contributing
74
+
75
+ Bug reports and pull requests are welcome on GitHub at https://github.com/rrx/rrx_config. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/rrx_config/blob/main/CODE_OF_CONDUCT.md).
76
+
77
+ ## License
78
+
79
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
80
+
81
+ ## Code of Conduct
82
+
83
+ Everyone interacting in the RrxConfig project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/rrx_config/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'singleton'
4
+ require_relative 'sources/local_source'
5
+ require_relative 'sources/environment_source'
6
+ require_relative 'sources/aws_secret_source'
7
+
8
+ module RrxConfig
9
+ class Configuration
10
+ include Singleton
11
+
12
+ # @return [Data]
13
+ def current
14
+ @current ||= read
15
+ end
16
+
17
+ def read
18
+ # Take the first source that returns a value
19
+ @current = sources.inject(nil) do |current, source|
20
+ current || source.new.read
21
+ end || default_config
22
+ end
23
+
24
+ private
25
+
26
+ def sources
27
+ [
28
+ Sources::LocalSource,
29
+ Sources::AwsSecretSource,
30
+ Sources::EnvironmentSource
31
+ ]
32
+ end
33
+
34
+ def default_config
35
+ Data.define.new
36
+ end
37
+ end
38
+
39
+ def self.respond_to_missing?(...)
40
+ Configuration.instance.current.respond_to?(...)
41
+ end
42
+
43
+ ##
44
+ # Allow config values to be read directly from RrxConfig.xxxx
45
+ def self.method_missing(name, ...)
46
+ if name.end_with?('?')
47
+ respond_to_missing?(name.to_s.chop.to_sym)
48
+ else
49
+ Configuration.instance.current.send(name, ...)
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ if defined?(ActiveRecord)
4
+ require 'active_record/database_configurations'
5
+ ActiveRecord::DatabaseConfigurations.register_db_config_handler do |env_name, name, url, config|
6
+ if url
7
+ ActiveRecord::DatabaseConfigurations::UrlConfig.new(env_name, name, url, config)
8
+ elsif RrxConfig.database?
9
+ ActiveRecord::DatabaseConfigurations::HashConfig.new(env_name, name, RrxConfig.database.to_h)
10
+ else
11
+ ActiveRecord::DatabaseConfigurations::HashConfig.new(env_name, name, config)
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RrxConfig
4
+ class Environment < ActiveSupport::StringInquirer
5
+ RRX_ENVIRONMENT_VARIABLE = 'RRX_ENVIRONMENT'
6
+ RRX_ENVIRONMENT_DEFAULT = 'development'
7
+
8
+ SHORT_NAMES = {
9
+ 'development' => 'dev',
10
+ 'staging' => 'stg',
11
+ 'production' => 'prd'
12
+ }.freeze
13
+
14
+ LONG_NAMES = SHORT_NAMES.invert.freeze
15
+
16
+ # @param [String, nil] name Deployment environment name
17
+ def initialize(name = nil)
18
+ value = normalize(name || from_env)
19
+ super(value)
20
+ validate!
21
+ @force_suffix = "-#{short}"
22
+ @suffix = production? ? '' : @force_suffix
23
+ end
24
+
25
+ def short
26
+ SHORT_NAMES[to_s]
27
+ end
28
+
29
+ def suffix(force = false) # rubocop:disable Style/OptionalBooleanParameter
30
+ force ? @force_suffix : @suffix
31
+ end
32
+
33
+ def validate!
34
+ raise RrxConfig::EnvironmentError, self unless SHORT_NAMES.key?(self)
35
+ end
36
+
37
+ class << self
38
+ def instance
39
+ @env ||= get_env
40
+ end
41
+
42
+ def get_env
43
+ Environment.new
44
+ end
45
+
46
+ ##
47
+ # Spec helper for testing +env+
48
+ def reset
49
+ @env = nil
50
+ end
51
+ end
52
+
53
+ private
54
+
55
+ def normalize(name)
56
+ LONG_NAMES[name] || name
57
+ end
58
+
59
+ def from_env
60
+ ENV.fetch(RRX_ENVIRONMENT_VARIABLE, RRX_ENVIRONMENT_DEFAULT)
61
+ end
62
+ end
63
+
64
+ ##
65
+ # Primary accessor for getting the environment
66
+ def self.env
67
+ Environment.instance
68
+ end
69
+ end
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative './base'
4
+
5
+ module RrxConfig
6
+ module Sources
7
+ class AwsSecretSource < Base
8
+ SECRET_VARIABLE = 'RRX_AWS_CONFIG_SECRET_NAME'
9
+ PROFILE_VARIABLE = 'RRX_AWS_PROFILE'
10
+ REGION_VARIABLE = 'RRX_AWS_REGION'
11
+ REGION_DEFAULT = 'us-west-2'
12
+
13
+ def read
14
+ read_secret if secret_id
15
+ end
16
+
17
+ ##
18
+ # Test helper
19
+ def write(value)
20
+ raise NotImplementedError unless Rails.env.test?
21
+
22
+ puts "Writing secret #{secret_id}"
23
+ result = client.create_secret({
24
+ name: secret_id,
25
+ secret_string: value,
26
+ force_overwrite_replica_secret: true,
27
+ description: 'Integration test'
28
+ })
29
+ puts "Secret created: #{result.arn}"
30
+ end
31
+
32
+ ##
33
+ # Test helper
34
+ def delete
35
+ raise NotImplementedError unless Rails.env.test?
36
+
37
+ puts "Deleting secret #{secret_id}"
38
+ client.delete_secret({ secret_id:, force_delete_without_recovery: true }) rescue nil
39
+ end
40
+
41
+ private
42
+
43
+ def secret_id
44
+ @secret_name ||= ENV.fetch(SECRET_VARIABLE, :-)
45
+ @secret_name == :- ? nil : @secret_name
46
+ end
47
+
48
+ def credentials_profile
49
+ profile = Rails.env.production? ? nil : ENV.fetch(PROFILE_VARIABLE, nil)
50
+ profile || 'default'
51
+ end
52
+
53
+ ##
54
+ # @return [Aws::SecretsManager::Client]
55
+ def client
56
+ @client ||= begin
57
+ require 'aws-sdk-secretsmanager'
58
+ Aws::SecretsManager::Client.new(
59
+ region: ENV.fetch(REGION_VARIABLE, REGION_DEFAULT),
60
+ profile: credentials_profile
61
+ )
62
+ end
63
+ end
64
+
65
+ def read_secret
66
+ read_json client.get_secret_value({secret_id:}).secret_string
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RrxConfig
4
+ module Sources
5
+ class Base
6
+ def read
7
+ throw NotImplementedError
8
+ end
9
+
10
+ protected
11
+
12
+ # @param [String, nil] value
13
+ # @return [Data, nil]
14
+ def read_json(value)
15
+ value ? json_to_data(JSON.parse(value, { symbolize_keys: true })) : nil
16
+ end
17
+
18
+ # @param [Hash] json
19
+ def json_to_data(json)
20
+ json = json.transform_values do |v|
21
+ v.is_a?(Hash) ? json_to_data(v) : v
22
+ end
23
+
24
+ Data.define(*json.keys).new(**json)
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative './base'
4
+
5
+ module RrxConfig
6
+ module Sources
7
+ class EnvironmentSource < Base
8
+ VARIABLE_NAME = 'RRX_CONFIG'
9
+
10
+ # @return [Struct, nil]
11
+ def read
12
+ read_json ENV.fetch(VARIABLE_NAME, nil)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative './base'
4
+
5
+ module RrxConfig
6
+ module Sources
7
+ ##
8
+ # Read config from local files when running locally or testing
9
+ class LocalSource < Base
10
+ def read
11
+ if Rails.env.development?
12
+ read_json_file development_config_path
13
+ elsif Rails.env.test?
14
+ read_json_file spec_config_path
15
+ end
16
+ end
17
+
18
+ private
19
+
20
+ # @param [Pathname] path
21
+ def read_json_file(path)
22
+ read_json path.read if path.exist?
23
+ end
24
+
25
+ def development_config_path
26
+ @development_config_path ||= Rails.root.join('local_config.json')
27
+ end
28
+
29
+ def spec_config_path
30
+ @spec_config_path ||= Rails.root.join('spec/spec_config.json')
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RrxConfig
4
+ VERSION = "0.1.0"
5
+ end
data/lib/rrx_config.rb ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'rrx_config/version'
4
+ require_relative 'rrx_config/configuration'
5
+ require_relative 'rrx_config/environment'
6
+ require_relative 'rrx_config/database_config'
7
+
8
+ module RrxConfig
9
+ class Error < StandardError; end
10
+
11
+ class EnvironmentError < Error
12
+ def initialize(msg)
13
+ super("Invalid environment '#{msg}'")
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,4 @@
1
+ module RrxConfig
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rrx_config
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Dan Drew
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-01-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: railties
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description:
28
+ email:
29
+ - dan.drew@hotmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".editorconfig"
35
+ - ".idea/.gitignore"
36
+ - ".idea/inspectionProfiles/Project_Default.xml"
37
+ - ".idea/modules.xml"
38
+ - ".idea/rrx_config.iml"
39
+ - ".idea/vcs.xml"
40
+ - ".rspec"
41
+ - ".rubocop.yml"
42
+ - CODE_OF_CONDUCT.md
43
+ - Gemfile
44
+ - Gemfile.lock
45
+ - LICENSE.txt
46
+ - README.md
47
+ - Rakefile
48
+ - lib/rrx_config.rb
49
+ - lib/rrx_config/configuration.rb
50
+ - lib/rrx_config/database_config.rb
51
+ - lib/rrx_config/environment.rb
52
+ - lib/rrx_config/sources/aws_secret_source.rb
53
+ - lib/rrx_config/sources/base.rb
54
+ - lib/rrx_config/sources/environment_source.rb
55
+ - lib/rrx_config/sources/local_source.rb
56
+ - lib/rrx_config/version.rb
57
+ - sig/rrx_config.rbs
58
+ homepage: https://github.com/rails-rrx/rrx_config
59
+ licenses:
60
+ - MIT
61
+ metadata:
62
+ homepage_uri: https://github.com/rails-rrx/rrx_config
63
+ source_code_uri: https://github.com/rails-rrx/rrx_config
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '3.1'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubygems_version: 3.4.10
80
+ signing_key:
81
+ specification_version: 4
82
+ summary: Ruby on Rails support for environment-base configuration
83
+ test_files: []