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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ace209a03eb21d620b72245e0637ab380faf6a40542a18092bef7d33ed830583
4
- data.tar.gz: 7716f985f8fec38aa5f1165d0997df890653bb025e4f0f7dfd45f88f673e8381
3
+ metadata.gz: e8fd1702bb57e08ff95b457deda0700eaceabe5bb1b016e2510c55aeb00da4e1
4
+ data.tar.gz: 130d60d2212815e550c7c9588f8912162345830089b8618fb3265eab66ddc47a
5
5
  SHA512:
6
- metadata.gz: 67ec50212126fe7cd1a30dd90018488421a8dce074828a6fd046803ee9d10019bf188c1eb60975572931b3cb888e5b89000b467cf8774c75d2c05ae380fc6771
7
- data.tar.gz: d55adea94edc0e232edbdf07b8d45c6390befaf5ea8effcc138d4c1024aa8928ddc5208e249a0933c6049e8bfd350b3292fc884588595f1d4c07fb8afac23000
6
+ metadata.gz: ada0dcf7dd8124c3baae87cf127c842afc4e55e533bab0541ed8943d323e5bf694e61fac2fddf802de4b78986887c62034b65bca18d152925f3f8445b52c46ae
7
+ data.tar.gz: cd9152bc0d81c5d623d49a1a3931687a52e796a78794ae17254ebee5328e8e9c5e36bd8b8723a1fa3e3accd45ae499466b61e63543a15ca4b887f14c90e83169
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devkitkat (0.1.33)
4
+ devkitkat (0.1.34)
5
5
  activesupport (~> 6.0.0)
6
6
  colorize (~> 0.8.1)
7
7
  docker-api (~> 2.0.0)
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|
@@ -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 master
9
- git pull origin master
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
@@ -1,3 +1,3 @@
1
1
  module Devkitkat
2
- VERSION = "0.1.33"
2
+ VERSION = "0.1.34"
3
3
  end
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.33
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: 2020-10-26 00:00:00.000000000 Z
11
+ date: 2021-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler