monoz 0.6.0 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -10
- data/lib/monoz/application.rb +0 -1
- data/lib/monoz/version.rb +1 -1
- data/lib/monoz.rb +2 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20f6693b2502d0469442c1e496d17d7d3bb7a51287a49a2509df5b1206ad352d
|
4
|
+
data.tar.gz: 23547d272e57b4d68f5cf6be27b5a6fa45ad5fb902bdd3df3a2168b186b859b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71aafaadf69ea13ec8e25e394b32e4ca57d4146edae3bd77184122498f767004ec5129cce7a5b39f490f7131394eff35d83b23601d5f84b12139e73130f3f33e
|
7
|
+
data.tar.gz: 5dd6cf23ea301bf5c784ae76bd4be4d30b3e004ff419936a36e66537a2a08a246ac1102cdd8e0b2bb00bd9c956685cb6692496c66eb65626d25c4f991251f466
|
data/README.md
CHANGED
@@ -85,19 +85,16 @@ Note that when you add a new dependency to a project, you'll need to run `monoz
|
|
85
85
|
|
86
86
|
#### Run other bundler commands
|
87
87
|
|
88
|
-
You can also run other bundler commands on all projects in the repository using the `monoz bundle` command followed by the desired arguments. For example, to run
|
88
|
+
You can also run other bundler commands on all projects in the repository using the `monoz bundle` command followed by the desired arguments. For example, to run `bundle lock --add-platform x86_64-linux` in all projects, you can use the following command:
|
89
89
|
|
90
90
|
```console
|
91
|
-
$ monoz bundle
|
91
|
+
$ monoz bundle lock --add-platform x86_64-linux
|
92
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
93
|
+
[example-core] bundle lock --add-platform x86_64-linux ✓
|
94
|
+
[example-com] bundle lock --add-platform x86_64-linux ✓
|
95
|
+
[example-admin] bundle lock --add-platform x86_64-linux ✓
|
96
96
|
|
97
|
-
|
98
|
-
kiqr_cloud: bundle exec rubocop ✓
|
99
|
-
|
100
|
-
Error: The command bundle exec rubocop failed to run in one or more project directories
|
97
|
+
The command ran successfully in all project directories without any errors.
|
101
98
|
```
|
102
99
|
|
103
100
|
This will execute the `bundle exec rubocop` command in each project directory, ensuring that all the necessary dependencies are installed and loaded for each project. Similarly, you can run other bundler commands such as `bundle install`, `bundle update`, and so on, by appending the desired arguments to the `monoz bundle` command.
|
@@ -172,7 +169,27 @@ example_com: bin/dev
|
|
172
169
|
23:41:06 css.1 | Done in 354ms.
|
173
170
|
```
|
174
171
|
|
175
|
-
|
172
|
+
## Actions
|
173
|
+
You can add custom actions to the `monoz.yml` file in the root directory of your project. Each action can be executed by running `monoz [ACTION]` on the command line.
|
174
|
+
|
175
|
+
To define a new action, add a new key under the actions section in the `monoz.yml` file. The key should be the name of the action, and its value should be a list of tasks to be executed.
|
176
|
+
|
177
|
+
Each task should have two keys: `in` and `run`. The `in` key specifies the projects in which the task should be executed. You can use the same filter syntax as when passing filters to the `--filter` option. The `run` key specifies the command to be executed.
|
178
|
+
|
179
|
+
Here's an example of a custom action that runs database migrations in all `apps`:
|
180
|
+
|
181
|
+
```yaml
|
182
|
+
actions:
|
183
|
+
migrate:
|
184
|
+
- in: apps
|
185
|
+
run: bin/rails db:migrate
|
186
|
+
```
|
187
|
+
|
188
|
+
To execute this action, simply run `monoz migrate` on the command line. This will run the `bin/rails db:migrate` command in all projects tagged as apps.
|
189
|
+
|
190
|
+
You can add as many custom actions as you like. Just make sure to follow the same format as in the example above.
|
191
|
+
|
192
|
+
## Filters
|
176
193
|
|
177
194
|
The `--filter` option in Monoz allows you to select certain projects based on specific criteria. This is useful if you only want to run a command on a specific subset of projects, rather than all of them. To use the `--filter` option, you simply specify a filter expression after the option. The filter expression is a comma-separated list of keywords that match the project names or tags in your Monoz configuration.
|
178
195
|
|
data/lib/monoz/application.rb
CHANGED
@@ -24,7 +24,6 @@ module Monoz
|
|
24
24
|
return help("bundle") if command.nil? || command.first == "help"
|
25
25
|
|
26
26
|
projects = Monoz.projects.order(:dependants)
|
27
|
-
Monoz::Services::BundleService.new(self).link_local_gems!(projects)
|
28
27
|
Monoz::Services::RunService.new(self).call(projects, "bundle", *command)
|
29
28
|
|
30
29
|
say "The command ran successfully in all project directories without any errors.", [:green]
|
data/lib/monoz/version.rb
CHANGED
data/lib/monoz.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: monoz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kjellberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: terminal-table
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
|
-
rubygems_version: 3.
|
102
|
+
rubygems_version: 3.5.6
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: Command line tool for managing ruby monorepos.
|