neptuno 1.0.10 → 1.2.0

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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +6 -5
  3. data/Rakefile +6 -6
  4. data/exe/neptuno +1 -1
  5. data/lib/neptuno/cli/activate.rb +19 -19
  6. data/lib/neptuno/cli/base.rb +4 -4
  7. data/lib/neptuno/cli/clone.rb +8 -2
  8. data/lib/neptuno/cli/configure.rb +3 -3
  9. data/lib/neptuno/cli/execute.rb +4 -4
  10. data/lib/neptuno/cli/init.rb +5 -5
  11. data/lib/neptuno/cli/install.rb +15 -17
  12. data/lib/neptuno/cli/list.rb +21 -31
  13. data/lib/neptuno/cli/version.rb +1 -1
  14. data/lib/neptuno/cli.rb +28 -28
  15. data/lib/neptuno/docker/attach.rb +2 -2
  16. data/lib/neptuno/docker/build.rb +5 -5
  17. data/lib/neptuno/docker/down.rb +18 -9
  18. data/lib/neptuno/docker/log.rb +1 -1
  19. data/lib/neptuno/docker/restart.rb +8 -8
  20. data/lib/neptuno/docker/services.rb +2 -2
  21. data/lib/neptuno/docker/up.rb +6 -11
  22. data/lib/neptuno/environment/config.rb +3 -3
  23. data/lib/neptuno/environment/update.rb +1 -1
  24. data/lib/neptuno/git/pull.rb +2 -2
  25. data/lib/neptuno/git/stash.rb +2 -2
  26. data/lib/neptuno/k8s/attach.rb +6 -6
  27. data/lib/neptuno/overmind/connect.rb +20 -71
  28. data/lib/neptuno/overmind/start.rb +22 -56
  29. data/lib/neptuno/overmind/stop.rb +12 -6
  30. data/lib/neptuno/services/add.rb +9 -15
  31. data/lib/neptuno/services/destroy.rb +1 -1
  32. data/lib/neptuno/services/list.rb +3 -2
  33. data/lib/neptuno/services/update.rb +8 -8
  34. data/lib/neptuno/templates/{tmuxinator.yml → .tmuxinator.yml} +2 -4
  35. data/lib/neptuno/templates/docker-compose.yml +18 -7
  36. data/lib/neptuno/templates/neptuno.yml +6 -0
  37. data/lib/neptuno/tty/config.rb +44 -10
  38. data/lib/neptuno/tty/file.rb +6 -6
  39. data/lib/neptuno/version.rb +1 -1
  40. data/lib/neptuno.rb +11 -11
  41. data/neptuno.gemspec +26 -26
  42. metadata +16 -15
@@ -5,7 +5,7 @@ module Neptuno
5
5
  # Wrapper class for TTY gem
6
6
  module File
7
7
  TTY = ::TTY::File
8
- ABORT_MESSAGE = 'fatal: not a Neptuno repository (or any of the parent directories)'
8
+ ABORT_MESSAGE = "fatal: not a Neptuno repository (or any of the parent directories)"
9
9
 
10
10
  def file
11
11
  TTY
@@ -13,7 +13,7 @@ module Neptuno
13
13
 
14
14
  # define path helpers
15
15
  def project
16
- neptuno_path.split('/').last
16
+ neptuno_path.split("/").last
17
17
  end
18
18
 
19
19
  def in_service?
@@ -21,7 +21,7 @@ module Neptuno
21
21
  end
22
22
 
23
23
  def service
24
- ENV['PWD'].match(%r{services/([^/]*)})&.captures&.first
24
+ ENV["PWD"].match(%r{services/([^/]*)})&.captures&.first
25
25
  end
26
26
 
27
27
  def neptuno_path
@@ -29,10 +29,10 @@ module Neptuno
29
29
 
30
30
  pwd = Dir.pwd
31
31
  loop do
32
- return pwd if pwd == ''
33
- return @base_path = pwd if Dir.children(pwd).include?('neptuno.yml')
32
+ return pwd if pwd == ""
33
+ return @base_path = pwd if Dir.children(pwd).include?("neptuno.yml")
34
34
 
35
- pwd = pwd.split('/')[0..-2].join('/')
35
+ pwd = pwd.split("/")[0..-2].join("/")
36
36
  end
37
37
  end
38
38
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Neptuno
4
- VERSION = '1.0.10'
4
+ VERSION = "1.2.0"
5
5
  end
data/lib/neptuno.rb CHANGED
@@ -1,18 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'zeitwerk'
4
- require 'tty-config'
5
- require 'tty-command'
6
- require 'tty-which'
7
- require 'tty-file'
8
- require 'tty-spinner'
9
- require 'hirb'
10
- require 'dotiw'
3
+ require "zeitwerk"
4
+ require "tty-config"
5
+ require "tty-command"
6
+ require "tty-which"
7
+ require "tty-file"
8
+ require "tty-spinner"
9
+ require "hirb"
10
+ require "dotiw"
11
11
 
12
12
  loader = Zeitwerk::Loader.for_gem
