devkitkat 0.1.29 → 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 +14 -14
- data/README.md +1 -0
- data/devkitkat.gemspec +2 -2
- data/lib/devkitkat/command.rb +1 -0
- data/lib/devkitkat/service.rb +2 -2
- data/lib/devkitkat/service/executor/variables.rb +1 -1
- data/lib/devkitkat/service/predefined_command/pull.rb +8 -2
- data/lib/devkitkat/service/predefined_command/start_container.rb +21 -0
- data/lib/devkitkat/version.rb +1 -1
- metadata +8 -7
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
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
devkitkat (0.1.
|
4
|
+
devkitkat (0.1.34)
|
5
5
|
activesupport (~> 6.0.0)
|
6
6
|
colorize (~> 0.8.1)
|
7
|
-
docker-api (~>
|
7
|
+
docker-api (~> 2.0.0)
|
8
8
|
parallel (~> 1.17.0)
|
9
9
|
pry (~> 0.12.2)
|
10
10
|
pry-nav
|
@@ -14,25 +14,25 @@ PATH
|
|
14
14
|
GEM
|
15
15
|
remote: https://rubygems.org/
|
16
16
|
specs:
|
17
|
-
activesupport (6.0.
|
17
|
+
activesupport (6.0.3.4)
|
18
18
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
19
19
|
i18n (>= 0.7, < 2)
|
20
20
|
minitest (~> 5.1)
|
21
21
|
tzinfo (~> 1.1)
|
22
|
-
zeitwerk (~> 2.2)
|
23
|
-
coderay (1.1.
|
22
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
23
|
+
coderay (1.1.3)
|
24
24
|
colorize (0.8.1)
|
25
|
-
concurrent-ruby (1.1.
|
25
|
+
concurrent-ruby (1.1.7)
|
26
26
|
diff-lcs (1.3)
|
27
|
-
docker-api (
|
27
|
+
docker-api (2.0.0)
|
28
28
|
excon (>= 0.47.0)
|
29
29
|
multi_json
|
30
|
-
excon (0.
|
31
|
-
i18n (1.8.
|
30
|
+
excon (0.78.0)
|
31
|
+
i18n (1.8.5)
|
32
32
|
concurrent-ruby (~> 1.0)
|
33
33
|
method_source (0.9.2)
|
34
|
-
minitest (5.14.
|
35
|
-
multi_json (1.
|
34
|
+
minitest (5.14.2)
|
35
|
+
multi_json (1.15.0)
|
36
36
|
parallel (1.17.0)
|
37
37
|
pry (0.12.2)
|
38
38
|
coderay (~> 1.1.0)
|
@@ -60,17 +60,17 @@ GEM
|
|
60
60
|
thread_safe (0.3.6)
|
61
61
|
tzinfo (1.2.7)
|
62
62
|
thread_safe (~> 0.1)
|
63
|
-
zeitwerk (2.
|
63
|
+
zeitwerk (2.4.0)
|
64
64
|
|
65
65
|
PLATFORMS
|
66
66
|
ruby
|
67
67
|
|
68
68
|
DEPENDENCIES
|
69
|
-
bundler (~> 1.
|
69
|
+
bundler (~> 2.1.4)
|
70
70
|
devkitkat!
|
71
71
|
rake (~> 12.3.3)
|
72
72
|
rspec (~> 3.0)
|
73
73
|
rspec-temp_dir (~> 1.1.0)
|
74
74
|
|
75
75
|
BUNDLED WITH
|
76
|
-
1.
|
76
|
+
2.1.4
|
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/devkitkat.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = "devkitkat"
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
|
-
spec.add_development_dependency "bundler", "~> 1.
|
26
|
+
spec.add_development_dependency "bundler", "~> 2.1.4"
|
27
27
|
spec.add_development_dependency "rake", "~> 12.3.3"
|
28
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
29
29
|
spec.add_development_dependency "rspec-temp_dir", "~> 1.1.0"
|
@@ -33,6 +33,6 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_runtime_dependency "parallel", "~> 1.17.0"
|
34
34
|
spec.add_runtime_dependency "ruby-progressbar", "~> 1.10.1"
|
35
35
|
spec.add_runtime_dependency "colorize", "~> 0.8.1"
|
36
|
-
spec.add_runtime_dependency "docker-api", "~>
|
36
|
+
spec.add_runtime_dependency "docker-api", "~> 2.0.0"
|
37
37
|
spec.add_runtime_dependency "require_all", "~> 3.0.0"
|
38
38
|
end
|
data/lib/devkitkat/command.rb
CHANGED
@@ -99,6 +99,7 @@ module Devkitkat
|
|
99
99
|
opts.separator "poop - Poop"
|
100
100
|
opts.separator "show-variables - Show all variables via 'export' command"
|
101
101
|
opts.separator "remove-containers - Remove all related containers"
|
102
|
+
opts.separator "start-container - Start a container (dry-run)"
|
102
103
|
end
|
103
104
|
end
|
104
105
|
|
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
|
@@ -61,7 +61,7 @@ module Devkitkat
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def machine_driver
|
64
|
-
config.service_hash(name).dig(
|
64
|
+
config.service_hash(name).dig('machine', 'driver')
|
65
65
|
end
|
66
66
|
end
|
67
67
|
end
|
@@ -22,7 +22,7 @@ module Devkitkat
|
|
22
22
|
variables << "export DK_MACHINE_DRIVER=#{config.machine_driver.to_s}"
|
23
23
|
variables << "export DK_MACHINE_LOCATION=#{config.machine_location.to_s}"
|
24
24
|
variables << "export DK_MACHINE_IMAGE=#{config.machine_image.to_s}"
|
25
|
-
variables << "export DK_MACHINE_EXTRA_HOSTS=#{config.machine_extra_hosts
|
25
|
+
variables << "export DK_MACHINE_EXTRA_HOSTS=#{config.machine_extra_hosts&.join(',').to_s}"
|
26
26
|
variables << "export DK_MACHINE_NETWORK_MODE=#{config.machine_network_mode.to_s}"
|
27
27
|
variables << "export DK_APPLICATION=#{config.application.to_s}"
|
28
28
|
variables
|
@@ -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
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Devkitkat
|
2
|
+
class Service
|
3
|
+
class PredefinedCommand
|
4
|
+
class StartContainer < Base
|
5
|
+
def to_script
|
6
|
+
<<~EOS
|
7
|
+
tail -f
|
8
|
+
EOS
|
9
|
+
end
|
10
|
+
|
11
|
+
def available?
|
12
|
+
true
|
13
|
+
end
|
14
|
+
|
15
|
+
def machine_driver
|
16
|
+
'docker'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
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
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.1.4
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 2.0.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 2.0.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: require_all
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -230,6 +230,7 @@ files:
|
|
230
230
|
- lib/devkitkat/service/predefined_command/reconfigure.rb
|
231
231
|
- lib/devkitkat/service/predefined_command/remove_containers.rb
|
232
232
|
- lib/devkitkat/service/predefined_command/show_variables.rb
|
233
|
+
- lib/devkitkat/service/predefined_command/start_container.rb
|
233
234
|
- lib/devkitkat/version.rb
|
234
235
|
homepage: https://gitlab.com/dosuken123/devkitkat
|
235
236
|
licenses:
|
@@ -250,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
251
|
- !ruby/object:Gem::Version
|
251
252
|
version: '0'
|
252
253
|
requirements: []
|
253
|
-
rubygems_version: 3.
|
254
|
+
rubygems_version: 3.1.4
|
254
255
|
signing_key:
|
255
256
|
specification_version: 4
|
256
257
|
summary: Make micro services easy
|