rucy 0.1.29 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +34 -0
- data/.github/workflows/tag.yml +35 -0
- data/.github/workflows/test.yml +32 -0
- data/.github/workflows/utils.rb +47 -0
- data/ChangeLog.md +13 -0
- data/Rakefile +4 -4
- data/VERSION +1 -1
- data/ext/rucy/extconf.rb +2 -2
- data/lib/rucy/{module.rb → extension.rb} +3 -3
- data/lib/rucy.rb +1 -1
- data/rucy.gemspec +10 -7
- data/task/doc.rake +3 -3
- data/test/helper.rb +2 -2
- metadata +40 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d49e0f60c9d534c3d7c96f5db668dcfd000b5ef26a5f73f871f21d32c6fcc30
|
4
|
+
data.tar.gz: 0b4e0b0516d3f2206ac78db15712a72186e70aa3b3da37ffa9bacd37d1dfe03e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3852ba9949ef11a6a7051717ccfb03f055b7fd49d8fd9b7247965c5327b1b03b377336f7365eb233adcb4f7c24ccc2e53c9aa2b330d2a9b326913b848406d523
|
7
|
+
data.tar.gz: e51cbafb37adf77d9f9cf034afbfb3855666c1b7ac24ea6e8861d1ebea5c8e4c948c16b5eb5ec47bf6275ae5b94474cb1aa36299328c1bab1eaaa555580ddd18
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags: ['v[0-9]*']
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
release:
|
9
|
+
runs-on: macos-latest
|
10
|
+
|
11
|
+
steps:
|
12
|
+
- name: ruby 3.2
|
13
|
+
uses: ruby/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: 3.2
|
16
|
+
|
17
|
+
- name: checkout
|
18
|
+
uses: actions/checkout@v2
|
19
|
+
|
20
|
+
- name: setup dependencies
|
21
|
+
run: "ruby -I.github/workflows -rutils -e 'setup_dependencies'"
|
22
|
+
|
23
|
+
- name: test
|
24
|
+
run: rake test
|
25
|
+
|
26
|
+
- name: upload to rubygems
|
27
|
+
env:
|
28
|
+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
|
29
|
+
run: |
|
30
|
+
mkdir -p $HOME/.gem
|
31
|
+
touch $HOME/.gem/credentials
|
32
|
+
chmod 0600 $HOME/.gem/credentials
|
33
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
34
|
+
rake upload
|
@@ -0,0 +1,35 @@
|
|
1
|
+
name: Tag
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [master]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
tag:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
|
11
|
+
steps:
|
12
|
+
- name: ruby 3.2
|
13
|
+
uses: ruby/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: 3.2
|
16
|
+
|
17
|
+
- name: checkout
|
18
|
+
uses: actions/checkout@v2
|
19
|
+
with:
|
20
|
+
fetch-depth: 0
|
21
|
+
token: ${{ secrets.PAT }}
|
22
|
+
|
23
|
+
- name: setup dependencies
|
24
|
+
run: "ruby -I.github/workflows -rutils -e 'setup_dependencies only: :xot'"
|
25
|
+
|
26
|
+
- name: setup user name and email
|
27
|
+
run: |
|
28
|
+
git config --global user.email "xordog@gmail.com"
|
29
|
+
git config --global user.name "xord"
|
30
|
+
|
31
|
+
- name: tag versions
|
32
|
+
run: "ruby -I.github/workflows -rutils -e 'tag_versions'"
|
33
|
+
|
34
|
+
- name: push tags
|
35
|
+
run: git push origin --tags
|
@@ -0,0 +1,32 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [master]
|
6
|
+
pull_request:
|
7
|
+
branches: [master]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: macos-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- name: ruby 3.2
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: 3.2
|
18
|
+
|
19
|
+
- name: checkout
|
20
|
+
uses: actions/checkout@v2
|
21
|
+
|
22
|
+
- name: setup dependencies
|
23
|
+
run: "ruby -I.github/workflows -rutils -e 'setup_dependencies'"
|
24
|
+
|
25
|
+
- name: lib
|
26
|
+
run: rake lib
|
27
|
+
|
28
|
+
- name: ext
|
29
|
+
run: rake ext
|
30
|
+
|
31
|
+
- name: test
|
32
|
+
run: rake test
|
@@ -0,0 +1,47 @@
|
|
1
|
+
def sh(cmd)
|
2
|
+
puts cmd
|
3
|
+
system cmd
|
4
|
+
end
|
5
|
+
|
6
|
+
def setup_dependencies(build: true, only: nil)
|
7
|
+
gemspec_path = `git ls-files`.lines(chomp: true).find {|l| l =~ /\.gemspec$/}
|
8
|
+
gemspec = File.read gemspec_path
|
9
|
+
name = File.basename gemspec_path, '.gemspec'
|
10
|
+
|
11
|
+
exts = File.readlines('Rakefile')
|
12
|
+
.map {|l| l[%r|^\s*require\W+(\w+)/extension\W+$|, 1]}
|
13
|
+
.compact
|
14
|
+
.reject {|ext| ext == name}
|
15
|
+
exts = exts & [only].flatten.map(&:to_s) if only
|
16
|
+
|
17
|
+
exts.each do |ext|
|
18
|
+
ver = gemspec[/add_runtime_dependency.*'#{ext}'.*'\s*~>\s*([\d\.]+)\s*'/, 1]
|
19
|
+
url = "https://github.com/xord/#{ext}.git"
|
20
|
+
sh %( git clone --depth 1 --branch v#{ver} #{url} ../#{ext} )
|
21
|
+
sh %( cd ../#{ext} && rake ext )
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def tag_versions()
|
26
|
+
tags = `git tag`.lines chomp: true
|
27
|
+
vers = `git log --oneline ./VERSION`
|
28
|
+
.lines(chomp: true)
|
29
|
+
.map {|line| line.split.first[/^\w+$/]}
|
30
|
+
.map {|hash| [`git cat-file -p #{hash}:./VERSION 2>/dev/null`[/[\d\.]+/], hash]}
|
31
|
+
.select {|ver, hash| ver && hash}
|
32
|
+
.reverse
|
33
|
+
.to_h
|
34
|
+
|
35
|
+
changes = File.read('ChangeLog.md')
|
36
|
+
.split(/^\s*##\s*\[\s*v([\d\.]+)\s*\].*$/)
|
37
|
+
.slice(1..-1)
|
38
|
+
.each_slice(2)
|
39
|
+
.to_h
|
40
|
+
.transform_values(&:strip!)
|
41
|
+
|
42
|
+
vers.to_a.reverse.each do |ver, hash|
|
43
|
+
tag = "v#{ver}"
|
44
|
+
break if tags.include?(tag)
|
45
|
+
sh %( git tag -a -m \"#{changes[ver]&.gsub '"', '\\"'}\" #{tag} #{hash} )
|
46
|
+
end
|
47
|
+
end
|
data/ChangeLog.md
ADDED
data/Rakefile
CHANGED
@@ -7,16 +7,16 @@
|
|
7
7
|
|
8
8
|
require 'rucy/rake'
|
9
9
|
|
10
|
-
require 'xot/
|
11
|
-
require 'rucy/
|
10
|
+
require 'xot/extension'
|
11
|
+
require 'rucy/extension'
|
12
12
|
|
13
13
|
|
14
|
-
|
14
|
+
EXTENSIONS = [Xot, Rucy]
|
15
15
|
NPARAM_MAX = 8
|
16
16
|
NTIMES = (0..NPARAM_MAX)
|
17
17
|
|
18
18
|
build_native_library
|
19
|
-
build_ruby_extension dlname: :tester
|
19
|
+
build_ruby_extension dlname: :tester, liboutput: false
|
20
20
|
test_ruby_extension
|
21
21
|
generate_documents
|
22
22
|
build_ruby_gem
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.31
|
data/ext/rucy/extconf.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
module Rucy
|
5
5
|
|
6
6
|
|
7
|
-
module
|
7
|
+
module Extension
|
8
8
|
|
9
9
|
module_function
|
10
10
|
|
@@ -13,7 +13,7 @@ module Rucy
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def version()
|
16
|
-
|
16
|
+
File.read(root_dir 'VERSION')[/[\d\.]+/]
|
17
17
|
end
|
18
18
|
|
19
19
|
def root_dir(path = '')
|
@@ -28,7 +28,7 @@ module Rucy
|
|
28
28
|
root_dir 'lib'
|
29
29
|
end
|
30
30
|
|
31
|
-
end#
|
31
|
+
end# Extension
|
32
32
|
|
33
33
|
|
34
34
|
end# Rucy
|
data/lib/rucy.rb
CHANGED
data/rucy.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# -*- mode: ruby; coding: utf-8 -*-
|
2
2
|
|
3
3
|
|
4
|
-
File.expand_path('
|
4
|
+
File.expand_path('lib', __dir__)
|
5
5
|
.tap {|s| $:.unshift s if !$:.include?(s) && File.directory?(s)}
|
6
6
|
|
7
|
-
require 'rucy/
|
7
|
+
require 'rucy/extension'
|
8
8
|
|
9
9
|
|
10
10
|
Gem::Specification.new do |s|
|
@@ -12,23 +12,26 @@ Gem::Specification.new do |s|
|
|
12
12
|
patterns.map {|pat| Dir.glob(pat).to_a}.flatten
|
13
13
|
end
|
14
14
|
|
15
|
-
|
16
|
-
name =
|
15
|
+
ext = Rucy::Extension
|
16
|
+
name = ext.name.downcase
|
17
17
|
rdocs = glob.call *%w[README .doc/ext/**/*.cpp]
|
18
18
|
|
19
19
|
s.name = name
|
20
20
|
s.summary = 'A Ruby C++ Extension Helper Library.'
|
21
21
|
s.description = 'This library helps you to develop Ruby Extension by C++.'
|
22
|
-
s.version =
|
22
|
+
s.version = ext.version
|
23
23
|
|
24
24
|
s.authors = %w[xordog]
|
25
25
|
s.email = 'xordog@gmail.com'
|
26
26
|
s.homepage = "https://github.com/xord/rucy"
|
27
27
|
|
28
28
|
s.platform = Gem::Platform::RUBY
|
29
|
-
s.required_ruby_version = '>= 2.
|
29
|
+
s.required_ruby_version = '>= 2.7.0'
|
30
30
|
|
31
|
-
s.add_runtime_dependency 'xot', '~> 0.1.
|
31
|
+
s.add_runtime_dependency 'xot', '~> 0.1.31'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rake'
|
34
|
+
s.add_development_dependency 'test-unit'
|
32
35
|
|
33
36
|
s.files = `git ls-files`.split $/
|
34
37
|
s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f}
|
data/task/doc.rake
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- mode: ruby; coding: utf-8 -*-
|
2
2
|
|
3
3
|
|
4
|
-
File.expand_path('
|
4
|
+
File.expand_path('../bin', __dir__).tap do |path|
|
5
5
|
ENV['PATH'] += ":#{path}" unless ENV['PATH'].split(':').include?(path)
|
6
6
|
end
|
7
7
|
|
@@ -16,8 +16,8 @@ end
|
|
16
16
|
namespace :doc do
|
17
17
|
|
18
18
|
|
19
|
-
|
20
|
-
name = env :NAME,
|
19
|
+
ext = EXTENSIONS.last
|
20
|
+
name = env :NAME, ext.name.downcase
|
21
21
|
extdir = env :EXTDIR, 'ext'
|
22
22
|
docdir = env :DOCDIR, 'doc'
|
23
23
|
rdoc = env :RDOC, 'rdoc'# 'yardoc'
|
data/test/helper.rb
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
%w[../xot .]
|
5
|
-
.map {|s| File.expand_path "
|
5
|
+
.map {|s| File.expand_path "../#{s}/lib", __dir__}
|
6
6
|
.each {|s| $:.unshift s if !$:.include?(s) && File.directory?(s)}
|
7
7
|
|
8
8
|
require 'test/unit'
|
9
9
|
require 'xot/test'
|
10
10
|
require 'rucy'
|
11
|
-
|
11
|
+
require_relative '../ext/rucy/tester'
|
12
12
|
|
13
13
|
include Xot::Test
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rucy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xordog
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xot
|
@@ -16,14 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.
|
19
|
+
version: 0.1.31
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1.
|
26
|
+
version: 0.1.31
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: test-unit
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
27
55
|
description: This library helps you to develop Ruby Extension by C++.
|
28
56
|
email: xordog@gmail.com
|
29
57
|
executables:
|
@@ -44,6 +72,11 @@ files:
|
|
44
72
|
- ".doc/ext/rucy/struct.cpp"
|
45
73
|
- ".doc/ext/rucy/tester.cpp"
|
46
74
|
- ".doc/ext/rucy/value.cpp"
|
75
|
+
- ".github/workflows/release.yml"
|
76
|
+
- ".github/workflows/tag.yml"
|
77
|
+
- ".github/workflows/test.yml"
|
78
|
+
- ".github/workflows/utils.rb"
|
79
|
+
- ChangeLog.md
|
47
80
|
- LICENSE
|
48
81
|
- README.md
|
49
82
|
- Rakefile
|
@@ -71,7 +104,7 @@ files:
|
|
71
104
|
- include/rucy/symbol.h
|
72
105
|
- include/rucy/value.h.erb
|
73
106
|
- lib/rucy.rb
|
74
|
-
- lib/rucy/
|
107
|
+
- lib/rucy/extension.rb
|
75
108
|
- lib/rucy/rake.rb
|
76
109
|
- rucy.gemspec
|
77
110
|
- src/class.cpp
|
@@ -100,14 +133,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
133
|
requirements:
|
101
134
|
- - ">="
|
102
135
|
- !ruby/object:Gem::Version
|
103
|
-
version: 2.
|
136
|
+
version: 2.7.0
|
104
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
138
|
requirements:
|
106
139
|
- - ">="
|
107
140
|
- !ruby/object:Gem::Version
|
108
141
|
version: '0'
|
109
142
|
requirements: []
|
110
|
-
rubygems_version: 3.
|
143
|
+
rubygems_version: 3.4.6
|
111
144
|
signing_key:
|
112
145
|
specification_version: 4
|
113
146
|
summary: A Ruby C++ Extension Helper Library.
|