rexer 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ae1d09f4a257d7ce265f52b7e8fd30c6d2891ca1fb756b9baeaaabe23f7cde1
4
- data.tar.gz: 37bdbb2c6181c0f37070f18abfe755077c222d784bd90444d18de62022f18f7a
3
+ metadata.gz: 8718806ffc0a827890d574a6396e88904059b58b5087b6ac09740da7bd39be42
4
+ data.tar.gz: b651388f82e418b597bbdf59016bf5a392b86593a462db1248eee5e6c101239f
5
5
  SHA512:
6
- metadata.gz: 1646431a82235a5b9be7e267676b3a3cb4b81761ff77d9b48cd87868ee59cb242c1e034c1dd1517c568da85e9ea621b57a7161be10388f986d74c22ce39e31a7
7
- data.tar.gz: 9730f772b7c5403adfa6e477e76a330b808d78e862cb3a032c3e516c21af85499a737d3661f55337b32d1776359749763b3a1a06095fa39657d419e3387ac99b
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
- [![asciicast](https://asciinema.org/a/672754.svg?9)](https://asciinema.org/a/672754)
19
+ [![demo](docs/demo-v0.8.0.gif)](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 install [ENV] # Install extensions for the specified environment
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 extensions for the specified environment
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 (master)
134
+ * bleuclair (support-propshaft)
128
135
  * redmine_issues_panel (master)
129
136
  * stable env
130
137
  * bleuclair (support-propshaft)
@@ -6,9 +6,7 @@ module Rexer
6
6
  end
7
7
 
8
8
  def call
9
- defined_envs.each do
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
@@ -25,11 +25,13 @@ module Rexer
25
25
  )
26
26
  end
27
27
 
28
- def env(env_name, &dsl)
29
- data = self.class.new(env_name).tap { _1.instance_eval(&dsl) }.to_data
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
- @plugins += data.plugins
32
- @themes += data.themes
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
@@ -1,3 +1,3 @@
1
1
  module Rexer
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
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.8.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-08-22 00:00:00.000000000 Z
11
+ date: 2024-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor