overmind 2.5.1-aarch64-linux

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3c2e5bc9344073038a1cc9891599fbbf5f966d98ff8d8efece9db8b0416d2c9a
4
+ data.tar.gz: ad8eed507500ed2edfcc1a6c24239018898a3ba9484ba2f03ba1adf7cf017b2e
5
+ SHA512:
6
+ metadata.gz: f2b2b47586eeddbfd774866dcd7629e50a60a5022be86ed2b641dffd6d633cfd3d2e2b267bdcba018463e70001d9998feb83ff307ebe5588e9a67358352bd3bb
7
+ data.tar.gz: 95bf067193a068b9fae363a5ab86edb6444f99cf37935f472697d64eccbcaf4658868ffc2a62c65b5b4920c54c19c1626d15a36682d4c0c6998dd8bc52606eaa
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 prog-supdex
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/bin/overmind ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'overmind/cli'
5
+
6
+ begin
7
+ cli = Overmind::CLI.new
8
+ cli.run(ARGV)
9
+ rescue StandardError => e
10
+ warn e.message
11
+ exit 1
12
+ end
@@ -0,0 +1,89 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Overmind
4
+ # Command-line interface for running golang library Overmind
5
+ # It ensures that the necessary dependencies, such as tmux, are present
6
+ # and runs Overmind with any provided arguments.
7
+ class CLI
8
+ SUPPORTED_OS_REGEX = /darwin|linux|bsd/i
9
+ # Path to the library's executable files
10
+ LIBRARY_PATH = File.expand_path("#{File.dirname(__FILE__)}/../../libexec")
11
+ OVERMIND_PATH = "#{LIBRARY_PATH}/overmind"
12
+ TMUX_FOLDER_PATH = "#{LIBRARY_PATH}/prebuilt-tmux/bin"
13
+ TMUX_PATH = "#{TMUX_FOLDER_PATH}/tmux"
14
+
15
+ def run(args = [])
16
+ os_validate!
17
+ validate_tmux_present!
18
+ validate_overmind_present!
19
+
20
+ # Ensures arguments are properly quoted if they contain spaces
21
+ args = args.map { |x| x.include?(" ") ? "'#{x}'" : x }
22
+
23
+ # Use prebuild tmux if found
24
+ path_with_tmux = File.exist?(TMUX_PATH) ? "#{TMUX_FOLDER_PATH}:#{ENV["PATH"]}" : ENV["PATH"]
25
+
26
+ # exec the Overmind process with modified PATH if necessary
27
+ exec({"PATH" => path_with_tmux}, "#{OVERMIND_PATH} #{args.join(" ")}")
28
+ end
29
+
30
+ private
31
+
32
+ # Checks if the current OS is supported based on a regex match
33
+ def os_supported?
34
+ RUBY_PLATFORM.match?(SUPPORTED_OS_REGEX)
35
+ end
36
+
37
+ # Checks if tmux is installed either globally or as a prebuilt binary
38
+ def tmux_installed?
39
+ system("which tmux") || File.exist?(TMUX_PATH)
40
+ end
41
+
42
+ # Checks if the Overmind executable is present
43
+ def overmind_installed?
44
+ File.exist?(OVERMIND_PATH)
45
+ end
46
+
47
+ # Validates the operating system and aborts with an error message if unsupported
48
+ def os_validate!
49
+ return if os_supported?
50
+
51
+ abort_with_message("Error: This gem supports Linux, *BSD, and macOS only.")
52
+ end
53
+
54
+ # Validates the presence of tmux and aborts with an error message if not found
55
+ def validate_tmux_present!
56
+ return if tmux_installed?
57
+
58
+ abort_with_message(<<~MSG)
59
+ Error: tmux not found. Please ensure tmux is installed and available in PATH.
60
+ If tmux is not installed, you can usually install it using your package manager. For example:
61
+
62
+ # For Ubuntu/Debian
63
+ sudo apt-get install tmux
64
+ #{" "}
65
+ # For macOS
66
+ brew install tmux
67
+ #{" "}
68
+ # For FreeBSD
69
+ sudo pkg install tmux
70
+
71
+ Installation commands might vary based on your operating system and its version.#{" "}
72
+ Please consult your system's package management documentation for the most accurate instructions.
73
+ MSG
74
+ end
75
+
76
+ # Validates the presence of Overmind and aborts with an error message if not found
77
+ def validate_overmind_present!
78
+ return if overmind_installed?
79
+
80
+ abort_with_message("Error: Invalid platform. Overmind wasn't built for #{RUBY_PLATFORM}")
81
+ end
82
+
83
+ # Aborts execution with a given error message
84
+ def abort_with_message(message)
85
+ warn "\e[31m#{message}\e[0m"
86
+ exit 1
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Overmind
4
+ VERSION = "2.5.1"
5
+ end
data/lib/overmind.rb ADDED
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Overmind; end
data/libexec/overmind ADDED
Binary file
Binary file
data/overmind.gemspec ADDED
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/overmind/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "overmind"
7
+ spec.version = Overmind::VERSION
8
+ spec.authors = ["prog-supdex"]
9
+ spec.email = ["symeton@gmail.com"]
10
+
11
+ spec.summary = "Overmind is a process manager for Procfile-based applications and tmux."
12
+ spec.description = "Overmind is a process manager for Procfile-based applications and tmux."
13
+ spec.homepage = "https://github.com/DarthSim/overmind"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.3"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/DarthSim/overmind"
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ spec.files = Dir["bin/*", "lib/**/*.rb", "libexec/**/*", "overmind.gemspec", "LICENSE.txt"]
22
+ spec.bindir = "bin"
23
+ spec.executables = ["overmind"]
24
+ spec.require_paths = %w[lib libexec]
25
+
26
+ spec.add_development_dependency "bundler"
27
+ spec.add_development_dependency "rake", "~> 13.0"
28
+ spec.add_development_dependency "rspec", "~> 3.5"
29
+ end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: overmind
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.5.1
5
+ platform: aarch64-linux
6
+ authors:
7
+ - prog-supdex
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-10-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '13.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '13.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.5'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.5'
55
+ description: Overmind is a process manager for Procfile-based applications and tmux.
56
+ email:
57
+ - symeton@gmail.com
58
+ executables:
59
+ - overmind
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - LICENSE.txt
64
+ - bin/overmind
65
+ - lib/overmind.rb
66
+ - lib/overmind/cli.rb
67
+ - lib/overmind/version.rb
68
+ - libexec/overmind
69
+ - libexec/prebuilt-tmux/bin/tmux
70
+ - overmind.gemspec
71
+ homepage: https://github.com/DarthSim/overmind
72
+ licenses:
73
+ - MIT
74
+ metadata:
75
+ homepage_uri: https://github.com/DarthSim/overmind
76
+ source_code_uri: https://github.com/DarthSim/overmind
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ - libexec
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '2.3'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubygems_version: 3.2.3
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: Overmind is a process manager for Procfile-based applications and tmux.
97
+ test_files: []