mona 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.ruby-version +1 -0
- data/.standard.yml +3 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +193 -0
- data/Rakefile +8 -0
- data/example/Gemfile +1 -0
- data/example/Gemfile.lock +51 -0
- data/example/Monafile.rb +16 -0
- data/example/bounded_contexts/cart/cart_app/Package.rb +11 -0
- data/example/bounded_contexts/cart/cart_app/bin/console +11 -0
- data/example/bounded_contexts/cart/cart_app/package/cart_app.rb +2 -0
- data/example/bounded_contexts/cart/cart_core/Package.rb +12 -0
- data/example/bounded_contexts/cart/cart_core/bin/console +9 -0
- data/example/bounded_contexts/cart/cart_core/package/cart_core.rb +2 -0
- data/example/bounded_contexts/cart/cart_datasets/Package.rb +10 -0
- data/example/bounded_contexts/cart/cart_datasets/bin/console +9 -0
- data/example/bounded_contexts/cart/cart_datasets/package/cart_datasets.rb +2 -0
- data/example/bounded_contexts/orders/orders_app/Package.rb +12 -0
- data/example/bounded_contexts/orders/orders_app/bin/console +9 -0
- data/example/bounded_contexts/orders/orders_app/package/orders_app.rb +2 -0
- data/example/bounded_contexts/orders/orders_core/Package.rb +13 -0
- data/example/bounded_contexts/orders/orders_core/bin/console +9 -0
- data/example/bounded_contexts/orders/orders_core/package/orders_core.rb +2 -0
- data/example/bounded_contexts/orders/orders_datasets/Package.rb +11 -0
- data/example/bounded_contexts/orders/orders_datasets/bin/console +9 -0
- data/example/bounded_contexts/orders/orders_datasets/package/orders_datasets.rb +2 -0
- data/example/bounded_contexts/orders/orders_query_api/Package.rb +13 -0
- data/example/bounded_contexts/orders/orders_query_api/bin/console +9 -0
- data/example/bounded_contexts/orders/orders_query_api/package/cart_query_api.rb +2 -0
- data/example/bounded_contexts/orders/paypal_client/Package.rb +9 -0
- data/example/bounded_contexts/orders/paypal_client/bin/console +9 -0
- data/example/bounded_contexts/orders/paypal_client/package/paypal_client.rb +2 -0
- data/example/bounded_contexts/shared/db_connection/Package.rb +10 -0
- data/example/bounded_contexts/shared/db_connection/bin/console +9 -0
- data/example/bounded_contexts/shared/db_connection/package/db_connection.rb +2 -0
- data/example/bounded_contexts/shared/test_utils/Package.rb +9 -0
- data/example/bounded_contexts/shared/test_utils/bin/console +9 -0
- data/example/bounded_contexts/shared/test_utils/package/test_utils.rb +2 -0
- data/example/bounded_contexts/storefront/storefront_app/Package.rb +11 -0
- data/example/bounded_contexts/storefront/storefront_app/bin/console +9 -0
- data/example/bounded_contexts/storefront/storefront_app/package/storefront_app.rb +2 -0
- data/example/bounded_contexts/storefront/storefront_core/Package.rb +11 -0
- data/example/bounded_contexts/storefront/storefront_core/bin/console +9 -0
- data/example/bounded_contexts/storefront/storefront_core/package/storefront_core.rb +2 -0
- data/example/bounded_contexts/storefront/storefront_datasets/Package.rb +11 -0
- data/example/bounded_contexts/storefront/storefront_datasets/bin/console +9 -0
- data/example/bounded_contexts/storefront/storefront_datasets/package/storefront_datasets.rb +2 -0
- data/example/configs/cart_app/default.yml +4 -0
- data/example/configs/cart_app/test.yml +3 -0
- data/example/configs/orders_app/default.yml +4 -0
- data/example/configs/orders_app/test.yml +2 -0
- data/exe/mona +15 -0
- data/lib/mona/config/loader.rb +74 -0
- data/lib/mona/config/manager.rb +20 -0
- data/lib/mona/config.rb +23 -0
- data/lib/mona/loaders/base.rb +63 -0
- data/lib/mona/loaders/zeitwerk.rb +77 -0
- data/lib/mona/package/builder.rb +27 -0
- data/lib/mona/package/dependency_bypasser.rb +43 -0
- data/lib/mona/package/factory.rb +95 -0
- data/lib/mona/package/find_root.rb +33 -0
- data/lib/mona/package/indexer.rb +30 -0
- data/lib/mona/package/initializer.rb +46 -0
- data/lib/mona/package/list.rb +10 -0
- data/lib/mona/package/repo.rb +63 -0
- data/lib/mona/package.rb +51 -0
- data/lib/mona/project/builder.rb +20 -0
- data/lib/mona/project/factory.rb +115 -0
- data/lib/mona/project/find_root.rb +31 -0
- data/lib/mona/project/initializer.rb +26 -0
- data/lib/mona/project.rb +43 -0
- data/lib/mona/task/manager.rb +36 -0
- data/lib/mona/task.rb +21 -0
- data/lib/mona/version.rb +5 -0
- data/lib/mona.rb +110 -0
- data/mona.gemspec +54 -0
- data/sig/mona.rbs +4 -0
- metadata +296 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8b1e6f0f8f39d50a6cd703a3993bf9e6cea636844d3a36cdf68cba3d76c3ec74
|
4
|
+
data.tar.gz: 517634680ebb18220bb99e16d336000df406d6733e95acf9144514052ed97c8a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c5e9ce28c8a4653502b0e3a86bfe4718c45c64ccb46c2236e0908453dc69d7ee43821270597d67dd5cc6c0f98991f898f74ea30d032a1957a8173c225ed5e298
|
7
|
+
data.tar.gz: 883ceeec918d447b575d689e164158bc434213729b0bfe8736e5516d357eda92f46b60b9a56ac5edb43d97b68cf153e6f947d224aaee8017a3cfbe943395ab50
|
data/.rspec
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.6
|
data/.standard.yml
ADDED
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -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 vocrsz@gmail.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/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2023 Nikita Kononov
|
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,193 @@
|
|
1
|
+
# Mona
|
2
|
+
|
3
|
+
Dependency manager to split and organize Ruby modules and namespaces into highlevel packages and manage relations between them
|
4
|
+
Next version of [Rdm gem](https://github.com/droidlabs/rdm)
|
5
|
+
|
6
|
+
## Idea
|
7
|
+
Main goal to implement the gem was to give developers an ability to keep a large codebase in the single git repository (monorepository) with easy access to:
|
8
|
+
1) require only needed dependencies
|
9
|
+
2) set up loading policies and inflection rules
|
10
|
+
3) manage configuration for different environments
|
11
|
+
4) run specific tasks on selected packages
|
12
|
+
|
13
|
+
## Example Project File Structure
|
14
|
+
```bash
|
15
|
+
├── Monafile.rb
|
16
|
+
├── Gemfile
|
17
|
+
├── Gemfile.lock
|
18
|
+
├── bounded_contexts
|
19
|
+
│ ├── orders
|
20
|
+
│ │ ├── bin
|
21
|
+
│ │ │ └── run
|
22
|
+
│ │ ├── package
|
23
|
+
│ │ │ ├── orders
|
24
|
+
│ │ │ │ └── export_orders.rb
|
25
|
+
│ │ │ │
|
26
|
+
│ │ │ └── orders.rb
|
27
|
+
│ │ │
|
28
|
+
│ │ └── Package.rb
|
29
|
+
│ │
|
30
|
+
│ ├── orders_db
|
31
|
+
│ │ ├── package
|
32
|
+
│ │ │ └── orders_db.rb
|
33
|
+
│ │ │
|
34
|
+
│ │ └── Package.rb
|
35
|
+
│ │
|
36
|
+
│ └── cart
|
37
|
+
│ ├── package
|
38
|
+
│ │ └── orders.rb
|
39
|
+
│ │
|
40
|
+
│ └── Package.rb
|
41
|
+
│
|
42
|
+
└── configs
|
43
|
+
├── orders_config
|
44
|
+
│ ├── default.yml
|
45
|
+
│ └── test.yml
|
46
|
+
│
|
47
|
+
└── api_client_config
|
48
|
+
├── default.yml
|
49
|
+
└── test.yml
|
50
|
+
```
|
51
|
+
|
52
|
+
## Package
|
53
|
+
The main Mona entity is the "package".
|
54
|
+
Package configuration is defined in Package.rb file.
|
55
|
+
Each package also have an 'entrypoint' file, which can be defined as package namespace module.
|
56
|
+
|
57
|
+
For example for orders package from project structure above entrypoint file could look the following way:
|
58
|
+
```ruby
|
59
|
+
module Orders
|
60
|
+
end
|
61
|
+
|
62
|
+
require 'some_gem'
|
63
|
+
|
64
|
+
SomeGem.example_initialization_for(__dir__)
|
65
|
+
```
|
66
|
+
|
67
|
+
You can declare dependencies rules which will determine what packages should be imported before you will initialize current one
|
68
|
+
```ruby
|
69
|
+
# ./bounded_contexts/orders/Package.rb
|
70
|
+
|
71
|
+
package do
|
72
|
+
name 'marketplace'
|
73
|
+
end
|
74
|
+
|
75
|
+
dependency do
|
76
|
+
import 'orders_db'
|
77
|
+
end
|
78
|
+
|
79
|
+
dependency :test do
|
80
|
+
import 'cart'
|
81
|
+
end
|
82
|
+
```
|
83
|
+
|
84
|
+
Having that configuration you can call the following code in your bin/run file
|
85
|
+
```bash
|
86
|
+
#!/usr/bin/env ruby
|
87
|
+
require 'bundler/setup'
|
88
|
+
require 'mona'
|
89
|
+
Mona.init_package
|
90
|
+
|
91
|
+
Orders::ExportOrders.new.call
|
92
|
+
```
|
93
|
+
|
94
|
+
Let's take a look at ```Mona.init_package``` command. That is the core feature of Mona and it does the following actions
|
95
|
+
1. Detect which package the caller file belongs to
|
96
|
+
You can also provide that file directly using 'from:' parameter
|
97
|
+
```Mona.init_package(from: __FILE__)```
|
98
|
+
or providing package name
|
99
|
+
```Mona.init_package('orders')```
|
100
|
+
2. Build dependencies tree: inside each project we have ```dependency do; end``` block which is provide us information which packages should be loaded before the current one
|
101
|
+
3. For each file in dependency tree:
|
102
|
+
* Using Project Code Loader to autoload/preload package classes and modules
|
103
|
+
* Call ```require``` for entrypoint file
|
104
|
+
|
105
|
+
## Configs
|
106
|
+
Mona Configs provides interface to declare and access key-value storage can be specified for certain environment
|
107
|
+
|
108
|
+
Instead of using ENV['SOME_VARIABLE_NAME'] in your ruby files you can set up Mona Configs and use env variables in your code like this:
|
109
|
+
```ruby
|
110
|
+
Mona.configs.api_client.some_variable_name
|
111
|
+
```
|
112
|
+
Let's define Mona Config for ```api_client```
|
113
|
+
```yml
|
114
|
+
# ./configs/api_client/default.yml
|
115
|
+
api_client:
|
116
|
+
some_variable_name: ENV['SOME_VARIABLE_NAME']
|
117
|
+
|
118
|
+
# ./configs/api_client/test.yml
|
119
|
+
api_client:
|
120
|
+
some_variable_name: ENV['SOME_VARIABLE_NAME'] + ENV['TEST_ENV_NUMBER']
|
121
|
+
```
|
122
|
+
|
123
|
+
Rdm looks up for configs in directory have been set in Monafile.rb file with ```set_configs_dir``` method
|
124
|
+
Each config has at least default.yml configuration which can be complemented with :env.yml files
|
125
|
+
Running ```Mona.init_package``` with specified :env will check if corresponding :env.yml file exists and merge it's values to the default configuration
|
126
|
+
|
127
|
+
## Project
|
128
|
+
The 2 main entities within Mona project are 'project' and 'package'
|
129
|
+
Project declaration stored in Monafile.rb and a parent directory of the file is considered as the project root
|
130
|
+
|
131
|
+
### Project Configuration File Example
|
132
|
+
|
133
|
+
```ruby
|
134
|
+
setup do |project|
|
135
|
+
# set up project.env
|
136
|
+
set_env(ENV['RUBY_ENV'] || raise('RUBY_ENV environment variable is not set'))
|
137
|
+
|
138
|
+
# set up directory to look up for project configs
|
139
|
+
set_configs_dir 'configs'
|
140
|
+
|
141
|
+
# set up directory to look up for packages
|
142
|
+
set_package_dirname 'package'
|
143
|
+
set_packages_lookup_subdir 'bounded_contexts'
|
144
|
+
|
145
|
+
# code loader configuration
|
146
|
+
set_loader :zeitwerk do
|
147
|
+
# file patterns to exclude in ruby autoloading
|
148
|
+
ignore "**/schema_migrations"
|
149
|
+
ignore "**/data_migrations"
|
150
|
+
|
151
|
+
# rules to overwrite default filename-to-class strategy
|
152
|
+
overwrite ->(kname) { kname.gsub(/Foo/) { _1.upcase } }
|
153
|
+
overwrite ->(kname) { kname.gsub('Baz', 'BazBar') }
|
154
|
+
|
155
|
+
# another way to define inflection rules
|
156
|
+
inflect "uuid_generator" => "UUIDGenerator"
|
157
|
+
end
|
158
|
+
|
159
|
+
# definition of the task to run rspec on the specific package
|
160
|
+
register_task :rspec_run, on: :package do |package, args|
|
161
|
+
Dir.chdir(package.root_path) do
|
162
|
+
require 'rspec'
|
163
|
+
|
164
|
+
status = RSpec::Core::Runner.run(args, $stderr, $stdout).to_i
|
165
|
+
|
166
|
+
exit(status)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
```
|
171
|
+
|
172
|
+
## Tasks
|
173
|
+
Mona tasks are an easy way to declare some procedures can be called on you packages/package
|
174
|
+
|
175
|
+
### Examples
|
176
|
+
```ruby
|
177
|
+
# Monafile.rb
|
178
|
+
setup do |project|
|
179
|
+
# ...
|
180
|
+
register_task :puts_package_name, on: :package do |package, args|
|
181
|
+
puts [package.name, args].inspect
|
182
|
+
end
|
183
|
+
# ...
|
184
|
+
end
|
185
|
+
```
|
186
|
+
|
187
|
+
You can call defined task that way:
|
188
|
+
```ruby
|
189
|
+
Mona.tasks.puts_package_name(
|
190
|
+
packages: Mona.packages.filter(name: "orders"),
|
191
|
+
args: [1, 2, 3]
|
192
|
+
)
|
193
|
+
```
|
data/Rakefile
ADDED
data/example/Gemfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
gem 'mona', path: '../'
|
@@ -0,0 +1,51 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
mona (0.1.13)
|
5
|
+
dry-auto_inject (~> 1.0.1)
|
6
|
+
dry-configurable (~> 1.0.1)
|
7
|
+
dry-container (~> 0.11.0)
|
8
|
+
dry-core (~> 1.0.0)
|
9
|
+
dry-system (~> 1.0.1)
|
10
|
+
sorbet-static-and-runtime (~> 0.5.11105)
|
11
|
+
thor
|
12
|
+
zeitwerk (~> 2.6.12)
|
13
|
+
|
14
|
+
GEM
|
15
|
+
specs:
|
16
|
+
concurrent-ruby (1.2.2)
|
17
|
+
dry-auto_inject (1.0.1)
|
18
|
+
dry-core (~> 1.0)
|
19
|
+
zeitwerk (~> 2.6)
|
20
|
+
dry-configurable (1.0.1)
|
21
|
+
dry-core (~> 1.0, < 2)
|
22
|
+
zeitwerk (~> 2.6)
|
23
|
+
dry-container (0.11.0)
|
24
|
+
concurrent-ruby (~> 1.0)
|
25
|
+
dry-core (1.0.0)
|
26
|
+
concurrent-ruby (~> 1.0)
|
27
|
+
zeitwerk (~> 2.6)
|
28
|
+
dry-inflector (1.0.0)
|
29
|
+
dry-system (1.0.1)
|
30
|
+
dry-auto_inject (~> 1.0, < 2)
|
31
|
+
dry-configurable (~> 1.0, < 2)
|
32
|
+
dry-core (~> 1.0, < 2)
|
33
|
+
dry-inflector (~> 1.0, < 2)
|
34
|
+
sorbet (0.5.11105)
|
35
|
+
sorbet-static (= 0.5.11105)
|
36
|
+
sorbet-runtime (0.5.11105)
|
37
|
+
sorbet-static (0.5.11105-x86_64-linux)
|
38
|
+
sorbet-static-and-runtime (0.5.11105)
|
39
|
+
sorbet (= 0.5.11105)
|
40
|
+
sorbet-runtime (= 0.5.11105)
|
41
|
+
thor (1.3.0)
|
42
|
+
zeitwerk (2.6.12)
|
43
|
+
|
44
|
+
PLATFORMS
|
45
|
+
x86_64-linux
|
46
|
+
|
47
|
+
DEPENDENCIES
|
48
|
+
mona!
|
49
|
+
|
50
|
+
BUNDLED WITH
|
51
|
+
2.4.20
|
data/example/Monafile.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
setup do |project|
|
2
|
+
set_env ->() { :test }
|
3
|
+
|
4
|
+
set_configs_dir 'configs'
|
5
|
+
set_package_dirname 'package'
|
6
|
+
|
7
|
+
set_loader :zeitwerk do |project|
|
8
|
+
inflect 'filename' => "FileName"
|
9
|
+
overwrite ->(klass_name) { klass_name.gsub(/Api/) { _1.upcase } }
|
10
|
+
ignore "**/schema_migrations"
|
11
|
+
end
|
12
|
+
|
13
|
+
register_task :print_package_name, on: :package do |package, args|
|
14
|
+
puts package.entrypoint_file
|
15
|
+
end
|
16
|
+
end
|