Modernize foundation 6.9#7
Conversation
… to 0.2.0 - foundation-rails: ">= 6.9, < 7" (was ">= 5, < 7") - railties: ">= 5.0, < 9" (was ">= 3.1.0") - drop "sass < 3.5" runtime dep (foundation 6.9 uses sassc) - drop "rails ~> 4.2" dev dep (no longer relevant) - bundler dev dep ~> 2.0, rake dev dep ~> 13.0 - add required_ruby_version >= 2.7 - reference README.md instead of non-existent README.rdoc - bump VERSION 0.1.1 -> 0.2.0 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…dencies - target foundation-sites ^6.9.0 (was ^6.0.0), select2 ^4.0.13 (was "latest") - move foundation-sites/select2 to peerDependencies so consumers don't get a duplicate copy at runtime; keep foundation-sites in devDependencies for local build access to its scss via --load-path - replace grunt-contrib-sass (dead libsass-ruby) with dart-sass via npm scripts (npm run build / build:dev / build:prod / watch) - drop Gruntfile.js and all grunt* deps (grunt-contrib-watch was in "dependencies" in the original -> would have been pulled by every consumer) - rebuild dist/*.css from source; drop stale *.css.map (no source maps in the new build) - bump package.json and bower.json to 0.2.0 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two jobs, both checking "does it actually install": gem (Ruby 3.0 / 3.1 / 3.2 / 3.3): - gem build, gem install --local the built .gem - require 'select2-foundation' smoke test - bundle install in a sample Gemfile pinning rails ~> 7.1 + foundation-rails ~> 6.9 + select2-rails ~> 4.0 + this gem via path npm (Node 18 / 20 / 22): - npm install - npm run build (dev + prod) - verify both dist/*.css files are non-empty Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- add GitHub Actions CI badge and MIT license badge to README - document npm install path alongside bower/Rails - replace grunt instructions with npm run build / watch - add 0.2.0 changelog entry - .gitignore: *.gem and package-lock.json (this is a library, not an app) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
zflat
left a comment
There was a problem hiding this comment.
Thanks for the updates and for adding the github workflows infrastructure. I have some comments if you could please take a look.
| - name: Resolve with foundation-rails 6.9 in a sample app | ||
| run: | | ||
| mkdir -p ci-resolve && cd ci-resolve | ||
| cat > Gemfile <<'EOF' | ||
| source 'https://rubygems.org' | ||
| gem 'rails', '~> 7.1' | ||
| gem 'foundation-rails', '~> 6.9' | ||
| gem 'select2-rails', '~> 4.0' | ||
| gem 'select2-foundation', path: '..' | ||
| EOF | ||
| bundle install | ||
| bundle list | grep -E "select2-foundation|foundation-rails|select2-rails" |
There was a problem hiding this comment.
There is already a sample app under test/styleguide06. Could this test make use of that app?
Also I think the apps under styleguide05 and styleguide can be removed to focus on foundation 6 only.
|
|
||
| - name: Require the gem | ||
| run: | | ||
| ruby -e "require 'select2-foundation'; raise 'VERSION missing' unless Select2Foundation::VERSION; puts 'Loaded select2-foundation ' + Select2Foundation::VERSION" |
There was a problem hiding this comment.
Could this test be changed to run the rake test rake task instead? I think they are both testing just about the same thing.
| ### npm | ||
|
|
||
| npm install foundation-sites select2 select2-foundation | ||
|
|
There was a problem hiding this comment.
There is no npm package select2-foundation and I don't have plans to publish there since this is such a niche package. Can you use this from the git repo?
| "select2-foundation" : "https://github.com/egemensarica/select2-foundation.git#v6" | ||
| "foundation-sites" : "^6.9.0", | ||
| "select2" : "^4.0.13", | ||
| "select2-foundation" : "https://github.com/zflat/select2-foundation.git" |
… apps - Remove test/styleguide (Rails 4 / Foundation 5) and test/styleguide05 (Foundation 5) so the codebase focuses on Foundation 6 only. - Modernize test/styleguide06 to boot on Rails 7.1 + Ruby 3 as a minimal asset-pipeline host: load only the railties select2-foundation needs (action_controller, action_view, sprockets), drop ActiveRecord, drop the Rails 4-only `raise_in_transactional_callbacks`, rename serve_static_files -> public_file_server.enabled. - Point APP_RAKEFILE and test_helper.rb at styleguide06; drop the ActiveRecord migration paths since there is no database. - Add rails/sprockets-rails/sassc-rails/jquery-rails to the root Gemfile dev/test group so styleguide06 resolves under bundle exec rake test. - CI: replace the ad-hoc ci-resolve sample-app step and the inline `ruby -e require` smoke test with a single `bundle exec rake test` step that exercises both the gem load and a foundation-rails 6.9 Rails app boot. Switch ruby/setup-ruby to bundler-cache: true. - README: select2-foundation is not on npm; install via the github: shorthand instead. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Updated as requested, thanks for the review. |
The previous `branches: [master, main]` push filter meant CI did not run on contributor feature branches, which prevented self-verification before requesting review. Drop the filter so push to any branch triggers CI; keep `pull_request` filtered to the integration branches; add workflow_dispatch for ad-hoc runs. Concurrency cancels superseded runs on the same ref to avoid wasted minutes when force-pushing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`gem install --local select2-foundation-*.gem` refuses to fetch runtime dependencies (foundation-rails ~> 6.9, select2-rails ~> 4.0, railties) from rubygems.org, so the install step failed across every Ruby version. The local .gem file is still picked up by path; dropping --local just lets the dep solver reach rubygems. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
I'm trying to get the tests and the test application to run. Here are some changes I made to your branch: diff --git a/test/styleguide06/Gemfile b/test/styleguide06/Gemfile
index 7025f96..e4cbcb5 100644
--- a/test/styleguide06/Gemfile
+++ b/test/styleguide06/Gemfile
@@ -5,6 +5,7 @@ source 'https://rubygems.org'
gemspec path: "../../"
gem 'rails', '~> 7.1.0'
+gem 'puma'
# Asset pipeline
gem 'sprockets-rails'
diff --git a/test/styleguide06/app/assets/config/manifest.js b/test/styleguide06/app/assets/config/manifest.js
new file mode 100644
index 0000000..f720e6f
--- /dev/null
+++ b/test/styleguide06/app/assets/config/manifest.js
@@ -0,0 +1,3 @@
+//= link_tree ../images
+= link_directory ../javascripts .js
+= link_directory ../stylesheets .css
diff --git a/test/styleguide06/config/environments/development.rb b/test/styleguide06/config/environments/development.rb
index 1649f35..55083aa 100644
--- a/test/styleguide06/config/environments/development.rb
+++ b/test/styleguide06/config/environments/development.rb
@@ -5,8 +5,6 @@ Rails.application.configure do
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
- config.action_mailer.raise_delivery_errors = false
-
config.active_support.deprecation = :log
config.assets.debug = true
diff --git a/test/styleguide06/config/environments/test.rb b/test/styleguide06/config/environments/test.rb
index 49361c0..e91441b 100644
--- a/test/styleguide06/config/environments/test.rb
+++ b/test/styleguide06/config/environments/test.rb
@@ -11,8 +11,6 @@ Rails.application.configure do
config.action_dispatch.show_exceptions = :rescuable
config.action_controller.allow_forgery_protection = false
- config.action_mailer.delivery_method = :test
-
config.active_support.test_order = :random
config.active_support.deprecation = :stderr
endThe two things I am testing are:
I'm getting errors when I browse to the URL that the rails server listens on. Can you help with getting the sample application back up and running for rails 7? |
Hey @zflat, any chances you would like to release an updated version of this component?
I've did some upgrades, so it works nicely in 2026 (and GitHub Dependabot won't scream about an old lodash module...)