mrubyudf 0.1.0
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 +7 -0
- data/.gitignore +8 -0
- data/Gemfile +6 -0
- data/LICENSE +674 -0
- data/README.md +153 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/example/circumference.rb +3 -0
- data/example/circumference.spec +8 -0
- data/example/fib.rb +12 -0
- data/example/fib.spec +8 -0
- data/example/repeat_str.rb +3 -0
- data/example/repeat_str.spec +9 -0
- data/example/rownum.rb +4 -0
- data/example/rownum.spec +6 -0
- data/example/swapcase.rb +3 -0
- data/example/swapcase.spec +8 -0
- data/exe/mrubyudf +4 -0
- data/lib/mrubyudf.rb +15 -0
- data/lib/mrubyudf/command.rb +53 -0
- data/lib/mrubyudf/function.rb +70 -0
- data/lib/mrubyudf/template.erb +70 -0
- data/lib/mrubyudf/template.rb +16 -0
- data/lib/mrubyudf/version.rb +3 -0
- data/misc/mruby-shared.patch +40 -0
- data/mrubyudf.gemspec +25 -0
- metadata +71 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
diff --git a/build_config.rb b/build_config.rb
|
2
|
+
index 254a28ce..310191e3 100644
|
3
|
+
--- a/build_config.rb
|
4
|
+
+++ b/build_config.rb
|
5
|
+
@@ -35,6 +35,10 @@ MRuby::Build.new do |conf|
|
6
|
+
# cc.compile_options = %Q[%{flags} -MMD -o "%{outfile}" -c "%{infile}"]
|
7
|
+
# end
|
8
|
+
|
9
|
+
+ conf.cc do |cc|
|
10
|
+
+ cc.flags = '-fPIC'
|
11
|
+
+ end
|
12
|
+
+
|
13
|
+
# mrbc settings
|
14
|
+
# conf.mrbc do |mrbc|
|
15
|
+
# mrbc.compile_options = "-g -B%{funcname} -o-" # The -g option is required for line numbers
|
16
|
+
@@ -59,6 +63,11 @@ MRuby::Build.new do |conf|
|
17
|
+
# archiver.archive_options = 'rs "%{outfile}" %{objs}'
|
18
|
+
# end
|
19
|
+
|
20
|
+
+ conf.archiver do |archiver|
|
21
|
+
+ archiver.command = 'gcc'
|
22
|
+
+ archiver.archive_options = '-shared -o %{outfile} %{objs}'
|
23
|
+
+ end
|
24
|
+
+
|
25
|
+
# Parser generator settings
|
26
|
+
# conf.yacc do |yacc|
|
27
|
+
# yacc.command = ENV['YACC'] || 'bison'
|
28
|
+
diff --git a/lib/mruby/build.rb b/lib/mruby/build.rb
|
29
|
+
index 8154b2b1..80f0b782 100644
|
30
|
+
--- a/lib/mruby/build.rb
|
31
|
+
+++ b/lib/mruby/build.rb
|
32
|
+
@@ -61,7 +61,7 @@ module MRuby
|
33
|
+
if ENV['OS'] == 'Windows_NT'
|
34
|
+
@exts = Exts.new('.o', '.exe', '.a')
|
35
|
+
else
|
36
|
+
- @exts = Exts.new('.o', '', '.a')
|
37
|
+
+ @exts = Exts.new('.o', '', '.so')
|
38
|
+
end
|
39
|
+
|
40
|
+
build_dir = build_dir || ENV['MRUBY_BUILD_DIR'] || "#{MRUBY_ROOT}/build"
|
data/mrubyudf.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative 'lib/mrubyudf/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "mrubyudf"
|
5
|
+
spec.version = MrubyUdf::VERSION
|
6
|
+
spec.authors = ["TOMITA Masahiro"]
|
7
|
+
spec.email = ["tommy@tmtm.org"]
|
8
|
+
|
9
|
+
spec.summary = 'Create MySQL UDF using mruby'
|
10
|
+
spec.description = 'Create MySQL UDF using mruby'
|
11
|
+
spec.homepage = 'https://github.com/tmtm/mrubyudf'
|
12
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
13
|
+
|
14
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
15
|
+
spec.metadata["source_code_uri"] = 'https://github.com/tmtm/mrubyudf'
|
16
|
+
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = "exe"
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mrubyudf
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- TOMITA Masahiro
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-05-02 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Create MySQL UDF using mruby
|
14
|
+
email:
|
15
|
+
- tommy@tmtm.org
|
16
|
+
executables:
|
17
|
+
- mrubyudf
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- ".gitignore"
|
22
|
+
- Gemfile
|
23
|
+
- LICENSE
|
24
|
+
- README.md
|
25
|
+
- Rakefile
|
26
|
+
- bin/console
|
27
|
+
- bin/setup
|
28
|
+
- example/circumference.rb
|
29
|
+
- example/circumference.spec
|
30
|
+
- example/fib.rb
|
31
|
+
- example/fib.spec
|
32
|
+
- example/repeat_str.rb
|
33
|
+
- example/repeat_str.spec
|
34
|
+
- example/rownum.rb
|
35
|
+
- example/rownum.spec
|
36
|
+
- example/swapcase.rb
|
37
|
+
- example/swapcase.spec
|
38
|
+
- exe/mrubyudf
|
39
|
+
- lib/mrubyudf.rb
|
40
|
+
- lib/mrubyudf/command.rb
|
41
|
+
- lib/mrubyudf/function.rb
|
42
|
+
- lib/mrubyudf/template.erb
|
43
|
+
- lib/mrubyudf/template.rb
|
44
|
+
- lib/mrubyudf/version.rb
|
45
|
+
- misc/mruby-shared.patch
|
46
|
+
- mrubyudf.gemspec
|
47
|
+
homepage: https://github.com/tmtm/mrubyudf
|
48
|
+
licenses: []
|
49
|
+
metadata:
|
50
|
+
homepage_uri: https://github.com/tmtm/mrubyudf
|
51
|
+
source_code_uri: https://github.com/tmtm/mrubyudf
|
52
|
+
post_install_message:
|
53
|
+
rdoc_options: []
|
54
|
+
require_paths:
|
55
|
+
- lib
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 2.3.0
|
61
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
requirements: []
|
67
|
+
rubygems_version: 3.1.2
|
68
|
+
signing_key:
|
69
|
+
specification_version: 4
|
70
|
+
summary: Create MySQL UDF using mruby
|
71
|
+
test_files: []
|