From da9b54bf2ad5d4962bb5393abdba4690995eca93 Mon Sep 17 00:00:00 2001 From: Alexander D Date: Thu, 6 Nov 2025 18:12:50 +0100 Subject: [PATCH 1/7] fix minitest run --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf3df58..faae31c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,4 +52,4 @@ jobs: run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 - name: Run Minitest Tests - run: bundle exec rails test "test/**/*_test.rb" -e ci + run: bundle exec ruby -Ilib -Itest test/*_test.rb From 8245037e898889055a5ed4bfe8b47f7ef7a72ed3 Mon Sep 17 00:00:00 2001 From: Alexander D Date: Thu, 6 Nov 2025 18:13:04 +0100 Subject: [PATCH 2/7] remove useless dependency on rails --- Gemfile.lock | 177 +----------------------------------- component-framework.gemspec | 3 +- 2 files changed, 5 insertions(+), 175 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 00ac575..e306235 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,72 +1,11 @@ PATH remote: . specs: - component-framework (1.0.2) + component-framework (1.0.3) GEM remote: https://rubygems.org/ specs: - action_text-trix (2.1.15) - railties - actioncable (8.1.1) - actionpack (= 8.1.1) - activesupport (= 8.1.1) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - zeitwerk (~> 2.6) - actionmailbox (8.1.1) - actionpack (= 8.1.1) - activejob (= 8.1.1) - activerecord (= 8.1.1) - activestorage (= 8.1.1) - activesupport (= 8.1.1) - mail (>= 2.8.0) - actionmailer (8.1.1) - actionpack (= 8.1.1) - actionview (= 8.1.1) - activejob (= 8.1.1) - activesupport (= 8.1.1) - mail (>= 2.8.0) - rails-dom-testing (~> 2.2) - actionpack (8.1.1) - actionview (= 8.1.1) - activesupport (= 8.1.1) - nokogiri (>= 1.8.5) - rack (>= 2.2.4) - rack-session (>= 1.0.1) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - useragent (~> 0.16) - actiontext (8.1.1) - action_text-trix (~> 2.1.15) - actionpack (= 8.1.1) - activerecord (= 8.1.1) - activestorage (= 8.1.1) - activesupport (= 8.1.1) - globalid (>= 0.6.0) - nokogiri (>= 1.8.5) - actionview (8.1.1) - activesupport (= 8.1.1) - builder (~> 3.1) - erubi (~> 1.11) - rails-dom-testing (~> 2.2) - rails-html-sanitizer (~> 1.6) - activejob (8.1.1) - activesupport (= 8.1.1) - globalid (>= 0.3.6) - activemodel (8.1.1) - activesupport (= 8.1.1) - activerecord (8.1.1) - activemodel (= 8.1.1) - activesupport (= 8.1.1) - timeout (>= 0.4.0) - activestorage (8.1.1) - actionpack (= 8.1.1) - activejob (= 8.1.1) - activerecord (= 8.1.1) - activesupport (= 8.1.1) - marcel (~> 1.0) activesupport (8.1.1) base64 bigdecimal @@ -82,129 +21,18 @@ GEM uri (>= 0.13.1) base64 (0.3.0) bigdecimal (3.3.1) - builder (3.3.0) concurrent-ruby (1.3.5) connection_pool (2.5.4) - crass (1.0.6) - date (3.5.0) drb (2.2.3) - erb (5.1.3) - erubi (1.13.1) - globalid (1.3.0) - activesupport (>= 6.1) i18n (1.14.7) concurrent-ruby (~> 1.0) - io-console (0.8.1) - irb (1.15.3) - pp (>= 0.6.0) - rdoc (>= 4.0.0) - reline (>= 0.4.2) json (2.15.2) logger (1.7.0) - loofah (2.24.1) - crass (~> 1.0.2) - nokogiri (>= 1.12.0) - mail (2.9.0) - logger - mini_mime (>= 0.1.1) - net-imap - net-pop - net-smtp - marcel (1.1.0) - mini_mime (1.1.5) minitest (5.26.0) - net-imap (0.5.12) - date - net-protocol - net-pop (0.1.2) - net-protocol - net-protocol (0.2.2) - timeout - net-smtp (0.5.1) - net-protocol - nio4r (2.7.5) - nokogiri (1.18.10-aarch64-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.10-aarch64-linux-musl) - racc (~> 1.4) - nokogiri (1.18.10-arm-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.10-arm-linux-musl) - racc (~> 1.4) - nokogiri (1.18.10-arm64-darwin) - racc (~> 1.4) - nokogiri (1.18.10-x86_64-darwin) - racc (~> 1.4) - nokogiri (1.18.10-x86_64-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.10-x86_64-linux-musl) - racc (~> 1.4) - pp (0.6.3) - prettyprint - prettyprint (0.2.0) - psych (5.2.6) - date - stringio - racc (1.8.1) - rack (3.2.4) - rack-session (2.1.1) - base64 (>= 0.1.0) - rack (>= 3.0.0) - rack-test (2.2.0) - rack (>= 1.3) - rackup (2.2.1) - rack (>= 3) - rails (8.1.1) - actioncable (= 8.1.1) - actionmailbox (= 8.1.1) - actionmailer (= 8.1.1) - actionpack (= 8.1.1) - actiontext (= 8.1.1) - actionview (= 8.1.1) - activejob (= 8.1.1) - activemodel (= 8.1.1) - activerecord (= 8.1.1) - activestorage (= 8.1.1) - activesupport (= 8.1.1) - bundler (>= 1.15.0) - railties (= 8.1.1) - rails-dom-testing (2.3.0) - activesupport (>= 5.0.0) - minitest - nokogiri (>= 1.6) - rails-html-sanitizer (1.6.2) - loofah (~> 2.21) - nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (8.1.1) - actionpack (= 8.1.1) - activesupport (= 8.1.1) - irb (~> 1.13) - rackup (>= 1.0.0) - rake (>= 12.2) - thor (~> 1.0, >= 1.2.2) - tsort (>= 0.2) - zeitwerk (~> 2.6) - rake (13.3.1) - rdoc (6.15.1) - erb - psych (>= 4.0.0) - tsort - reline (0.6.2) - io-console (~> 0.5) securerandom (0.4.1) - stringio (3.1.7) - thor (1.4.0) - timeout (0.4.4) - tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) uri (1.1.1) - useragent (0.16.11) - websocket-driver (0.8.0) - base64 - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) - zeitwerk (2.7.3) PLATFORMS aarch64-linux-gnu @@ -217,8 +45,9 @@ PLATFORMS x86_64-linux-musl DEPENDENCIES + activesupport (~> 8.0) component-framework! - rails (~> 8.0) + minitest (~> 5.26) BUNDLED WITH 2.6.6 diff --git a/component-framework.gemspec b/component-framework.gemspec index 49d763c..7f22e62 100644 --- a/component-framework.gemspec +++ b/component-framework.gemspec @@ -15,5 +15,6 @@ Gem::Specification.new do |spec| spec.files = Dir["README.md", "lib/**/*.rb", "LICENSE.txt"] - spec.add_development_dependency "rails", "~> 8.0" + spec.add_development_dependency "activesupport", "~> 8.0" + spec.add_development_dependency "minitest", "~> 5.26" end From 82ed09ee597c99dfc4ad0df58bf557c9baabb15f Mon Sep 17 00:00:00 2001 From: Alexander D Date: Thu, 6 Nov 2025 18:13:15 +0100 Subject: [PATCH 3/7] set tag on master --- .github/workflows/tag.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000..92ea4f7 --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,38 @@ +name: Tag Release + +on: + push: + branches: + - master + +permissions: + contents: write + +jobs: + tag_version: + name: Tag Version + runs-on: ubuntu-latest + if: github.repository == 'boldtrail/component-framework' + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Ensure tags are present + run: git fetch --tags --force + + - name: Create tag + run: | + TAG=v$(ruby -I lib -r component/framework/version -e 'puts Component::Framework::VERSION') + + if git rev-parse "$TAG" >/dev/null 2>&1; then + echo "Tag $TAG already exists. Skipping." + echo "created=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + + git tag "$TAG" + git push origin "$TAG" + echo "created=true" >> "$GITHUB_OUTPUT" From 5aecebbe845322920751362eb3f384685c954aca Mon Sep 17 00:00:00 2001 From: Alexander D Date: Thu, 6 Nov 2025 18:13:22 +0100 Subject: [PATCH 4/7] up version --- lib/component/framework/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/component/framework/version.rb b/lib/component/framework/version.rb index 3403b44..1fc4c46 100644 --- a/lib/component/framework/version.rb +++ b/lib/component/framework/version.rb @@ -1,5 +1,5 @@ module Component module Framework - VERSION = "1.0.2" + VERSION = '1.0.3' end end From ea9f95c058e54b5e38a3183b44f2bdaa457836bc Mon Sep 17 00:00:00 2001 From: Alexander D Date: Thu, 6 Nov 2025 22:58:07 +0100 Subject: [PATCH 5/7] join workflows --- .github/workflows/ci.yml | 25 ++++++++++++++++++++++++- .github/workflows/tag.yml | 38 -------------------------------------- 2 files changed, 24 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faae31c..5ee0f7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,8 @@ jobs: ci: runs-on: ubuntu-latest name: Tests & Linting + permissions: + contents: write # limit workflow to run only on main repo and not to consume other workflow run quota # but allow manual trigger on forked repos @@ -52,4 +54,25 @@ jobs: run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 - name: Run Minitest Tests - run: bundle exec ruby -Ilib -Itest test/*_test.rb + run: bundle exec ruby -Ilib -Itest test/**/*_test.rb + + - name: Create tag + if: > + success() && + github.event_name == 'push' && + github.ref == 'refs/heads/master' && + github.repository == 'boldtrail/component-framework' + run: | + TAG=v$(ruby -I lib -r component/framework/version -e 'puts Component::Framework::VERSION') + + git fetch --tags --force + + if git rev-parse "$TAG" >/dev/null 2>&1; then + echo "Tag $TAG already exists. Skipping." + echo "created=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + + git tag "$TAG" + git push origin "$TAG" + echo "created=true" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml deleted file mode 100644 index 92ea4f7..0000000 --- a/.github/workflows/tag.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Tag Release - -on: - push: - branches: - - master - -permissions: - contents: write - -jobs: - tag_version: - name: Tag Version - runs-on: ubuntu-latest - if: github.repository == 'boldtrail/component-framework' - - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Ensure tags are present - run: git fetch --tags --force - - - name: Create tag - run: | - TAG=v$(ruby -I lib -r component/framework/version -e 'puts Component::Framework::VERSION') - - if git rev-parse "$TAG" >/dev/null 2>&1; then - echo "Tag $TAG already exists. Skipping." - echo "created=false" >> "$GITHUB_OUTPUT" - exit 0 - fi - - git tag "$TAG" - git push origin "$TAG" - echo "created=true" >> "$GITHUB_OUTPUT" From bf3b669d514048614bd13746bb6f57bf7edd7443 Mon Sep 17 00:00:00 2001 From: Alexander D Date: Thu, 6 Nov 2025 23:05:29 +0100 Subject: [PATCH 6/7] misc --- lib/component/framework/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/component/framework/version.rb b/lib/component/framework/version.rb index 1fc4c46..01b4852 100644 --- a/lib/component/framework/version.rb +++ b/lib/component/framework/version.rb @@ -1,5 +1,5 @@ module Component module Framework - VERSION = '1.0.3' + VERSION = "1.0.3" end end From 201686bc2cd45efede62252380a371bff31ae710 Mon Sep 17 00:00:00 2001 From: "Alexander D." Date: Fri, 7 Nov 2025 09:31:04 +0100 Subject: [PATCH 7/7] return test mask --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ee0f7b..57926a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 - name: Run Minitest Tests - run: bundle exec ruby -Ilib -Itest test/**/*_test.rb + run: bundle exec ruby -Ilib -Itest test/*_test.rb - name: Create tag if: >