bcome 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/bcome +7 -3
- data/bin/boot.rb +22 -14
- data/lib/bcome/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: a78ef0e9b999c6dc1c605b73791e5d853be3e5fa
|
4
|
+
data.tar.gz: 5585b40b46f2f0b962893161aaa566a698d8ddfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dc3a5c6bfeb933f670a63865cd57f5f697373c6793328a74d46d17c453bbabaf023379da4a16fbb97b1116747c769af5c800aad817f0a37770715fc207970fe
|
7
|
+
data.tar.gz: 0315e88f28e40b7d65fe161b4d982df9a404bb8f674a52c1e003beebc83d75e8df870b7f649a89d5b8108d8ec54c6cd8098f249ff991cc267334e9b346182b7e
|
data/bin/bcome
CHANGED
@@ -11,6 +11,10 @@ require 'bcome'
|
|
11
11
|
load Bcome::Boot.boot_path
|
12
12
|
|
13
13
|
## Load the shell
|
14
|
-
|
15
|
-
|
16
|
-
IRB.
|
14
|
+
unless @no_shell
|
15
|
+
require 'irb/ext/multi-irb'
|
16
|
+
IRB.parse_opts_with_ignoring_script
|
17
|
+
IRB.irb nil, @context_object
|
18
|
+
end
|
19
|
+
|
20
|
+
@ssh_to.node.ssh if @ssh_in && @ssh_to
|
data/bin/boot.rb
CHANGED
@@ -41,29 +41,30 @@ RENDER = ::Bcome::RenderIrb.new
|
|
41
41
|
|
42
42
|
quick_context = ENV['bcome_context'] ? ENV['bcome_context'] : ARGV[0]
|
43
43
|
|
44
|
+
quick_contexts = []
|
45
|
+
|
44
46
|
if quick_context
|
47
|
+
|
48
|
+
## Our context might be a shortcut context, in which case load it
|
45
49
|
quick_context =~ /(.+):(.+)/
|
46
50
|
platform_key = $1
|
47
51
|
context_reference = $2
|
48
52
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
puts "Cannot find platform named #{platform_key}".failure
|
56
|
-
exit
|
53
|
+
if platform_key && context_reference
|
54
|
+
if platform = ESTATE.resource_for_identifier(platform_key)
|
55
|
+
if platform.has_quick_contexts? && (context = platform.quick_context_for_reference(context_reference))
|
56
|
+
quick_contexts = context[:keys]
|
57
|
+
end
|
58
|
+
end
|
57
59
|
end
|
58
60
|
|
59
|
-
unless
|
60
|
-
|
61
|
-
exit
|
61
|
+
unless quick_contexts.any? # we didn't find a shortcut
|
62
|
+
quick_contexts = quick_context.split(":")
|
62
63
|
end
|
63
|
-
|
64
|
-
quick_contexts = context[:keys]
|
65
64
|
end
|
66
65
|
|
66
|
+
@no_shell = true if quick_contexts.last == "ssh"
|
67
|
+
|
67
68
|
#########################
|
68
69
|
## QUICK CONTEXT & BOOT #
|
69
70
|
#########################
|
@@ -79,7 +80,14 @@ if quick_contexts.any?
|
|
79
80
|
is_first_context = true
|
80
81
|
|
81
82
|
spawn = false
|
82
|
-
quick_contexts.
|
83
|
+
quick_contexts.each_with_index do |resource_context_key, index|
|
84
|
+
|
85
|
+
if resource_context_key == "ssh" && index == (quick_contexts.size - 1) ## If last shortcut is SSH, we'll skip so we can execute it
|
86
|
+
@ssh_in = true
|
87
|
+
@ssh_to = @context_object
|
88
|
+
break
|
89
|
+
end
|
90
|
+
|
83
91
|
next_context_resource = @context_object.resource_for_identifier(resource_context_key)
|
84
92
|
|
85
93
|
# Initialize our object namespace, but only from our lowest level namespace object. This
|
data/lib/bcome/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillaume Roderick (Webzakimbo)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|