Zum Hauptinhalt springen
IT Security Toolshttpx(03.10.2026 um 04:49 Uhr)
•
IT Security NachrichtenEU AI Act Deployer Guide: Your 90-Day Action Plan(03.10.2026 um 05:17 Uhr)
•
AI & KI NachrichtenSchulen rüsten sich nur langsam gegen neue KI-Cyberrisiken(03.10.2026 um 05:13 Uhr)
•
IT Security NachrichtenWarum KI-Agenten neue Sicherheitskonzepte brauchen(03.10.2026 um 05:17 Uhr)
•••
Sichere ProgrammierungRecovering API Usage Automatically in Static Analysis?(20.09.2026 um 04:32 Uhr)
•
Sicherheitslücken (CVE)just dropped macos lpe - CVE-2026-43786(21.09.2026 um 21:48 Uhr)
••
Malware / Trojaner / VirenCDC-ACM Serial Interface Bypasses TCC on macOS(25.09.2026 um 19:18 Uhr)
•
IT Security Toolshttpx(03.10.2026 um 04:49 Uhr)
•
IT Security NachrichtenEU AI Act Deployer Guide: Your 90-Day Action Plan(03.10.2026 um 05:17 Uhr)
•
AI & KI NachrichtenSchulen rüsten sich nur langsam gegen neue KI-Cyberrisiken(03.10.2026 um 05:13 Uhr)
•
IT Security NachrichtenWarum KI-Agenten neue Sicherheitskonzepte brauchen(03.10.2026 um 05:17 Uhr)
•••
Sichere ProgrammierungRecovering API Usage Automatically in Static Analysis?(20.09.2026 um 04:32 Uhr)
•
Sicherheitslücken (CVE)just dropped macos lpe - CVE-2026-43786(21.09.2026 um 21:48 Uhr)
••
Malware / Trojaner / VirenCDC-ACM Serial Interface Bypasses TCC on macOS(25.09.2026 um 19:18 Uhr)
•
Intelligence View
⚡ tsecurity.de Intelligence

Day 17: A JavaScript bug and GitHub Workflow CI for the four-pillars Ruby gem

I thought I'd like to try another Ruby Gem today and went back to the Ruby Digger. I noticed that the gems are not listed in the order they were released. I…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!

I thought I'd like to try another Ruby Gem today and went back to the Ruby Digger. I noticed that the gems are not listed in the order they were released. I think I already noticed this earlier, but did not deal with it. Now it really bothered me. I looked at the code and as I remembered, I have sorted the entries. So how come they are not sorted on the web site.



First I tried it locally. I ran the code that generates the HTML page and then opened the HTML file in my browser. The order was as I expected.



So how come it works correctly on my computer but incorrectly when it is on the GitHub Pages server.






This was really annoying.



I added some debugging code to print the version number of Ruby. As much as it did not seem reasonable I was desperate. I thought maybe we have some version difference and that causes the problem. I also added some code to print the dates to the screen while the HTML file is being generated.



I pushed out the code and after a few seconds looked at the results.



The version number was similar and the dates were printed in the correctly sorted order on the screen. So how come they are not sorted on the web site.






Then I saw it



When I refreshed the page it showed up properly and then there was a blink and the order was gone.



That's when I realized the HTML table is configured s a sortable table. I looked at the code and it was sorted by the wrong column.



I think I copied the code for this from the CPAN Digger, but we have different columns here so the code was sorting according to the names of the authors. Oh oh.



It did not happen when I looked at the HTML file on my computer as I was loading a plain file and it could not load the JavaScript that triggered the sorting.



I fixed the JavaScript code, well, update the configuration to point to the right column. This fixed the issue, but then I started to think, why do we even need to let the user sort the table? So I turned off the sorting.



Phew, that was a stupid bug.






four-pillars in Ruby



A class which tells fortune by Four Pillar astrology.



It is a very simple Gem without any dependencies and some plain tests. It was easy to configure so I configured both a Docker container based job and a job that runs on the 3 different operating systems.



Pull-Request






GitHub Actions configuration file






name: CI

on:
push:
pull_request:
workflow_dispatch:
# schedule:
# - cron: '42 5 * * *'

jobs:
test-in-container:
strategy:
fail-fast: false
matrix:
ruby: [ '2.6', '2.7', '3.0' ]

runs-on: ubuntu-latest
name: OS Ruby ${{matrix.ruby}}
container: ruby:${{matrix.ruby}}

steps:
- uses: actions/checkout@v3

- name: Show Ruby Version
run: |
ruby -v

- name: Run tests
run: |
rake test

test-natively:
strategy:
fail-fast: false
matrix:
runner: [ubuntu-latest, macos-latest, windows-latest]
ruby-version: ['3.0']

runs-on: ${{matrix.runner}}
name: OS ${{matrix.runner}} Ruby ${{matrix.ruby-version}}

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Run tests
run: rake test









Conclusion



Even Chinese Astrology can be tested.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Day 17: A JavaScript bug and GitHub Workflow CI for the four-pillars Ruby gem

Thematisch verwandte Begriffe: JavaScript, GitHub, Workflow, fourpillars · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag