Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,15 @@ jobs:
bundler-cache: true
- name: Run tests
run: bundle exec rake test
Demo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
working-directory: demo
bundler-cache: true
- name: Run tests
working-directory: demo
run: bundle exec rake test:all
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Change Log

## Apology
You can find recent releases with docs in GitHub:

The tooling to support our old way of doing the change log doesn't work anymore, and we don't have a better solution, so this change log has become unreliable since version 4.5.0. Please refer to the commit history if you need to debug changes.
https://github.com/bootstrap-ruby/bootstrap_form/releases

## Diffs

- [Pending Release](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.1.0...HEAD)
- [Pending Release](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.0...HEAD)
- [5.2.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.1.0...v5.2.0)
- [5.1.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.0.0...v5.1.0)
- [5.0.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.5.0...v5.0.0)
- [4.5.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.4.0...v4.5.0)
Expand All @@ -23,6 +25,10 @@ The tooling to support our old way of doing the change log doesn't work anymore,
- [2.5.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.4.0...v2.5.0)
- [2.4.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.3.0...v2.4.0)

## Older releases

The tooling to support our old way of doing the change log doesn't work anymore, and we don't have a better solution, so this change log has become unreliable since version 4.5.0. Please refer to the commit history if you need to debug changes.

## [Pending Release][]

### Breaking changes
Expand Down
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Some other nice things that `bootstrap_form` does for you are:

`bootstrap_form` supports at a minimum the currently supported versions of Ruby and Rails:

* Ruby 2.5+
* Rails 5.2+
* Ruby 3.0+
* Rails 6.0+
* Bootstrap 5.0+

