geordi 2.12.0 → 2.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -50
- data/features/docker.feature +7 -4
- data/lib/geordi/commands/docker.rb +5 -0
- data/lib/geordi/cucumber.rb +3 -3
- data/lib/geordi/docker.rb +19 -2
- data/lib/geordi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '080677a5fee73a4a5ddc02c2f68b5927ec66cb95b328ccbac62abf6aa26d0e19'
|
|
4
|
+
data.tar.gz: 78da560700b6bd7e72424fa1d7f5df556e88d2b80e834aaf7582f6012e31d94c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 10384fad288da0e83e9add107b9b46dcfb83c9f06c777389975127a10d98e94829ffd9414b1607246a31fbfc201d5f732934072ad93e95bb07f28eeac174388e
|
|
7
|
+
data.tar.gz: d76fae6a3b79ebf391aa51df3b9348c263e5903afb1dd89b53f99e2893469bac285b5a5f438d5d120cfa60f5938b22d84e882f7b2dd1aa0f6d966e3b82af8f4c
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
geordi (2.12.
|
|
4
|
+
geordi (2.12.1)
|
|
5
5
|
thor (~> 0.18.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -13,16 +13,9 @@ GEM
|
|
|
13
13
|
contracts (~> 0.9)
|
|
14
14
|
cucumber (>= 1.3.19)
|
|
15
15
|
rspec-expectations (>= 2.99)
|
|
16
|
-
axiom-types (0.1.1)
|
|
17
|
-
descendants_tracker (~> 0.0.4)
|
|
18
|
-
ice_nine (~> 0.11.0)
|
|
19
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
|
20
16
|
builder (3.2.4)
|
|
21
17
|
childprocess (0.5.9)
|
|
22
18
|
ffi (~> 1.0, >= 1.0.11)
|
|
23
|
-
coderay (1.1.3)
|
|
24
|
-
coercible (1.0.0)
|
|
25
|
-
descendants_tracker (~> 0.0.1)
|
|
26
19
|
contracts (0.9)
|
|
27
20
|
cucumber (1.3.20)
|
|
28
21
|
builder (>= 2.1.2)
|
|
@@ -30,40 +23,18 @@ GEM
|
|
|
30
23
|
gherkin (~> 2.12)
|
|
31
24
|
multi_json (>= 1.7.5, < 2.0)
|
|
32
25
|
multi_test (>= 0.1.2)
|
|
33
|
-
declarative (0.0.20)
|
|
34
|
-
declarative-option (0.1.0)
|
|
35
|
-
descendants_tracker (0.0.4)
|
|
36
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
|
37
26
|
diff-lcs (1.2.5)
|
|
38
|
-
equalizer (0.0.11)
|
|
39
|
-
excon (0.78.0)
|
|
40
|
-
faraday (1.1.0)
|
|
41
|
-
multipart-post (>= 1.2, < 3)
|
|
42
|
-
ruby2_keywords
|
|
43
|
-
faraday_middleware (1.0.0)
|
|
44
|
-
faraday (~> 1.0)
|
|
45
27
|
ffi (1.9.18)
|
|
46
28
|
gherkin (2.12.2)
|
|
47
29
|
multi_json (~> 1.3)
|
|
48
30
|
highline (1.6.21)
|
|
49
|
-
ice_nine (0.11.2)
|
|
50
31
|
launchy (2.4.3)
|
|
51
32
|
addressable (~> 2.3)
|
|
52
|
-
method_source (1.0.0)
|
|
53
|
-
mimemagic (0.3.5)
|
|
54
33
|
multi_json (1.15.0)
|
|
55
34
|
multi_test (0.1.2)
|
|
56
|
-
multipart-post (2.1.1)
|
|
57
35
|
parallel (0.5.16)
|
|
58
36
|
parallel_tests (0.6.18)
|
|
59
37
|
parallel
|
|
60
|
-
pry (0.13.1)
|
|
61
|
-
coderay (~> 1.1)
|
|
62
|
-
method_source (~> 1.0)
|
|
63
|
-
representable (3.0.4)
|
|
64
|
-
declarative (< 0.1.0)
|
|
65
|
-
declarative-option (< 0.2.0)
|
|
66
|
-
uber (< 0.2.0)
|
|
67
38
|
rspec-expectations (3.4.0)
|
|
68
39
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
69
40
|
rspec-support (~> 3.4.0)
|
|
@@ -71,25 +42,7 @@ GEM
|
|
|
71
42
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
72
43
|
rspec-support (~> 3.4.0)
|
|
73
44
|
rspec-support (3.4.1)
|
|
74
|
-
ruby2_keywords (0.0.2)
|
|
75
45
|
thor (0.18.1)
|
|
76
|
-
thread_safe (0.3.6)
|
|
77
|
-
tracker_api (1.11.0)
|
|
78
|
-
addressable
|
|
79
|
-
equalizer
|
|
80
|
-
excon
|
|
81
|
-
faraday
|
|
82
|
-
faraday_middleware
|
|
83
|
-
mimemagic
|
|
84
|
-
multi_json
|
|
85
|
-
representable
|
|
86
|
-
virtus
|
|
87
|
-
uber (0.1.0)
|
|
88
|
-
virtus (1.0.5)
|
|
89
|
-
axiom-types (~> 0.1)
|
|
90
|
-
coercible (~> 1.0)
|
|
91
|
-
descendants_tracker (~> 0.0, >= 0.0.3)
|
|
92
|
-
equalizer (~> 0.0, >= 0.0.9)
|
|
93
46
|
|
|
94
47
|
PLATFORMS
|
|
95
48
|
ruby
|
|
@@ -101,9 +54,7 @@ DEPENDENCIES
|
|
|
101
54
|
highline
|
|
102
55
|
launchy
|
|
103
56
|
parallel_tests
|
|
104
|
-
pry
|
|
105
57
|
rspec-mocks
|
|
106
|
-
tracker_api
|
|
107
58
|
|
|
108
59
|
BUNDLED WITH
|
|
109
60
|
1.17.3
|
data/features/docker.feature
CHANGED
|
@@ -30,7 +30,7 @@ Feature: The docker command
|
|
|
30
30
|
Then the output should contain "x Your project does not seem to be properly set up."
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
Scenario: Setup runs docker-compose
|
|
33
|
+
Scenario: Setup runs docker-compose pull
|
|
34
34
|
Given a file named "docker-compose.yml" with:
|
|
35
35
|
"""
|
|
36
36
|
services:
|
|
@@ -38,7 +38,7 @@ Feature: The docker command
|
|
|
38
38
|
"""
|
|
39
39
|
|
|
40
40
|
When I run `geordi docker setup`
|
|
41
|
-
Then the output should contain "docker-compose
|
|
41
|
+
Then the output should contain "docker-compose pull"
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
Scenario: Shell checks for existence of docker
|
|
@@ -48,12 +48,15 @@ Feature: The docker command
|
|
|
48
48
|
And the output should contain "x You need to install docker first"
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
Scenario: Shell runs docker-compose run
|
|
51
|
+
Scenario: Shell runs docker-compose run main
|
|
52
52
|
Given a file named "docker-compose.yml" with:
|
|
53
53
|
"""
|
|
54
54
|
services:
|
|
55
55
|
main: foo
|
|
56
56
|
"""
|
|
57
|
+
And I set the environment variables to:
|
|
58
|
+
| variable | value |
|
|
59
|
+
| SSH_AUTH_SOCK | /path/to/sock/ssh |
|
|
57
60
|
|
|
58
61
|
When I run `geordi docker shell`
|
|
59
|
-
Then the output should contain "docker-compose run --service-ports main"
|
|
62
|
+
Then the output should contain "docker-compose run --service-ports -v /path/to/sock:/path/to/sock -e SSH_AUTH_SOCK=/path/to/sock/ssh main"
|
data/lib/geordi/cucumber.rb
CHANGED
|
@@ -13,7 +13,7 @@ module Geordi
|
|
|
13
13
|
VNC_DISPLAY = ':17'
|
|
14
14
|
VNC_SERVER_DEFAULT_OPTIONS = '-localhost -nolisten tcp -SecurityTypes None -geometry 1280x1024'
|
|
15
15
|
VNC_SERVER_COMMAND = "vncserver #{VNC_DISPLAY} #{ENV.fetch('GEORDI_VNC_OPTIONS', VNC_SERVER_DEFAULT_OPTIONS)}"
|
|
16
|
-
VNC_VIEWER_COMMAND = "vncviewer
|
|
16
|
+
VNC_VIEWER_COMMAND = "vncviewer"
|
|
17
17
|
VNC_ENV_VARIABLES = %w[DISPLAY BROWSER LAUNCHY_BROWSER]
|
|
18
18
|
|
|
19
19
|
def run(files, cucumber_options, options = {})
|
|
@@ -30,10 +30,10 @@ module Geordi
|
|
|
30
30
|
system command # Util.system! would reset the Firefox PATH
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
def launch_vnc_viewer
|
|
33
|
+
def launch_vnc_viewer(source = VNC_DISPLAY)
|
|
34
34
|
fork {
|
|
35
35
|
error = capture_stderr do
|
|
36
|
-
system(VNC_VIEWER_COMMAND)
|
|
36
|
+
system(VNC_VIEWER_COMMAND, source)
|
|
37
37
|
end
|
|
38
38
|
unless $?.success?
|
|
39
39
|
if $?.exitstatus == 127
|
data/lib/geordi/docker.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require 'geordi/interaction'
|
|
2
|
+
require 'geordi/cucumber'
|
|
2
3
|
require 'yaml'
|
|
3
4
|
|
|
4
5
|
module Geordi
|
|
@@ -10,7 +11,7 @@ module Geordi
|
|
|
10
11
|
def setup
|
|
11
12
|
check_installation_and_config
|
|
12
13
|
announce('Building containers...')
|
|
13
|
-
if execute(:system, 'docker-compose', '
|
|
14
|
+
if execute(:system, 'docker-compose', 'pull')
|
|
14
15
|
success('Build successful.')
|
|
15
16
|
else
|
|
16
17
|
fail('Build failed.')
|
|
@@ -19,7 +20,14 @@ module Geordi
|
|
|
19
20
|
|
|
20
21
|
def shell
|
|
21
22
|
check_installation_and_config
|
|
22
|
-
|
|
23
|
+
command = [:exec, 'docker-compose', 'run', '--service-ports']
|
|
24
|
+
command += ssh_agent_forward
|
|
25
|
+
command += ['main']
|
|
26
|
+
execute(*command)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def vnc
|
|
30
|
+
Cucumber.new.launch_vnc_viewer('::5967')
|
|
23
31
|
end
|
|
24
32
|
|
|
25
33
|
private
|
|
@@ -67,5 +75,14 @@ module Geordi
|
|
|
67
75
|
rescue
|
|
68
76
|
false
|
|
69
77
|
end
|
|
78
|
+
|
|
79
|
+
def ssh_agent_forward
|
|
80
|
+
if (auth_sock = ENV['SSH_AUTH_SOCK'])
|
|
81
|
+
dirname = File.dirname(auth_sock)
|
|
82
|
+
['-v', "#{dirname}:#{dirname}", '-e', "SSH_AUTH_SOCK=#{auth_sock}"]
|
|
83
|
+
else
|
|
84
|
+
[]
|
|
85
|
+
end
|
|
86
|
+
end
|
|
70
87
|
end
|
|
71
88
|
end
|
data/lib/geordi/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: geordi
|
|
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
|
- Henning Koch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-11
|
|
11
|
+
date: 2020-12-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|