rexer 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/rexer/cli.rb +2 -1
- data/lib/rexer/source/git.rb +17 -4
- data/lib/rexer/source/github.rb +5 -0
- data/lib/rexer/version.rb +1 -1
- data/lib/rexer.rb +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9226515e3b9599a9915d140c03d8153f1e562409b5c2d8d3f28501d547511ffc
|
4
|
+
data.tar.gz: 8aa2e357ea18131f0fdef8a00276a891f8dec119ad0c9171524384ac4a6119f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 002633010dcb32959079688a3510edda19e93784145b47b5ca60cf48749348d36f63691c94df30568b8a1fbc3acf63940a832ffa9afc80b0325a430398e9b122
|
7
|
+
data.tar.gz: 236685fa7ad6d2760831d2a416b81a1e2e23efb588399e83134e81dbcf06fa3a6b83351f383eae4f59adf3e8aae7c772ed70b6fbe3066004fa92664fca88ecc3
|
data/README.md
CHANGED
data/lib/rexer/cli.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "thor"
|
2
2
|
require "dotenv"
|
3
3
|
require "erb"
|
4
|
+
require "active_support/core_ext/object/blank"
|
4
5
|
|
5
6
|
module Rexer
|
6
7
|
class Cli < Thor
|
@@ -34,7 +35,7 @@ module Rexer
|
|
34
35
|
Commands::Switch.new.call(env&.to_sym)
|
35
36
|
end
|
36
37
|
|
37
|
-
desc "update", "Update extensions for the currently installed environment to the latest version"
|
38
|
+
desc "update", "Update extensions for the currently installed environment to the latest version if extensions are updateable"
|
38
39
|
def update
|
39
40
|
Commands::Update.new.call
|
40
41
|
end
|
data/lib/rexer/source/git.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "git"
|
2
|
+
require "uri"
|
2
3
|
|
3
4
|
module Rexer
|
4
5
|
module Source
|
@@ -8,6 +9,7 @@ module Rexer
|
|
8
9
|
@branch = branch
|
9
10
|
@tag = tag
|
10
11
|
@ref = ref
|
12
|
+
@reference = branch || tag || ref
|
11
13
|
end
|
12
14
|
|
13
15
|
def load(path)
|
@@ -20,19 +22,30 @@ module Rexer
|
|
20
22
|
end
|
21
23
|
|
22
24
|
def updatable?
|
23
|
-
|
25
|
+
branch || reference.nil?
|
24
26
|
end
|
25
27
|
|
26
28
|
def info
|
27
|
-
|
29
|
+
URI.parse(url).then do |uri|
|
30
|
+
"#{uri.host}#{uri.path}@#{reference_name}"
|
31
|
+
end
|
28
32
|
end
|
29
33
|
|
30
34
|
private
|
31
35
|
|
32
|
-
attr_reader :url, :branch, :tag, :ref
|
36
|
+
attr_reader :url, :reference, :branch, :tag, :ref
|
33
37
|
|
34
38
|
def checkout(git)
|
35
|
-
|
39
|
+
reference&.then { git.checkout(_1) }
|
40
|
+
end
|
41
|
+
|
42
|
+
def reference_name
|
43
|
+
branch || tag || ref || "main"
|
44
|
+
end
|
45
|
+
|
46
|
+
def short_ref
|
47
|
+
return unless ref
|
48
|
+
ref.match?(/^[a-z0-9]+$/) ? ref.slice(0, 7) : ref
|
36
49
|
end
|
37
50
|
end
|
38
51
|
end
|
data/lib/rexer/source/github.rb
CHANGED
@@ -2,8 +2,13 @@ module Rexer
|
|
2
2
|
module Source
|
3
3
|
class Github < Git
|
4
4
|
def initialize(repo:, branch: nil, tag: nil, ref: nil)
|
5
|
+
@repo = repo
|
5
6
|
super(url: "https://github.com/#{repo}", branch: branch, tag: tag, ref: ref)
|
6
7
|
end
|
8
|
+
|
9
|
+
def info
|
10
|
+
"#{@repo}@#{reference_name}"
|
11
|
+
end
|
7
12
|
end
|
8
13
|
end
|
9
14
|
end
|
data/lib/rexer/version.rb
CHANGED
data/lib/rexer.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.14.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-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '3.1'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: activesupport
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '7.0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '7.0'
|
97
111
|
description: Rexer is a command-line tool for managing Redmine Extension (Plugin and
|
98
112
|
Themes). It allows you to define extensions in a Ruby DSL and install, uninstall,
|
99
113
|
update, and switch between different sets of the extensions.
|