bootstrap_form 5.2.1 → 5.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9bea3ab95f979a7fc02d2c2a5dff3bae3ca536c6e277a86d11361c3e3bd72e59
4
- data.tar.gz: 80fa55a6cbcd89ae0b52ebc8135d8b9f38b25b321bdbe492983db46c866c1e7d
3
+ metadata.gz: 4f254a69bb17aa95e9b912696e17d960c76a8b276946e3e33a0c4ade55cc3a38
4
+ data.tar.gz: 5d7d83dd48e78fc1dfbb9be6cea0cf12a4bdc9dbe646e3720152e4f78953adb3
5
5
  SHA512:
6
- metadata.gz: a97b0ddfb9afcfb847b27ea4853c4f3b99bb0c72a0366d4d1a0a3fac217f0693090c96ea03c51e3a07e66cfe3c8c4576be8618eb3b48401c6d6f326e35619fa7
7
- data.tar.gz: 3d79f681187a5fa0cab604ced1919229cdbdd101cc8f91c4261a115b82fa5589c3037b8b0c6d6208ce17affe964397a8fc33a9483a82a5c74efd22c9224eb582
6
+ metadata.gz: 2e9d0227f8d07cd40fd0986cb67f0b86de8c759fd7e7b60d42e3ea8dd0d825555a62b5f60de26e30a8b08985cc9b38e42e765338d1ca628e50c5a8841ca64756
7
+ data.tar.gz: 74034f6ad801fea16c3002242b80647eed61732c9a15c8d6b4197f59cd232c7d361974ef42697fa4b81f03100d73e7699794a0a5454da03661bde1677045ee42
data/CHANGELOG.md CHANGED
@@ -6,13 +6,14 @@ https://github.com/bootstrap-ruby/bootstrap_form/releases
6
6
 
7
7
  ## Diffs
8
8
 
9
- - [Pending Release](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.0...HEAD)
9
+ - [5.2.2](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.1...v5.2.2)
10
+ [Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-05-23T10%3A00..2023-05-28T16%3A00)
10
11
  - [5.2.1](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.0...v5.2.1)
11
- [Issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-05-20T23%3A59..2023-05-23T10%3A00)
12
+ [Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-05-20T23%3A59..2023-05-23T10%3A00)
12
13
  - [5.2.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.1.0...v5.2.0)
13
- [Issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2022-06-25T17%3A22..2023-05-20T23%3A59)
14
+ [Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2022-06-25T17%3A22..2023-05-20T23%3A59)
14
15
  - [5.1.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.0.0...v5.1.0)
15
- [Issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2021-11-12T05%3A58..2022-06-25T17%3A22)
16
+ [Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2021-11-12T05%3A58..2022-06-25T17%3A22)
16
17
  - [5.0.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.5.0...v5.0.0)
17
18
  - [4.5.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.4.0...v4.5.0)
18
19
  - [4.4.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.3.0...v4.4.0)
data/RELEASING.md CHANGED
@@ -10,22 +10,37 @@ Follow these steps to release a new version of bootstrap_form to rubygems.org.
10
10
 
11
11
  ## How to release
12
12
 
13
- 1. Run `BUNDLE_GEMFILE=gemfiles/7.0.gemfile bundle update` to make sure that you have all the gems necessary for testing and releasing.
13
+ 1. Make sure that you have all the gems necessary for testing and releasing.
14
+
15
+ BUNDLE_GEMFILE=gemfiles/7.0.gemfile bundle update
16
+
14
17
  2. **Ensure the tests are passing by running the tests**
15
18
 
16
19
  (There should be no errors or warnings.)
17
20
 
18
21
  BUNDLE_GEMFILE=gemfiles/7.0.gemfile bundle exec rake test
19
22
 
20
- 2. **Ensure the demo tests are passing by running**
23
+ 3. **Ensure the demo tests are passing by running**
21
24
 
22
25
  cd demo
23
26
  bundle update
24
27
  bundle exec rake test:all
