rbz 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3ae86d4f7db596df154d451f1131d67a43ba6d9a1de8baad4c0bbb98d7012c27
4
+ data.tar.gz: 2ae0115a335d18de08e2a24190ab02ae9195658cdaebba9e16554eadfca93ede
5
+ SHA512:
6
+ metadata.gz: 4cbe45bed80e2b31068da400f69f9d8550f8998dccecff7810c32c9e6533a3a56e79ef54f69ac73392257e6f0c23b2ef223c963bf9a9f9e5d00dbb578bb5e6ff
7
+ data.tar.gz: 92017ffdaf1024211ff9bdbdd38242dd9bdf7de71822c8b2a18d210c9fbc7951543fc18e515b2ba8b6b75ac5b016842cdf004390bd9888069dceddd275957ed7
data/.standard.yml ADDED
@@ -0,0 +1,3 @@
1
+ # For available configuration options, see:
2
+ # https://github.com/standardrb/standard
3
+ ruby_version: 3.0
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 Adam Daniels
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/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # Single-file Ruby archives (`rbz`)
2
+
3
+ An experimental method of packaging a Ruby project into a single file archive,
4
+ which is extracted and run on the destination machine.
5
+
6
+ Zero dependencies outside of stdlib.
7
+
8
+ Will this work for many projects? Maybe. Will it work for all projects? Doubtful.
9
+ Will I maintain it? Unsure.
10
+
11
+ Inspired by [this][1] Ruby bug tracker issue.
12
+
13
+ ## Installation
14
+
15
+ $ gem install rbz
16
+
17
+ ## Usage
18
+
19
+ Generate an archive from a folder of Ruby files. There *must* be a file in the
20
+ root of the folder called `main.rb`, which will be the entry point to the application.
21
+
22
+ $ rbz <folder with ruby files> > my-archive.rbz
23
+
24
+ Once the archive is generated, run it with `ruby`.
25
+
26
+ $ ruby my-archive.rbz
27
+
28
+ ## License
29
+
30
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
31
+
32
+ [1]: https://bugs.ruby-lang.org/issues/11028
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "minitest/test_task"
5
+
6
+ Minitest::TestTask.create
7
+
8
+ require "standard/rake"
9
+
10
+ task default: %i[test standard]
data/example/main.rb ADDED
@@ -0,0 +1 @@
1
+ puts "Hello world"
data/example.rbz ADDED
@@ -0,0 +1,252 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "tmpdir"
4
+ require "rubygems/package"
5
+ require "stringio"
6
+
7
+ Dir.mktmpdir("rbz") do |dir|
8
+ Dir.chdir(dir) do
9
+ tar = StringIO.new(DATA.read.unpack1("m"))
10
+ Gem::Package::TarReader.new(tar) do |reader|
11
+ reader.each do |entry|
12
+ next if entry.full_name.start_with?("._")
13
+ next if entry.full_name.start_with?("PaxHeader")
14
+
15
+ File.write(entry.full_name, entry.read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245
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
246
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
247
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
248
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
249
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
250
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
251
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
252
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
@@ -0,0 +1 @@
1
+ puts "Hello from other file"
data/example_2/main.rb ADDED
@@ -0,0 +1 @@
1
+ require_relative "lib/other_file"
data/exe/rbz ADDED
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "rubygems/package"
4
+ require "stringio"
5
+
6
+ source = ARGV[0] or abort "Error: Missing source directory"
7
+ io = StringIO.new
8
+
9
+ Gem::Package::TarWriter.new(io) do |writer|
10
+ Dir.chdir(source) do
11
+ Dir.glob("**/*").each do |e|
12
+ next if File.directory?(e)
13
+ mode = File.lstat(e).mode
14
+ writer.add_file(e, mode) { |fio| fio.write File.read(e, mode: "rb") }
15
+ end
16
+ end
17
+ end
18
+
19
+ puts File.read(__FILE__).split("__END__").last.strip
20
+ puts
21
+ puts "__END__"
22
+ puts [io.string].pack("m")
23
+
24
+ __END__
25
+
26
+ require "tmpdir"
27
+ require "rubygems/package"
28
+ require "stringio"
29
+
30
+ Dir.mktmpdir("rbz") do |dir|
31
+ Dir.chdir(dir) do
32
+ tar = StringIO.new(DATA.read.unpack1("m"))
33
+ Gem::Package::TarReader.new(tar) do |reader|
34
+ reader.each do |entry|
35
+ next if entry.full_name.start_with?("._")
36
+ next if entry.full_name.start_with?("PaxHeader")
37
+
38
+ FileUtils.mkdir_p(File.dirname(entry.full_name))
39
+ File.write(entry.full_name, entry.read, mode: "wb")
40
+ File.chmod(entry.header.mode, entry.full_name)
41
+ end
42
+ end
43
+
44
+ load "main.rb"
45
+ end
46
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Rbz
4
+ VERSION = "0.1.0"
5
+ end
data/lib/rbz.rb ADDED
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "rbz/version"
data/sig/rbz.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Rbz
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rbz
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Adam Daniels
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-04-12 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ - adam@mediadrive.ca
16
+ executables:
17
+ - rbz
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ".standard.yml"
22
+ - LICENSE.txt
23
+ - README.md
24
+ - Rakefile
25
+ - example.rbz
26
+ - example/main.rb
27
+ - example_2/lib/other_file.rb
28
+ - example_2/main.rb
29
+ - exe/rbz
30
+ - lib/rbz.rb
31
+ - lib/rbz/version.rb
32
+ - sig/rbz.rbs
33
+ homepage: https://github.com/adam12/rbz
34
+ licenses:
35
+ - MIT
36
+ metadata:
37
+ homepage_uri: https://github.com/adam12/rbz
38
+ source_code_uri: https://github.com/adam12/rbz
39
+ post_install_message:
40
+ rdoc_options: []
41
+ require_paths:
42
+ - lib
43
+ required_ruby_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 3.0.0
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ requirements: []
54
+ rubygems_version: 3.5.8
55
+ signing_key:
56
+ specification_version: 4
57
+ summary: Single file Ruby archives. Crazy? Maybe.
58
+ test_files: []