capistrano_multiconfig_parallel 0.31.1 → 0.32.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -17
- data/capistrano_multiconfig_parallel.gemspec +0 -1
- data/lib/capistrano_multiconfig_parallel/all.rb +1 -0
- data/lib/capistrano_multiconfig_parallel/application.rb +0 -3
- data/lib/capistrano_multiconfig_parallel/celluloid/terminal_table.rb +2 -2
- data/lib/capistrano_multiconfig_parallel/classes/cursor.rb +3 -3
- data/lib/capistrano_multiconfig_parallel/cli.rb +0 -1
- data/lib/capistrano_multiconfig_parallel/helpers/application_helper.rb +2 -0
- data/lib/capistrano_multiconfig_parallel/helpers/stages_helper.rb +37 -0
- data/lib/capistrano_multiconfig_parallel/version.rb +2 -2
- metadata +3 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f2058afba53f3625fe0253f9ea80bcfcd83928f
|
4
|
+
data.tar.gz: 6d568cea8e8d7e5501166d5e0fe3f2a8c5fd4baa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e18832aa02656f2de014326cc40c3cc7b9107c2c9e32b0c9c8edc9a542054f55d8fe9cf86f2a545006f733adcc4656af66ee76285b70d6f433ddf10748eb7861
|
7
|
+
data.tar.gz: c3b95a15ab8d3a962d1013918d082b6bd76ddb074d9bdf3d51d9c4dd6c8216223ecfafc937412ca0bfe575d79207d416c1843e2a5640023ce2c902b641b6914f
|
data/README.md
CHANGED
@@ -20,27 +20,25 @@ CAUTION!! PLEASE READ CAREFULLY!! Capistrano is not thread-safe. However in orde
|
|
20
20
|
Requirements
|
21
21
|
------------
|
22
22
|
|
23
|
-
1. [
|
24
|
-
2. [
|
25
|
-
3. [
|
26
|
-
4. [
|
27
|
-
5. [
|
28
|
-
6. [
|
29
|
-
7. [
|
30
|
-
8. [
|
31
|
-
9. [
|
32
|
-
10. [
|
33
|
-
11. [
|
34
|
-
12. [
|
35
|
-
13. [
|
36
|
-
14. [
|
37
|
-
15. [devnull >= 0.1](https://github.com/arlimus/inquirer.rb)
|
38
|
-
16. [rack >= 1.6](http://rack.github.io/)
|
23
|
+
1. [ActiveSuport >= 4.2.0](https://rubygems.org/gems/activesupport)
|
24
|
+
2. [celluloid-pmap >= 0.2.2](https://github.com/jwo/celluloid-pmap)
|
25
|
+
3. [celluloid_pubsub >= 0.1.0](https://github.com/bogdanRada/celluloid_pubsub)
|
26
|
+
4. [celluloid-websocket-client >= 0.0.1](https://github.com/jeremyd/celluloid-websocket-client)
|
27
|
+
5. [composable_state_machine >= 1.0.2](https://github.com/swoop-inc/composable_state_machine)
|
28
|
+
6. [terminal-table >= 1.5.2](https://github.com/tj/terminal-table)
|
29
|
+
7. [colorize >= 0.7](https://github.com/fazibear/colorize)
|
30
|
+
8. [eventmachine >= 1.0.3](https://github.com/eventmachine/eventmachine)
|
31
|
+
9. [right_popen >= 1.1.3](https://github.com/rightscale/right_popen)
|
32
|
+
10. [capistrano >= 3.0](https://github.com/capistrano/capistrano/)
|
33
|
+
11. [configliere >= 0.4](https://github.com/infochimps-platform/configliere)
|
34
|
+
12. [inquirer >= 0.2](https://github.com/arlimus/inquirer.rb)
|
35
|
+
13. [devnull >= 0.1](https://github.com/arlimus/inquirer.rb)
|
36
|
+
14. [rack >= 1.6](http://rack.github.io/)
|
39
37
|
|
40
38
|
Compatibility
|
41
39
|
-------------
|
42
40
|
|
43
|
-
Rails >3.0 only. MRI 1.9.x
|
41
|
+
Rails >3.0 only. [MRI 1.9.x or 2.x](http://www.ruby-lang.org)
|
44
42
|
|
45
43
|
Ruby 1.8 is not officially supported. We will accept further compatibilty pull-requests but no upcoming versions will be tested against it.
|
46
44
|
|
@@ -26,7 +26,6 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_runtime_dependency 'eventmachine', '~> 1.0', '>= 1.0.3'
|
27
27
|
s.add_runtime_dependency 'right_popen', '~> 1.1', '>= 1.1.3'
|
28
28
|
s.add_runtime_dependency 'capistrano','~> 3.0','>= 3.0'
|
29
|
-
s.add_runtime_dependency 'capistrano-multiconfig','~> 3.0','>= 3.0.8'
|
30
29
|
s.add_runtime_dependency 'activesupport', '~> 4.0','>= 4.0'
|
31
30
|
s.add_runtime_dependency 'configliere', '~> 0.4', '>=0.4'
|
32
31
|
s.add_runtime_dependency 'inquirer', '~> 0.2', '>= 0.2'
|
@@ -1,12 +1,9 @@
|
|
1
|
-
require 'capistrano/multiconfig/dsl'
|
2
1
|
module CapistranoMulticonfigParallel
|
3
2
|
# finds app dependencies, shows menu and delegates jobs to celluloid manager
|
4
3
|
class Application
|
5
4
|
include Celluloid
|
6
5
|
include Celluloid::Logger
|
7
6
|
include CapistranoMulticonfigParallel::ApplicationHelper
|
8
|
-
include Capistrano::DSL
|
9
|
-
include Capistrano::Multiconfig::DSL
|
10
7
|
|
11
8
|
attr_reader :stage_apps, :top_level_tasks, :jobs, :branch_backup, :condition, :manager, :dependency_tracker, :application, :stage, :name, :args, :argv, :default_stage
|
12
9
|
|
@@ -72,9 +72,9 @@ module CapistranoMulticonfigParallel
|
|
72
72
|
|
73
73
|
def setup_table_jobs(table)
|
74
74
|
jobs = @manager.alive? ? @manager.jobs.dup : []
|
75
|
-
jobs.each do |
|
75
|
+
jobs.each do |job_id, job|
|
76
76
|
table.add_row(job.terminal_row)
|
77
|
-
table.add_separator
|
77
|
+
table.add_separator if jobs.keys.last != job_id
|
78
78
|
end
|
79
79
|
jobs
|
80
80
|
end
|
@@ -27,9 +27,9 @@ module CapistranoMulticonfigParallel
|
|
27
27
|
def fetch_cursor_position(table_size, position, previously_erased_screen)
|
28
28
|
final_position = position || fetch_position
|
29
29
|
terminal_rows = fetch_terminal_size
|
30
|
-
|
31
|
-
|
32
|
-
move_to_home!
|
30
|
+
if previously_erased_screen == false && refetch_position?(table_size, terminal_rows, final_position)
|
31
|
+
screen_erased = true
|
32
|
+
move_to_home!
|
33
33
|
final_position = fetch_position
|
34
34
|
terminal_rows = fetch_terminal_size
|
35
35
|
end
|
@@ -1,10 +1,12 @@
|
|
1
1
|
require_relative './core_helper'
|
2
2
|
require_relative './internal_helper'
|
3
|
+
require_relative './stages_helper'
|
3
4
|
module CapistranoMulticonfigParallel
|
4
5
|
# class that holds the options that are configurable for this gem
|
5
6
|
module ApplicationHelper
|
6
7
|
include CapistranoMulticonfigParallel::InternalHelper
|
7
8
|
include CapistranoMulticonfigParallel::CoreHelper
|
9
|
+
include CapistranoMulticonfigParallel::StagesHelper
|
8
10
|
|
9
11
|
delegate :logger,
|
10
12
|
:configuration,
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module CapistranoMulticonfigParallel
|
2
|
+
# module used to fetch the stages (code taken from https://github.com/railsware/capistrano-multiconfig)
|
3
|
+
# TODO: find a way to remove this and still be compatible with capistrano 2.x
|
4
|
+
module StagesHelper
|
5
|
+
module_function
|
6
|
+
|
7
|
+
def stages
|
8
|
+
fetch_stages_paths do |paths|
|
9
|
+
checks_paths(paths)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def checks_paths(paths)
|
14
|
+
paths.reject! { |path| check_stage_path(paths, path) }
|
15
|
+
sorted_paths(paths)
|
16
|
+
end
|
17
|
+
|
18
|
+
def sorted_paths(paths)
|
19
|
+
paths.present? ? paths.uniq.sort : paths
|
20
|
+
end
|
21
|
+
|
22
|
+
def check_stage_path(paths, path)
|
23
|
+
paths.any? { |another| another != path && another.start_with?(path + ':') }
|
24
|
+
end
|
25
|
+
|
26
|
+
def stages_paths
|
27
|
+
stages_root = File.expand_path(File.join(detect_root, 'config/deploy'))
|
28
|
+
Dir["#{stages_root}/**/*.rb"].map do |file|
|
29
|
+
file.slice(stages_root.size + 1..-4).tr('/', ':')
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def fetch_stages_paths
|
34
|
+
stages_paths.tap { |paths| yield paths if block_given? }
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano_multiconfig_parallel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.32.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bogdanRada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: celluloid-pmap
|
@@ -190,26 +190,6 @@ dependencies:
|
|
190
190
|
- - ">="
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: '3.0'
|
193
|
-
- !ruby/object:Gem::Dependency
|
194
|
-
name: capistrano-multiconfig
|
195
|
-
requirement: !ruby/object:Gem::Requirement
|
196
|
-
requirements:
|
197
|
-
- - "~>"
|
198
|
-
- !ruby/object:Gem::Version
|
199
|
-
version: '3.0'
|
200
|
-
- - ">="
|
201
|
-
- !ruby/object:Gem::Version
|
202
|
-
version: 3.0.8
|
203
|
-
type: :runtime
|
204
|
-
prerelease: false
|
205
|
-
version_requirements: !ruby/object:Gem::Requirement
|
206
|
-
requirements:
|
207
|
-
- - "~>"
|
208
|
-
- !ruby/object:Gem::Version
|
209
|
-
version: '3.0'
|
210
|
-
- - ">="
|
211
|
-
- !ruby/object:Gem::Version
|
212
|
-
version: 3.0.8
|
213
193
|
- !ruby/object:Gem::Dependency
|
214
194
|
name: activesupport
|
215
195
|
requirement: !ruby/object:Gem::Requirement
|
@@ -682,6 +662,7 @@ files:
|
|
682
662
|
- lib/capistrano_multiconfig_parallel/helpers/configuration.rb
|
683
663
|
- lib/capistrano_multiconfig_parallel/helpers/core_helper.rb
|
684
664
|
- lib/capistrano_multiconfig_parallel/helpers/internal_helper.rb
|
665
|
+
- lib/capistrano_multiconfig_parallel/helpers/stages_helper.rb
|
685
666
|
- lib/capistrano_multiconfig_parallel/initializers/rake.rb
|
686
667
|
- lib/capistrano_multiconfig_parallel/initializers/websocket.rb
|
687
668
|
- lib/capistrano_multiconfig_parallel/version.rb
|