25
-
26
- 3. Determine which would be the correct next version number according to [semver](http://semver.org/).
27
- 4. Update the version in `./lib/bootstrap_form/version.rb`.
28
- 5. Update the GitHub diff links at the beginning of `CHANGELOG.md` (The pattern should be obvious when you look at them).
29
- 6. Update the installation instructions in `README.md` to use the new version.
30
- 7. Commit the CHANGELOG and version changes in a single commit; the message should be "Preparing vX.Y.Z" where `X.Y.Z` is the version being released.
31
- 8. Run `bundle exec rake release`; this will tag, push to GitHub, and publish to rubygems.org.
28
+ cd -
29
+
30
+ 4. Determine which would be the correct next version number according to [semver](http://semver.org/).
31
+ 5. Update the version in `./lib/bootstrap_form/version.rb`.
32
+ 6. Update the GitHub diff links at the beginning of `CHANGELOG.md` (The pattern should be obvious when you look at them).
33
+ 7. Update the installation instructions in `README.md` to use the new version.
34
+ 8. Commit the CHANGELOG and version changes in a single commit; the message should be "Preparing vX.Y.Z" where `X.Y.Z` is the version being released.
35
+ 9. Tag, push to GitHub, and publish to rubygems.org:
36
+
37
+ bundle exec rake release
38
+
39
+ 10. Go to https://github.com/bootstrap-ruby/bootstrap_form/releases and create the new release and add release notes by clicking the "Generate release notes" button.
40
+ Add the link of closed issues from CHANGELOG.
41
+ Group the commits in sections:
42
+ * ### New features
43
+ * ### Bugfixes
44
+ * ### Performance
45
+ * ### Documentation
46
+ * ### Development
data/Rakefile CHANGED
@@ -1,12 +1,14 @@
1
1
  begin
2
2
  require 'bundler/setup'
3
+
4
+ require 'bundler/gem_tasks'
5
+ require "minitest/test_task"
6
+ require 'rdoc/task'
3
7
  require 'rubocop/rake_task'
4
8
  rescue LoadError
5
9
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
10
  end
7
11
 
8
- require 'rdoc/task'
9
-
10
12
  RDoc::Task.new(:rdoc) do |rdoc|
11
13
  rdoc.rdoc_dir = 'rdoc'
12
14
  rdoc.title = 'BootstrapForm'
@@ -15,10 +17,6 @@ RDoc::Task.new(:rdoc) do |rdoc|
15
17
  rdoc.rdoc_files.include('lib/**/*.rb')
16
18
  end
17
19
 
18
- require 'bundler/gem_tasks'
19
-
20
- require "minitest/test_task"
21
-
22
20
  Minitest::TestTask.create(:test) do |t|
23
21
  t.libs << "test"
24
22
  t.libs << "lib"
@@ -26,12 +24,6 @@ Minitest::TestTask.create(:test) do |t|
26
24
  t.test_globs = ["test/**/*_test.rb"]
27
25
  end
28
26
 
29
- # This automatically updates GitHub Releases whenever we `rake release` the gem
30
- task "release:rubygem_push" do
31
- require "chandler/tasks"
32
- Rake.application.invoke_task("chandler:push")
33
- end
34
-
35
27
  desc 'Run RuboCop checks'
36
28
  RuboCop::RakeTask.new(:rubocop)
37
29
 
@@ -26,7 +26,7 @@ module BootstrapForm
26
26
  target = obj.instance_of?(Class) ? obj : obj.class
27
27
  return false unless target.respond_to? :validators_on
28
28
 
29
- presence_validator?(target_validators(target, attribute)) ||
29
+ presence_validator?(target_unconditional_validators(target, attribute)) ||
30
30
  required_association?(target, attribute)
31
31
  end
32
32
 
@@ -35,12 +35,14 @@ module BootstrapForm
35
35
  next unless a.is_a?(ActiveRecord::Reflection::BelongsToReflection)
36
36
  next unless a.foreign_key == attribute.to_s
37
37
 
38
- presence_validator?(target_validators(target, name))
38
+ presence_validator?(target_unconditional_validators(target, name))
39
39
  end
40
40
  end
41
41
 
42
- def target_validators(target, attribute)
43
- target.validators_on(attribute).map(&:class)
42
+ def target_unconditional_validators(target, attribute)
43
+ target.validators_on(attribute)
44
+ .reject { |validator| validator.options[:if].present? || validator.options[:unless].present? }
45
+ .map(&:class)
44
46
  end
45
47
 
46
48
  def presence_validator?(target_validators)
@@ -1,4 +1,4 @@
1
1
  module BootstrapForm
2
- VERSION = "5.2.1".freeze
2
+ VERSION = "5.2.2".freeze
3
3
  REQUIRED_RAILS_VERSION = ">= 6.0".freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.1
4
+ version: 5.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Potenza
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-05-23 00:00:00.000000000 Z
12
+ date: 2023-05-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack