standalone-ruby 1.4.1 → 1.4.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1047c642dd5943c1150396ca13e6ea383e85f44d7ded1b2f47530e4d5dfe8c75
4
- data.tar.gz: 4b01d0bb1581e7f1b997bc4a0f255b069c3fd7a4018b46aa6b7d380f4bbce8d7
3
+ metadata.gz: fe559b571044132ebcebf950af268390f5009c482bdb015854f72b632e42c3da
4
+ data.tar.gz: a64e59f677a1748f79e297ac3b6070bde2b061e07dd2c7aabf206f081bb8687a
5
5
  SHA512:
6
- metadata.gz: 268b455553e3d471d8e1f18756aeb22d741d54e96aa5e07cd0c8bd192561e8beeb7be95db4a41161a3895e9cf22c08e92dfa6ae4f3b25257510b5f1c0cdf868c
7
- data.tar.gz: f62b96f5b243afc5582f1b675742cf545aaf7a9e641f85f847a0ace4266c4bf9e2b1991aa94343f60f4b695cda9dd205b52b1dee6a84b0d436d28cabff85d620
6
+ metadata.gz: 5d8deff562c776976cfec36842691c02c1c2bac027af1cd6a53cc4d6eed966e4679500737e8618b754b0a19d30cdfcd1566654800d7939ec08e93b8cfc80bba7
7
+ data.tar.gz: 9ed83514709d966dfea42547053c59b1de8cd67df2c3988110cf328fd513e85b4539ce55d69d3aa13743ef3d1fbe9ce7e4b68b3833fa8664ea893992e0295250
data/CHANGELOG.md CHANGED
@@ -24,4 +24,11 @@
24
24
 
25
25
  ## [1.4] - 2025-04-06
26
26
  - Added exe support!
27
- - Improvements have been made for non-GUI programs.
27
+ - Improvements have been made for non-GUI programs.
28
+
29
+ ## [1.4.1] - 2025-04-06
30
+ - Displayer outputs changed.
31
+
32
+ ## [1.4.2] - 2025-04-08
33
+ - The text output of the Robocopy operation is removed from the screen
34
+ - Help message edited
data/bin/standalone-ruby CHANGED
@@ -1,4 +1,4 @@
1
1
  require File.expand_path('../lib/standalone_ruby', __dir__)
2
2
 
3
- standalone_ruby = StandaloneRuby.new
3
+ standalone_ruby = Program.new
4
4
  standalone_ruby.run
@@ -1,6 +1,6 @@
1
1
  require_relative 'utils/launcher'
2
2
 
3
- class StandaloneRuby
3
+ class Program
4
4
  def run
5
5
  Launcher.new.run
6
6
  end
@@ -1,4 +1,5 @@
1
1
  require_relative 'logger_helper'
2
+ require_relative '../version/version'
2
3
 
3
4
  class Displayer
4
5
  def initialize(params)
@@ -8,31 +9,33 @@ class Displayer
8
9
 
9
10
  def display_params
10
11
  begin
11
- display_text = []
12
-
13
- display_text << "Platform: #{@params[:platform]}" if @params[:platform]
14
- display_text << "Project Path: #{@params[:project_path]}" if @params[:project_path]
15
- display_text << "Exe File: #{@params[:exe]}" if @params[:exe]
16
- display_text << "Ruby Path: #{@params[:ruby_path]}" if @params[:ruby_path]
17
- display_text << "Ruby Folder: #{File.basename(@params[:ruby_path])}" if @params[:ruby_path]
18
- display_text << "Main File: #{@params[:main_file]}" if @params[:main_file]
19
- display_text << "Launcher: #{@params[:launcher]}" if @params[:launcher]
20
- display_text << "Launcher Type: #{@params[:launcher_type]}" if @params[:launcher_type]
21
- display_text << "Template: #{@params[:template]}" if @params[:template]
22
- display_text << "Template: Default Template" unless @params[:template]
23
- display_text << "Log Path: Users Documents Directory"
12
+ display_map = {
13
+ "Platform" => @params[:platform],
14
+ "Project Path" => @params[:project_path],
15
+ "Exe File" => @params[:exe],
16
+ "Ruby Path" => @params[:ruby_path],
17
+ "Ruby Folder" => @params[:ruby_path] ? File.basename(@params[:ruby_path]) : nil,
18
+ "Main File" => @params[:main_file],
19
+ "Launcher" => @params[:launcher],
20
+ "Launcher Type" => @params[:launcher_type],
21
+ "Template" => @params[:template] || "Default Template",
22
+ "Log Path" => "Users Documents Directory"
23
+ }
24
+
25
+ display_text = display_map.map { |key, value| "#{key}: #{value}" if value }.compact
24
26
 
25
27
  puts display_text.join("\n") unless display_text.empty?
26
28
 
27
- rescue Exception => e
28
- print("Display Error: ".red); puts("#{e.message}".red)
29
+ rescue => e
30
+ print("Display Error: ".red); puts(e.message.red)
29
31
  @logger.error("Display Error: #{e.message}")
30
32
  end
31
33
  end
32
34
 
35
+
33
36
  def banner
