cheftacular 2.12.0 → 2.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cheftacular/actions/console.rb +10 -4
- data/lib/cheftacular/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: beb5fbd1287af65d3d6bb6cc57548ebfd4dfcdc6
|
4
|
+
data.tar.gz: 49b01ae599af945412cfa5e192f10099fdc9b54c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c838c68b82fc04160920297b30ac80ccef096d18254c9eedb76f15014b9d789edeea667ecd42108e8064ff3d36ac5a08ee4c248be7a63490856cc141c4a3a232
|
7
|
+
data.tar.gz: 57709f757fc71defb4224104a4b95940287a45ac292df54f3337ffbf6c83067d3f225d0eec3082bd6e320e10e838b6a8a62f6041f0482467ea9aa1124ff912ae
|
@@ -5,7 +5,9 @@ class Cheftacular
|
|
5
5
|
@config['documentation']['action'][__method__]['long_description'] = [
|
6
6
|
"`cft console` will create a console session on the first node found for a repository.",
|
7
7
|
[
|
8
|
-
" 1. Attempts to setup a console for the unique stack, stacks currently supported for console is only Rails."
|
8
|
+
" 1. Attempts to setup a console for the unique stack, stacks currently supported for console is only Rails.",
|
9
|
+
|
10
|
+
" 2. If there is a node in the repository set that has the role `preferred_console`, this node will come before others."
|
9
11
|
]
|
10
12
|
]
|
11
13
|
|
@@ -18,13 +20,17 @@ class Cheftacular
|
|
18
20
|
self.send("console_#{ @config['getter'].get_current_stack }")
|
19
21
|
end
|
20
22
|
|
21
|
-
def console_ruby_on_rails
|
23
|
+
def console_ruby_on_rails node_args=[{unless: 'role[rails]'}]
|
22
24
|
nodes = @config['getter'].get_true_node_objects
|
23
25
|
|
24
26
|
#must have rails stack to run migrations and not be a db, only want ONE node
|
25
|
-
|
27
|
+
node_args << { unless: "role[#{ @options['role'] }]" }
|
28
|
+
|
29
|
+
consolable_nodes = @config['parser'].exclude_nodes( nodes, (node_args + [{ unless: "role[preferred_console]" }]).flatten, true )
|
30
|
+
|
31
|
+
consolable_nodes = @config['parser'].exclude_nodes( nodes, node_args, true ) if consolable_nodes.empty?
|
26
32
|
|
27
|
-
|
33
|
+
consolable_nodes.each do |n|
|
28
34
|
puts("Beginning console run for #{ n.name } (#{ n.public_ipaddress }) on role #{ @options['role'] }") unless @options['quiet']
|
29
35
|
|
30
36
|
start_console_ruby_on_rails(n.public_ipaddress, n.run_list)
|
data/lib/cheftacular/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cheftacular
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.12.
|
4
|
+
version: 2.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Louis Alridge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|