rucy 0.1.31 → 0.1.32

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: c89685c7459df42c182e7cf35d81c7e0da7e225a825311514cd83a4f3f796365
4
+ data.tar.gz: 545dc4331565a973c35f2bf31a8dd7c956b81ff249cc9b0805d8904feebaa9c5
5
5
  SHA512:
6
- metadata.gz: 3852ba9949ef11a6a7051717ccfb03f055b7fd49d8fd9b7247965c5327b1b03b377336f7365eb233adcb4f7c24ccc2e53c9aa2b330d2a9b326913b848406d523
7
- data.tar.gz: e51cbafb37adf77d9f9cf034afbfb3855666c1b7ac24ea6e8861d1ebea5c8e4c948c16b5eb5ec47bf6275ae5b94474cb1aa36299328c1bab1eaaa555580ddd18
6
+ metadata.gz: 247fae5e615284b5940e1cff1b19700340ac6ee45746e4fc79a2af0f639868088bea6dca7bfb2abbe8b6bfea4c6741688d223ff761d2b4a4bd8b1165a939b3ec
7
+ data.tar.gz: 38571c46ef907b0df2a422f7a1c6d74670febec720d3dadb08c623704fceb82688e3788fabd926fb35a1396f2419596f3806912facb0a73f9b44255624d0fd81
@@ -0,0 +1,59 @@
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: test
24
+ run: rake test
25
+
26
+ - name: create gem
27
+ id: gem
28
+ run: |
29
+ rake gem
30
+ echo path=$(ruby -e 'print Dir.glob("*.gem").first') >> $GITHUB_OUTPUT
31
+
32
+ - name: create github release
33
+ id: release
34
+ uses: actions/create-release@v1
35
+ env:
36
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37
+ with:
38
+ tag_name: ${{ github.ref }}
39
+ release_name: ${{ github.ref }}
40
+
41
+ - name: upload to github release
42
+ uses: actions/upload-release-asset@v1
43
+ env:
44
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45
+ with:
46
+ upload_url: ${{ steps.release.outputs.upload_url }}
47
+ asset_path: ./${{ steps.gem.outputs.path }}
48
+ asset_name: ${{ steps.gem.outputs.path }}
49
+ asset_content_type: application/zip
50
+
51
+ - name: upload to rubygems
52
+ env:
53
+ GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
54
+ run: |
55
+ mkdir -p $HOME/.gem
56
+ touch $HOME/.gem/credentials
57
+ chmod 0600 $HOME/.gem/credentials
58
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
59
+ 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,11 @@
1
1
  # rucy ChangeLog
2
2
 
3
3
 
4
+ ## [v0.1.32] - 2023-03-01
5
+
6
+ - fix bugs
7
+
8
+
4
9
  ## [v0.1.31] - 2023-02-27
5
10
 
6
11
  - 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.32
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.32'
32
32
 
33
33
  s.add_development_dependency 'rake'
34
34
  s.add_development_dependency 'test-unit'
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.32
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-03-01 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.32
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.32
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"
@@ -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