reight 0.4.0 → 0.5.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 +4 -4
- data/.github/workflows/release-gem.yml +2 -49
- data/.github/workflows/release-wasm.yml +11 -5
- data/.github/workflows/tag.yml +5 -28
- data/.github/workflows/test.yml +1 -37
- data/ChangeLog.md +13 -0
- data/Gemfile.lock +29 -0
- data/Rakefile +1 -1
- data/Reight.podspec +2 -2
- data/VERSION +1 -1
- data/lib/reight/all.rb +1 -2
- data/lib/reight/app/runner.rb +10 -1
- data/lib/reight/app.rb +2 -0
- data/lib/reight/cli.rb +3 -5
- data/lib/reight/map.rb +1 -0
- data/lib/reight/reight.rb +7 -0
- data/reight.gemspec +9 -9
- metadata +20 -20
- data/.github/workflows/utils.rb +0 -127
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ccbc78084e7a0738479094c4679bea2b88c9d77e3a51ce511b92c90db17a2947
|
|
4
|
+
data.tar.gz: 9518407443595fe668a31e846f3e54cf8c0c133cd5332e50b77a607c5fcb7884
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d90d90a81684ddb32dfb92f3d9d4bc98a74f38aa8ea95ff21abab2b0bf5b8eb7bfa217367c477f9c73667b42ddece3e2b9acebd414f352936b2ea05436609ae
|
|
7
|
+
data.tar.gz: 2dcd5ffb6122e5b55645d9386938e7f1166ea441dc397e152de9351ee0d9a9a52a7fdad9192d122d54a1449a7819f9977d5655584d02244de3adf02487c8a4c6
|
|
@@ -9,52 +9,5 @@ permissions:
|
|
|
9
9
|
|
|
10
10
|
jobs:
|
|
11
11
|
release:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- name: ruby 3.2
|
|
16
|
-
uses: ruby/setup-ruby@v1
|
|
17
|
-
with:
|
|
18
|
-
ruby-version: 3.2
|
|
19
|
-
|
|
20
|
-
- name: checkout
|
|
21
|
-
uses: actions/checkout@v4
|
|
22
|
-
|
|
23
|
-
- name: setup gems
|
|
24
|
-
run: bundle install
|
|
25
|
-
|
|
26
|
-
- name: setup dependencies
|
|
27
|
-
run: "ruby -I.github/workflows -rutils -e 'setup_dependencies'"
|
|
28
|
-
|
|
29
|
-
- name: packages
|
|
30
|
-
run: bundle exec rake packages
|
|
31
|
-
|
|
32
|
-
- name: setup zig
|
|
33
|
-
if: github.event.repository.name == 'reflex-terminal'
|
|
34
|
-
uses: mlugg/setup-zig@v2
|
|
35
|
-
with:
|
|
36
|
-
version: 0.16.0
|
|
37
|
-
|
|
38
|
-
- name: test
|
|
39
|
-
run: bundle exec rake test
|
|
40
|
-
|
|
41
|
-
- name: create gem
|
|
42
|
-
id: gem
|
|
43
|
-
run: |
|
|
44
|
-
bundle exec rake gem
|
|
45
|
-
echo path=$(ruby -e 'print Dir.glob("*.gem").first') >> $GITHUB_OUTPUT
|
|
46
|
-
|
|
47
|
-
- name: create github release
|
|
48
|
-
env:
|
|
49
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
50
|
-
run: ruby -I.github/workflows -rutils -e 'release(*ARGV)' ./${{ steps.gem.outputs.path }}
|
|
51
|
-
|
|
52
|
-
- name: upload to rubygems
|
|
53
|
-
env:
|
|
54
|
-
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
|
|
55
|
-
run: |
|
|
56
|
-
mkdir -p $HOME/.gem
|
|
57
|
-
touch $HOME/.gem/credentials
|
|
58
|
-
chmod 0600 $HOME/.gem/credentials
|
|
59
|
-
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
|
60
|
-
bundle exec rake upload
|
|
12
|
+
uses: xord/xot/.github/workflows/release-gem.yml@master
|
|
13
|
+
secrets: inherit
|
|
@@ -13,16 +13,21 @@ jobs:
|
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
14
|
|
|
15
15
|
steps:
|
|
16
|
-
- name:
|
|
16
|
+
- name: checkout
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: setup ruby
|
|
17
20
|
uses: ruby/setup-ruby@v1
|
|
18
21
|
with:
|
|
19
22
|
ruby-version: 4.0
|
|
20
23
|
|
|
21
|
-
- name:
|
|
22
|
-
|
|
24
|
+
- name: setup xot
|
|
25
|
+
run: git clone -q --depth 1 https://github.com/xord/xot.git "${{ runner.temp }}/xot"
|
|
23
26
|
|
|
24
27
|
- name: checkout monorepo
|
|
25
|
-
|
|
28
|
+
env:
|
|
29
|
+
RUBYLIB: ${{ runner.temp }}/xot/lib
|
|
30
|
+
run: ruby -rxot/rake -e 'checkout_monorepo'
|
|
26
31
|
|
|
27
32
|
- name: setup node
|
|
28
33
|
uses: actions/setup-node@v4
|
|
@@ -41,7 +46,8 @@ jobs:
|
|
|
41
46
|
- name: upload to release
|
|
42
47
|
env:
|
|
43
48
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
44
|
-
|
|
49
|
+
RUBYLIB: ../all/xot/lib
|
|
50
|
+
run: ruby -rxot/rake -e 'release_on_github(*Dir.glob("../all/reight/wasm/output/*"))'
|
|
45
51
|
|
|
46
52
|
- name: publish to npm
|
|
47
53
|
run: cd ../all/reight/wasm && rake publish
|
data/.github/workflows/tag.yml
CHANGED
|
@@ -1,35 +1,12 @@
|
|
|
1
1
|
name: Tag
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: [Test]
|
|
6
|
+
types: [completed]
|
|
5
7
|
branches: [master]
|
|
6
8
|
|
|
7
9
|
jobs:
|
|
8
10
|
tag:
|
|
9
|
-
|
|
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@v4
|
|
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
|
|
11
|
+
uses: xord/xot/.github/workflows/tag.yml@master
|
|
12
|
+
secrets: inherit
|
data/.github/workflows/test.yml
CHANGED
|
@@ -7,40 +7,4 @@ on:
|
|
|
7
7
|
|
|
8
8
|
jobs:
|
|
9
9
|
test:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
steps:
|
|
13
|
-
- name: ruby 3.2
|
|
14
|
-
uses: ruby/setup-ruby@v1
|
|
15
|
-
with:
|
|
16
|
-
ruby-version: 3.2
|
|
17
|
-
|
|
18
|
-
- name: checkout
|
|
19
|
-
uses: actions/checkout@v4
|
|
20
|
-
|
|
21
|
-
- name: setup gems
|
|
22
|
-
run: bundle install
|
|
23
|
-
|
|
24
|
-
- name: setup dependencies
|
|
25
|
-
run: "ruby -I.github/workflows -rutils -e 'setup_dependencies'"
|
|
26
|
-
|
|
27
|
-
- name: packages
|
|
28
|
-
run: bundle exec rake verbose packages
|
|
29
|
-
|
|
30
|
-
- name: setup zig
|
|
31
|
-
if: github.event.repository.name == 'reflex-terminal'
|
|
32
|
-
uses: mlugg/setup-zig@v2
|
|
33
|
-
with:
|
|
34
|
-
version: 0.16.0
|
|
35
|
-
|
|
36
|
-
- name: vendor
|
|
37
|
-
run: bundle exec rake vendor
|
|
38
|
-
|
|
39
|
-
- name: lib
|
|
40
|
-
run: bundle exec rake verbose lib
|
|
41
|
-
|
|
42
|
-
- name: ext
|
|
43
|
-
run: bundle exec rake verbose ext
|
|
44
|
-
|
|
45
|
-
- name: test
|
|
46
|
-
run: bundle exec rake verbose test
|
|
10
|
+
uses: xord/xot/.github/workflows/test.yml@master
|
data/ChangeLog.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
# reight ChangeLog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## [v0.5.0] - 2026-11-04
|
|
5
|
+
|
|
6
|
+
- [BREAKING] Raise the deployment targets to macOS 11.0 and iOS 14.0
|
|
7
|
+
- [BREAKING] loadPixels and updatePixels exchange straight alpha, not premultiplied (from processing)
|
|
8
|
+
- [BREAKING] A shader from createShader sees premultiplied samples from texMap and must emit premultiplied color (from processing)
|
|
9
|
+
- [BREAKING] Report wheel deltas in pixels, in the same direction, on every platform (from reflex)
|
|
10
|
+
- Package a macOS app without CocoaPods
|
|
11
|
+
|
|
12
|
+
- Fix ArgumentError on switching back to the runner
|
|
13
|
+
- Fix mouseOver and mouseOut never reaching a script
|
|
14
|
+
- Fix the run task still passing the old --edit option
|
|
15
|
+
|
|
16
|
+
|
|
4
17
|
## [v0.4.0] - 2026-08-04
|
|
5
18
|
|
|
6
19
|
- Add packager support with subcommand CLI
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: https://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
power_assert (3.1.0)
|
|
5
|
+
rake (13.4.2)
|
|
6
|
+
rexml (3.4.4)
|
|
7
|
+
test-unit (3.7.8)
|
|
8
|
+
power_assert
|
|
9
|
+
yard (0.9.45)
|
|
10
|
+
|
|
11
|
+
PLATFORMS
|
|
12
|
+
ruby
|
|
13
|
+
|
|
14
|
+
DEPENDENCIES
|
|
15
|
+
rake
|
|
16
|
+
rexml
|
|
17
|
+
test-unit
|
|
18
|
+
yard
|
|
19
|
+
|
|
20
|
+
CHECKSUMS
|
|
21
|
+
bundler (4.0.20) sha256=7978a8ac648767f5e635bc522445b79e80a52b907a39a36c2d8085ed6bc762ae
|
|
22
|
+
power_assert (3.1.0) sha256=fefe98ed5d3140628138f3f9f9194d6ece01f1320e69700d3c928adca7518251
|
|
23
|
+
rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
|
|
24
|
+
rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
|
|
25
|
+
test-unit (3.7.8) sha256=689d1ca53f4d46f678b4e5d68d8e4294f87fc5e8b9238cc4de7c5727e8d65943
|
|
26
|
+
yard (0.9.45) sha256=52e211493f7cb8a3ebf7e104a25a1e73937a3103092545d34cb88fafebb3dc51
|
|
27
|
+
|
|
28
|
+
BUNDLED WITH
|
|
29
|
+
4.0.20
|
data/Rakefile
CHANGED
|
@@ -29,5 +29,5 @@ build_ruby_gem
|
|
|
29
29
|
task :run do
|
|
30
30
|
libs = %w[xot rucy beeps rays reflex processing rubysketch]
|
|
31
31
|
.map {|lib| "-I#{ENV['ALL']}/#{lib}/lib"}
|
|
32
|
-
sh %( ruby #{libs.join ' '} -Ilib bin/r8
|
|
32
|
+
sh %( ruby #{libs.join ' '} -Ilib bin/r8 edit '#{ENV["dir"] || "demo/hello"}' )
|
|
33
33
|
end
|
data/Reight.podspec
CHANGED
|
@@ -11,8 +11,8 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.author = {"xordog" => "xordog@gmail.com"}
|
|
12
12
|
s.homepage = "https://github.com/xord/reight"
|
|
13
13
|
|
|
14
|
-
s.osx.deployment_target = "
|
|
15
|
-
s.ios.deployment_target = "
|
|
14
|
+
s.osx.deployment_target = "11.0"
|
|
15
|
+
s.ios.deployment_target = "14.0"
|
|
16
16
|
|
|
17
17
|
root = "${PODS_ROOT}/#{s.name}"
|
|
18
18
|
exts = File.read(File.expand_path 'Rakefile', __dir__)
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.5.0
|
data/lib/reight/all.rb
CHANGED
|
@@ -3,8 +3,7 @@ require 'rubysketch/all'
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
module Reight
|
|
6
|
-
Processing.alias_snake_case_methods__ Processing
|
|
7
|
-
Processing.alias_snake_case_methods__ RubySketch
|
|
6
|
+
Processing.alias_snake_case_methods__ Processing, RubySketch
|
|
8
7
|
|
|
9
8
|
WINDOW__ = Processing.setup__ RubySketch::Window, RubySketch::Context
|
|
10
9
|
$processing_context__ = WINDOW__.context
|
data/lib/reight/app/runner.rb
CHANGED
|
@@ -86,6 +86,16 @@ class Reight::Runner < Reight::App
|
|
|
86
86
|
call_event {@context.double_clicked}
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
+
def mouse_over()
|
|
90
|
+
super
|
|
91
|
+
call_event {@context.mouse_over}
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def mouse_out()
|
|
95
|
+
super
|
|
96
|
+
call_event {@context.mouse_out}
|
|
97
|
+
end
|
|
98
|
+
|
|
89
99
|
def mouse_wheel()
|
|
90
100
|
super
|
|
91
101
|
call_event {@context.mouse_wheel}
|
|
@@ -168,7 +178,6 @@ class Reight::Runner < Reight::App
|
|
|
168
178
|
end
|
|
169
179
|
|
|
170
180
|
def cleanup()
|
|
171
|
-
ROOT_CONTEXT.remove_world @context.spriteWorld__ if @context
|
|
172
181
|
@context = nil
|
|
173
182
|
end_wrapping_user_classes
|
|
174
183
|
clear_all_timers
|
data/lib/reight/app.rb
CHANGED
data/lib/reight/cli.rb
CHANGED
|
@@ -69,6 +69,8 @@ class Reight::CLI
|
|
|
69
69
|
c.mouse_dragged {r8.mouse_dragged}
|
|
70
70
|
c.mouse_clicked {r8.mouse_clicked}
|
|
71
71
|
c.double_clicked {r8.double_clicked}
|
|
72
|
+
c.mouse_over {r8.mouse_over}
|
|
73
|
+
c.mouse_out {r8.mouse_out}
|
|
72
74
|
c.mouse_wheel {r8.mouse_wheel}
|
|
73
75
|
c.touch_started {r8.touch_started}
|
|
74
76
|
c.touch_ended {r8.touch_ended}
|
|
@@ -84,11 +86,7 @@ class Reight::CLI
|
|
|
84
86
|
def package(command, argv)
|
|
85
87
|
require 'reflex/packager'
|
|
86
88
|
cli = Reflex::Packager::CLI.new Reflex::Packager::Profile.new(
|
|
87
|
-
|
|
88
|
-
git: 'https://github.com/xord/reight',
|
|
89
|
-
version: Reight::Extension.version,
|
|
90
|
-
libraries: %w[Xot Rucy Beeps Rays Reflex Processing RubySketch Reight],
|
|
91
|
-
extensions: %w[beeps_ext rays_ext reflex_ext],
|
|
89
|
+
extension: Reight::Extension,
|
|
92
90
|
config_files: %w[reight.yml reight.yaml r8.yml r8.yaml],
|
|
93
91
|
command: 'r8',
|
|
94
92
|
boot: <<~BOOT,
|
data/lib/reight/map.rb
CHANGED
data/lib/reight/reight.rb
CHANGED
|
@@ -56,6 +56,11 @@ class Reight::R8
|
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
def setup()
|
|
59
|
+
begin
|
|
60
|
+
Reflex::Gamepad.enable
|
|
61
|
+
rescue Rucy::NativeError
|
|
62
|
+
# gamepads are not available
|
|
63
|
+
end
|
|
59
64
|
w, h = Reight::App::SCREEN_WIDTH, Reight::App::SCREEN_HEIGHT
|
|
60
65
|
createCanvas w, h, pixelDensity: AUTO
|
|
61
66
|
window_resize(*[w, h].map {_1 * 3})
|
|
@@ -72,6 +77,8 @@ class Reight::R8
|
|
|
72
77
|
def mouse_dragged() = current.mouse_dragged
|
|
73
78
|
def mouse_clicked() = current.mouse_clicked
|
|
74
79
|
def double_clicked() = current.double_clicked
|
|
80
|
+
def mouse_over() = current.mouse_over
|
|
81
|
+
def mouse_out() = current.mouse_out
|
|
75
82
|
def mouse_wheel() = current.mouse_wheel
|
|
76
83
|
def touch_started() = current.touch_started
|
|
77
84
|
def touch_ended() = current.touch_ended
|
data/reight.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
|
11
11
|
|
|
12
12
|
ext = Reight::Extension
|
|
13
13
|
name = ext.name true
|
|
14
|
-
rdocs = glob.call
|
|
14
|
+
rdocs = glob.call(*%w[README])
|
|
15
15
|
|
|
16
16
|
s.name = name
|
|
17
17
|
s.version = ext.version
|
|
@@ -25,14 +25,14 @@ Gem::Specification.new do |s|
|
|
|
25
25
|
s.platform = Gem::Platform::RUBY
|
|
26
26
|
s.required_ruby_version = '>= 3.0.0'
|
|
27
27
|
|
|
28
|
-
s.add_dependency 'xot', '~> 0.
|
|
29
|
-
s.add_dependency 'rucy', '~> 0.
|
|
30
|
-
s.add_dependency 'beeps', '~> 0.
|
|
31
|
-
s.add_dependency 'rays', '~> 0.
|
|
32
|
-
s.add_dependency 'reflexion', '~> 0.
|
|
33
|
-
s.add_dependency 'reflex-packager', '~> 0.
|
|
34
|
-
s.add_dependency 'processing', '~> 1.
|
|
35
|
-
s.add_dependency 'rubysketch', '~> 0.
|
|
28
|
+
s.add_dependency 'xot', '~> 0.5.0'
|
|
29
|
+
s.add_dependency 'rucy', '~> 0.5.0'
|
|
30
|
+
s.add_dependency 'beeps', '~> 0.5.0'
|
|
31
|
+
s.add_dependency 'rays', '~> 0.5.0'
|
|
32
|
+
s.add_dependency 'reflexion', '~> 0.7.0'
|
|
33
|
+
s.add_dependency 'reflex-packager', '~> 0.3.0'
|
|
34
|
+
s.add_dependency 'processing', '~> 1.5.0'
|
|
35
|
+
s.add_dependency 'rubysketch', '~> 0.11.0'
|
|
36
36
|
|
|
37
37
|
s.files = `git ls-files`.split $/
|
|
38
38
|
s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: reight
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- xordog
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: xot
|
|
@@ -16,112 +16,112 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.
|
|
19
|
+
version: 0.5.0
|
|
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.
|
|
26
|
+
version: 0.5.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rucy
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.
|
|
33
|
+
version: 0.5.0
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.
|
|
40
|
+
version: 0.5.0
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: beeps
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.
|
|
47
|
+
version: 0.5.0
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0.
|
|
54
|
+
version: 0.5.0
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: rays
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 0.
|
|
61
|
+
version: 0.5.0
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: 0.
|
|
68
|
+
version: 0.5.0
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: reflexion
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: 0.
|
|
75
|
+
version: 0.7.0
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: 0.
|
|
82
|
+
version: 0.7.0
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: reflex-packager
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: 0.
|
|
89
|
+
version: 0.3.0
|
|
90
90
|
type: :runtime
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: 0.
|
|
96
|
+
version: 0.3.0
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: processing
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: 1.
|
|
103
|
+
version: 1.5.0
|
|
104
104
|
type: :runtime
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: 1.
|
|
110
|
+
version: 1.5.0
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
112
|
name: rubysketch
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - "~>"
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: 0.
|
|
117
|
+
version: 0.11.0
|
|
118
118
|
type: :runtime
|
|
119
119
|
prerelease: false
|
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements:
|
|
122
122
|
- - "~>"
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: 0.
|
|
124
|
+
version: 0.11.0
|
|
125
125
|
description: A Retro Game Engine for Ruby.
|
|
126
126
|
email: xordog@gmail.com
|
|
127
127
|
executables:
|
|
@@ -134,12 +134,12 @@ files:
|
|
|
134
134
|
- ".github/workflows/release-wasm.yml"
|
|
135
135
|
- ".github/workflows/tag.yml"
|
|
136
136
|
- ".github/workflows/test.yml"
|
|
137
|
-
- ".github/workflows/utils.rb"
|
|
138
137
|
- ".gitignore"
|
|
139
138
|
- CLAUDE.md
|
|
140
139
|
- CONTRIBUTING.md
|
|
141
140
|
- ChangeLog.md
|
|
142
141
|
- Gemfile
|
|
142
|
+
- Gemfile.lock
|
|
143
143
|
- LICENSE
|
|
144
144
|
- README.md
|
|
145
145
|
- Rakefile
|
|
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
223
223
|
- !ruby/object:Gem::Version
|
|
224
224
|
version: '0'
|
|
225
225
|
requirements: []
|
|
226
|
-
rubygems_version: 3.
|
|
226
|
+
rubygems_version: 3.5.22
|
|
227
227
|
signing_key:
|
|
228
228
|
specification_version: 4
|
|
229
229
|
summary: A Retro Game Engine for Ruby.
|
data/.github/workflows/utils.rb
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
require 'shellwords'
|
|
2
|
-
|
|
3
|
-
ALL_REPO = 'xord/all'
|
|
4
|
-
ALL_DIR = '../all'
|
|
5
|
-
ALL_FETCH_DEPTH = 100
|
|
6
|
-
|
|
7
|
-
RENAMES = {reflex: 'reflexion'}
|
|
8
|
-
|
|
9
|
-
def sh(cmd)
|
|
10
|
-
puts cmd
|
|
11
|
-
system cmd
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def setup_dependencies(only: nil)
|
|
15
|
-
gemspec_path = `git ls-files`.lines(chomp: true).find {|l| l =~ /\.gemspec$/}
|
|
16
|
-
return unless gemspec_path
|
|
17
|
-
|
|
18
|
-
gemspec = File.read gemspec_path
|
|
19
|
-
name = File.basename gemspec_path, '.gemspec'
|
|
20
|
-
|
|
21
|
-
exts = File.readlines('Rakefile')
|
|
22
|
-
.map {|l| l[%r|^\s*require\W+([\w\-\_]+)/extension\W+$|, 1]}
|
|
23
|
-
.compact
|
|
24
|
-
.reject {|ext| ext == name}
|
|
25
|
-
exts = exts & [only].flatten.map(&:to_s) if only
|
|
26
|
-
return if exts.empty?
|
|
27
|
-
|
|
28
|
-
unless setup_dependencies_via_monorepo(exts)
|
|
29
|
-
setup_dependencies_via_each_repo_by_version(gemspec, exts)
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
exts.each {|ext| sh %( cd ../#{ext} && rake ext )}
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def setup_dependencies_via_monorepo(exts)
|
|
36
|
-
return false unless checkout_monorepo
|
|
37
|
-
exts.each {|ext| sh %( ln -snf all/#{ext} ../#{ext} )}
|
|
38
|
-
true
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def checkout_monorepo()
|
|
42
|
-
uuid = `git log -1 --format=%B`[/^\[\[([0-9a-fA-F-]+)\]\]$/, 1]
|
|
43
|
-
return false unless uuid
|
|
44
|
-
|
|
45
|
-
commit = setup_monorepo uuid
|
|
46
|
-
return false unless commit
|
|
47
|
-
|
|
48
|
-
Dir.chdir(ALL_DIR) {sh %( git checkout -q #{commit} )}
|
|
49
|
-
true
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
def setup_monorepo(uuid)
|
|
53
|
-
unless File.directory? ALL_DIR
|
|
54
|
-
url = "https://github.com/#{ALL_REPO}.git"
|
|
55
|
-
sh %( git clone --no-tags --depth #{ALL_FETCH_DEPTH} #{url} #{ALL_DIR} )
|
|
56
|
-
end
|
|
57
|
-
loop do
|
|
58
|
-
commit = find_monorepo_commit uuid
|
|
59
|
-
return commit if commit
|
|
60
|
-
|
|
61
|
-
deepened = Dir.chdir ALL_DIR do
|
|
62
|
-
before = `git rev-list --count HEAD`.to_i
|
|
63
|
-
sh %( git fetch --deepen #{ALL_FETCH_DEPTH} )
|
|
64
|
-
`git rev-list --count HEAD`.to_i > before
|
|
65
|
-
end
|
|
66
|
-
return nil unless deepened
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def find_monorepo_commit(uuid)
|
|
71
|
-
Dir.chdir ALL_DIR do
|
|
72
|
-
out = `git log origin/HEAD -F --grep="[[#{uuid}]]" --format=%H -1`.strip
|
|
73
|
-
out.empty? ? nil : out
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
def setup_dependencies_via_each_repo_by_version(gemspec, exts)
|
|
78
|
-
exts.each do |ext|
|
|
79
|
-
gem = RENAMES[ext.to_sym].then {|s| s || ext}
|
|
80
|
-
ver = gemspec[/add_dependency.*['"]#{gem}['"].*['"]\s*~>\s*([\d\.]+)\s*['"]/, 1]
|
|
81
|
-
opts = '-c advice.detachedHead=false --depth 1'
|
|
82
|
-
clone = "git clone #{opts} https://github.com/xord/#{ext}.git ../#{ext}"
|
|
83
|
-
|
|
84
|
-
# 'rake subtree:push' pushes all subrepos, so cloning by new tag
|
|
85
|
-
# often fails before tagging each new tag
|
|
86
|
-
sh %( #{clone} --branch v#{ver} || #{clone} )
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
def tag_versions()
|
|
91
|
-
changes = changelogs
|
|
92
|
-
tags = `git tag`.lines chomp: true
|
|
93
|
-
vers = `git log --oneline ./VERSION`
|
|
94
|
-
.lines(chomp: true)
|
|
95
|
-
.map {|line| line.split.first[/^\w+$/]}
|
|
96
|
-
.map {|sha| [`git cat-file -p #{sha}:./VERSION 2>/dev/null`[/[\d\.]+/], sha]}
|
|
97
|
-
.select {|ver, sha| ver && sha}
|
|
98
|
-
.reverse
|
|
99
|
-
.to_h
|
|
100
|
-
|
|
101
|
-
vers.to_a.reverse.each do |ver, sha|
|
|
102
|
-
tag = "v#{ver}"
|
|
103
|
-
break if tags.include?(tag)
|
|
104
|
-
sh %( git tag -a -m \"#{changes[tag]&.gsub '"', '\\"'}\" #{tag} #{sha} )
|
|
105
|
-
end
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
def release(*paths)
|
|
109
|
-
tag = ENV['GITHUB_REF']&.sub(%r|^refs/tags/|, '') || raise('GITHUB_REF tag not set')
|
|
110
|
-
notes = (changelogs[tag] || '').shellescape
|
|
111
|
-
paths = paths.flatten.join ' '
|
|
112
|
-
|
|
113
|
-
sh(%( gh release create #{tag} #{paths} --notes #{notes} )) ||
|
|
114
|
-
sh(%( gh release upload #{tag} #{paths} --clobber )) ||
|
|
115
|
-
raise('failed to upload to releases')
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
def changelogs()
|
|
119
|
-
File.read('ChangeLog.md')
|
|
120
|
-
.split(/^\s*##\s*\[\s*(v[\d\.]+)\s*\].*$/)
|
|
121
|
-
.slice(1..)
|
|
122
|
-
.each_slice(2)
|
|
123
|
-
.to_h
|
|
124
|
-
.transform_values(&:strip!)
|
|
125
|
-
rescue Errno::ENOENT
|
|
126
|
-
raise 'failed to get changelogs'
|
|
127
|
-
end
|