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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d49e0f60c9d534c3d7c96f5db668dcfd000b5ef26a5f73f871f21d32c6fcc30
4
- data.tar.gz: 0b4e0b0516d3f2206ac78db15712a72186e70aa3b3da37ffa9bacd37d1dfe03e
3
+ metadata.gz: 847b1aae2526309e585fde444cce7716b17dd7dcdc10db29d7ff4aa7f61f1d12
4
+ data.tar.gz: 917bef8ed199dcfd43870210f90c4b2fbbd3209f3027e1ba7bc8a9cf9c6c927b
5
5
  SHA512:
6
- metadata.gz: 3852ba9949ef11a6a7051717ccfb03f055b7fd49d8fd9b7247965c5327b1b03b377336f7365eb233adcb4f7c24ccc2e53c9aa2b330d2a9b326913b848406d523
7
- data.tar.gz: e51cbafb37adf77d9f9cf034afbfb3855666c1b7ac24ea6e8861d1ebea5c8e4c948c16b5eb5ec47bf6275ae5b94474cb1aa36299328c1bab1eaaa555580ddd18
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
@@ -22,11 +22,5 @@ jobs:
22
22
  - name: setup dependencies
23
23
  run: "ruby -I.github/workflows -rutils -e 'setup_dependencies'"
24
24
 
25
- - name: lib
26
- run: rake lib
27
-
28
- - name: ext
29
- run: rake ext
30
-
31
25
  - name: test
32
26
  run: rake test
@@ -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
- gemspec = File.read gemspec_path
9
- name = File.basename gemspec_path, '.gemspec'
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
- 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} )
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
@@ -1,6 +1,16 @@
1
1
  # rucy ChangeLog
2
2
 
3
3
 
4
+ ## [v0.1.33] - 2023-04-22
5
+
6
+ - update dependencies
7
+
8
+
9
+ ## [v0.1.32] - 2023-03-01
10
+
11
+ - fix bugs
12
+
13
+
4
14
  ## [v0.1.31] - 2023-02-27
5
15
 
6
16
  - add ChangeLog.md file
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.31
1
+ 0.1.33
data/ext/rucy/extconf.rb CHANGED
@@ -13,8 +13,7 @@ require 'rucy/extension'
13
13
 
14
14
  Xot::ExtConf.new Xot, Rucy do
15
15
  setup do
16
- headers << 'ruby.h'
17
- local_libs << 'rucy'
16
+ headers << 'ruby.h'
18
17
  end
19
18
 
20
19
  create_makefile 'rucy/tester'
data/include/rucy/ruby.h CHANGED
@@ -4,7 +4,10 @@
4
4
  #define __RUCY_RUBY_H__
5
5
 
6
6
 
7
+ #pragma clang diagnostic push
8
+ #pragma clang diagnostic ignored "-Wundef"
7
9
  #include <ruby.h>
10
+ #pragma clang diagnostic pop
8
11
 
9
12
 
10
13
  #ifdef memcpy
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'
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.31
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-02-26 00:00:00.000000000 Z
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.31
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.31
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.6
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