kdeploy 0.1.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.
data/Rakefile ADDED
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+ require 'time'
6
+
7
+ # Default task runs tests and RuboCop, then pushes code
8
+ task default: %w[push]
9
+
10
+ # Run RSpec tests
11
+ RSpec::Core::RakeTask.new(:test) do |spec|
12
+ spec.pattern = 'spec/**{,/*/**}/*_spec.rb'
13
+ end
14
+
15
+ # Run RuboCop
16
+ task :rubocop do
17
+ system 'bundle exec rubocop'
18
+ end
19
+
20
+ # Auto-commit and push changes
21
+ task :push do
22
+ system 'bundle exec rubocop -A'
23
+ system 'git add .'
24
+ system "git commit -m 'Update #{Time.now}'"
25
+ system 'git pull'
26
+ system 'git push'
27
+ end
28
+
29
+ # Documentation task
30
+ task :doc do
31
+ system 'bundle exec yard doc'
32
+ end
33
+
34
+ # Clean build artifacts
35
+ task :clean do
36
+ system 'rm -f *.gem'
37
+ system 'rm -rf doc/'
38
+ system 'rm -rf coverage/'
39
+ end
40
+
41
+ # Install gem locally
42
+ task :install do
43
+ system 'gem build kdeploy.gemspec'
44
+ system "gem install kdeploy-#{Kdeploy::VERSION}.gem"
45
+ end
data/bin/kdeploy ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require_relative '../lib/kdeploy'
5
+ require_relative '../lib/kdeploy/cli'
6
+
7
+ Kdeploy::CLI.start(ARGV)
data/kdeploy.gemspec ADDED
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/kdeploy/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'kdeploy'
7
+ spec.version = Kdeploy::VERSION
8
+ spec.authors = ['Kdeploy Team']
9
+ spec.email = ['team@kdeploy.dev']
10
+
11
+ spec.summary = 'Lightweight agentless deployment tool with DSL, heredoc, and ERB template support'
12
+ spec.description = <<~DESC
13
+ Kdeploy is a lightweight, agentless deployment tool similar to Chef, Puppet, and Ansible.
14
+ It uses Ruby DSL for defining deployment pipelines with support for inventory management,
15
+ parallel execution, SSH-based remote operations, heredoc syntax for multi-line scripts,
16
+ and ERB templates for dynamic configuration generation.
17
+ DESC
18
+ spec.homepage = 'https://github.com/kevin197011/kdeploy'
19
+ spec.license = 'MIT'
20
+ spec.required_ruby_version = '>= 3.0.0'
21
+
22
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
23
+ spec.metadata['homepage_uri'] = spec.homepage
24
+ spec.metadata['source_code_uri'] = 'https://github.com/kevin197011/kdeploy'
25
+ spec.metadata['changelog_uri'] = 'https://github.com/kevin197011/kdeploy/blob/main/CHANGELOG.md'
26
+ spec.metadata['rubygems_mfa_required'] = 'true'
27
+
28
+ # Specify which files should be added to the gem when it is released.
29
+ spec.files = Dir.chdir(__dir__) do
30
+ `git ls-files -z`.split("\x0").reject do |f|
31
+ (File.expand_path(f) == __FILE__) ||
32
+ f.start_with?(*%w[exe/ test/ spec/ features/ .git .circleci appveyor Gemfile])
33
+ end
34
+ end
35
+ spec.bindir = 'bin'
36
+ spec.executables = spec.files.grep(%r{\Abin/}) { |f| File.basename(f) }
37
+ spec.require_paths = ['lib']
38
+
39
+ # Dependencies
40
+ spec.add_dependency 'colorize', '~> 0.8'
41
+ spec.add_dependency 'concurrent-ruby', '~> 1.2'
42
+ spec.add_dependency 'net-scp', '~> 4.0'
43
+ spec.add_dependency 'net-ssh', '~> 7.0'
44
+ spec.add_dependency 'thor', '~> 1.3'
45
+ spec.add_dependency 'tty-prompt', '~> 0.23'
46
+ spec.add_dependency 'yaml', '~> 0.2'
47
+
48
+ # NOTE: Development dependencies are managed in Gemfile
49
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kdeploy
4
+ # Banner module for displaying ASCII art banner
5
+ module Banner
6
+ class << self
7
+ def show
8
+ puts banner.colorize(:light_blue)
9
+ end
10
+
11
+ private
12
+
13
+ def banner
14
+ <<~BANNER
15
+ _ _
16
+ /\\ /\\__| | ___ _ __ | | ___ _ _
17
+ / //_/ _` |/ _ \\ '_ \\| |/ _ \\| | | |
18
+ / __ \\ (_| | __/ |_) | | (_) | |_| |
19
+ \\/ \\/\\__,_|\\___| .__/|_|\\___/ \\__, |
20
+ |_| |___/
21
+
22
+ ⚡ Lightweight Agentless Deployment Tool
23
+ 🚀 Deploy with confidence, scale with ease
24
+ BANNER
25
+ end
26
+ end
27
+ end
28
+ end