devkitkat 0.1.18 → 0.1.20

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: f15d601f70f02d45b6cfc8410752ee8a35ed92e3ae230b09420743e324929d12
4
- data.tar.gz: 7db27646a5ed36bfde804db3ec120bd520b2a412eb5ebabaae8fafb0acdb7c53
3
+ metadata.gz: fc4e89605c7399f9d0552458cc97d8537427bac842b6914583fd387c3c5f38bc
4
+ data.tar.gz: 75e49494c401224ac04c7437c4cc6054444647370a226ce6d1e53c86beb83414
5
5
  SHA512:
6
- metadata.gz: 631e86aac2dd91d2861c196c6245f131771b326522a0fb5394d945ee7f758f7e0e561e076999ce110f755268a99c90dc59cc4787c64e1b5e3801f5383bbe8d71
7
- data.tar.gz: ce859f44ce06c155a56f0b3157c84001981545b646fddd9eef543f68332169ab75c72975c76a3ec583a455900a63ddb26e0436c9deb704ec79e908f6d12883ae
6
+ metadata.gz: 3ef8f4df847e466f3d33a4731a42d5537c6a2081a0e98e0ced285e92dc053ded777237fb7846d445bb5bbfb58f340c0418e042e194e8744eae1684f09d188a25
7
+ data.tar.gz: 04a41c6e24be0eed4b17dd559a2335dfd76f8641444cb07d1ca990819f3d3d5086a6ae94b030592aa4f7fdda8f4fb0c9a75f90a795c26bd195ea93ac8ce36c98
data/.gitignore CHANGED
@@ -11,3 +11,4 @@
11
11
  .rspec_status
12
12
  services
13
13
  .devkitkat.yml
14
+ .devkitkat
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devkitkat (0.1.18)
4
+ devkitkat (0.1.20)
5
5
  activesupport (~> 6.0.0)
6
6
  colorize (~> 0.8.1)
7
7
  docker-api (~> 1.34.2)
@@ -26,7 +26,7 @@ GEM
26
26
  docker-api (1.34.2)
27
27
  excon (>= 0.47.0)
28
28
  multi_json
29
- excon (0.67.0)
29
+ excon (0.68.0)
30
30
  i18n (1.7.0)
31
31
  concurrent-ruby (~> 1.0)
32
32
  method_source (0.9.2)
data/bin/devkitkat CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ require 'bundler/setup' if ENV['DEVKITKAT_DEBUG']
2
3
  require "devkitkat"
3
4
  require 'pry'
4
5
 
@@ -24,6 +24,10 @@ module Devkitkat
24
24
  options[:debug]
25
25
  end
26
26
 
27
+ def quiet?
28
+ options[:quiet]
29
+ end
30
+
27
31
  def tmp_dir
28
32
  File.join(kit_root, '.devkitkat')
29
33
  end
@@ -44,8 +48,8 @@ module Devkitkat
44
48
  opts.separator ""
45
49
  opts.separator "Options:"
46
50
 
47
- opts.on("-p", "--path PATH", "The root path of the .devkitkat.yml") do |v|
48
- options[:root_path] = v
51
+ opts.on("-d", "--debug", "Debug mode") do |v|
52
+ options[:debug] = v
49
53
  end
50
54
 
51
55
  opts.on("-e", "--exclude SERVICE", "Exclude serviced from the specified target") do |v|
@@ -58,23 +62,27 @@ module Devkitkat
58
62
  options[:variables].merge!(Hash[*v.split('=')])
59
63
  end
60
64
 
61
- opts.on("-d", "--debug", "Debug mode") do |v|
62
- options[:debug] = v
65
+ opts.on("-h", "--help", "Show help") do |v|
66
+ show_help
63
67
  end
64
68
 
65
69
  opts.on("-i", "--interactive", "Interactive mode. STDOUT is streamed in console.") do |v|
66
70
  options[:interactive] = v
67
71
  end
68
72
 
73
+ opts.on("-p", "--path PATH", "The root path of the .devkitkat.yml") do |v|
74
+ options[:root_path] = v
75
+ end
76
+
77
+ opts.on("-q", "--quiet", 'Quiet mode') do |v|
78
+ options[:quiet] = v
79
+ end
80
+
69
81
  opts.on("-v", "--version", "Show version") do |v|
70
82
  puts Devkitkat::VERSION
71
83
  exit
72
84
  end
73
85
 
74
- opts.on("-h", "--help", "Show help") do |v|
75
- show_help
76
- end
77
-
78
86
  opts.separator ""
79
87
  opts.separator "Utility Commands:"
80
88
  opts.separator "add-script - Add a script file"
@@ -24,18 +24,24 @@ module Devkitkat
24
24
  end
25
25
  end
26
26
 
27
- exit(1) unless results&.all? { |result| result == true }
27
+ terminate_process_group! unless results&.all? { |result| result == true }
28
28
  end
29
29
 
30
30
  private
31
31
 
32
+ def terminate_process_group!
33
+ pgid = Process.getpgid(Process.pid)
34
+
35
+ Process.kill('TERM', -pgid)
36
+ end
37
+
32
38
  def target_services
33
39
  @target_services ||= config.resolve!(command.target, exclude: command.options[:exclude])
34
40
  .map { |name| Service.new(name, config, command) }
35
41
  end
36
42
 
37
43
  def print_log_paths
38
- return if command.interactive?
44
+ return if command.interactive? || command.quiet?
39
45
 
40
46
  log_paths = target_services.map(&:log_path)
41
47
  puts %Q{See the log at \n#{log_paths.join("\n")}}
@@ -223,6 +223,7 @@ fi
223
223
  def pull
224
224
  return unless repo_defined?
225
225
 
226
+ executor.write("cd #{src_dir}")
226
227
  executor.write("git pull origin master")
227
228
  end
228
229
 
@@ -1,3 +1,3 @@
1
1
  module Devkitkat
2
- VERSION = "0.1.18"
2
+ VERSION = "0.1.20"
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.18
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinya Maeda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-25 00:00:00.000000000 Z
11
+ date: 2019-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler