kompo 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -5
- data/exe/kompo +0 -18
- data/lib/kompo/version.rb +1 -1
- data/lib/kompo.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 530a1741287a0f2ef4705f078d5dcce97879b84b9cc222f5c005741a5a0b05e1
|
4
|
+
data.tar.gz: 9fdd81108938288b9908ca3c34af707e24d3a0f1fb2bf31fae33fba22d34381d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 514af116c063da5503567dd8e2f6e94d64e9f7075264cb56a2d829e954eec36c225dec8c194f806c62daf1b76a2eddfaaf7a2087f4c3d7b5de8801f2046e5692
|
7
|
+
data.tar.gz: 25880f8208dc8df0f82c815375804ad34c558945a3ae7d037cdc35f621312fffcd95ebd22361d7f84ffba14825df32d6250cb236cca1b652a83b83ded90bb423
|
data/README.md
CHANGED
@@ -5,16 +5,13 @@ TODO: Delete this and the text below, and describe your gem
|
|
5
5
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/kompo`. To experiment with that code, run `bin/console` for an interactive prompt.
|
6
6
|
|
7
7
|
## Installation
|
8
|
-
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
10
|
-
|
11
8
|
Install the gem and add to the application's Gemfile by executing:
|
12
9
|
|
13
|
-
$ bundle add
|
10
|
+
$ bundle add kompo
|
14
11
|
|
15
12
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
16
13
|
|
17
|
-
$ gem install
|
14
|
+
$ gem install kompo
|
18
15
|
|
19
16
|
## Usage
|
20
17
|
|
data/exe/kompo
CHANGED
@@ -28,21 +28,3 @@ Kompo::Tasks.cd_work_dir(option) do |task|
|
|
28
28
|
end
|
29
29
|
|
30
30
|
puts 'info: Finish kompo!'
|
31
|
-
|
32
|
-
require 'debug'
|
33
|
-
module Kernel
|
34
|
-
def require(path)
|
35
|
-
debugger
|
36
|
-
end
|
37
|
-
def autoload(const, file)
|
38
|
-
Object.autoload(const, file)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
class Module
|
43
|
-
alias original_autoload autoload
|
44
|
-
def autoload(const_name, file)
|
45
|
-
original_autoload(const_name, file)
|
46
|
-
end
|
47
|
-
end
|
48
|
-
autoload(:Hoge, 'make_main.rb')
|
data/lib/kompo/version.rb
CHANGED
data/lib/kompo.rb
CHANGED
@@ -12,12 +12,12 @@ module Kompo
|
|
12
12
|
|
13
13
|
class Option
|
14
14
|
extend Forwardable
|
15
|
-
attr_accessor :entrypoint, :
|
15
|
+
attr_accessor :entrypoint, :output, :gemfile, :stdlib, :dest_dir, :ruby_src_path, :cache_bundle_path, :ruby_version, :compress, :context, :args
|
16
16
|
delegate %i[on] => :@opt
|
17
17
|
|
18
18
|
def initialize(dir = Dir.getwd, opt = OptionParser.new)
|
19
19
|
@entrypoint = File.join(dir, 'main.rb')
|
20
|
-
@
|
20
|
+
@output = File.basename(dir)
|
21
21
|
@gemfile = true
|
22
22
|
@stdlib = true
|
23
23
|
@dest_dir = dir
|
@@ -55,7 +55,7 @@ module Kompo
|
|
55
55
|
extend Forwardable
|
56
56
|
attr_reader :task, :fs, :work_dir, :ruby_src_dir, :ruby_pc, :ruby_bin, :extinit_o, :encinit_o, :lib_ruby_static_dir, :bundle_setup, :bundle_ruby, :std_libs, :gem_libs
|
57
57
|
|
58
|
-
delegate %i[entrypoint
|
58
|
+
delegate %i[entrypoint output gemfile stdlib dest_dir ruby_src_path cache_bundle_path ruby_version compress context args] => :@option
|
59
59
|
delegate %i[komop_cli lib_kompo_dir] => :@fs
|
60
60
|
|
61
61
|
def initialize(option, dir)
|
@@ -213,14 +213,14 @@ module Kompo
|
|
213
213
|
'-lruby-static',
|
214
214
|
get_libs,
|
215
215
|
'-o',
|
216
|
-
|
216
|
+
output
|
217
217
|
].join(' ')
|
218
218
|
|
219
219
|
exec_command command, 'Packing'
|
220
220
|
end
|
221
221
|
|
222
222
|
def copy_to_dest_dir
|
223
|
-
command = ['cp', '-f',
|
223
|
+
command = ['cp', '-f', output, dest_dir].join(' ')
|
224
224
|
exec_command command, 'Copy to dest dir'
|
225
225
|
end
|
226
226
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kompo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Hirano
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Write a longer description or delete this line.
|
14
14
|
email:
|