34
- banner = -<<'BANNER'
35
- Standalone-Ruby v1.4.1 - Package your Ruby projects as exe!
37
+ banner = -<<"BANNER"
38
+ Standalone-Ruby v#{StandaloneRuby::VERSION} - Package your Ruby projects as exe!
36
39
  # Github: https://github.com/ardatetikbey/Standalone-Ruby
37
40
  # RubyGems: https://rubygems.org/gems/standalone-ruby
38
41
 
@@ -48,7 +48,7 @@ class ExePacker
48
48
  File.delete(stub_output)
49
49
  @logger.info("Stub file deleted successfully")
50
50
 
51
- puts("\nExe file has been generated!")
51
+ puts("\nExe file has been generated!".green_bold_dark)
52
52
  @logger.info("Exe file generated successfully at: #{exe_path}")
53
53
  rescue Exception => err
54
54
  @logger.error("Error occurred: #{err.message}")
@@ -65,4 +65,8 @@ class String
65
65
  def yellow
66
66
  "\e[33m#{self}\e[0m"
67
67
  end
68
+
69
+ def green_bold_dark
70
+ "\e[1m\e[38;5;28m#{self}\e[0m"
71
+ end
68
72
  end
@@ -55,7 +55,7 @@ class Launcher
55
55
  @exe_packer.pack
56
56
  @logger.info("Exe pack finished.")
57
57
 
58
- puts "\nThanks for using Standalone-Ruby!"
58
+ puts "Thanks for using Standalone-Ruby! Don't forget to star the project on Github."
59
59
 
60
60
  print("\nWARNING: ".yellow); puts("Instead of changing the path of the created exe file, create a shortcut. The same applies here as in every application.")
61
61
  @logger.info("Program finished.")
@@ -2,6 +2,7 @@ require 'fileutils'
2
2
  require 'optparse'
3
3
 
4
4
  require_relative 'logger_helper'
5
+ require_relative '../version/version'
5
6
 
6
7
  class ParameterParser
7
8
  def initialize
@@ -20,7 +21,7 @@ class ParameterParser
20
21
 
21
22
  def display_help
22
23
  help_text = <<~EOT
23
- Standalone-Ruby v1.4.1 - Package your Ruby projects as exe!
24
+ Standalone-Ruby v#{StandaloneRuby::VERSION} - Package your Ruby projects as exe!
24
25
 
25
26
  Usage: standalone-ruby [-h] [-p PROJECT_PATH] [-r RUBY_PATH] [-m MAIN_FILE] [-l LAUNCHER] [-t TEMPLATE] [-e EXE_FILE] [-c THREADS] [-g] [-v]
26
27
 
@@ -52,6 +53,10 @@ class ParameterParser
52
53
  -h, --help Show this help message.
53
54
 
54
55
  -v, --version Show program version.
56
+
57
+ Notes:
58
+ - Make sure that the Ruby interpreter you are using includes all the gems required for the target project.
59
+ - The Ruby interpreter uses Robocopy for copying, and the number of threads given affects the speed of this operation.
55
60
 
56
61
  For more details, please visit the documentation at:
57
62
  https://github.com/ardatetikbey/Standalone-Ruby
@@ -157,7 +162,7 @@ class ParameterParser
157
162
  end
158
163
 
159
164
  opts.on("-v", "--version") do
160
- puts "Standalone Ruby Gem Version 1.4.1"
165
+ puts "Standalone Ruby Gem Version #{StandaloneRuby::VERSION}"
161
166
  exit!
162
167
  end
163
168
 
@@ -15,7 +15,6 @@ class RubyCopy
15
15
  copy_output = `robocopy "#{@params[:ruby_path]}" "#{File.join(@params[:project_path].to_s, File.basename(@params[:ruby_path].to_s))}" /E /MT:#{@params[:threads].to_i} /V /ETA /NFL /NDL /R:1000000 /W:30 /NP`
16
16
  puts "Robocopy Command: robocopy \"#{@params[:ruby_path]}\" \"#{File.join(@params[:project_path], File.basename(@params[:ruby_path]))}\" /E /MT:#{@params[:threads].to_i} /V /ETA /NFL /NDL /R:1000000 /W:30 /NP"
17
17
 
18
- puts copy_output
19
18
  @logger.info("Robocopy output printed to screen.")
20
19
 
21
20
  puts("The Ruby interpreter copying process has been completed.")
@@ -0,0 +1,3 @@
1
+ module StandaloneRuby
2
+ VERSION = "1.4.2"
3
+ end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standalone-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arda Tetik
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-06 00:00:00.000000000 Z
10
+ date: 2025-04-08 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Make your projects installation independent!
13
13
  email:
14
- - ardatetikruby@gmail.com
14
+ - ardatetik1881@gmail.com
15
15
  executables:
16
16
  - standalone-ruby
17
17
  extensions: []
@@ -104,6 +104,7 @@ files:
104
104
  - lib/utils/logger_helper.rb
105
105
  - lib/utils/parameter_parser.rb
106
106
  - lib/utils/ruby_copy.rb
107
+ - lib/version/version.rb
107
108
  homepage: https://github.com/ardatetikbey/Standalone-Ruby
108
109
  licenses:
109
110
  - MIT