lagoon 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Appraisals +39 -0
- data/CHANGELOG.md +14 -2
- data/README.md +111 -146
- data/Rakefile +17 -3
- data/exe/lagoon +3 -3
- data/gemfiles/adapters.gemfile +15 -0
- data/gemfiles/rails_6.1.gemfile +23 -0
- data/gemfiles/rails_7.0.gemfile +23 -0
- data/gemfiles/rails_7.1.gemfile +23 -0
- data/gemfiles/rails_7.2.gemfile +23 -0
- data/gemfiles/rails_8.0.gemfile +23 -0
- data/gemfiles/rails_8.1.gemfile +23 -0
- data/lib/lagoon/analyzer/action_controller_analyzer.rb +76 -0
- data/lib/lagoon/analyzer/active_record_analyzer.rb +202 -0
- data/lib/lagoon/analyzer/ast/controller_scope_collector.rb +104 -0
- data/lib/lagoon/analyzer/ast/method_reference_visitor.rb +170 -0
- data/lib/lagoon/analyzer/ast_model_reference_analyzer.rb +44 -0
- data/lib/lagoon/analyzer/database_schema_analyzer.rb +83 -0
- data/lib/lagoon/cli.rb +109 -80
- data/lib/lagoon/configuration.rb +42 -6
- data/lib/lagoon/diagram/base.rb +48 -8
- data/lib/lagoon/diagram/controller_diagram.rb +10 -16
- data/lib/lagoon/diagram/controller_model_diagram.rb +28 -0
- data/lib/lagoon/diagram/er_diagram.rb +10 -16
- data/lib/lagoon/diagram/model_diagram.rb +13 -16
- data/lib/lagoon/errors.rb +9 -0
- data/lib/lagoon/options.rb +182 -0
- data/lib/lagoon/parser/application_class_filter.rb +47 -0
- data/lib/lagoon/parser/controller_model_parser.rb +196 -0
- data/lib/lagoon/parser/controller_parser.rb +37 -54
- data/lib/lagoon/parser/model_parser.rb +57 -112
- data/lib/lagoon/parser/schema_parser.rb +120 -67
- data/lib/lagoon/railtie.rb +1 -1
- data/lib/lagoon/renderer/base_renderer.rb +49 -19
- data/lib/lagoon/renderer/class_diagram_renderer.rb +37 -31
- data/lib/lagoon/renderer/controller_model_er_renderer.rb +47 -0
- data/lib/lagoon/renderer/er_diagram_renderer.rb +43 -42
- data/lib/lagoon/result.rb +22 -0
- data/lib/lagoon/version.rb +1 -1
- data/lib/lagoon.rb +70 -21
- data/lib/tasks/lagoon.rake +15 -7
- data/sig/lagoon.rbs +107 -0
- metadata +57 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7608b72eca2bd31b6580ce38174a7f3e1be9c562e0f1f626790783d2a8425493
|
|
4
|
+
data.tar.gz: cef98a67e5c8b0906f12da0a49cb00343d19b5e2cd50b45aad35369a5212e665
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a51572bf6c1d22840b7a78a85759a6fe8b37c25d8139b46ca4125328fcdc6441905cbc9540e73e445d75852bdda84cfa36ded562623c28d80e5940232249650c
|
|
7
|
+
data.tar.gz: 467721a37e4d66144a619e5366e07d5f1fbe18479e98e93e4e40da47ccc333fb2822ebf2f24c097c4914d92a9dbe720d02ff73abcac6e93873e07c918211122e
|
data/Appraisals
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
appraise 'rails-6.1' do
|
|
4
|
+
gem 'actionpack', '~> 6.1.0'
|
|
5
|
+
gem 'activerecord', '~> 6.1.0'
|
|
6
|
+
gem 'railties', '~> 6.1.0'
|
|
7
|
+
gem 'sqlite3', '~> 1.4'
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
appraise 'rails-7.0' do
|
|
11
|
+
gem 'actionpack', '~> 7.0.0'
|
|
12
|
+
gem 'activerecord', '~> 7.0.0'
|
|
13
|
+
gem 'railties', '~> 7.0.0'
|
|
14
|
+
gem 'sqlite3', '~> 1.4'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
appraise 'rails-7.1' do
|
|
18
|
+
gem 'actionpack', '~> 7.1.0'
|
|
19
|
+
gem 'activerecord', '~> 7.1.0'
|
|
20
|
+
gem 'railties', '~> 7.1.0'
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
appraise 'rails-7.2' do
|
|
24
|
+
gem 'actionpack', '~> 7.2.0'
|
|
25
|
+
gem 'activerecord', '~> 7.2.0'
|
|
26
|
+
gem 'railties', '~> 7.2.0'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
appraise 'rails-8.0' do
|
|
30
|
+
gem 'actionpack', '~> 8.0.0'
|
|
31
|
+
gem 'activerecord', '~> 8.0.0'
|
|
32
|
+
gem 'railties', '~> 8.0.0'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
appraise 'rails-8.1' do
|
|
36
|
+
gem 'actionpack', '~> 8.1.0'
|
|
37
|
+
gem 'activerecord', '~> 8.1.0'
|
|
38
|
+
gem 'railties', '~> 8.1.0'
|
|
39
|
+
end
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Unreleased
|
|
9
9
|
|
|
10
|
-
-
|
|
10
|
+
## 0.2.0 - 2026-07-16
|
|
11
|
+
|
|
12
|
+
- Added structured generation results with content, warnings, and counts.
|
|
13
|
+
- Added application-only discovery, strict analysis, configurable current-principal helpers, multi-database ER generation, and atomic output.
|
|
14
|
+
- Fixed all declared CLI and Rake options, including brief, exclude/specify, all-models, hide-magic, and hide-types.
|
|
15
|
+
- Fixed ER relationship direction and cardinality using actual foreign key, primary key, unique index, and nullability metadata.
|
|
16
|
+
- Changed controller-model output to UML dependency relationships and expanded AST analysis for callbacks, helper methods, namespaces, local variables, and association chains.
|
|
17
|
+
- Added Prism as a runtime dependency while retaining lazy AST loading.
|
|
18
|
+
- Added Ruby/Rails/adapter CI matrices, end-to-end Rails coverage, Mermaid parser validation, package smoke tests, linting, and RBS validation.
|
|
19
|
+
|
|
20
|
+
## 0.1.0 - 2025-12-17
|
|
21
|
+
|
|
22
|
+
- Initial release
|
data/README.md
CHANGED
|
@@ -1,229 +1,194 @@
|
|
|
1
1
|
# Lagoon
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Lagoon is a Ruby gem that generates Mermaid class diagrams and ER diagrams from Rails applications, inspired by [RailRoady](https://github.com/preston/railroady). Unlike RailRoady, which outputs DOT/SVG format and depends on Graphviz, Lagoon outputs Mermaid syntax that can be directly displayed on GitHub, GitLab, Notion, and other platforms that support Mermaid.
|
|
3
|
+
Lagoon generates deterministic Mermaid diagrams from Rails models, controllers, and database metadata.
|
|
6
4
|
|
|
7
5
|
## Features
|
|
8
6
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
7
|
+
- Active Record model class diagrams with attributes, declared methods, associations, inheritance, STI handling, and polymorphic/through labels
|
|
8
|
+
- Controller class diagrams with declared public, protected, and private methods
|
|
9
|
+
- ER diagrams based on actual primary keys, foreign keys, unique indexes, nullability, and one-to-one constraints
|
|
10
|
+
- Controller-to-model dependency diagrams based on Prism AST analysis
|
|
11
|
+
- Application-only discovery by default, with explicit opt-in for engine and gem classes
|
|
12
|
+
- Atomic file output and structured results containing content, warnings, and counts
|
|
13
|
+
- No external diagram-rendering binary required; Lagoon writes Mermaid source directly
|
|
14
|
+
|
|
15
|
+
Lagoon depends on the Ruby gems Active Support, Prism, and Thor. A Rails application supplies Active Record and Action Pack.
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
19
|
-
Add
|
|
19
|
+
Add Lagoon to your application's Gemfile:
|
|
20
20
|
|
|
21
21
|
```ruby
|
|
22
|
-
gem
|
|
22
|
+
gem "lagoon"
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Then run:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
bundle install
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
## CLI
|
|
32
|
+
|
|
33
|
+
Run commands from the Rails application root, or pass `--root PATH`:
|
|
32
34
|
|
|
33
35
|
```bash
|
|
34
|
-
|
|
36
|
+
lagoon models -o doc/models.mermaid
|
|
37
|
+
lagoon controllers -o doc/controllers.mermaid
|
|
38
|
+
lagoon er -o doc/er_diagram.mermaid
|
|
39
|
+
lagoon controller_models -o doc/controller_models.mermaid
|
|
40
|
+
lagoon all -o doc/diagrams
|
|
35
41
|
```
|
|
36
42
|
|
|
37
|
-
|
|
43
|
+
For `all`, `--output` is a directory. Lagoon writes `models.mermaid`, `controllers.mermaid`, `er_diagram.mermaid`, and `controller_models.mermaid` inside it.
|
|
38
44
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
Lagoon provides a CLI tool for generating diagrams:
|
|
45
|
+
Useful model options:
|
|
42
46
|
|
|
43
47
|
```bash
|
|
44
|
-
|
|
45
|
-
lagoon models
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
lagoon
|
|
49
|
-
|
|
50
|
-
# Generate ER diagram
|
|
51
|
-
lagoon er -o doc/er_diagram.mermaid
|
|
48
|
+
lagoon models --brief
|
|
49
|
+
lagoon models --exclude Audit Event --specify User Post
|
|
50
|
+
lagoon models --all-models --show-belongs-to --hide-through
|
|
51
|
+
lagoon models --hide-magic --hide-types
|
|
52
|
+
lagoon models --direction LR --no-inheritance
|
|
53
|
+
```
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
- `--brief` hides attributes and methods.
|
|
56
|
+
- `--all-models` includes loaded models outside `app/models`; the default is application models only.
|
|
57
|
+
- `--hide-magic` hides `id`, `created_at`, and `updated_at`. They are shown by default.
|
|
58
|
+
- `--all-columns` overrides `--hide-magic`.
|
|
59
|
+
- `--hide-types` keeps attribute names but omits their types.
|
|
55
60
|
|
|
56
|
-
|
|
57
|
-
lagoon models -b -i
|
|
61
|
+
Controller and ER filtering use the same `--exclude` and `--specify` contract. `--strict` stops at the first analysis error; otherwise supported per-item failures are returned as warnings and generation continues. Use `--verbose` to print warnings and detailed CLI errors.
|
|
58
62
|
|
|
59
|
-
|
|
60
|
-
lagoon models -d LR # Left to Right (default: TB - Top to Bottom)
|
|
63
|
+
Controller commands also accept `--all-controllers` to include loaded controllers outside `app/controllers`.
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
lagoon help models
|
|
64
|
-
```
|
|
65
|
+
Direction (`TB`, `BT`, `LR`, or `RL`) is exposed only for class-based diagrams: models, controllers, controller-model dependencies, and `all`.
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
## Rake tasks
|
|
67
68
|
|
|
68
|
-
|
|
69
|
+
The Railtie provides:
|
|
69
70
|
|
|
70
71
|
```bash
|
|
71
|
-
# Generate all diagrams
|
|
72
72
|
rake mermaid:all
|
|
73
|
-
|
|
74
|
-
# Generate specific diagrams
|
|
75
73
|
rake mermaid:models
|
|
76
74
|
rake mermaid:controllers
|
|
77
75
|
rake mermaid:er
|
|
78
|
-
|
|
79
|
-
# Generate brief diagrams
|
|
76
|
+
rake mermaid:controller_models
|
|
80
77
|
rake mermaid:brief
|
|
81
78
|
```
|
|
82
79
|
|
|
83
|
-
|
|
80
|
+
`mermaid:brief` passes the same normalized `brief: true` option used by the CLI.
|
|
84
81
|
|
|
85
|
-
|
|
82
|
+
## Programmatic API
|
|
86
83
|
|
|
87
84
|
```ruby
|
|
88
|
-
require
|
|
85
|
+
require "lagoon"
|
|
89
86
|
|
|
90
|
-
# Configure Lagoon
|
|
91
87
|
Lagoon.configure do |config|
|
|
92
88
|
config.output_dir = "doc/diagrams"
|
|
93
89
|
config.diagram_direction = "LR"
|
|
94
90
|
config.show_attributes = true
|
|
95
91
|
config.show_methods = false
|
|
96
92
|
config.include_inheritance = true
|
|
97
|
-
config.exclude_models = ["
|
|
93
|
+
config.exclude_models = ["Audit"]
|
|
94
|
+
config.exclude_controllers = ["HealthController"]
|
|
95
|
+
config.exclude_tables = ["solid_queue_jobs"]
|
|
96
|
+
config.internal_tables = %w[schema_migrations ar_internal_metadata]
|
|
97
|
+
config.helper_models = {
|
|
98
|
+
"current_user" => "User",
|
|
99
|
+
"current_account" => "Account"
|
|
100
|
+
}
|
|
101
|
+
config.strict = false
|
|
98
102
|
end
|
|
99
103
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
result = Lagoon.generate_model_diagram(
|
|
105
|
+
output: "doc/models.mermaid",
|
|
106
|
+
show_methods: true,
|
|
107
|
+
show_belongs_to: true
|
|
108
|
+
)
|
|
104
109
|
|
|
105
|
-
|
|
106
|
-
|
|
110
|
+
puts result.path
|
|
111
|
+
puts result.content
|
|
112
|
+
warn result.warnings.join("\n")
|
|
113
|
+
p result.counts
|
|
107
114
|
```
|
|
108
115
|
|
|
109
|
-
|
|
116
|
+
Every generator returns `Lagoon::Result` with `path`, `content`, `warnings`, and `counts`. `Result#to_s` and `Result#to_path` return the output path.
|
|
110
117
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
```ruby
|
|
114
|
-
Lagoon.configure do |config|
|
|
115
|
-
config.output_dir = "doc/diagrams" # Default: "doc/diagrams"
|
|
116
|
-
config.diagram_direction = "TB" # Default: "TB" (Top to Bottom)
|
|
117
|
-
# Options: "TB", "BT", "LR", "RL"
|
|
118
|
-
config.show_attributes = true # Default: true
|
|
119
|
-
config.show_methods = false # Default: false
|
|
120
|
-
config.include_inheritance = true # Default: true
|
|
121
|
-
config.exclude_models = [] # Default: []
|
|
122
|
-
config.exclude_controllers = [] # Default: []
|
|
123
|
-
config.diagram_format = :class_diagram # Default: :class_diagram
|
|
124
|
-
# Options: :class_diagram, :er_diagram
|
|
125
|
-
end
|
|
126
|
-
```
|
|
118
|
+
Configuration is snapshotted for each generation, so per-call options do not mutate global state. Unknown option keys and invalid directions raise `Lagoon::ConfigurationError`. Use `Lagoon.reset_configuration!` to restore defaults.
|
|
127
119
|
|
|
128
|
-
|
|
120
|
+
`Lagoon.generate_all(output: "doc/diagrams", brief: true)` eager-loads Rails once and returns a hash of four `Lagoon::Result` objects.
|
|
129
121
|
|
|
130
|
-
|
|
122
|
+
### Multiple databases
|
|
131
123
|
|
|
132
|
-
|
|
124
|
+
ER generation discovers the Active Record connection pools. Explicit connections can also be supplied:
|
|
133
125
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
- `--hide-magic`: Hide magic fields (id, timestamps)
|
|
143
|
-
- `--hide-types`: Hide attribute types
|
|
126
|
+
```ruby
|
|
127
|
+
Lagoon.generate_er_diagram(
|
|
128
|
+
connections: {
|
|
129
|
+
primary: ActiveRecord::Base.connection,
|
|
130
|
+
archive: ArchiveRecord.connection
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
```
|
|
144
134
|
|
|
145
|
-
|
|
135
|
+
When more than one connection is used, entity identifiers are qualified with the connection name.
|
|
146
136
|
|
|
147
|
-
|
|
148
|
-
- `-i, --inheritance`: Include inheritance relationships
|
|
149
|
-
- `-e, --exclude`: Exclude specified controllers
|
|
150
|
-
- `-s, --specify`: Only process specified controllers
|
|
151
|
-
- `--hide-public`: Hide public methods
|
|
152
|
-
- `--hide-protected`: Hide protected methods
|
|
153
|
-
- `--hide-private`: Hide private methods
|
|
137
|
+
## Output semantics
|
|
154
138
|
|
|
155
|
-
|
|
139
|
+
ER relationships are oriented from the referenced table to the table containing the foreign key. For a required, non-unique `posts.user_id` foreign key, Lagoon emits:
|
|
156
140
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
141
|
+
```mermaid
|
|
142
|
+
erDiagram
|
|
143
|
+
USERS ||..o{ POSTS : "has many"
|
|
144
|
+
```
|
|
161
145
|
|
|
162
|
-
|
|
146
|
+
The dotted line denotes a non-identifying relationship. A foreign key that is part of the child's primary key is emitted as identifying; nullable and unique foreign keys adjust both cardinalities.
|
|
163
147
|
|
|
164
|
-
|
|
148
|
+
Controller-model output uses UML dependencies rather than ER cardinalities:
|
|
165
149
|
|
|
166
150
|
```mermaid
|
|
167
151
|
classDiagram
|
|
168
152
|
direction TB
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
+Integer id
|
|
172
|
-
+String name
|
|
173
|
-
+String email
|
|
174
|
-
+DateTime created_at
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
class Post {
|
|
178
|
-
+Integer id
|
|
179
|
-
+String title
|
|
180
|
-
+Text content
|
|
181
|
-
+Integer user_id
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
User "1" --> "*" Post : has_many posts
|
|
153
|
+
UsersController ..> User : index, show
|
|
154
|
+
UsersController ..> Post : show
|
|
185
155
|
```
|
|
186
156
|
|
|
187
|
-
|
|
157
|
+
## Controller-model analysis
|
|
188
158
|
|
|
189
|
-
|
|
190
|
-
erDiagram
|
|
191
|
-
USER ||--o{ POST : "has many"
|
|
192
|
-
|
|
193
|
-
USER {
|
|
194
|
-
int id PK
|
|
195
|
-
string name
|
|
196
|
-
string email
|
|
197
|
-
datetime created_at
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
POST {
|
|
201
|
-
int id PK
|
|
202
|
-
string title
|
|
203
|
-
text content
|
|
204
|
-
int user_id FK
|
|
205
|
-
}
|
|
206
|
-
```
|
|
159
|
+
Lagoon validates references against loaded `ActiveRecord::Base.descendants` and association reflection. It recognizes:
|
|
207
160
|
|
|
208
|
-
|
|
161
|
+
- direct and namespaced constants, including acronym names
|
|
162
|
+
- standalone model constants
|
|
163
|
+
- instance and local variables
|
|
164
|
+
- block parameters and chained associations
|
|
165
|
+
- `before_action` methods
|
|
166
|
+
- argument-free controller helper/private method calls
|
|
167
|
+
- configurable current-principal helpers such as `current_user`
|
|
168
|
+
- inherited actions and source locations outside the conventional controller path
|
|
209
169
|
|
|
210
|
-
-
|
|
211
|
-
- Rails >= 6.0 (for Rails integration)
|
|
170
|
+
It deliberately ignores arbitrary calls such as `@user.save` and non-model constants such as service objects. Dynamic constantization, metaprogrammed references, and model use hidden behind service objects remain outside static analysis.
|
|
212
171
|
|
|
213
|
-
##
|
|
172
|
+
## Requirements
|
|
214
173
|
|
|
215
|
-
|
|
174
|
+
- Ruby 3.2 or newer
|
|
175
|
+
- Rails 6.1 or newer
|
|
216
176
|
|
|
217
|
-
|
|
177
|
+
CI exercises Ruby 3.2 through 4.0, Rails 6.1 through 8.1, and SQLite/PostgreSQL/MySQL schema integrations.
|
|
218
178
|
|
|
219
|
-
##
|
|
179
|
+
## Development
|
|
220
180
|
|
|
221
|
-
|
|
181
|
+
```bash
|
|
182
|
+
bundle install
|
|
183
|
+
bundle exec rake
|
|
184
|
+
```
|
|
222
185
|
|
|
223
|
-
|
|
186
|
+
The default task runs RSpec (including a minimal Rails end-to-end fixture), Ruby syntax compilation, all RuboCop checks, RBS validation, and gem build. Mermaid CLI parsing runs when `MERMAID_CLI` is set, for example:
|
|
224
187
|
|
|
225
|
-
|
|
188
|
+
```bash
|
|
189
|
+
MERMAID_CLI=mmdc bundle exec rspec spec/integration/mermaid_syntax_spec.rb
|
|
190
|
+
```
|
|
226
191
|
|
|
227
|
-
##
|
|
192
|
+
## License
|
|
228
193
|
|
|
229
|
-
Lagoon is
|
|
194
|
+
Lagoon is available under the [MIT License](LICENSE.txt).
|
data/Rakefile
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
3
|
+
require 'bundler/gem_tasks'
|
|
4
|
+
require 'rspec/core/rake_task'
|
|
5
|
+
require 'rubocop/rake_task'
|
|
5
6
|
|
|
6
7
|
RSpec::Core::RakeTask.new(:spec)
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
RuboCop::RakeTask.new
|
|
10
|
+
|
|
11
|
+
desc 'Validate RBS signatures'
|
|
12
|
+
task 'rbs:validate' do
|
|
13
|
+
sh 'bundle exec rbs -I sig validate'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
desc 'Compile every Ruby file'
|
|
17
|
+
task :syntax do
|
|
18
|
+
ruby_files = FileList['lib/**/*.rb', 'exe/*', 'spec/**/*.rb', '*.gemspec', 'Rakefile']
|
|
19
|
+
ruby_files.each { |file| RubyVM::InstructionSequence.compile_file(file) }
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
task default: %i[spec syntax rubocop rbs:validate build]
|
data/exe/lagoon
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
source 'https://rubygems.org'
|
|
4
|
+
|
|
5
|
+
gem 'actionpack', '>= 6.1'
|
|
6
|
+
gem 'activerecord', '>= 6.1'
|
|
7
|
+
gem 'mysql2', '~> 0.5'
|
|
8
|
+
gem 'pg', '~> 1.5'
|
|
9
|
+
gem 'railties', '>= 6.1'
|
|
10
|
+
gem 'rake', '~> 13.0'
|
|
11
|
+
gem 'rspec', '~> 3.0'
|
|
12
|
+
gem 'simplecov', '~> 0.22', require: false
|
|
13
|
+
gem 'sqlite3', '>= 1.4'
|
|
14
|
+
|
|
15
|
+
gemspec path: '../'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file was generated by Appraisal
|
|
4
|
+
|
|
5
|
+
source 'https://rubygems.org'
|
|
6
|
+
|
|
7
|
+
gem 'actionpack', '~> 6.1.0'
|
|
8
|
+
gem 'activerecord', '~> 6.1.0'
|
|
9
|
+
gem 'irb'
|
|
10
|
+
gem 'railties', '~> 6.1.0'
|
|
11
|
+
gem 'rake', '~> 13.0'
|
|
12
|
+
gem 'rspec', '~> 3.0'
|
|
13
|
+
gem 'sqlite3', '~> 1.4'
|
|
14
|
+
|
|
15
|
+
group :development, :test do
|
|
16
|
+
gem 'appraisal', '~> 2.5'
|
|
17
|
+
gem 'mutex_m'
|
|
18
|
+
gem 'rbs', '>= 3.0'
|
|
19
|
+
gem 'rubocop', '>= 1.70', require: false
|
|
20
|
+
gem 'simplecov', '~> 0.22', require: false
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
gemspec path: '../'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file was generated by Appraisal
|
|
4
|
+
|
|
5
|
+
source 'https://rubygems.org'
|
|
6
|
+
|
|
7
|
+
gem 'actionpack', '~> 7.0.0'
|
|
8
|
+
gem 'activerecord', '~> 7.0.0'
|
|
9
|
+
gem 'irb'
|
|
10
|
+
gem 'railties', '~> 7.0.0'
|
|
11
|
+
gem 'rake', '~> 13.0'
|
|
12
|
+
gem 'rspec', '~> 3.0'
|
|
13
|
+
gem 'sqlite3', '~> 1.4'
|
|
14
|
+
|
|
15
|
+
group :development, :test do
|
|
16
|
+
gem 'appraisal', '~> 2.5'
|
|
17
|
+
gem 'mutex_m'
|
|
18
|
+
gem 'rbs', '>= 3.0'
|
|
19
|
+
gem 'rubocop', '>= 1.70', require: false
|
|
20
|
+
gem 'simplecov', '~> 0.22', require: false
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
gemspec path: '../'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file was generated by Appraisal
|
|
4
|
+
|
|
5
|
+
source 'https://rubygems.org'
|
|
6
|
+
|
|
7
|
+
gem 'actionpack', '~> 7.1.0'
|
|
8
|
+
gem 'activerecord', '~> 7.1.0'
|
|
9
|
+
gem 'irb'
|
|
10
|
+
gem 'railties', '~> 7.1.0'
|
|
11
|
+
gem 'rake', '~> 13.0'
|
|
12
|
+
gem 'rspec', '~> 3.0'
|
|
13
|
+
gem 'sqlite3', '>= 1.4'
|
|
14
|
+
|
|
15
|
+
group :development, :test do
|
|
16
|
+
gem 'appraisal', '~> 2.5'
|
|
17
|
+
gem 'mutex_m'
|
|
18
|
+
gem 'rbs', '>= 3.0'
|
|
19
|
+
gem 'rubocop', '>= 1.70', require: false
|
|
20
|
+
gem 'simplecov', '~> 0.22', require: false
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
gemspec path: '../'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file was generated by Appraisal
|
|
4
|
+
|
|
5
|
+
source 'https://rubygems.org'
|
|
6
|
+
|
|
7
|
+
gem 'actionpack', '~> 7.2.0'
|
|
8
|
+
gem 'activerecord', '~> 7.2.0'
|
|
9
|
+
gem 'irb'
|
|
10
|
+
gem 'railties', '~> 7.2.0'
|
|
11
|
+
gem 'rake', '~> 13.0'
|
|
12
|
+
gem 'rspec', '~> 3.0'
|
|
13
|
+
gem 'sqlite3', '>= 1.4'
|
|
14
|
+
|
|
15
|
+
group :development, :test do
|
|
16
|
+
gem 'appraisal', '~> 2.5'
|
|
17
|
+
gem 'mutex_m'
|
|
18
|
+
gem 'rbs', '>= 3.0'
|
|
19
|
+
gem 'rubocop', '>= 1.70', require: false
|
|
20
|
+
gem 'simplecov', '~> 0.22', require: false
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
gemspec path: '../'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file was generated by Appraisal
|
|
4
|
+
|
|
5
|
+
source 'https://rubygems.org'
|
|
6
|
+
|
|
7
|
+
gem 'actionpack', '~> 8.0.0'
|
|
8
|
+
gem 'activerecord', '~> 8.0.0'
|
|
9
|
+
gem 'irb'
|
|
10
|
+
gem 'railties', '~> 8.0.0'
|
|
11
|
+
gem 'rake', '~> 13.0'
|
|
12
|
+
gem 'rspec', '~> 3.0'
|
|
13
|
+
gem 'sqlite3', '>= 1.4'
|
|
14
|
+
|
|
15
|
+
group :development, :test do
|
|
16
|
+
gem 'appraisal', '~> 2.5'
|
|
17
|
+
gem 'mutex_m'
|
|
18
|
+
gem 'rbs', '>= 3.0'
|
|
19
|
+
gem 'rubocop', '>= 1.70', require: false
|
|
20
|
+
gem 'simplecov', '~> 0.22', require: false
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
gemspec path: '../'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file was generated by Appraisal
|
|
4
|
+
|
|
5
|
+
source 'https://rubygems.org'
|
|
6
|
+
|
|
7
|
+
gem 'actionpack', '~> 8.1.0'
|
|
8
|
+
gem 'activerecord', '~> 8.1.0'
|
|
9
|
+
gem 'irb'
|
|
10
|
+
gem 'railties', '~> 8.1.0'
|
|
11
|
+
gem 'rake', '~> 13.0'
|
|
12
|
+
gem 'rspec', '~> 3.0'
|
|
13
|
+
gem 'sqlite3', '>= 1.4'
|
|
14
|
+
|
|
15
|
+
group :development, :test do
|
|
16
|
+
gem 'appraisal', '~> 2.5'
|
|
17
|
+
gem 'mutex_m'
|
|
18
|
+
gem 'rbs', '>= 3.0'
|
|
19
|
+
gem 'rubocop', '>= 1.70', require: false
|
|
20
|
+
gem 'simplecov', '~> 0.22', require: false
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
gemspec path: '../'
|