13
- loader.inflector.inflect('neptuno' => 'Neptuno')
14
- loader.inflector.inflect('cli' => 'CLI')
15
- loader.inflector.inflect('tty' => 'TTY')
13
+ loader.inflector.inflect("neptuno" => "Neptuno")
14
+ loader.inflector.inflect("cli" => "CLI")
15
+ loader.inflector.inflect("tty" => "TTY")
16
16
  loader.setup
17
17
 
18
18
  module Neptuno
data/neptuno.gemspec CHANGED
@@ -1,47 +1,47 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'lib/neptuno/version'
3
+ require_relative "lib/neptuno/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = 'neptuno'
6
+ spec.name = "neptuno"
7
7
  spec.version = Neptuno::VERSION
8
- spec.authors = ['Roberto Plancarte']
9
- spec.email = ['roberto.plancarte@gmail.com']
8
+ spec.authors = ["Roberto Plancarte"]
9
+ spec.email = ["roberto.plancarte@gmail.com"]
10
10
 
11
- spec.summary = 'Unified Development Environment CLI'
11
+ spec.summary = "Unified Development Environment CLI"
12
12
  spec.description = "A CLI for Neptuno distributed architectural style applications"
13
- spec.homepage = 'https://github.com/apptegy/neptuno'
14
- spec.license = 'Apache-2.0'
15
- spec.required_ruby_version = '>= 2.3.0'
13
+ spec.homepage = "https://github.com/apptegy/neptuno"
14
+ spec.license = "Apache-2.0"
15
+ spec.required_ruby_version = ">= 2.3.0"
16
16
 
17
17
  # spec.metadata['allowed_push_host'] = "TODO: Set to 'https://mygemserver.com'"
18
18
 
19
- spec.metadata['homepage_uri'] = "https://apptegy.github.io/neptuno/"
20
- spec.metadata['source_code_uri'] = "https://github.com/apptegy/neptuno"
21
- spec.metadata['changelog_uri'] = "https://github.com/apptegy/releases"
19
+ spec.metadata["homepage_uri"] = "https://apptegy.github.io/neptuno/"
20
+ spec.metadata["source_code_uri"] = "https://github.com/apptegy/neptuno"
21
+ spec.metadata["changelog_uri"] = "https://github.com/apptegy/releases"
22
22
 
23
23
  # Specify which files should be added to the gem when it is released.
24
24
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
25
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
26
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
27
27
  end
28
- spec.bindir = 'exe'
28
+ spec.bindir = "exe"
29
29
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
- spec.require_paths = ['lib']
30
+ spec.require_paths = ["lib"]
31
31
 
32
32
  # Neptuno dependency list
33
+ spec.add_dependency "dotiw"
34
+ spec.add_dependency "dry-cli"
35
+ spec.add_dependency "hirb"
33
36
  spec.add_dependency "psych", "< 4"
34
- spec.add_dependency 'dotiw'
35
- spec.add_dependency 'dry-cli'
36
- spec.add_dependency 'hirb'
37
- spec.add_dependency 'tty-command'
38
- spec.add_dependency 'tty-config'
39
- spec.add_dependency 'tty-file'
40
- spec.add_dependency 'tty-prompt'
41
- spec.add_dependency 'tty-spinner'
42
- spec.add_dependency 'tty-which'
43
- spec.add_dependency 'zeitwerk'
44
-
45
- spec.add_development_dependency 'minitest-reporters'
46
- spec.add_development_dependency 'standard'
37
+ spec.add_dependency "tty-command"
38
+ spec.add_dependency "tty-config"
39
+ spec.add_dependency "tty-file"
40
+ spec.add_dependency "tty-prompt"
41
+ spec.add_dependency "tty-spinner"
42
+ spec.add_dependency "tty-which"
43
+ spec.add_dependency "zeitwerk"
44
+
45
+ spec.add_development_dependency "minitest-reporters"
46
+ spec.add_development_dependency "standard"
47
47
  end
metadata CHANGED
@@ -1,31 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neptuno
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.2.0
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-12-07 00:00:00.000000000 Z
11
+ date: 2023-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: psych
14
+ name: dotiw
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - <
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: '4'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - <
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: '4'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: dotiw
28
+ name: dry-cli
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '>='
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: dry-cli
42
+ name: hirb
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '>='
@@ -53,19 +53,19 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: hirb
56
+ name: psych
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - <
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '4'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - <
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '4'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: tty-command
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -254,8 +254,9 @@ files:
254
254
  - lib/neptuno/services/destroy.rb
255
255
  - lib/neptuno/services/list.rb
256
256
  - lib/neptuno/services/update.rb
257
+ - lib/neptuno/templates/.tmuxinator.yml
257
258
  - lib/neptuno/templates/docker-compose.yml
258
- - lib/neptuno/templates/tmuxinator.yml
259
+ - lib/neptuno/templates/neptuno.yml
259
260
  - lib/neptuno/tty/command.rb
260
261
  - lib/neptuno/tty/config.rb
261
262
  - lib/neptuno/tty/file.rb