luban 0.7.6 → 0.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/luban/deployment/cli/application/base.rb +2 -1
- data/lib/luban/deployment/cli/project.rb +22 -3
- data/lib/luban/deployment/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5546cfa5d73a014152bd5bd7976308d1c76b7b2b
|
4
|
+
data.tar.gz: 97f680b036efb2cd730657570249f2039d18a507
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f04d10b3b45fb86fd0f3d6f0210b2a9ed6c20da71da97ee614d5039fd01daec2102ba3cef672d391c75b39f5006b0ae1f79a0577e7ed376b69692d699c79faf2
|
7
|
+
data.tar.gz: a9343ab5e0cbeccf9404f6850267dd7849b19b27ee8cc260609ab16465b0d06a749d602386a17924244dd21d1a568fc754f1e47de9d77b69a602690642b85744
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## Version 0.7.7 (Aug 31, 2016)
|
4
|
+
|
5
|
+
Minor enhancements:
|
6
|
+
* Added start_sequence & stop_sequence in Project to customize the way to start/stop apps/serivces
|
7
|
+
|
8
|
+
Bug fixes:
|
9
|
+
* Used snakecase (instead of downcase) to convert application class name to application name
|
10
|
+
|
3
11
|
## Version 0.7.6 (Aug 30, 2016)
|
4
12
|
|
5
13
|
Bug fixes:
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module Luban
|
2
2
|
module Deployment
|
3
3
|
class Application < Luban::Deployment::Command
|
4
|
+
using Luban::CLI::CoreRefinements
|
4
5
|
include Luban::Deployment::Parameters::Project
|
5
6
|
include Luban::Deployment::Parameters::Application
|
6
7
|
include Luban::Deployment::Command::Tasks::Install
|
@@ -254,7 +255,7 @@ module Luban
|
|
254
255
|
def set_default_parameters
|
255
256
|
super
|
256
257
|
set_default_project_parameters
|
257
|
-
set_default :application, self.class.name.split(':').last.
|
258
|
+
set_default :application, self.class.name.split(':').last.snakecase
|
258
259
|
set_default_application_parameters
|
259
260
|
set_default_profile
|
260
261
|
end
|
@@ -54,10 +54,29 @@ module Luban
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
-
Luban::Deployment::Command::Tasks::Control::Actions.each do |action|
|
57
|
+
#Luban::Deployment::Command::Tasks::Control::Actions.each do |action|
|
58
|
+
# define_method(action) do |args:, opts:|
|
59
|
+
# apps.each_value do |app|
|
60
|
+
# app.send(__method__, args: args, opts: opts) if app.controllable?
|
61
|
+
# end
|
62
|
+
# end
|
63
|
+
#end
|
64
|
+
|
65
|
+
def start_sequence; @start_sequence ||= apps.keys; end
|
66
|
+
def stop_sequence; @stop_sequence ||= start_sequence.reverse; end
|
67
|
+
|
68
|
+
%i(start_process restart_process check_process show_process).each do |action|
|
58
69
|
define_method(action) do |args:, opts:|
|
59
|
-
|
60
|
-
app.send(__method__, args: args, opts: opts) if app.controllable?
|
70
|
+
start_sequence.each do |app|
|
71
|
+
apps[app].send(__method__, args: args, opts: opts) if apps[app].controllable?
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
%i(stop_process kill_process).each do |action|
|
77
|
+
define_method(action) do |args:, opts:|
|
78
|
+
stop_sequence.each do |app|
|
79
|
+
apps[app].send(__method__, args: args, opts: opts) if apps[app].controllable?
|
61
80
|
end
|
62
81
|
end
|
63
82
|
end
|