rexer 0.1.0 → 0.2.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/cli.rb +5 -0
- data/lib/rexer/commands/envs.rb +24 -0
- data/lib/rexer/extension/theme.rb +8 -1
- data/lib/rexer/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd717744bdbbcbb0470f21f2cf7c8345b4852901a7cd86088751ca971d07b5cf
|
4
|
+
data.tar.gz: ec7eac6cb58e0eed5ad5ad58de7479fc6223521497deb49728fb62a6fc2616dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9db79d00f966ffa25c12cc5978103169e796f621e7e5e7dc842225067dbce3dcded6453cd61caa15e13434725bfc74da416b9c196a287279627359de3db5e2d
|
7
|
+
data.tar.gz: 1d02b36a1baf9a5350d6729dd565f0cad4327a99c07ed28694d89f34253f2fcc8c08dd7bb68e978a4ace19c9ff3985d45a1041595c9c05dc8e40226484da5f84
|
data/README.md
CHANGED
@@ -9,13 +9,13 @@ It is mainly aimed at helping with the development of Redmine and its plugins, a
|
|
9
9
|
|
10
10
|
## Installation
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
```
|
13
|
+
gem install rexer
|
14
|
+
```
|
15
15
|
|
16
|
-
|
16
|
+
## Supported Redmine
|
17
17
|
|
18
|
-
|
18
|
+
Rexer is tested with Redmine v5.1 and trunk.
|
19
19
|
|
20
20
|
## Usage
|
21
21
|
|
@@ -55,6 +55,7 @@ This command uninstalls the extensions and deletes the `.extensions.lock` file.
|
|
55
55
|
$ rex
|
56
56
|
Commands:
|
57
57
|
rex help [COMMAND] # Describe available commands or one specific command
|
58
|
+
rex envs # Show the list of defined environments in .extensions.rb
|
58
59
|
rex install [ENV] # Install extensions for the specified environment
|
59
60
|
rex state # Show the current state of the installed extensions
|
60
61
|
rex switch [ENV] # Uninstall extensions for the currently installed environment and install extensions for the specified environment
|
@@ -125,20 +126,26 @@ end
|
|
125
126
|
|
126
127
|
## Developing
|
127
128
|
|
128
|
-
### Running
|
129
|
+
### Running tests
|
129
130
|
|
130
131
|
First, you need to build the docker image for the integration tests.
|
131
132
|
|
132
133
|
```
|
133
|
-
rake
|
134
|
+
rake test:prepare_integration
|
134
135
|
```
|
135
136
|
|
136
|
-
Then, you can run
|
137
|
+
Then, you can run all tests.
|
137
138
|
|
138
139
|
```
|
139
140
|
rake test
|
140
141
|
```
|
141
142
|
|
143
|
+
Or, you can only the integration tests as follows.
|
144
|
+
|
145
|
+
```
|
146
|
+
rake test:integration
|
147
|
+
```
|
148
|
+
|
142
149
|
### Formatting and Linting code
|
143
150
|
|
144
151
|
This project uses [Standard](https://github.com/standardrb/standard) for code formatting and linting. You can format and check the code by running the following commands.
|
data/lib/rexer/cli.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
module Rexer
|
2
|
+
module Commands
|
3
|
+
class Envs
|
4
|
+
def initialize
|
5
|
+
@definition = Definition.load_data
|
6
|
+
end
|
7
|
+
|
8
|
+
def call
|
9
|
+
defined_envs.each do
|
10
|
+
puts _1
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
attr_reader :definition
|
17
|
+
|
18
|
+
def defined_envs
|
19
|
+
all_envs = definition.plugins.map(&:env) + definition.themes.map(&:env)
|
20
|
+
all_envs.uniq
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -2,7 +2,14 @@ module Rexer
|
|
2
2
|
module Extension
|
3
3
|
module Theme
|
4
4
|
def self.dir
|
5
|
-
Pathname.
|
5
|
+
public_themes = Pathname.pwd.join("public", "themes")
|
6
|
+
|
7
|
+
if public_themes.exist?
|
8
|
+
# When Redmine version is v5.1 or older, public/themes is used.
|
9
|
+
public_themes
|
10
|
+
else
|
11
|
+
Pathname.new("themes")
|
12
|
+
end
|
6
13
|
end
|
7
14
|
|
8
15
|
class Base
|
data/lib/rexer/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rexer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katsuya Hidaka
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- exe/rex
|
70
70
|
- lib/rexer.rb
|
71
71
|
- lib/rexer/cli.rb
|
72
|
+
- lib/rexer/commands/envs.rb
|
72
73
|
- lib/rexer/commands/install.rb
|
73
74
|
- lib/rexer/commands/state.rb
|
74
75
|
- lib/rexer/commands/switch.rb
|