neptuno 1.0.6 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/gem-push.yml +3 -3
- data/Gemfile +4 -4
- data/Gemfile.lock +16 -14
- data/bin/docker-compose.yml +84 -0
- data/bin/neptuno.yml +14 -0
- data/lib/neptuno/cli/base.rb +3 -3
- data/lib/neptuno/cli/clone.rb +25 -0
- data/lib/neptuno/cli/init.rb +2 -2
- data/lib/neptuno/cli/install.rb +13 -1
- data/lib/neptuno/cli/list.rb +3 -0
- data/lib/neptuno/cli.rb +1 -0
- data/lib/neptuno/docker/build.rb +1 -0
- data/lib/neptuno/docker/down.rb +1 -0
- data/lib/neptuno/docker/restart.rb +1 -0
- data/lib/neptuno/docker/up.rb +1 -0
- data/lib/neptuno/overmind/connect.rb +3 -3
- data/lib/neptuno/templates/tmuxinator.yml +44 -0
- data/lib/neptuno/tty/config.rb +16 -0
- data/lib/neptuno/tty/file.rb +8 -0
- data/lib/neptuno/version.rb +1 -1
- data/neptuno.gemspec +5 -4
- metadata +53 -38
- data/lib/neptuno/templates/Dockerfile +0 -0
- data/lib/neptuno/templates/Procfile +0 -0
- data/lib/neptuno/templates/ude.yml +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fdd35003a1d21e386935b986fdfb6ad8c80e046b
|
4
|
+
data.tar.gz: 55858aa807a99d00f00659ffbb62e34053f4250e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eef5f6e972d2f45eaf2bd829eddf7527ff338e7408d1fad72626552f1d31db2cd9c9f33d3b72c558c82c3734be8c4b55c6b9282ba17057727b577d74a6b4134f
|
7
|
+
data.tar.gz: 4cc4927e14a4fa716090518106191fc37fbab4d45fb06d125f53096eda5f3c137cbb3f4740d7ad7f26c50706f1d184295b0d6de3b514e314432e32363bbe3ff1
|
@@ -16,10 +16,10 @@ jobs:
|
|
16
16
|
|
17
17
|
steps:
|
18
18
|
- uses: actions/checkout@v3
|
19
|
-
- name: Set up Ruby 2.
|
20
|
-
uses:
|
19
|
+
- name: Set up Ruby 2.0.0
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
21
|
with:
|
22
|
-
ruby-version: 2.
|
22
|
+
ruby-version: 2.0.0
|
23
23
|
|
24
24
|
- name: Publish to RubyGems
|
25
25
|
run: |
|
data/Gemfile
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
source
|
3
|
+
source "https://rubygems.org"
|
4
4
|
|
5
5
|
# Specify your gem's dependencies in neptuno.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
gem
|
8
|
+
gem "rake"
|
9
9
|
|
10
|
-
gem
|
10
|
+
gem "minitest"
|
11
11
|
|
12
|
-
gem
|
12
|
+
gem "rubocop", require: false
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
neptuno (1.0.
|
4
|
+
neptuno (1.0.8)
|
5
5
|
dotiw
|
6
6
|
dry-cli
|
7
7
|
hirb
|
8
|
+
psych (< 4)
|
8
9
|
tty-command
|
9
10
|
tty-config
|
10
11
|
tty-file
|
@@ -16,7 +17,7 @@ PATH
|
|
16
17
|
GEM
|
17
18
|
remote: https://rubygems.org/
|
18
19
|
specs:
|
19
|
-
activesupport (7.0.
|
20
|
+
activesupport (7.0.4)
|
20
21
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
21
22
|
i18n (>= 1.6, < 2)
|
22
23
|
minitest (>= 5.1)
|
@@ -29,12 +30,12 @@ GEM
|
|
29
30
|
dotiw (5.3.3)
|
30
31
|
activesupport
|
31
32
|
i18n
|
32
|
-
dry-cli (0.
|
33
|
+
dry-cli (1.0.0)
|
33
34
|
hirb (0.7.3)
|
34
35
|
i18n (1.12.0)
|
35
36
|
concurrent-ruby (~> 1.0)
|
36
37
|
json (2.6.2)
|
37
|
-
minitest (5.16.
|
38
|
+
minitest (5.16.3)
|
38
39
|
minitest-reporters (1.5.0)
|
39
40
|
ansi
|
40
41
|
builder
|
@@ -45,29 +46,30 @@ GEM
|
|
45
46
|
ast (~> 2.4.1)
|
46
47
|
pastel (0.8.0)
|
47
48
|
tty-color (~> 0.5)
|
49
|
+
psych (3.3.4)
|
48
50
|
rainbow (3.1.1)
|
49
51
|
rake (13.0.6)
|
50
|
-
regexp_parser (2.
|
52
|
+
regexp_parser (2.6.0)
|
51
53
|
rexml (3.2.5)
|
52
|
-
rubocop (1.
|
54
|
+
rubocop (1.39.0)
|
53
55
|
json (~> 2.3)
|
54
56
|
parallel (~> 1.10)
|
55
57
|
parser (>= 3.1.2.1)
|
56
58
|
rainbow (>= 2.2.2, < 4.0)
|
57
59
|
regexp_parser (>= 1.8, < 3.0)
|
58
60
|
rexml (>= 3.2.5, < 4.0)
|
59
|
-
rubocop-ast (>= 1.
|
61
|
+
rubocop-ast (>= 1.23.0, < 2.0)
|
60
62
|
ruby-progressbar (~> 1.7)
|
61
63
|
unicode-display_width (>= 1.4.0, < 3.0)
|
62
|
-
rubocop-ast (1.
|
64
|
+
rubocop-ast (1.23.0)
|
63
65
|
parser (>= 3.1.1.0)
|
64
|
-
rubocop-performance (1.
|
66
|
+
rubocop-performance (1.15.0)
|
65
67
|
rubocop (>= 1.7.0, < 2.0)
|
66
68
|
rubocop-ast (>= 0.4.0)
|
67
69
|
ruby-progressbar (1.11.0)
|
68
|
-
standard (1.
|
69
|
-
rubocop (= 1.
|
70
|
-
rubocop-performance (= 1.
|
70
|
+
standard (1.18.0)
|
71
|
+
rubocop (= 1.39.0)
|
72
|
+
rubocop-performance (= 1.15.0)
|
71
73
|
tty-color (0.6.0)
|
72
74
|
tty-command (0.10.1)
|
73
75
|
pastel (~> 0.8)
|
@@ -90,9 +92,9 @@ GEM
|
|
90
92
|
tty-which (0.5.0)
|
91
93
|
tzinfo (2.0.5)
|
92
94
|
concurrent-ruby (~> 1.0)
|
93
|
-
unicode-display_width (2.
|
95
|
+
unicode-display_width (2.3.0)
|
94
96
|
wisper (2.0.1)
|
95
|
-
zeitwerk (2.6.
|
97
|
+
zeitwerk (2.6.6)
|
96
98
|
|
97
99
|
PLATFORMS
|
98
100
|
x86_64-darwin-21
|
@@ -0,0 +1,84 @@
|
|
1
|
+
---
|
2
|
+
version: '3'
|
3
|
+
|
4
|
+
volumes:
|
5
|
+
db_data:
|
6
|
+
redis_data:
|
7
|
+
rails_demo_bundle_cache:
|
8
|
+
|
9
|
+
services:
|
10
|
+
##########################
|
11
|
+
# Reverse Proxy
|
12
|
+
##########################
|
13
|
+
nginx:
|
14
|
+
build:
|
15
|
+
context: .
|
16
|
+
dockerfile: ./dockerfiles/nginx/Dockerfile
|
17
|
+
ports:
|
18
|
+
- 80:80
|
19
|
+
|
20
|
+
##########################
|
21
|
+
# Database
|
22
|
+
##########################
|
23
|
+
db:
|
24
|
+
image: postgres
|
25
|
+
restart: always
|
26
|
+
environment:
|
27
|
+
POSTGRES_PASSWORD: password
|
28
|
+
|
29
|
+
##########################
|
30
|
+
# Message Queue
|
31
|
+
##########################
|
32
|
+
mq:
|
33
|
+
image: redis:alpine
|
34
|
+
volumes:
|
35
|
+
- redis_data:/data
|
36
|
+
|
37
|
+
##########################
|
38
|
+
# Rails demo
|
39
|
+
##########################
|
40
|
+
rails_demo:
|
41
|
+
healthcheck:
|
42
|
+
test: "ls ./tmp/ | grep ready.txt"
|
43
|
+
stdin_open: true
|
44
|
+
tty: true
|
45
|
+
command: ash
|
46
|
+
build:
|
47
|
+
context: .
|
48
|
+
dockerfile: ./dockerfiles/rails_demo/Dockerfile
|
49
|
+
volumes:
|
50
|
+
- ~/.ssh:/root/.ssh:ro
|
51
|
+
- ~/.bundle:/root/.bundle
|
52
|
+
- ~/.npmrc:/root/.npmrc:ro
|
53
|
+
- rails_demo_bundle_cache:/bundle:delegated
|
54
|
+
- ./services/rails_demo:/usr/src/app:cached
|
55
|
+
ports:
|
56
|
+
- "3000:80"
|
57
|
+
- "4000:4000"
|
58
|
+
depends_on:
|
59
|
+
- nginx
|
60
|
+
- mq
|
61
|
+
- db
|
62
|
+
command: bash
|
63
|
+
|
64
|
+
##########################
|
65
|
+
# Selenium
|
66
|
+
##########################
|
67
|
+
selenium-hub:
|
68
|
+
image: selenium/hub:latest
|
69
|
+
container_name: selenium-hub
|
70
|
+
ports:
|
71
|
+
- "4442:4442"
|
72
|
+
- "4443:4443"
|
73
|
+
- "4444:4444"
|
74
|
+
|
75
|
+
chrome:
|
76
|
+
image: selenium/node-chrome:dev
|
77
|
+
shm_size: 2gb
|
78
|
+
depends_on:
|
79
|
+
- selenium-hub
|
80
|
+
environment:
|
81
|
+
- SE_EVENT_BUS_HOST=selenium-hub
|
82
|
+
- SE_EVENT_BUS_PUBLISH_PORT=4442
|
83
|
+
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
|
84
|
+
- JAVA_OPTS=-Dwebdriver.chrome.whitelistedIps=
|
data/bin/neptuno.yml
ADDED
data/lib/neptuno/cli/base.rb
CHANGED
@@ -9,15 +9,15 @@ module Neptuno
|
|
9
9
|
include TTY::File
|
10
10
|
include Neptuno::TTY::Command
|
11
11
|
|
12
|
-
ABORT_MESSAGE =
|
12
|
+
ABORT_MESSAGE = "fatal: not a Neptuno repository (or any of the parent directories)"
|
13
13
|
|
14
14
|
def initialize
|
15
|
-
abort ABORT_MESSAGE if neptuno_path ==
|
15
|
+
abort ABORT_MESSAGE if neptuno_path == ""
|
16
16
|
config.append_path(neptuno_path)
|
17
17
|
config.read
|
18
18
|
end
|
19
19
|
|
20
|
-
def command_service_to(request, service_as_args:
|
20
|
+
def command_service_to(request, service_as_args: "")
|
21
21
|
chosen_service ||= service_as_args&.empty? ? nil : service_as_args
|
22
22
|
chosen_service ||= service if in_service?
|
23
23
|
chosen_service ||= prompt.select("Command service to #{request}:", services)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Neptuno
|
4
|
+
module CLI
|
5
|
+
# Init Neptuno files
|
6
|
+
|
7
|
+
class Clone < Dry::CLI::Command
|
8
|
+
desc 'Clone a neptuno compliant project'
|
9
|
+
def call(**options)
|
10
|
+
git_url = options[:args].first
|
11
|
+
args_path = options[:args].second
|
12
|
+
path = args_path || git_url.split('/').last.split('.').first
|
13
|
+
`git clone --recurse-submodules #{git_url} #{path}`
|
14
|
+
`cd #{path}`
|
15
|
+
`cd #{path} && neptuno services update -am`
|
16
|
+
puts "Building Docker images"
|
17
|
+
`cd #{path} && neptuno build -a`
|
18
|
+
puts "Starting Docker containers"
|
19
|
+
`cd #{path} && neptuno up -a`
|
20
|
+
puts "Starting service processes"
|
21
|
+
`cd #{path} && neptuno start -a`
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/neptuno/cli/init.rb
CHANGED
@@ -10,8 +10,7 @@ module Neptuno
|
|
10
10
|
|
11
11
|
desc 'Initializes a Neptuno project folder structure'
|
12
12
|
|
13
|
-
WORK_TREE = { '.' => ['
|
14
|
-
{ 'services' => [], 'dockerfiles' => [], 'procfiles' => [], 'environments' => [] }] }.freeze
|
13
|
+
WORK_TREE = { '.' => [{ 'services' => [], 'dockerfiles' => [], 'procfiles' => [], 'environments' => [] }] }.freeze
|
15
14
|
|
16
15
|
CONFIG = nil
|
17
16
|
|
@@ -21,6 +20,7 @@ module Neptuno
|
|
21
20
|
config.set(:configured_services, value: '')
|
22
21
|
config.set(:services, value: [])
|
23
22
|
config.write(create: true, force: true)
|
23
|
+
`cp #{File.expand_path("../../templates", __FILE__)}/* ./`
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
data/lib/neptuno/cli/install.rb
CHANGED
@@ -20,6 +20,10 @@ module Neptuno
|
|
20
20
|
install 'tmux'
|
21
21
|
install 'overmind'
|
22
22
|
install 'tmuxinator'
|
23
|
+
|
24
|
+
if(system("apt-get -v"))
|
25
|
+
system("sudo apt-get update")
|
26
|
+
end
|
23
27
|
end
|
24
28
|
|
25
29
|
def install(package)
|
@@ -27,7 +31,15 @@ module Neptuno
|
|
27
31
|
puts "#{package} is already installed"
|
28
32
|
else
|
29
33
|
puts "Installing #{package}"
|
30
|
-
system("brew
|
34
|
+
if(system("brew -v"))
|
35
|
+
system("brew install #{package}")
|
36
|
+
else
|
37
|
+
if(package == 'overmind')
|
38
|
+
system("go install github.com/DarthSim/overmind/v2@latest")
|
39
|
+
else
|
40
|
+
system("sudo apt-get install #{package} -y")
|
41
|
+
end
|
42
|
+
end
|
31
43
|
end
|
32
44
|
end
|
33
45
|
end
|
data/lib/neptuno/cli/list.rb
CHANGED
@@ -61,6 +61,9 @@ module Neptuno
|
|
61
61
|
branches = service_current_branches
|
62
62
|
dates = last_commit_date
|
63
63
|
|
64
|
+
x = docker_compose_services - neptuno_procs.select{|k,v| v.length > 0}.keys
|
65
|
+
x.each{|y| neptuno_procs[y] = ""}
|
66
|
+
|
64
67
|
procs = neptuno_procs.map do |name, *processes|
|
65
68
|
display_date = get_display_date(dates[name], options.fetch(:relative))
|
66
69
|
state = docker_procs[name]&.match?(/running/) ? 'on' : nil
|
data/lib/neptuno/cli.rb
CHANGED
@@ -10,6 +10,7 @@ module Neptuno
|
|
10
10
|
|
11
11
|
register 'version', Version, aliases: ['v', '-v', '--version', 'info']
|
12
12
|
register 'init', Init
|
13
|
+
register 'clone', Clone
|
13
14
|
register 'ls', List, aliases: ['ps']
|
14
15
|
register 'activate', Activate, aliases: ['a']
|
15
16
|
register 'config', Configure, aliases: %w[configure conf cc]
|
data/lib/neptuno/docker/build.rb
CHANGED
@@ -11,6 +11,7 @@ module Neptuno
|
|
11
11
|
|
12
12
|
def call(services: [], **options)
|
13
13
|
command_services_to('build', all: options.fetch(:all), services_as_args: services) do |services|
|
14
|
+
make_service_files(services)
|
14
15
|
system("cd #{neptuno_path} && docker compose build #{services.join(' ')}")
|
15
16
|
end
|
16
17
|
end
|
data/lib/neptuno/docker/down.rb
CHANGED
@@ -12,6 +12,7 @@ module Neptuno
|
|
12
12
|
|
13
13
|
def call(services: [], **options)
|
14
14
|
command_services_to('go down', all: options.fetch(:all), services_as_args: services) do |services|
|
15
|
+
make_service_files(services)
|
15
16
|
system("cd #{neptuno_path} && docker compose stop -t 0 #{services.join(' ')}")
|
16
17
|
system("cd #{neptuno_path} && docker compose rm -f #{services.join(' ')}")
|
17
18
|
system("cd #{neptuno_path} && tmux kill-session -t neptuno") if options.fetch(:tmux)
|
@@ -11,6 +11,7 @@ module Neptuno
|
|
11
11
|
|
12
12
|
def call(services: [], **options)
|
13
13
|
command_services_to('restart', all: options.fetch(:all), services_as_args: services) do |services|
|
14
|
+
make_service_files(services)
|
14
15
|
system("cd #{neptuno_path} && docker compose stop -t 0 #{services.join(' ')}")
|
15
16
|
system("cd #{neptuno_path} && docker compose rm -f #{services.join(' ')}")
|
16
17
|
system("cd #{neptuno_path} && docker compose build #{services.join(' ')}")
|
data/lib/neptuno/docker/up.rb
CHANGED
@@ -12,6 +12,7 @@ module Neptuno
|
|
12
12
|
|
13
13
|
def call(services: [], **options)
|
14
14
|
command_services_to('come up', all: options.fetch(:all), services_as_args: services) do |services, project|
|
15
|
+
make_service_files(services)
|
15
16
|
system("cd #{neptuno_path} && docker compose up -d #{services.join(' ')}")
|
16
17
|
success = system("cd #{neptuno_path} && docker logs -f #{project}_#{services.first}_1") if options.fetch(:log)
|
17
18
|
unless success
|
@@ -41,7 +41,7 @@ module Neptuno
|
|
41
41
|
case status
|
42
42
|
when :force
|
43
43
|
spinners[service].success
|
44
|
-
`cd #{neptuno_path}/procfiles/#{service} && overmind start -D -N > /dev/null 2>&`
|
44
|
+
`cd #{neptuno_path}/procfiles/#{service} && overmind start -D -N #{auto_restart_procs.unshift("-r").join(" ") if auto_restart_procs.to_a.count > 0} > /dev/null 2>&`
|
45
45
|
when :dead
|
46
46
|
spinners[service].update(state: 'dead ')
|
47
47
|
spinners[service].error
|
@@ -77,7 +77,7 @@ module Neptuno
|
|
77
77
|
end
|
78
78
|
else
|
79
79
|
spinners.select { |_k, v| v.instance_variable_get(:@succeeded) == :success }.each_key do |service|
|
80
|
-
system("cd #{neptuno_path}/procfiles/#{service} && overmind start -D -N > /dev/null 2>&1")
|
80
|
+
system("cd #{neptuno_path}/procfiles/#{service} && overmind start -D -N #{auto_restart_procs.unshift("-r").join(" ") if auto_restart_procs.to_a.count > 0} > /dev/null 2>&1")
|
81
81
|
end
|
82
82
|
sleep(5)
|
83
83
|
spinner.stop
|
@@ -89,7 +89,7 @@ module Neptuno
|
|
89
89
|
rescue RuntimeError
|
90
90
|
system("cd #{neptuno_path} && docker compose exec #{service} kill -9 -1")
|
91
91
|
system("cd #{neptuno_path}/procfiles/#{service} && rm .overmind.sock > /dev/null 2>&1")
|
92
|
-
system("cd #{neptuno_path}/procfiles/#{service} && overmind start -D -N > /dev/null 2>&1")
|
92
|
+
system("cd #{neptuno_path}/procfiles/#{service} && overmind start -D -N #{auto_restart_procs.unshift("-r").join(" ") if auto_restart_procs.to_a.count > 0} > /dev/null 2>&1")
|
93
93
|
retry
|
94
94
|
end
|
95
95
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# ./.tmuxinator.yml
|
2
|
+
|
3
|
+
<% if YAML.load_file('neptuno.yml')["procfile_manager"] == "tmux" %>
|
4
|
+
name: <%= @args[0] %>
|
5
|
+
root: .
|
6
|
+
attach: false
|
7
|
+
windows:
|
8
|
+
<% File.read("procfiles/#{args[0]}/Procfile").each_line do |proc| %>
|
9
|
+
<%= "- #{proc}" %>
|
10
|
+
<% end %>
|
11
|
+
- host: cd services/<%= args[0] %> && zsh
|
12
|
+
|
13
|
+
<% else %>
|
14
|
+
|
15
|
+
name: neptuno
|
16
|
+
root: .
|
17
|
+
on_project_exit: tmux kill-session -t neptuno
|
18
|
+
|
19
|
+
windows:
|
20
|
+
- neptuno:
|
21
|
+
panes:
|
22
|
+
- sleep 2 && vim
|
23
|
+
- neptuno ps
|
24
|
+
- # host shell
|
25
|
+
|
26
|
+
<% @args.each do |service| %>
|
27
|
+
- <%= service %>:
|
28
|
+
root: .
|
29
|
+
pre: cd ./services/<%= service %>
|
30
|
+
|
31
|
+
<% if YAML.load_file('neptuno.yml')["mode"] == "ide" %>
|
32
|
+
layout: 3595,323x99,0,0[323x82,0,0,85,323x16,0,83{161x16,0,83,86,161x16,162,83,87}]
|
33
|
+
panes:
|
34
|
+
- sleep 2 && vim
|
35
|
+
- server:
|
36
|
+
neptuno c <%= service %>
|
37
|
+
<% else %>
|
38
|
+
panes:
|
39
|
+
- server:
|
40
|
+
neptuno c <%= service %>
|
41
|
+
<% end %>
|
42
|
+
<% end %>
|
43
|
+
|
44
|
+
<% end %>
|
data/lib/neptuno/tty/config.rb
CHANGED
@@ -4,6 +4,7 @@ module Neptuno
|
|
4
4
|
module TTY
|
5
5
|
# Wrapper class for TTY gem
|
6
6
|
module Config
|
7
|
+
include TTY::File
|
7
8
|
TTY = ::TTY::Config.new
|
8
9
|
TTY.filename = 'neptuno'
|
9
10
|
|
@@ -13,8 +14,23 @@ module Neptuno
|
|
13
14
|
TTY
|
14
15
|
end
|
15
16
|
|
17
|
+
def docker_compose_services
|
18
|
+
source = ::File.read("#{neptuno_path}/docker-compose.yml")
|
19
|
+
docker_compose = begin
|
20
|
+
YAML.load(source, aliases: true)
|
21
|
+
rescue ArgumentError
|
22
|
+
YAML.load(source)
|
23
|
+
end
|
24
|
+
docker_compose.fetch('services').keys
|
25
|
+
end
|
26
|
+
|
27
|
+
def auto_restart_procs
|
28
|
+
config.fetch('auto_restart_procs')
|
29
|
+
end
|
30
|
+
|
16
31
|
def services
|
17
32
|
s = config.fetch('services')
|
33
|
+
s = s.to_a.union(docker_compose_services)
|
18
34
|
abort ABORT_MESSAGE if s.count.zero?
|
19
35
|
s.sort
|
20
36
|
end
|
data/lib/neptuno/tty/file.rb
CHANGED
@@ -35,6 +35,14 @@ module Neptuno
|
|
35
35
|
pwd = pwd.split('/')[0..-2].join('/')
|
36
36
|
end
|
37
37
|
end
|
38
|
+
|
39
|
+
def make_service_files(services)
|
40
|
+
services.each do |service|
|
41
|
+
`cd #{neptuno_path} && mkdir -p environments/#{service} procfiles/#{service} dockerfiles/#{service}`
|
42
|
+
`cd #{neptuno_path} && touch environments/#{service}/local_env`
|
43
|
+
`cd #{neptuno_path} && touch dockerfiles/#{service}/Dockerfile`
|
44
|
+
end
|
45
|
+
end
|
38
46
|
end
|
39
47
|
end
|
40
48
|
end
|
data/lib/neptuno/version.rb
CHANGED
data/neptuno.gemspec
CHANGED
@@ -12,13 +12,13 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = "A CLI for Neptuno distributed architectural style applications"
|
13
13
|
spec.homepage = 'https://github.com/apptegy/neptuno'
|
14
14
|
spec.license = 'Apache-2.0'
|
15
|
-
spec.required_ruby_version = '>= 2.
|
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'] =
|
20
|
-
spec.metadata['source_code_uri'] =
|
21
|
-
spec.metadata['changelog_uri'] = "
|
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.
|
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.require_paths = ['lib']
|
31
31
|
|
32
32
|
# Neptuno dependency list
|
33
|
+
spec.add_dependency "psych", "< 4"
|
33
34
|
spec.add_dependency 'dotiw'
|
34
35
|
spec.add_dependency 'dry-cli'
|
35
36
|
spec.add_dependency 'hirb'
|
metadata
CHANGED
@@ -1,181 +1,195 @@
|
|
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.8
|
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-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: psych
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - <
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - <
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: dotiw
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- -
|
31
|
+
- - '>='
|
18
32
|
- !ruby/object:Gem::Version
|
19
33
|
version: '0'
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- -
|
38
|
+
- - '>='
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: dry-cli
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- -
|
45
|
+
- - '>='
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: '0'
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- -
|
52
|
+
- - '>='
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: hirb
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- -
|
59
|
+
- - '>='
|
46
60
|
- !ruby/object:Gem::Version
|
47
61
|
version: '0'
|
48
62
|
type: :runtime
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- -
|
66
|
+
- - '>='
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: tty-command
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- -
|
73
|
+
- - '>='
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: '0'
|
62
76
|
type: :runtime
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- -
|
80
|
+
- - '>='
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: tty-config
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- -
|
87
|
+
- - '>='
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: '0'
|
76
90
|
type: :runtime
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- -
|
94
|
+
- - '>='
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: tty-file
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- -
|
101
|
+
- - '>='
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '0'
|
90
104
|
type: :runtime
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- -
|
108
|
+
- - '>='
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: tty-prompt
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- -
|
115
|
+
- - '>='
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
118
|
type: :runtime
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- -
|
122
|
+
- - '>='
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: tty-spinner
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- -
|
129
|
+
- - '>='
|
116
130
|
- !ruby/object:Gem::Version
|
117
131
|
version: '0'
|
118
132
|
type: :runtime
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- -
|
136
|
+
- - '>='
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: tty-which
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- -
|
143
|
+
- - '>='
|
130
144
|
- !ruby/object:Gem::Version
|
131
145
|
version: '0'
|
132
146
|
type: :runtime
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- -
|
150
|
+
- - '>='
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: zeitwerk
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- -
|
157
|
+
- - '>='
|
144
158
|
- !ruby/object:Gem::Version
|
145
159
|
version: '0'
|
146
160
|
type: :runtime
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- -
|
164
|
+
- - '>='
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: minitest-reporters
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- -
|
171
|
+
- - '>='
|
158
172
|
- !ruby/object:Gem::Version
|
159
173
|
version: '0'
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- -
|
178
|
+
- - '>='
|
165
179
|
- !ruby/object:Gem::Version
|
166
180
|
version: '0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: standard
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
170
184
|
requirements:
|
171
|
-
- -
|
185
|
+
- - '>='
|
172
186
|
- !ruby/object:Gem::Version
|
173
187
|
version: '0'
|
174
188
|
type: :development
|
175
189
|
prerelease: false
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
177
191
|
requirements:
|
178
|
-
- -
|
192
|
+
- - '>='
|
179
193
|
- !ruby/object:Gem::Version
|
180
194
|
version: '0'
|
181
195
|
description: A CLI for Neptuno distributed architectural style applications
|
@@ -186,9 +200,9 @@ executables:
|
|
186
200
|
extensions: []
|
187
201
|
extra_rdoc_files: []
|
188
202
|
files:
|
189
|
-
-
|
190
|
-
-
|
191
|
-
-
|
203
|
+
- .github/workflows/gem-push.yml
|
204
|
+
- .github/workflows/main.yml
|
205
|
+
- .gitignore
|
192
206
|
- AUTHORS
|
193
207
|
- CHANGELOG.md
|
194
208
|
- CODE_OF_CONDUCT.md
|
@@ -198,6 +212,8 @@ files:
|
|
198
212
|
- README.md
|
199
213
|
- Rakefile
|
200
214
|
- bin/console
|
215
|
+
- bin/docker-compose.yml
|
216
|
+
- bin/neptuno.yml
|
201
217
|
- bin/setup
|
202
218
|
- docs/bg.png
|
203
219
|
- docs/docs.css
|
@@ -212,6 +228,7 @@ files:
|
|
212
228
|
- lib/neptuno/cli.rb
|
213
229
|
- lib/neptuno/cli/activate.rb
|
214
230
|
- lib/neptuno/cli/base.rb
|
231
|
+
- lib/neptuno/cli/clone.rb
|
215
232
|
- lib/neptuno/cli/configure.rb
|
216
233
|
- lib/neptuno/cli/execute.rb
|
217
234
|
- lib/neptuno/cli/init.rb
|
@@ -237,11 +254,8 @@ files:
|
|
237
254
|
- lib/neptuno/services/destroy.rb
|
238
255
|
- lib/neptuno/services/list.rb
|
239
256
|
- lib/neptuno/services/update.rb
|
240
|
-
- lib/neptuno/templates/Dockerfile
|
241
|
-
- lib/neptuno/templates/Procfile
|
242
257
|
- lib/neptuno/templates/docker-compose.yml
|
243
258
|
- lib/neptuno/templates/tmuxinator.yml
|
244
|
-
- lib/neptuno/templates/ude.yml
|
245
259
|
- lib/neptuno/tty/command.rb
|
246
260
|
- lib/neptuno/tty/config.rb
|
247
261
|
- lib/neptuno/tty/file.rb
|
@@ -253,25 +267,26 @@ homepage: https://github.com/apptegy/neptuno
|
|
253
267
|
licenses:
|
254
268
|
- Apache-2.0
|
255
269
|
metadata:
|
256
|
-
homepage_uri: https://github.
|
270
|
+
homepage_uri: https://apptegy.github.io/neptuno/
|
257
271
|
source_code_uri: https://github.com/apptegy/neptuno
|
258
|
-
changelog_uri: https://github.com/apptegy/
|
272
|
+
changelog_uri: https://github.com/apptegy/releases
|
259
273
|
post_install_message:
|
260
274
|
rdoc_options: []
|
261
275
|
require_paths:
|
262
276
|
- lib
|
263
277
|
required_ruby_version: !ruby/object:Gem::Requirement
|
264
278
|
requirements:
|
265
|
-
- -
|
279
|
+
- - '>='
|
266
280
|
- !ruby/object:Gem::Version
|
267
|
-
version: 2.
|
281
|
+
version: 2.3.0
|
268
282
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
269
283
|
requirements:
|
270
|
-
- -
|
284
|
+
- - '>='
|
271
285
|
- !ruby/object:Gem::Version
|
272
286
|
version: '0'
|
273
287
|
requirements: []
|
274
|
-
|
288
|
+
rubyforge_project:
|
289
|
+
rubygems_version: 2.0.14.1
|
275
290
|
signing_key:
|
276
291
|
specification_version: 4
|
277
292
|
summary: Unified Development Environment CLI
|
File without changes
|
File without changes
|
File without changes
|