## Installation
Expand All @@ -42,7 +42,7 @@ And follow the remaining instructions in the [official bootstrap installation gu
Add the `bootstrap_form` gem to your `Gemfile`:

```ruby
gem "bootstrap_form", "~> 5.1"
gem "bootstrap_form", "~> 5.2"
```

Then:
Expand Down Expand Up @@ -84,7 +84,7 @@ This generates the following HTML:
<form accept-charset="UTF-8" action="/users" class="new_user" id="new_user" method="post">
<div class="mb-3">
<label class="form-label required" for="user_email">Email</label>
<input class="form-control" id="user_email" name="user[email]" type="email" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" required="required" type="email" value="steve@example.com">
</div>
<div class="mb-3">
<label class="form-label" for="user_password">Password</label>
Expand Down Expand Up @@ -145,7 +145,7 @@ This generates:
<form accept-charset="UTF-8" action="/users" method="post">
<div class="mb-3">
<label class="form-label required" for="user_email">Email</label>
<input class="form-control" id="user_email" name="user[email]" type="email" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" required="required" type="email" value="steve@example.com">
</div>
<div class="mb-3">
<label class="form-label" for="user_password">Password</label>
Expand Down Expand Up @@ -278,7 +278,7 @@ This generates:
```html
<div class="mb-3">
<label class="form-label custom-class required" for="user_email">Email</label>
<input class="form-control" id="user_email" name="user[email]" type="text" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" required="required" type="text" value="steve@example.com">
</div>
```

Expand All @@ -294,7 +294,7 @@ This generates:
```html
<div class="mb-3">
<label class="form-label visually-hidden required" for="user_email">Email</label>
<input class="form-control" id="user_email" name="user[email]" placeholder="Email" type="text" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" placeholder="Email" required="required" type="text" value="steve@example.com">
</div>
```

Expand All @@ -312,7 +312,7 @@ This generates:
```html
<div class="mb-3">
<label class="form-label required" for="user_email">Email</label>
<input class="custom-class" id="user_email" name="user[email]" type="text" value="steve@example.com">
<input aria-required="true" class="custom-class" id="user_email" name="user[email]" required="required" type="text" value="steve@example.com">
</div>
```

Expand Down Expand Up @@ -438,7 +438,7 @@ This generates:
<div class="mb-3">
<label class="form-label required" for="user_email">Email</label>
<div class="input-group input-group-lg">
<input class="form-control" id="user_email" name="user[email]" type="email" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" required="required" type="email" value="steve@example.com">
<input class="btn btn-primary" data-disable-with="Subscribe" name="commit" type="submit" value="Subscribe">
</div>
</div>
Expand Down Expand Up @@ -503,7 +503,7 @@ Generated HTML:

```html
<div class="mb-3">
<input class="form-control" id="user_email" name="user[email]" type="email" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" required="required" type="email" value="steve@example.com">
</div>
```

Expand Down Expand Up @@ -771,7 +771,7 @@ This generates:
```html
<div class="mb-3">
<label class="form-label required" for="user_email">Email</label>
<input class="form-control-plaintext" id="user_email" name="user[email]" readonly type="text" value="steve@example.com">
<input aria-required="true" class="form-control-plaintext" id="user_email" name="user[email]" readonly required="required" type="text" value="steve@example.com">
</div>
```

Expand All @@ -791,7 +791,7 @@ This generates:
<div class="mb-3 row">
<label class="form-label col-form-label col-sm-2 required" for="user_email">Email</label>
<div class="col-sm-10">
<input class="form-control-plaintext" id="user_email" name="user[email]" readonly type="text" value="steve@example.com">
<input aria-required="true" class="form-control-plaintext" id="user_email" name="user[email]" readonly required="required" type="text" value="steve@example.com">
</div>
</div>
</form>
Expand Down Expand Up @@ -1054,7 +1054,7 @@ This generates:
<form accept-charset="UTF-8" action="/users" class="new_user row row-cols-auto g-3 align-items-center" id="new_user" method="post">
<div class="col">
<label class="form-label visually-hidden mr-sm-2 required" for="user_email">Email</label>
<input class="form-control" id="user_email" name="user[email]" type="email" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" required="required" type="email" value="steve@example.com">
</div>
<div class="col">
<label class="form-label visually-hidden mr-sm-2" for="user_password">Password</label>
Expand Down Expand Up @@ -1116,7 +1116,7 @@ This generates:
<div class="mb-3 row">
<label class="form-label col-form-label col-sm-2 required" for="user_email">Email</label>
<div class="col-sm-10">
<input class="form-control" id="user_email" name="user[email]" type="email" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" required="required" type="email" value="steve@example.com">
</div>
</div>
<div class="mb-3 row">
Expand Down Expand Up @@ -1163,7 +1163,7 @@ This generates:
<div class="mb-3 row">
<label class="form-label col-form-label col-sm-2 required" for="user_email">Email</label>
<div class="col-sm-10">
<input class="form-control" id="user_email" name="user[email]" type="email" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" required="required" type="email" value="steve@example.com">
</div>
</div>
<div class="mb-3 row">
Expand Down Expand Up @@ -1220,7 +1220,7 @@ This generates:
<div class="mb-3 row">
<label class="form-label col-form-label col-sm-2 required" for="user_email">Email</label>
<div class="col-sm-10">
<input class="form-control" id="user_email" name="user[email]" type="email" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" required="required" type="email" value="steve@example.com">
</div>
</div>
<div class="mb-3 row">
Expand Down Expand Up @@ -1260,7 +1260,7 @@ This generates:
<div class="mb-3 row">
<label class="form-label col-form-label col-sm-2 required" for="user_email">Email</label>
<div class="col-sm-10">
<input class="form-control" id="user_email" name="user[email]" type="email" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" required="required" type="email" value="steve@example.com">
</div>
</div>
<div class="mb-3">
Expand Down Expand Up @@ -1301,7 +1301,7 @@ This generates:
<form accept-charset="UTF-8" action="/users" class="new_user" id="new_user" method="post">
<div class="mb-3">
<label class="form-label required" for="user_email">Email</label>
<input class="form-control" id="user_email" name="user[email]" type="email" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" required="required" type="email" value="steve@example.com">
</div>
<div class="mb-3">
<label class="form-label" for="user_password">Password</label>
Expand Down Expand Up @@ -1337,7 +1337,7 @@ This generates:
```html
<form accept-charset="UTF-8" action="/users" class="new_user" id="new_user" method="post">
<div class="mb-3 form-floating">
<input class="form-control" id="user_email" name="user[email]" placeholder="Email" type="email" value="steve@example.com">
<input aria-required="true" class="form-control" id="user_email" name="user[email]" placeholder="Email" required="required" type="email" value="steve@example.com">
<label class="form-label required" for="user_email">Email</label>
</div>
<div class="mb-3 form-floating">
Expand Down Expand Up @@ -1553,7 +1553,7 @@ This generates:
```html
<div class="mb-3">
<label class="form-label required" for="user_login">New Username</label>
<input class="form-control" id="user_login" name="user[login]" required="required" type="password">
<input aria-required="true" class="form-control" id="user_login" name="user[login]" required="required" type="password">
</div>
<div class="mb-3">
<label class="form-label" for="user_password">New Password</label>
Expand Down
13 changes: 12 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ Follow these steps to release a new version of bootstrap_form to rubygems.org.
## How to release

1. Run `BUNDLE_GEMFILE=gemfiles/7.0.gemfile bundle update` to make sure that you have all the gems necessary for testing and releasing.
2. **Ensure the tests are passing by running `BUNDLE_GEMFILE=gemfiles/7.0.gemfile bundle update`.** (Currently this step shows a lot of warnings about method redefinitions, but otherwise everything must be green before release.)
2. **Ensure the tests are passing by running the tests**

(There should be no errors or warnings.)

BUNDLE_GEMFILE=gemfiles/7.0.gemfile bundle exec rake test

2. **Ensure the demo tests are passing by running**

cd demo
bundle install
bundle exec rake test:all

3. Determine which would be the correct next version number according to [semver](http://semver.org/).
4. Update the version in `./lib/bootstrap_form/version.rb`.
5. Update the GitHub diff links at the beginning of `CHANGELOG.md` (The pattern should be obvious when you look at them).
Expand Down
59 changes: 8 additions & 51 deletions demo/Gemfile
Original file line number Diff line number Diff line change
@@ -1,71 +1,28 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.0"

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails", require: "sprockets/railtie"

# Use sqlite3 as the database for Active Record
gem "sqlite3", "~> 1.4"

# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"
gem "bootstrap_form", path: ".."

# Bundle and transpile JavaScript [https://github.com/rails/jsbundling-rails]
gem "jsbundling-rails"
gem "rails", "~> 7.0.0"

# Bundle and process CSS [https://github.com/rails/cssbundling-rails]
gem "bootsnap", require: false
gem "cssbundling-rails"

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem "htmlbeautifier"
gem "jbuilder"

# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "jsbundling-rails"
gem "puma", "~> 5.0"
gem "sprockets-rails", require: "sprockets/railtie"
gem "sqlite3", "~> 1.4"
gem "tzinfo-data", platforms: %i[mingw mswin x64_mingw jruby]

# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false

gem "bootstrap_form", path: ".."

# Needed for our demo app but not the gem itself
gem "htmlbeautifier"

# Use Sass to process CSS
# gem "sassc-rails"

# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[mri mingw x64_mingw]
end

group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"

# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler"

# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
end

group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem "capybara-screenshot-diff"
gem "selenium-webdriver"
gem "webdrivers"
Expand Down
Loading