rails-crud-tools 0.6.18 → 0.6.20

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: a782ad293b035babd4de987cde85efc7b30ab62ca1b4e370ce0d731bca04e715
4
- data.tar.gz: dd19bb565b82498817241446deea201d04003680dad78f0caa5bd89de1cd567d
3
+ metadata.gz: e8c8fe1e3590b9f9d338def25a4a4202854cb744950119a4ca58b809bcc33d77
4
+ data.tar.gz: baca515de9005597ae4664b317812c57558d5ef33991bacceb85c3bb7df313f6
5
5
  SHA512:
6
- metadata.gz: 0d38388d3f8a9fce57850022114009876b404bb1aa4fef755a966b81771aa2728475c36a9f7a100f829da2524164546c0710ae1b3d07c442c03fd7c8cbc2191f
7
- data.tar.gz: 17cdd7535c96de3f5ac7a6cdcd259eb948bbb0b1e456b716e780a03d121aa36f44f73c731e3deb8c81fd1722e45c4251ba42b74dbd418ff2b80d62c531c8dd88
6
+ metadata.gz: f59fb3f51760b34b527a92263f68ee54d1698f66836875027903a147dfe0e2e16553b3c62c2ba1ed7ae35c72e3f2c2e731597b177956ae5aae041d68632eafa8
7
+ data.tar.gz: e9c6cf57f1f8dfab373e98d6364df3b421b5f609e599a8bbf141f4a1c41b025c28f8891933c10a4f960c71c2e54db65a40c9ca2369939e7292def391bd3776bc
@@ -0,0 +1,44 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
3
+ {
4
+ "name": "rails-crud-tools",
5
+ // Update the 'dockerComposeFile' list if you have more compose files or use different names.
6
+ // The .devcontainer/docker-compose.yml file contains any overrides you need/want to make.
7
+ "dockerComposeFile": [
8
+ "../docker-compose.yml",
9
+ "docker-compose.yml"
10
+ ],
11
+ // The 'service' property is the name of the service for the container that VS Code should
12
+ // use. Update this value and .devcontainer/docker-compose.yml to the real service name.
13
+ "service": "app",
14
+ // The optional 'workspaceFolder' property is the path VS Code should open by default when
15
+ // connected. This is typically a file mount in .devcontainer/docker-compose.yml
16
+ "workspaceFolder": "/root/app",
17
+ "workspaceMount": "source=.,target=/root/app,type=bind,consistency=cached",
18
+ // Features to add to the dev container. More info: https://containers.dev/features.
19
+ // "features": {},
20
+
21
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
22
+ // "forwardPorts": [],
23
+
24
+ // Uncomment the next line if you want start specific services in your Docker Compose config.
25
+ // "runServices": [],
26
+
27
+ // Uncomment the next line if you want to keep your containers running after VS Code shuts down.
28
+ // "shutdownAction": "none",
29
+
30
+ // Uncomment the next line to run commands after the container is created.
31
+ // "postCreateCommand": "cat /etc/os-release",
32
+
33
+ // Configure tool-specific properties.
34
+ "customizations": {
35
+ "jetbrains": {
36
+ "backend": "RubyMine",
37
+ "plugins": [
38
+ "com.github.copilot"
39
+ ],
40
+ }
41
+ },
42
+ // Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
43
+ // "remoteUser": "devcontainer"
44
+ }
@@ -0,0 +1,26 @@
1
+ version: '3.8'
2
+ services:
3
+ # Update this to the name of the service you want to work with in your docker-compose.yml file
4
+ app:
5
+ # Uncomment if you want to override the service's Dockerfile to one in the .devcontainer
6
+ # folder. Note that the path of the Dockerfile and context is relative to the *primary*
7
+ # docker-compose.yml file (the first in the devcontainer.json "dockerComposeFile"
8
+ # array). The sample below assumes your primary file is in the root of your project.
9
+ #
10
+ # build:
11
+ # context: .
12
+ # dockerfile: .devcontainer/Dockerfile
13
+
14
+ # volumes:
15
+ # Update this to wherever you want VS Code to mount the folder of your project
16
+ # - ..:/workspaces:cached
17
+
18
+ # Uncomment the next four lines if you will use a ptrace-based debugger like C++, Go, and Rust.
19
+ # cap_add:
20
+ # - SYS_PTRACE
21
+ # security_opt:
22
+ # - seccomp:unconfined
23
+
24
+ # Overrides default command so things don't shut down after the process ends.
25
+ command: sleep infinity
26
+
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,274 @@
1
+ AllCops:
2
+ TargetRubyVersion: 3.1
3
+ Exclude:
4
+ - 'ide/**/*'
5
+ - 'spec/**/*'
6
+ - 'lib/rails/crud/tools/cli.rb'
7
+ Style/StringLiterals:
8
+ Enabled: true
9
+ EnforcedStyle: double_quotes
10
+
11
+ Style/StringLiteralsInInterpolation:
12
+ Enabled: true
13
+ EnforcedStyle: double_quotes
14
+
15
+ Layout/LineLength:
16
+ Max: 200
17
+
18
+ Metrics/MethodLength:
19
+ Max: 50
20
+
21
+ Metrics/AbcSize:
22
+ Max: 60
23
+
24
+ Metrics/CyclomaticComplexity:
25
+ Max: 20
26
+
27
+ Metrics/PerceivedComplexity:
28
+ Max: 20
29
+
30
+ Metrics/ModuleLength:
31
+ Max: 130
32
+
33
+ Metrics/BlockLength:
34
+ Enabled: true
35
+ Max: 30
36
+
37
+ Gemspec/AddRuntimeDependency:
38
+ Enabled: true
39
+ Gemspec/DeprecatedAttributeAssignment:
40
+ Enabled: true
41
+ Gemspec/DevelopmentDependencies:
42
+ Enabled: true
43
+ Gemspec/RequireMFA:
44
+ Enabled: true
45
+ Layout/LineContinuationLeadingSpace:
46
+ Enabled: true
47
+ Layout/LineContinuationSpacing:
48
+ Enabled: true
49
+ Layout/LineEndStringConcatenationIndentation:
50
+ Enabled: true
51
+ Layout/SpaceBeforeBrackets:
52
+ Enabled: true
53
+ Lint/AmbiguousAssignment:
54
+ Enabled: true
55
+ Lint/AmbiguousOperatorPrecedence:
56
+ Enabled: true
57
+ Lint/AmbiguousRange:
58
+ Enabled: true
59
+ Lint/ConstantOverwrittenInRescue:
60
+ Enabled: true
61
+ Lint/DeprecatedConstants:
62
+ Enabled: true
63
+ Lint/DuplicateBranch:
64
+ Enabled: true
65
+ Lint/DuplicateMagicComment:
66
+ Enabled: true
67
+ Lint/DuplicateMatchPattern:
68
+ Enabled: true
69
+ Lint/DuplicateRegexpCharacterClassElement:
70
+ Enabled: true
71
+ Lint/DuplicateSetElement:
72
+ Enabled: true
73
+ Lint/EmptyBlock:
74
+ Enabled: true
75
+ Lint/EmptyClass:
76
+ Enabled: true
77
+ Lint/EmptyInPattern:
78
+ Enabled: true
79
+ Lint/HashNewWithKeywordArgumentsAsDefault:
80
+ Enabled: true
81
+ Lint/IncompatibleIoSelectWithFiberScheduler:
82
+ Enabled: true
83
+ Lint/ItWithoutArgumentsInBlock:
84
+ Enabled: true
85
+ Lint/LambdaWithoutLiteralBlock:
86
+ Enabled: true
87
+ Lint/LiteralAssignmentInCondition:
88
+ Enabled: true
89
+ Lint/MixedCaseRange:
90
+ Enabled: true
91
+ Lint/NoReturnInBeginEndBlocks:
92
+ Enabled: true
93
+ Lint/NonAtomicFileOperation:
94
+ Enabled: true
95
+ Lint/NumberedParameterAssignment:
96
+ Enabled: true
97
+ Lint/NumericOperationWithConstantResult:
98
+ Enabled: true
99
+ Lint/OrAssignmentToConstant:
100
+ Enabled: true
101
+ Lint/RedundantDirGlobSort:
102
+ Enabled: true
103
+ Lint/RedundantRegexpQuantifiers:
104
+ Enabled: true
105
+ Lint/RefinementImportMethods:
106
+ Enabled: true
107
+ Lint/RequireRangeParentheses:
108
+ Enabled: true
109
+ Lint/RequireRelativeSelfPath:
110
+ Enabled: true
111
+ Lint/SymbolConversion:
112
+ Enabled: true
113
+ Lint/ToEnumArguments:
114
+ Enabled: true
115
+ Lint/TripleQuotes:
116
+ Enabled: true
117
+ Lint/UnescapedBracketInRegexp:
118
+ Enabled: true
119
+ Lint/UnexpectedBlockArity:
120
+ Enabled: true
121
+ Lint/UnmodifiedReduceAccumulator:
122
+ Enabled: true
123
+ Lint/UselessDefined:
124
+ Enabled: true
125
+ Lint/UselessNumericOperation:
126
+ Enabled: true
127
+ Lint/UselessRescue:
128
+ Enabled: true
129
+ Lint/UselessRuby2Keywords:
130
+ Enabled: true
131
+ Metrics/CollectionLiteralLength:
132
+ Enabled: true
133
+ Naming/BlockForwarding:
134
+ Enabled: true
135
+ Security/CompoundHash:
136
+ Enabled: true
137
+ Security/IoMethods:
138
+ Enabled: true
139
+ Style/AmbiguousEndlessMethodDefinition:
140
+ Enabled: true
141
+ Style/ArgumentsForwarding:
142
+ Enabled: true
143
+ Style/ArrayIntersect:
144
+ Enabled: true
145
+ Style/BitwisePredicate:
146
+ Enabled: true
147
+ Style/CollectionCompact:
148
+ Enabled: true
149
+ Style/CombinableDefined:
150
+ Enabled: true
151
+ Style/ComparableClamp:
152
+ Enabled: true
153
+ Style/ConcatArrayLiterals:
154
+ Enabled: true
155
+ Style/DataInheritance:
156
+ Enabled: true
157
+ Style/DigChain:
158
+ Enabled: true
159
+ Style/DirEmpty:
160
+ Enabled: true
161
+ Style/DocumentDynamicEvalDefinition:
162
+ Enabled: true
163
+ Style/EmptyHeredoc:
164
+ Enabled: true
165
+ Style/EndlessMethod:
166
+ Enabled: true
167
+ Style/EnvHome:
168
+ Enabled: true
169
+ Style/ExactRegexpMatch:
170
+ Enabled: true
171
+ Style/FetchEnvVar:
172
+ Enabled: true
173
+ Style/FileEmpty:
174
+ Enabled: true
175
+ Style/FileNull:
176
+ Enabled: true
177
+ Style/FileRead:
178
+ Enabled: true
179
+ Style/FileTouch:
180
+ Enabled: true
181
+ Style/FileWrite:
182
+ Enabled: true
183
+ Style/HashConversion:
184
+ Enabled: true
185
+ Style/HashExcept:
186
+ Enabled: true
187
+ Style/IfWithBooleanLiteralBranches:
188
+ Enabled: true
189
+ Style/InPatternThen:
190
+ Enabled: true
191
+ Style/KeywordArgumentsMerging:
192
+ Enabled: true
193
+ Style/MagicCommentFormat:
194
+ Enabled: true
195
+ Style/MapCompactWithConditionalBlock:
196
+ Enabled: true
197
+ Style/MapIntoArray:
198
+ Enabled: true
199
+ Style/MapToHash:
200
+ Enabled: true
201
+ Style/MapToSet:
202
+ Enabled: true
203
+ Style/MinMaxComparison:
204
+ Enabled: true
205
+ Style/MultilineInPatternThen:
206
+ Enabled: true
207
+ Style/NegatedIfElseCondition:
208
+ Enabled: true
209
+ Style/NestedFileDirname:
210
+ Enabled: true
211
+ Style/NilLambda:
212
+ Enabled: true
213
+ Style/NumberedParameters:
214
+ Enabled: true
215
+ Style/NumberedParametersLimit:
216
+ Enabled: true
217
+ Style/ObjectThen:
218
+ Enabled: true
219
+ Style/OpenStructUse:
220
+ Enabled: true
221
+ Style/OperatorMethodCall:
222
+ Enabled: true
223
+ Style/QuotedSymbols:
224
+ Enabled: true
225
+ Style/RedundantArgument:
226
+ Enabled: true
227
+ Style/RedundantArrayConstructor:
228
+ Enabled: true
229
+ Style/RedundantConstantBase:
230
+ Enabled: true
231
+ Style/RedundantCurrentDirectoryInPath:
232
+ Enabled: true
233
+ Style/RedundantDoubleSplatHashBraces:
234
+ Enabled: true
235
+ Style/RedundantEach:
236
+ Enabled: true
237
+ Style/RedundantFilterChain:
238
+ Enabled: true
239
+ Style/RedundantHeredocDelimiterQuotes:
240
+ Enabled: true
241
+ Style/RedundantInitialize:
242
+ Enabled: true
243
+ Style/RedundantInterpolationUnfreeze:
244
+ Enabled: true
245
+ Style/RedundantLineContinuation:
246
+ Enabled: true
247
+ Style/RedundantRegexpArgument:
248
+ Enabled: true
249
+ Style/RedundantRegexpConstructor:
250
+ Enabled: true
251
+ Style/RedundantSelfAssignmentBranch:
252
+ Enabled: true
253
+ Style/RedundantStringEscape:
254
+ Enabled: true
255
+ Style/ReturnNilInPredicateMethodDefinition:
256
+ Enabled: true
257
+ Style/SafeNavigationChainLength:
258
+ Enabled: true
259
+ Style/SelectByRegexp:
260
+ Enabled: true
261
+ Style/SendWithLiteralMethodName:
262
+ Enabled: true
263
+ Style/SingleLineDoEndBlock:
264
+ Enabled: true
265
+ Style/StringChars:
266
+ Enabled: true
267
+ Style/SuperArguments:
268
+ Enabled: true
269
+ Style/SuperWithArgsParentheses:
270
+ Enabled: true
271
+ Style/SwapValues:
272
+ Enabled: true
273
+ Style/YAMLFileRead:
274
+ Enabled: true
data/CHANGELOG.md ADDED
@@ -0,0 +1,86 @@
1
+ ## [0.6.20] - 2025-02-05
2
+ - modified CRUD diagram is backed up on update
3
+ - made last updated thread-safe
4
+
5
+ ## [0.6.19] - 2025-01-30
6
+ - Bug fixes
7
+
8
+ ## [0.6.11] - 2025-01-30
9
+ - Bug fixes related to activesupport
10
+
11
+ ## [0.6.10] - 2025-01-11
12
+ - Required ruby version up
13
+ - Change configuration file to yaml format
14
+
15
+ ## [0.6.9] - 2025-01-10
16
+ - refactoring gem dependency
17
+
18
+ ## [0.6.1] - 2025-01-09
19
+ - Rubocop support
20
+ - Change of configuration file name
21
+
22
+ ## [0.6.0] - 2025-01-08
23
+ - Support for select insert, select update, and select delete
24
+
25
+ ## [0.5.0] - 2025-01-07
26
+ - Multiple table support
27
+
28
+ ## [0.4.3] - 2025-01-07
29
+ - Refactored `crud_notifications.rb`.
30
+ - Modified to not execute the `setup` method in `tools.rb` when running commands.
31
+
32
+ ## [0.4.2] - 2025-01-06
33
+ - Fixed to update the last modifier of the CRUD file
34
+ - Changed CRUD file saving process to asynchronous processing
35
+
36
+ ## [0.4.1] - 2025-01-04
37
+ - Create the base directory if it does not exist during initialization
38
+
39
+ ## [0.4.0] - 2025-01-04
40
+ - Fixed to save only when cell values change
41
+ - Added sheet name to configuration file
42
+ - Added font name to configuration file
43
+ - Created test code
44
+ - Added initialization command
45
+ - Added configuration file creation command
46
+
47
+ ## [0.3.2] - 2025-01-01
48
+ - Multi-thread support
49
+
50
+ ## [0.3.1] - 2024-12-31
51
+ - Changed to rails-crud-tools
52
+
53
+ ## [0.3.0] - 2024-12-30
54
+ - Job support
55
+ - Added command to generate CRUD diagrams
56
+
57
+ ## [0.2.2] - 2024-12-25
58
+ - Added ON/OFF for SQL output
59
+ - Improved summary log
60
+
61
+ ## [0.2.1] - 2024-12-25
62
+ - Refactoring
63
+
64
+ ## [0.2.0] - 2024-12-25
65
+ - API support
66
+
67
+ ## [0.1.6] - 2024-12-25
68
+ - Improved logging
69
+
70
+ ## [0.1.5] - 2024-12-25
71
+ - Improved multi-threading
72
+
73
+ ## [0.1.4] - 2024-12-24
74
+ - Refactoring
75
+
76
+ ## [0.1.3] - 2024-12-24
77
+ - Bug fix
78
+
79
+ ## [0.1.2] - 2024-12-24
80
+ - Bug fix
81
+
82
+ ## [0.1.1] - 2024-12-24
83
+ - Preview release
84
+
85
+ ## [0.1.0] - 2024-12-23
86
+ - Initial release
data/Dockerfile ADDED
@@ -0,0 +1,10 @@
1
+ FROM ruby:3.1.4
2
+
3
+ RUN apt-get update -qq && apt-get install -y \
4
+ build-essential \
5
+ vim && \
6
+ rm -rf /var/lib/apt/lists/*
7
+
8
+ ENV EDITOR=vim
9
+
10
+ WORKDIR /root/app
data/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in rails-crud-tools.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+
12
+ gem "rubocop", "~> 1.21"
13
+
14
+ gem "rubyzip", "~> 2.4"
15
+
16
+ gem "rails"
17
+
18
+ gem "simplecov"
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 yamabiko
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 yhijikata
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,85 @@
1
+ # Rails::Crud::Tools
2
+
3
+ Welcome to Rails::Crud::Tools!
4
+ This gem provides a tool to automatically update CRUD diagrams as you interact with your application.
5
+ It simplifies logging and managing CRUD operations seamlessly within a Rails application.
6
+
7
+ ## Installation
8
+
9
+ Add the gem to the `development` group in your application's Gemfile by including the following lines:
10
+
11
+ ```ruby
12
+ gem 'rails-crud-tools'
13
+ ```
14
+
15
+ Then execute:
16
+
17
+ ```sh
18
+ $ bundle install
19
+ ```
20
+
21
+ If you are not using Bundler, you can install the gem manually:
22
+
23
+ ```sh
24
+ $ gem install rails-crud-tools
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ### Setup
30
+ This command will generate the **doc/crud.xlsx** file and the **.crudconfig.yml** file.
31
+
32
+ ```sh
33
+ $ bundle exec crud init
34
+ ```
35
+
36
+ .crudconfig.yml
37
+ ```yaml
38
+ enabled: true # Enables or disables the CRUD tools functionality
39
+ base_dir: doc # The base directory where the CRUD files will be stored
40
+ crud_file:
41
+ file_name: crud.xlsx # The name of the CRUD Excel file
42
+ sheet_name: CRUD # The name of the sheet in the CRUD Excel file
43
+ header_bg_color: 00FFCC # The background color for the header in the CRUD Excel file
44
+ font_name: Arial # The font name used in the CRUD Excel file
45
+ method_col: Verb # Column indicating the HTTP method
46
+ action_col: Controller#Action # Column indicating the controller and action
47
+ table_start_col: your_first_table # Column where the table starts
48
+ sql_logging_enabled: true # Enables or disables SQL logging for CRUD operations
49
+ ```
50
+
51
+ ### How It Works
52
+
53
+ Once integrated, the gem automatically tracks CRUD operations (Create, Read, Update, Delete) performed in your application.
54
+ The diagrams will update dynamically based on these operations, providing you with real-time insights into your application's data flow.
55
+
56
+ ### Automatic Backup
57
+
58
+ The gem automatically creates backup files when updating the CRUD diagram. When changes are made to the CRUD Excel file:
59
+
60
+ 1. A backup file is created with the `.bak` extension (e.g., `crud.xlsx.bak`)
61
+ 2. The backup is created before any modifications to the original file
62
+ 3. If an error occurs during the update, the backup file is used to restore the original file
63
+ 4. The backup file is automatically removed after a successful update
64
+
65
+ This ensures that your CRUD diagram data is protected against potential corruption or errors during updates.
66
+
67
+ ## Logs
68
+
69
+ Please refer to the log file at `log/crud.log`.
70
+
71
+ ## CRUD Macro Workbook
72
+
73
+ The `tools/crud_macro.xlsm` file is a macro-enabled workbook used for manipulating CRUD diagrams.
74
+ This workbook contains macros that help in managing and visualizing CRUD operations within your application.
75
+
76
+ ### Excel Macro Download
77
+
78
+ You can download the `crud_macro.xlsm` file from the following link:
79
+
80
+ [Download crud_macro.xlsm](https://github.com/YamabikoLab/rails-crud-tools/raw/main/tools/crud_macro.xlsm)
81
+
82
+ ## License
83
+
84
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
85
+
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,8 @@
1
+ version: '3.8'
2
+ services:
3
+ app:
4
+ build: .
5
+ container_name: rails-crud-tools
6
+ volumes:
7
+ - .:/root/app
8
+ tty: true
data/exe/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "rails/crud/tools"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/exe/crud ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ ENV["SKIP_CRUD_SETUP"] = "true"
5
+ require "rails/crud/tools/cli"
6
+
7
+ def display_help
8
+ puts <<~HELP
9
+ Usage: crud [command]
10
+
11
+ Commands:
12
+ init Initialize by generating CRUD and config files
13
+ gen crud Generate CRUD file
14
+ gen config Generate config file
15
+ help Display this help message
16
+ HELP
17
+ end
18
+
19
+ if ARGV.empty? || ARGV.include?("help")
20
+ display_help
21
+ elsif ARGV.include?("init")
22
+ RailsCrudTools::CLI.init
23
+ elsif ARGV == %w[gen crud]
24
+ RailsCrudTools::CLI.generate_crud_file
25
+ elsif ARGV == %w[gen config]
26
+ RailsCrudTools::CLI.generate_crud_config
27
+ else
28
+ puts "Unknown command: #{ARGV.join(" ")}"
29
+ display_help
30
+ end
data/exe/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here