devkitkat 0.1.33 → 0.1.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/lib/devkitkat/service.rb +1 -1
- data/lib/devkitkat/service/predefined_command/pull.rb +8 -2
- data/lib/devkitkat/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: e8fd1702bb57e08ff95b457deda0700eaceabe5bb1b016e2510c55aeb00da4e1
|
4
|
+
data.tar.gz: 130d60d2212815e550c7c9588f8912162345830089b8618fb3265eab66ddc47a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ada0dcf7dd8124c3baae87cf127c842afc4e55e533bab0541ed8943d323e5bf694e61fac2fddf802de4b78986887c62034b65bca18d152925f3f8445b52c46ae
|
7
|
+
data.tar.gz: cd9152bc0d81c5d623d49a1a3931687a52e796a78794ae17254ebee5328e8e9c5e36bd8b8723a1fa3e3accd45ae499466b61e63543a15ca4b887f14c90e83169
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -38,6 +38,7 @@ download/prepare services. These are available keys.
|
|
38
38
|
|`services:` |Hash |Yes |-|The services to run the application|
|
39
39
|
|`services:<name>` |Hash |Yes |-|The service name e.g. `rails`, `db`, `redis`|
|
40
40
|
|`services:<name>:repo: <value>` |String |No |-|The git URL of the repository|
|
41
|
+
|`services:<name>:repo_ref: <value>` |String |No |-|The ref of the repository|
|
41
42
|
|`services:<name>:<key>: <value>` |Hash |No |-|The key and value of the environment variable. e.g. `POSTGRES_PASSWORD: abcdef`. |
|
42
43
|
|`image:` |String |No |-|The docker image. Only effective when `type` is `docker` or `cloud`|
|
43
44
|
|`groups:` |Hash |No |-|The groups of the services|
|
data/lib/devkitkat/service.rb
CHANGED
@@ -8,7 +8,7 @@ module Devkitkat
|
|
8
8
|
attr_reader :name, :config, :command, :executor
|
9
9
|
|
10
10
|
DIVISIONS = %w[src script data cache log example dockerfile].freeze
|
11
|
-
SERVICE_PROPERTIES = %w[repo host port]
|
11
|
+
SERVICE_PROPERTIES = %w[repo repo_ref host port]
|
12
12
|
|
13
13
|
def initialize(name, config, command)
|
14
14
|
@name, @config, @command = name, config, command
|
@@ -2,14 +2,20 @@ module Devkitkat
|
|
2
2
|
class Service
|
3
3
|
class PredefinedCommand
|
4
4
|
class Pull < Base
|
5
|
+
DEFAULT_REPO_REF = 'master'.freeze
|
6
|
+
|
5
7
|
def to_script
|
6
8
|
<<~EOS
|
7
9
|
cd #{service.src_dir}
|
8
|
-
git checkout
|
9
|
-
git pull origin
|
10
|
+
git checkout #{repo_ref}
|
11
|
+
git pull origin #{repo_ref}
|
10
12
|
EOS
|
11
13
|
end
|
12
14
|
|
15
|
+
def repo_ref
|
16
|
+
service.repo_ref || DEFAULT_REPO_REF
|
17
|
+
end
|
18
|
+
|
13
19
|
def available?
|
14
20
|
service.repo_defined?
|
15
21
|
end
|
data/lib/devkitkat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devkitkat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shinya Maeda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|