rexer 0.8.0 → 0.9.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/README.md +15 -8
- data/lib/rexer/commands/envs.rb +2 -4
- data/lib/rexer/definition/dsl.rb +6 -4
- data/lib/rexer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8718806ffc0a827890d574a6396e88904059b58b5087b6ac09740da7bd39be42
|
4
|
+
data.tar.gz: b651388f82e418b597bbdf59016bf5a392b86593a462db1248eee5e6c101239f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba24fbdc765bc378b6fd024c9e9215db5476c40cb77890da0468343374d79049d2bbb18d2a216377c71d4cc42d77a221c75493f3783f553521b29b27c8a1641d
|
7
|
+
data.tar.gz: fde4958f98ae92922e07a16b8b0564897a7449ab8f16b5102c9ca77389614290a7e5c59128af436843e028783094ba017af9ef59b4fd99250ca494f00845dff5
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ Rexer is a command-line tool for managing Redmine Extension (Plugin and Theme).
|
|
16
16
|
|
17
17
|
It is mainly aimed at helping with the development of Redmine and its plugins, allowing you to define extensions in a Ruby DSL and install, uninstall, update, and switch between different sets of the extensions.
|
18
18
|
|
19
|
-
[](https://asciinema.org/a/672754)
|
20
20
|
|
21
21
|
## What is Redmine Extension?
|
22
22
|
|
@@ -80,14 +80,19 @@ This command uninstalls the extensions and deletes the `.extensions.lock`.
|
|
80
80
|
```
|
81
81
|
$ rex
|
82
82
|
Commands:
|
83
|
-
rex help [COMMAND] # Describe available commands or one specific command
|
84
83
|
rex envs # Show the list of defined environments in .extensions.rb
|
85
|
-
rex
|
84
|
+
rex help [COMMAND] # Describe available commands or one specific command
|
85
|
+
rex init # Create a new .extensions.rb file
|
86
|
+
rex install [ENV] # Install the definitions in .extensions.rb for the specified environment
|
86
87
|
rex state # Show the current state of the installed extensions
|
87
|
-
rex switch [ENV] # Uninstall extensions for the currently installed environment and install
|
88
|
-
rex uninstall # Uninstall extensions for the currently installed environment
|
88
|
+
rex switch [ENV] # Uninstall extensions for the currently installed environment and install ext...
|
89
|
+
rex uninstall # Uninstall extensions for the currently installed environment based on the st...
|
89
90
|
rex update # Update extensions for the currently installed environment to the latest version
|
90
91
|
rex version # Show Rexer version
|
92
|
+
|
93
|
+
Options:
|
94
|
+
-v, [--verbose], [--no-verbose], [--skip-verbose] # Detailed output
|
95
|
+
-q, [--quiet], [--no-quiet], [--skip-quiet] # Minimal output
|
91
96
|
```
|
92
97
|
|
93
98
|
### rex install [ENV]
|
@@ -112,19 +117,21 @@ Loads `.extensions.lock` and updates the currently installed extensions to the l
|
|
112
117
|
You can define an environment and extensions for each environment using the `env ... do - end` block.
|
113
118
|
|
114
119
|
```ruby
|
115
|
-
theme :bleuclair, github: { repo: "farend/redmine_theme_farend_bleuclair" }
|
116
120
|
plugin :redmine_issues_panel, git: { url: "https://github.com/redmica/redmine_issues_panel" }
|
117
121
|
|
118
122
|
env :stable do
|
119
|
-
theme :bleuclair, github: { repo: "farend/redmine_theme_farend_bleuclair", branch: "support-propshaft" }
|
120
123
|
plugin :redmine_issues_panel, git: { url: "https://github.com/redmica/redmine_issues_panel", tag: "v1.0.2" }
|
121
124
|
end
|
125
|
+
|
126
|
+
env :default, :stable do
|
127
|
+
theme :bleuclair, github: { repo: "farend/redmine_theme_farend_bleuclair", branch: "support-propshaft" }
|
128
|
+
end
|
122
129
|
```
|
123
130
|
|
124
131
|
Definitions other than `env ... do - end` are implicitly defined as `env :default do - end`. Therefore, the above is resolved as follows:
|
125
132
|
|
126
133
|
* default env
|
127
|
-
* bleuclair (
|
134
|
+
* bleuclair (support-propshaft)
|
128
135
|
* redmine_issues_panel (master)
|
129
136
|
* stable env
|
130
137
|
* bleuclair (support-propshaft)
|
data/lib/rexer/commands/envs.rb
CHANGED
@@ -6,9 +6,7 @@ module Rexer
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def call
|
9
|
-
defined_envs
|
10
|
-
puts _1
|
11
|
-
end
|
9
|
+
puts(*defined_envs)
|
12
10
|
end
|
13
11
|
|
14
12
|
private
|
@@ -17,7 +15,7 @@ module Rexer
|
|
17
15
|
|
18
16
|
def defined_envs
|
19
17
|
all_envs = definition.plugins.map(&:env) + definition.themes.map(&:env)
|
20
|
-
all_envs.uniq
|
18
|
+
all_envs.uniq.sort
|
21
19
|
end
|
22
20
|
end
|
23
21
|
end
|
data/lib/rexer/definition/dsl.rb
CHANGED
@@ -25,11 +25,13 @@ module Rexer
|
|
25
25
|
)
|
26
26
|
end
|
27
27
|
|
28
|
-
def env(
|
29
|
-
|
28
|
+
def env(*env_names, &dsl)
|
29
|
+
env_names.each do |env_name|
|
30
|
+
data = self.class.new(env_name).tap { _1.instance_eval(&dsl) }.to_data
|
30
31
|
|
31
|
-
|
32
|
-
|
32
|
+
@plugins += data.plugins
|
33
|
+
@themes += data.themes
|
34
|
+
end
|
33
35
|
end
|
34
36
|
|
35
37
|
def to_data
|
data/lib/rexer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rexer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katsuya Hidaka
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|