rucy 0.1.31 → 0.1.33
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-gem.yml +62 -0
- data/.github/workflows/test.yml +0 -6
- data/.github/workflows/utils.rb +13 -5
- data/ChangeLog.md +10 -0
- data/Rakefile +1 -2
- data/VERSION +1 -1
- data/ext/rucy/extconf.rb +1 -2
- data/include/rucy/ruby.h +3 -0
- data/rucy.gemspec +1 -1
- data/test/helper.rb +2 -1
- metadata +6 -6
- data/.github/workflows/release.yml +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 847b1aae2526309e585fde444cce7716b17dd7dcdc10db29d7ff4aa7f61f1d12
|
4
|
+
data.tar.gz: 917bef8ed199dcfd43870210f90c4b2fbbd3209f3027e1ba7bc8a9cf9c6c927b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8702b13df2188e98a5c6bc9dfa8f999fc9fffc6f04f55947b847db039adbbf6d1140fccb239ac581efba1e9a82797455baad889ba8e24ef1295441d9aa2589e
|
7
|
+
data.tar.gz: f7beac3a6ada020080f3fc16ba3ff5a4582aac52b5318f026192e2fbbe3bc814d6620575560b9965c8b8a7684126e2ae2b8df6820a0fb9002dbf852152b3f05c
|
@@ -0,0 +1,62 @@
|
|
1
|
+
name: Release Gem
|
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: install gems
|
24
|
+
run: gem install yard
|
25
|
+
|
26
|
+
- name: test
|
27
|
+
run: rake quiet test
|
28
|
+
|
29
|
+
- name: create gem
|
30
|
+
id: gem
|
31
|
+
run: |
|
32
|
+
rake gem
|
33
|
+
echo path=$(ruby -e 'print Dir.glob("*.gem").first') >> $GITHUB_OUTPUT
|
34
|
+
|
35
|
+
- name: create github release
|
36
|
+
id: release
|
37
|
+
uses: actions/create-release@v1
|
38
|
+
env:
|
39
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
40
|
+
with:
|
41
|
+
tag_name: ${{ github.ref }}
|
42
|
+
release_name: ${{ github.ref }}
|
43
|
+
|
44
|
+
- name: upload to github release
|
45
|
+
uses: actions/upload-release-asset@v1
|
46
|
+
env:
|
47
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
48
|
+
with:
|
49
|
+
upload_url: ${{ steps.release.outputs.upload_url }}
|
50
|
+
asset_path: ./${{ steps.gem.outputs.path }}
|
51
|
+
asset_name: ${{ steps.gem.outputs.path }}
|
52
|
+
asset_content_type: application/zip
|
53
|
+
|
54
|
+
- name: upload to rubygems
|
55
|
+
env:
|
56
|
+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
|
57
|
+
run: |
|
58
|
+
mkdir -p $HOME/.gem
|
59
|
+
touch $HOME/.gem/credentials
|
60
|
+
chmod 0600 $HOME/.gem/credentials
|
61
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
62
|
+
rake upload
|
data/.github/workflows/test.yml
CHANGED
data/.github/workflows/utils.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
RENAMES = {reflex: 'reflexion'}
|
2
|
+
|
1
3
|
def sh(cmd)
|
2
4
|
puts cmd
|
3
5
|
system cmd
|
@@ -5,8 +7,10 @@ end
|
|
5
7
|
|
6
8
|
def setup_dependencies(build: true, only: nil)
|
7
9
|
gemspec_path = `git ls-files`.lines(chomp: true).find {|l| l =~ /\.gemspec$/}
|
8
|
-
|
9
|
-
|
10
|
+
return unless gemspec_path
|
11
|
+
|
12
|
+
gemspec = File.read gemspec_path
|
13
|
+
name = File.basename gemspec_path, '.gemspec'
|
10
14
|
|
11
15
|
exts = File.readlines('Rakefile')
|
12
16
|
.map {|l| l[%r|^\s*require\W+(\w+)/extension\W+$|, 1]}
|
@@ -15,9 +19,13 @@ def setup_dependencies(build: true, only: nil)
|
|
15
19
|
exts = exts & [only].flatten.map(&:to_s) if only
|
16
20
|
|
17
21
|
exts.each do |ext|
|
18
|
-
|
19
|
-
|
20
|
-
|
22
|
+
gem = RENAMES[ext.to_sym].then {|s| s || ext}
|
23
|
+
clone = "git clone --depth 1 https://github.com/xord/#{ext}.git ../#{ext}"
|
24
|
+
ver = gemspec[/add_runtime_dependency.*['"]#{gem}['"].*['"]\s*~>\s*([\d\.]+)\s*['"]/, 1]
|
25
|
+
|
26
|
+
# 'rake subtree:push' pushes all subrepos, so cloning by new tag
|
27
|
+
# often fails before tagging each new tag
|
28
|
+
sh %( #{clone} --branch v#{ver} || #{clone} )
|
21
29
|
sh %( cd ../#{ext} && rake ext )
|
22
30
|
end
|
23
31
|
end
|
data/ChangeLog.md
CHANGED
data/Rakefile
CHANGED
@@ -15,10 +15,9 @@ EXTENSIONS = [Xot, Rucy]
|
|
15
15
|
NPARAM_MAX = 8
|
16
16
|
NTIMES = (0..NPARAM_MAX)
|
17
17
|
|
18
|
+
default_tasks :ext
|
18
19
|
build_native_library
|
19
20
|
build_ruby_extension dlname: :tester, liboutput: false
|
20
21
|
test_ruby_extension
|
21
22
|
generate_documents
|
22
23
|
build_ruby_gem
|
23
|
-
|
24
|
-
task :default => :ext
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.33
|
data/ext/rucy/extconf.rb
CHANGED
data/include/rucy/ruby.h
CHANGED
data/rucy.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.platform = Gem::Platform::RUBY
|
29
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.33'
|
32
32
|
|
33
33
|
s.add_development_dependency 'rake'
|
34
34
|
s.add_development_dependency 'test-unit'
|
data/test/helper.rb
CHANGED
@@ -5,9 +5,10 @@
|
|
5
5
|
.map {|s| File.expand_path "../#{s}/lib", __dir__}
|
6
6
|
.each {|s| $:.unshift s if !$:.include?(s) && File.directory?(s)}
|
7
7
|
|
8
|
-
require 'test/unit'
|
9
8
|
require 'xot/test'
|
10
9
|
require 'rucy'
|
11
10
|
require_relative '../ext/rucy/tester'
|
12
11
|
|
12
|
+
require 'test/unit'
|
13
|
+
|
13
14
|
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.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xordog
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xot
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.
|
19
|
+
version: 0.1.33
|
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.33
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,7 +72,7 @@ files:
|
|
72
72
|
- ".doc/ext/rucy/struct.cpp"
|
73
73
|
- ".doc/ext/rucy/tester.cpp"
|
74
74
|
- ".doc/ext/rucy/value.cpp"
|
75
|
-
- ".github/workflows/release.yml"
|
75
|
+
- ".github/workflows/release-gem.yml"
|
76
76
|
- ".github/workflows/tag.yml"
|
77
77
|
- ".github/workflows/test.yml"
|
78
78
|
- ".github/workflows/utils.rb"
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
|
-
rubygems_version: 3.4.
|
143
|
+
rubygems_version: 3.4.10
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: A Ruby C++ Extension Helper Library.
|
@@ -1,34 +0,0 @@
|
|
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
|