neptuno 1.0.3 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/docs/splash.png +0 -0
- data/lib/neptuno/cli/activate.rb +1 -2
- data/lib/neptuno/cli/list.rb +2 -1
- data/lib/neptuno/docker/attach.rb +5 -2
- data/lib/neptuno/docker/log.rb +5 -2
- data/lib/neptuno/docker/up.rb +5 -2
- data/lib/neptuno/overmind/connect.rb +1 -3
- data/lib/neptuno/overmind/start.rb +1 -2
- data/lib/neptuno/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: 4a6835e63059152770ea372ddea2f3ef29432602e945ca066da50395c4619863
|
4
|
+
data.tar.gz: b78fa32b47aab0b82c137244fbe474c187be421747cdf098fd1bbf62553d317a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7d8c01bf9e8577226fc496b68856fe6b8d3bfb81efba45e3e9b0a38003af2ccec40476a418fe23a547743b1560dfb6831eed69067777d9a28ddb1a1f3f2d871
|
7
|
+
data.tar.gz: fc11b7c142f119f796ccbb46db0fbe2c80ecc8bcf371d4d73f328f5bf435705e68f8524af0fdd89825ed580428cee9e51424804bc889fb9c019cf676b9a20f07
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -59,7 +59,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
59
59
|
|
60
60
|
## Contributing
|
61
61
|
|
62
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
62
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/apptegy/neptuno. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/neptuno/blob/master/CODE_OF_CONDUCT.md).
|
63
63
|
|
64
64
|
## License
|
65
65
|
|
data/docs/splash.png
CHANGED
Binary file
|
data/lib/neptuno/cli/activate.rb
CHANGED
@@ -12,7 +12,6 @@ module Neptuno
|
|
12
12
|
argument :services, type: :array, required: false, desc: 'Optional list of services'
|
13
13
|
|
14
14
|
def call(services: [], **options)
|
15
|
-
dd = config.fetch('docker_delimiter') || '-'
|
16
15
|
multi_spinner = ::TTY::Spinner::Multi.new('[:spinner] Services')
|
17
16
|
spinners = {}
|
18
17
|
count = 0
|
@@ -28,7 +27,7 @@ module Neptuno
|
|
28
27
|
ps = `cd #{neptuno_path} && docker compose ps`.split("\n").compact.select { |x| x.match(/^\s*#{project}/) }
|
29
28
|
|
30
29
|
running_services.sort.each do |service|
|
31
|
-
service_ps = ps.find {
|
30
|
+
service_ps = ps.find {|s| s =~ /#{project}[-_]#{service}[-_]\d\s/ }
|
32
31
|
|
33
32
|
status = :dead if service_ps.to_s.include?('exited')
|
34
33
|
status = :starting if service_ps.to_s.include?('starting')
|
data/lib/neptuno/cli/list.rb
CHANGED
@@ -9,10 +9,13 @@ module Neptuno
|
|
9
9
|
option :up, type: :boolean, default: false, desc: 'Try to start containers before connecting'
|
10
10
|
|
11
11
|
def call(**options)
|
12
|
-
dd = config.fetch('docker_delimiter') || '-'
|
13
12
|
command_service_to('attach', service_as_args: options[:args].first) do |service, project|
|
14
13
|
system("cd #{neptuno_path} && docker compose up -d #{service}") if options.fetch(:up)
|
15
|
-
system("cd #{neptuno_path} && docker attach #{project}#{
|
14
|
+
success = system("cd #{neptuno_path} && docker attach #{project}_#{service}_1")
|
15
|
+
unless success
|
16
|
+
puts "Trying #{project}-#{services.first}-1"
|
17
|
+
system("cd #{neptuno_path} && docker attach #{project}-#{service}-1")
|
18
|
+
end
|
16
19
|
end
|
17
20
|
end
|
18
21
|
end
|
data/lib/neptuno/docker/log.rb
CHANGED
@@ -7,9 +7,12 @@ module Neptuno
|
|
7
7
|
desc "Docker: Show a container's log"
|
8
8
|
|
9
9
|
def call(**options)
|
10
|
-
dd = config.fetch('docker_delimiter') || '-'
|
11
10
|
command_service_to('log', service_as_args: options[:args].first) do |service, project|
|
12
|
-
system("cd #{neptuno_path} && docker logs -f #{project}#{
|
11
|
+
success = system("cd #{neptuno_path} && docker logs -f #{project}_#{service}_1")
|
12
|
+
unless success
|
13
|
+
puts "Trying #{project}-#{services.first}-1"
|
14
|
+
system("cd #{neptuno_path} && docker logs -f #{project}-#{service}-1")
|
15
|
+
end
|
13
16
|
end
|
14
17
|
end
|
15
18
|
end
|
data/lib/neptuno/docker/up.rb
CHANGED
@@ -11,10 +11,13 @@ module Neptuno
|
|
11
11
|
argument :services, type: :array, required: false, desc: 'Optional list of services'
|
12
12
|
|
13
13
|
def call(services: [], **options)
|
14
|
-
dd = config.fetch('docker_delimiter') || '-'
|
15
14
|
command_services_to('come up', all: options.fetch(:all), services_as_args: services) do |services, project|
|
16
15
|
system("cd #{neptuno_path} && docker compose up -d #{services.join(' ')}")
|
17
|
-
system("cd #{neptuno_path} && docker logs -f #{project}#{
|
16
|
+
success = system("cd #{neptuno_path} && docker logs -f #{project}_#{services.first}_1") if options.fetch(:log)
|
17
|
+
unless success
|
18
|
+
puts "Trying #{project}-#{services.first}-1"
|
19
|
+
system("cd #{neptuno_path} && docker logs -f #{project}-#{services.first}-1") if options.fetch(:log)
|
20
|
+
end
|
18
21
|
end
|
19
22
|
end
|
20
23
|
end
|
@@ -15,7 +15,6 @@ module Neptuno
|
|
15
15
|
argument :services, type: :array, required: false, desc: 'Optional list of services'
|
16
16
|
|
17
17
|
def call(services: [], **options)
|
18
|
-
dd = config.fetch('docker_delimiter') || '-'
|
19
18
|
multi_spinner = ::TTY::Spinner::Multi.new('[:spinner] Services')
|
20
19
|
spinners = {}
|
21
20
|
count = 0
|
@@ -31,7 +30,7 @@ module Neptuno
|
|
31
30
|
ps = `cd #{neptuno_path} && docker-compose ps`.split("\n").compact.select { |x| x.match(/^\s*#{project}/) }
|
32
31
|
|
33
32
|
running_services.sort.each do |service|
|
34
|
-
service_ps = ps.find {
|
33
|
+
service_ps = ps.find {|s| s =~ /#{project}[-_]#{service}[-_]\d\s/ }
|
35
34
|
|
36
35
|
status = :dead if service_ps.to_s.include?('exited')
|
37
36
|
status = :starting if service_ps.to_s.include?('starting')
|
@@ -88,7 +87,6 @@ module Neptuno
|
|
88
87
|
begin
|
89
88
|
system("cd #{neptuno_path}/procfiles/#{services.first} && overmind connect shell", exception: true)
|
90
89
|
rescue RuntimeError
|
91
|
-
puts 'sry'
|
92
90
|
system("cd #{neptuno_path} && docker compose exec #{service} kill -9 -1")
|
93
91
|
system("cd #{neptuno_path}/procfiles/#{service} && rm .overmind.sock > /dev/null 2>&1")
|
94
92
|
system("cd #{neptuno_path}/procfiles/#{service} && overmind start -D -N > /dev/null 2>&1")
|
@@ -13,7 +13,6 @@ module Neptuno
|
|
13
13
|
argument :services, type: :array, required: false, desc: 'Optional list of services'
|
14
14
|
|
15
15
|
def call(services: [], **options)
|
16
|
-
dd = config.fetch('docker_delimiter') || '-'
|
17
16
|
multi_spinner = ::TTY::Spinner::Multi.new('[:spinner] Services')
|
18
17
|
spinners = {}
|
19
18
|
count = 0
|
@@ -29,7 +28,7 @@ module Neptuno
|
|
29
28
|
ps = `cd #{neptuno_path} && docker compose ps`.split("\n").compact.select { |x| x.match(/^\s*#{project}/) }
|
30
29
|
|
31
30
|
running_services.sort.each do |service|
|
32
|
-
service_ps = ps.find {
|
31
|
+
service_ps = ps.find {|s| s =~ /#{project}[-_]#{service}[-_]\d\s/ }
|
33
32
|
|
34
33
|
status = :dead if service_ps.to_s.include?('exited')
|
35
34
|
status = :starting if service_ps.to_s.include?('starting')
|
data/lib/neptuno/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neptuno
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Plancarte
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotiw
|