Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/publish-jinx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish - Jinx Updates
on:
workflow_dispatch:
# push:
# branches:
# - master
# paths:
# - 'scripts/**'

permissions:
contents: write

jobs:
publish-jinx:
if: "!contains(github.event.head_commit.message, 'Repo updates within last')"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Checkout configuration
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Update JINX manifest
continue-on-error: true
run: |
wget --tries=5 --retry-connrefused --retry-on-host-error https://github.com/elanthia-online/jinxp/releases/download/v0.4.0/jinxp \
&& chmod +x jinxp \
&& ./jinxp -i scripts
sed -i 's|/assets/|/scripts/|g' dist/manifest.json
mv dist/manifest.json ./
mv dist/headers ./

- name: Commit changes
continue-on-error: true
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add headers
git add manifest.json
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit"
else
git commit -m "Repo updates within last 3 hours"
fi

- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
11 changes: 8 additions & 3 deletions .github/workflows/publish.yml → .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
name: Publish Updates
name: Publish - Repository Updates
on:
push:
branches: [ 'master' ]

jobs:
publish:
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: 'gtk:vscode:profanity'
strategy:
matrix:
ruby: ['4.0']
name: Publish Updates
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: '20'
- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0
- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
ruby-version: '2.7'
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install xmllint
uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ concurrency:
jobs:
test:
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: 'gtk:vscode:profanity'
strategy:
matrix:
ruby: ['2.7']
ruby: ['4.0']
name: Run tests on Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0
- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/rubocop_syntax_checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ on:
jobs:
rubocop:
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: 'gtk:vscode:profanity'
strategy:
matrix:
ruby: ['3.3']
ruby: ['4.0']
name: Run Rubocop on Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.2
with:
fetch-depth: 0

Expand All @@ -31,7 +33,7 @@ jobs:
**/*.lic
**/*.rb

- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0
- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ on:
jobs:
check_syntax:
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: 'gtk:vscode:profanity'
strategy:
matrix:
ruby: ['3.3']
ruby: ['4.0']
name: Run tests on Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.2
with:
fetch-depth: 0

Expand All @@ -30,12 +32,12 @@ jobs:
files: |
**/*.lic
**/*.rb
- uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0

- uses: ruby/setup-ruby@708024e6c902387ab41de36e1669e43b5ee7085e # v1.283.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run Ruby syntax check on changed scripts
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
Expand Down
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AllCops:
SuggestExtensions: false
TargetRubyVersion: 3.3
TargetRubyVersion: 4.0
NewCops: disable
Include:
- '**/*.lic'
Expand All @@ -27,6 +27,9 @@ Layout/HeredocIndentation:
Layout/LineLength:
Enabled: false

Lint/MissingSuper:
AllowedParentClasses: [Object, BaseObject, GameBase::Game]

Metrics/AbcSize:
Enabled: false

Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.4
4.0.0
87 changes: 84 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,93 @@
return true if ENV['NETLIFY']
=begin
When building Gemfile.lock file, please add additional platforms to the file via the following command:

source 'https://rubygems.org'
bundle lock \
--add-platform aarch64-linux \
--add-platform aarch64-linux-gnu \
--add-platform aarch64-linux-musl \
--add-platform arm-linux \
--add-platform arm-linux-gnu \
--add-platform arm-linux-musl \
--add-platform arm64-darwin \
--add-platform x64-mingw \
--add-platform x64-mingw-ucrt \
--add-platform x86-darwin \
--add-platform x86-linux \
--add-platform x86-linux-gnu \
--add-platform x86-linux-musl \
--add-platform x86-mingw \
--add-platform x86-mingw-ucrt \
--add-platform x86_64-darwin \
--add-platform x86_64-linux \
--add-platform x86_64-linux-gnu \
--add-platform x86_64-linux-musl

This ensures that the lock file can be used by all platforms that are able to support it.
=end

source "https://rubygems.org"

git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

group :development do
gem "rspec"
gem "rubocop"
gem "guard"
gem "guard-rspec"
gem "webmock"
gem "rack"
gem 'rubocop'
end

group :vscode do
gem "rbs"
gem "prism"
gem "sorbet-runtime"
gem "ruby-lsp"
end

group :gtk do
gem "gtk3"
end

group :profanity do
gem "curses"
end

gem "ascii_charts"
gem "base64"
gem "benchmark"
gem "concurrent-ruby"
gem "digest"
gem "drb"
gem "ffi"
gem "fiddle"
gem "fileutils"
gem "json"
gem "kramdown"
gem "logger"
gem "openssl"
gem "open-uri"
gem "os"
gem "ostruct"
gem "rake"
gem "redis"
gem "resolv"
gem "rexml"
gem "sequel"
gem "set"
gem "tempfile"
gem "terminal-table"
gem "time"
gem "tmpdir"
gem "tzinfo"
gem "tzinfo-data"
gem "webrick"
gem "win32ole", platforms: :windows
gem "yaml"
gem "zlib"

if Gem.win_platform?
gem "sqlite3", platforms: :windows, force_ruby_platform: true
else
gem "sqlite3"
end
5 changes: 3 additions & 2 deletions bin/tasks/migrate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
##
Migration.run(
migrations: Dir[Migration.cwd("type_data", "migrations", "**", "*.rb")],
tables: Dir[Migration.cwd("type_data", "tables", "**", "*.yaml")],
dist: Migration.cwd("dist"))
tables: Dir[Migration.cwd("type_data", "tables", "**", "*.yaml")],
dist: Migration.cwd("dist")
)
Loading