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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f85ecb638f4b2b69057cfc4506b59dfb8f69d1e5
4
- data.tar.gz: 3c19ebfc18ef56f9f271ede4192d83b077fda04d
3
+ metadata.gz: 5546cfa5d73a014152bd5bd7976308d1c76b7b2b
4
+ data.tar.gz: 97f680b036efb2cd730657570249f2039d18a507
5
5
  SHA512:
6
- metadata.gz: 87d697be9c51e303964c6e6436e169b9890c8ee0be7d615648558473a32cc4ea568bf50866beb5d63de6b6c8b6c4bed758811de7ea29436d26b14598d2e3297e
7
- data.tar.gz: 3b49f00bc620aff401e874fc1d4c15e68fc90b8d7a221413de59898b1de42712c8793a4fcacd6af6a79aadd20ed11cfe9e1ca55064db9800f61c0eee516eeb33
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.downcase
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
- apps.each_value do |app|
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
@@ -1,5 +1,5 @@
1
1
  module Luban
2
2
  module Deployment
3
- VERSION = "0.7.6"
3
+ VERSION = "0.7.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rubyist Lei