monoz 0.6.0 → 0.6.2

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: c0013889b9898c959838d428124b04fa0854671d15eb123d76f73c6731df02c6
4
- data.tar.gz: 429449f0e251ca61ba961aa69158e44114d6950c92f173dcd8e8d5fa7249c5c2
3
+ metadata.gz: 20f6693b2502d0469442c1e496d17d7d3bb7a51287a49a2509df5b1206ad352d
4
+ data.tar.gz: 23547d272e57b4d68f5cf6be27b5a6fa45ad5fb902bdd3df3a2168b186b859b7
5
5
  SHA512:
6
- metadata.gz: 23fe065b566bb689a741df6b05b8f294f01c74ea146c6cb6870a7b55f18ef0cf28646cb2ae85a7da1cd125ffa1d425623457f94456fe0fc928602fa6745c518d
7
- data.tar.gz: ad78c15989fea4e158317f2cff8eb2f8e0fc84324e1c393a4c5359fb440ea3a97d6ebb06327d6fa88da1ad3b34a580d576a769e1efc1a811a105fd021db9ed69
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 Rubocop tests in all projects, you can use the following command:
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 exec rubocop
91
+ $ monoz bundle lock --add-platform x86_64-linux
92
92
 
93
- kiqr_core: bundle exec rubocop
94
- content_api: bundle exec rubocop
95
- Configuration file not found: /some/path/.rubocop.yml
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
- core_api: bundle exec rubocop
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
- ### Filtering projects
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Monoz
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.2"
3
3
  end
data/lib/monoz.rb CHANGED
@@ -4,6 +4,8 @@ require_relative "monoz/version"
4
4
 
5
5
  require "pathname"
6
6
  require "shellwords"
7
+ require "active_support"
8
+ require "active_support/core_ext/hash/indifferent_access"
7
9
 
8
10
  module Monoz
9
11
  module Errors
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.0
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: 2023-04-05 00:00:00.000000000 Z
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: '7'
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: '7'
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.4.10
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.