From 3efab202c8609edbbbb9ed66b80c70f1d71ad841 Mon Sep 17 00:00:00 2001 From: Vladislav Andreev Date: Sat, 7 Dec 2024 12:41:11 +0300 Subject: [PATCH] Add bin/kamal binstub --- Gemfile | 1 + Gemfile.lock | 27 +++++++++++++++++++++++++++ bin/kamal | 27 +++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100755 bin/kamal diff --git a/Gemfile b/Gemfile index ecb60a0..2d8f3f2 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,7 @@ ruby file: ".ruby-version" gem "bootsnap", require: false gem "dotenv", "~> 3.1" gem "importmap-rails" +gem "kamal" gem "ostruct", "~> 0.6.0" gem "propshaft" gem "puma" diff --git a/Gemfile.lock b/Gemfile.lock index 9e6a471..a7523b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -74,6 +74,9 @@ GEM uri (>= 0.13.1) ast (2.4.2) base64 (0.2.0) + bcrypt_pbkdf (1.1.1) + bcrypt_pbkdf (1.1.1-arm64-darwin) + bcrypt_pbkdf (1.1.1-x86_64-darwin) benchmark (0.4.0) bigdecimal (3.1.8) bindex (0.8.1) @@ -91,6 +94,7 @@ GEM reline (>= 0.3.8) dotenv (3.1.4) drb (2.2.1) + ed25519 (1.3.0) erubi (1.13.0) globalid (1.2.1) activesupport (>= 6.1) @@ -105,6 +109,17 @@ GEM rdoc (>= 4.0.0) reline (>= 0.4.2) json (2.9.0) + kamal (2.3.0) + activesupport (>= 7.0) + base64 (~> 0.2) + bcrypt_pbkdf (~> 1.0) + concurrent-ruby (~> 1.2) + dotenv (~> 3.1) + ed25519 (~> 1.2) + net-ssh (~> 7.3) + sshkit (>= 1.23.0, < 2.0) + thor (~> 1.3) + zeitwerk (>= 2.6.18, < 3.0) language_server-protocol (3.17.0.3) logger (1.6.2) loofah (2.23.1) @@ -126,8 +141,13 @@ GEM net-protocol net-protocol (0.2.2) timeout + net-scp (4.0.0) + net-ssh (>= 2.6.5, < 8.0.0) + net-sftp (4.0.0) + net-ssh (>= 5.0.0, < 8.0.0) net-smtp (0.5.0) net-protocol + net-ssh (7.3.0) nio4r (2.7.4) nokogiri (1.16.8-aarch64-linux) racc (~> 1.4) @@ -248,6 +268,12 @@ GEM rack (>= 2.2.4) redis-client (>= 0.22.2) sorbet-runtime (0.5.11690) + sshkit (1.23.2) + base64 + net-scp (>= 1.1.2) + net-sftp (>= 2.1.2) + net-ssh (>= 2.8.0) + ostruct stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.1.2) @@ -302,6 +328,7 @@ DEPENDENCIES debug dotenv (~> 3.1) importmap-rails + kamal ostruct (~> 0.6.0) propshaft puma diff --git a/bin/kamal b/bin/kamal new file mode 100755 index 0000000..cbe59b9 --- /dev/null +++ b/bin/kamal @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'kamal' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("kamal", "kamal")