capistrano_multiconfig_parallel 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,7 +37,7 @@ module CapistranoMulticonfigParallel
37
37
 
38
38
  def multi_stage_deploy(options)
39
39
  stages = fetch_multi_stages
40
- return if stages.blank?
40
+ return if stages.blank?
41
41
  multi_collect_and_run_jobs(options) do |apps, new_options|
42
42
  apps.each do |app|
43
43
  stages.each do |stage|
@@ -46,17 +46,16 @@ module CapistranoMulticonfigParallel
46
46
  end if apps.present?
47
47
  end
48
48
  end
49
-
49
+
50
50
  def menu_deploy_interactive(options)
51
51
  multi_collect_and_run_jobs(options) do |apps, new_options|
52
52
  deploy_multiple_apps(apps, new_options)
53
53
  deploy_app(new_options) if !custom_command? && new_options['app'].present?
54
54
  end
55
55
  end
56
-
57
- private
58
-
59
-
56
+
57
+ private
58
+
60
59
  def multi_collect_and_run_jobs(options = {}, &block)
61
60
  collect_jobs(options) do |new_options|
62
61
  applications = @dependency_tracker.fetch_apps_needed_for_deployment(new_options['app'], new_options['action'])
@@ -66,19 +65,17 @@ module CapistranoMulticonfigParallel
66
65
  end
67
66
 
68
67
  def backup_the_branch
69
- return if custom_command? || @argv['BRANCH'].blank?
68
+ return if custom_command? || @argv['BRANCH'].blank?
70
69
  @branch_backup = @argv['BRANCH'].to_s
71
70
  @argv['BRANCH'] = nil
72
71
  end
73
-
74
- def deploy_multiple_apps(applications, options)
72
+
73
+ def deploy_multiple_apps(applications, options)
75
74
  options = options.stringify_keys
76
75
  return unless applications.present?
77
76
  applications.each do |app|
78
77
  deploy_app(options.merge('app' => app))
79
78
  end
80
79
  end
81
-
82
-
83
80
  end
84
81
  end
@@ -26,23 +26,21 @@ module CapistranoMulticonfigParallel
26
26
  end
27
27
 
28
28
  def stage_deploy(options)
29
- return unless custom_command?
29
+ return unless custom_command?
30
30
  stages = fetch_multi_stages
31
- return if stages.blank?
31
+ return if stages.blank?
32
32
  collect_jobs(options) do |new_options|
33
33
  stages.each do |stage|
34
34
  deploy_app(new_options.merge('stage' => stage, 'action' => 'deploy'))
35
35
  end
36
36
  end
37
37
  end
38
-
39
-
38
+
40
39
  def deploy_single_app(options)
41
40
  return if custom_command?
42
41
  collect_jobs(options) do |new_options|
43
- deploy_app(new_options)
42
+ deploy_app(new_options)
44
43
  end
45
44
  end
46
-
47
45
  end
48
46
  end
@@ -1,6 +1,13 @@
1
- Configurations::StrictConfiguration.class_eval do
2
- def property_type(property)
3
- return unless __configurable?(property)
4
- @__configurable__[property][:type]
1
+ require 'configliere'
2
+ require 'configliere/commandline'
3
+ Configliere::Commandline.class_eval do
4
+ def resolve!(print_help_and_exit = true)
5
+ process_argv!
6
+ if print_help_and_exit && self[:multi_help]
7
+ dump_help
8
+ exit(2)
9
+ end
10
+ super()
11
+ self
5
12
  end
6
13
  end
@@ -0,0 +1,16 @@
1
+ multi_debug: true
2
+ multi_progres: false
3
+ multi_secvential: false
4
+ websocket_server:
5
+ enable_debug: false
6
+
7
+ development_stages:
8
+ - development
9
+ - webdev
10
+
11
+ task_confirmation_active: false
12
+ task_confirmations:
13
+ - deploy:symlink:release
14
+
15
+ track_dependencies: false
16
+ application_dependencies: []
@@ -10,8 +10,8 @@ module CapistranoMulticonfigParallel
10
10
  end
11
11
 
12
12
  def application_dependencies
13
- deps = CapistranoMulticonfigParallel.configuration.track_dependencies ? CapistranoMulticonfigParallel.configuration.application_dependencies : []
14
- deps.present? && deps.is_a?(Array) ? deps.map(&:stringify_keys) : []
13
+ deps = CapistranoMulticonfigParallel.configuration.track_dependencies ? CapistranoMulticonfigParallel.configuration.application_dependencies : []
14
+ deps.present? && deps.is_a?(Array) ? deps.map(&:stringify_keys) : []
15
15
  end
16
16
 
17
17
  def all_websites_return_applications_selected
@@ -7,8 +7,8 @@ module CapistranoMulticonfigParallel
7
7
  # module used for generating the version
8
8
  module VERSION
9
9
  MAJOR = 0
10
- MINOR = 0
11
- TINY = 3
10
+ MINOR = 1
11
+ TINY = 0
12
12
  PRE = nil
13
13
 
14
14
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')