kompo 0.1.0 → 0.1.1
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/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: 8a96e1190c101239d2daebe19c13ed99ecb86a700388aa31b43fad74cf014097
|
4
|
+
data.tar.gz: 52e1a70b3aa11b909aab20cf9ee922f998df0b376657fb7c69529e998db7599a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3861dd4a6833f5f097bfee577b41e603a65c47b32c5711d9d938d5e65d3bfd7a77cc0d39977731a605a100eecb4e12f0f34e38f9d2e5a152fe53e9e1f065c20d
|
7
|
+
data.tar.gz: 9e6c6c2d037c1b28ee9e6f8b38da74bd5ef9b3af34293c3fe5935920f0cabc6af7d818a297bbafd4a013870ec2ebe1fd1b5b08e1c79d5b936715086adfdab59f
|
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/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.1
|
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-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Write a longer description or delete this line.
|
14
14
|
email:
|