bootstrap_form 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +102 -0
- data/.rubocop_todo.yml +104 -0
- data/.travis.yml +6 -3
- data/CHANGELOG.md +14 -1
- data/CODE_OF_CONDUCT.md +76 -0
- data/CONTRIBUTING.md +49 -20
- data/Dangerfile +5 -5
- data/Gemfile +1 -0
- data/README.md +52 -4
- data/Rakefile +7 -1
- data/bootstrap_form.gemspec +1 -1
- data/demo/app/controllers/bootstrap_controller.rb +2 -4
- data/demo/app/helpers/bootstrap_helper.rb +0 -2
- data/demo/app/models/address.rb +1 -1
- data/demo/app/models/faux_user.rb +1 -1
- data/demo/app/models/user.rb +2 -2
- data/demo/bin/bundle +2 -2
- data/demo/bin/rails +3 -3
- data/demo/bin/rake +2 -2
- data/demo/bin/setup +8 -8
- data/demo/bin/update +8 -8
- data/demo/bin/yarn +3 -3
- data/demo/config.ru +1 -1
- data/demo/config/application.rb +3 -5
- data/demo/config/environments/development.rb +3 -5
- data/demo/config/environments/test.rb +2 -4
- data/demo/config/initializers/assets.rb +2 -2
- data/lib/bootstrap_form.rb +2 -2
- data/lib/bootstrap_form/aliasing.rb +5 -5
- data/lib/bootstrap_form/form_builder.rb +106 -85
- data/lib/bootstrap_form/helper.rb +7 -8
- data/lib/bootstrap_form/helpers/bootstrap.rb +25 -27
- data/lib/bootstrap_form/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d661bd91f892a0d10b09359e36a4846266f622e7fbc38430327bab3f51cd0e13
|
4
|
+
data.tar.gz: 4322fb71af8060d60a28268f00529d857eea8f5b09463953f21e32718ce64251
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e21b999c29774ec236fba107ed3d20476345cb60e5675f7aad7e56715ddc2307dc2ed397c51e44d3f35e62d2be1d8e14ffb455ff11d5b2f6ae80525306e0894
|
7
|
+
data.tar.gz: 176023ba2fe9ff4131996289508f63cd654011eddf23cb22c90afa739fcb49c369d7b68b1a533158f925faadcd76e40c23bf0b4dd7a4da96566ad59303967c34
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
# Taken from: https://github.com/mattbrictson/rails-template/blob/master/rubocop.yml.tt
|
2
|
+
# Modified for demo app in `demo/` directory.
|
3
|
+
AllCops:
|
4
|
+
DisplayCopNames: true
|
5
|
+
DisplayStyleGuide: true
|
6
|
+
TargetRubyVersion: 2.2.2
|
7
|
+
Exclude:
|
8
|
+
- "bin/*"
|
9
|
+
- Capfile
|
10
|
+
- demo/config/boot.rb
|
11
|
+
- demo/config/environment.rb
|
12
|
+
- demo/config/initializers/version.rb
|
13
|
+
- demo/db/schema.rb
|
14
|
+
- "demo/node_modules/**/*"
|
15
|
+
- "demo/bower_components/**/*"
|
16
|
+
- "demo/tmp/**/*"
|
17
|
+
- "demo/vendor/**/*"
|
18
|
+
- Gemfile
|
19
|
+
- Guardfile
|
20
|
+
- demo/Rakefile
|
21
|
+
- Rakefile
|
22
|
+
|
23
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
24
|
+
EnforcedStyle: no_space
|
25
|
+
|
26
|
+
Metrics/AbcSize:
|
27
|
+
Exclude:
|
28
|
+
- "demo/test/**/*"
|
29
|
+
- "test/**/*"
|
30
|
+
|
31
|
+
Metrics/BlockLength:
|
32
|
+
Exclude:
|
33
|
+
- "demo/config/**/*"
|
34
|
+
- "demo/test/**/*"
|
35
|
+
- "test/**/*"
|
36
|
+
|
37
|
+
Metrics/ClassLength:
|
38
|
+
Exclude:
|
39
|
+
- "demo/test/**/*"
|
40
|
+
- "test/**/*"
|
41
|
+
|
42
|
+
Metrics/LineLength:
|
43
|
+
Max: 132
|
44
|
+
Exclude:
|
45
|
+
- "demo/config/**/*"
|
46
|
+
- "demo/db/**/*"
|
47
|
+
|
48
|
+
Metrics/MethodLength:
|
49
|
+
Max: 12
|
50
|
+
Exclude:
|
51
|
+
- "demo/db/migrate/*"
|
52
|
+
- "demo/test/**/*"
|
53
|
+
- "test/**/*"
|
54
|
+
|
55
|
+
Naming/MemoizedInstanceVariableName:
|
56
|
+
EnforcedStyleForLeadingUnderscores: optional
|
57
|
+
|
58
|
+
Naming/VariableNumber:
|
59
|
+
Enabled: false
|
60
|
+
|
61
|
+
Performance/Casecmp:
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
Rails:
|
65
|
+
Enabled: true
|
66
|
+
|
67
|
+
Rails/ApplicationRecord:
|
68
|
+
Exclude:
|
69
|
+
- "demo/db/migrate/**"
|
70
|
+
|
71
|
+
Rails/RefuteMethods:
|
72
|
+
Enabled: false
|
73
|
+
|
74
|
+
Rails/Validation:
|
75
|
+
Enabled: false
|
76
|
+
|
77
|
+
Style/BarePercentLiterals:
|
78
|
+
EnforcedStyle: percent_q
|
79
|
+
|
80
|
+
Style/ClassAndModuleChildren:
|
81
|
+
Enabled: false
|
82
|
+
|
83
|
+
Style/Documentation:
|
84
|
+
Enabled: false
|
85
|
+
|
86
|
+
Style/DoubleNegation:
|
87
|
+
Enabled: false
|
88
|
+
|
89
|
+
Style/EmptyMethod:
|
90
|
+
Enabled: false
|
91
|
+
|
92
|
+
Style/FrozenStringLiteralComment:
|
93
|
+
Enabled: false
|
94
|
+
|
95
|
+
Style/NumericPredicate:
|
96
|
+
Enabled: false
|
97
|
+
|
98
|
+
Style/StringLiterals:
|
99
|
+
EnforcedStyle: double_quotes
|
100
|
+
|
101
|
+
Style/TrivialAccessors:
|
102
|
+
AllowPredicates: true
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
inherit_from: .rubocop.yml
|
2
|
+
|
3
|
+
# This configuration was generated by
|
4
|
+
# `rubocop --auto-gen-config`
|
5
|
+
# on 2018-11-01 19:28:56 +0000 using RuboCop version 0.60.0.
|
6
|
+
# The point is for the user to remove these configuration records
|
7
|
+
# one by one as the offenses are removed from the code base.
|
8
|
+
# Note that changes in the inspected code, or installation of new
|
9
|
+
# versions of RuboCop, may require this file to be generated again.
|
10
|
+
|
11
|
+
# Offense count: 1
|
12
|
+
# Cop supports --auto-correct.
|
13
|
+
# Configuration parameters: EnforcedStyle.
|
14
|
+
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
|
15
|
+
Layout/IndentHeredoc:
|
16
|
+
Exclude:
|
17
|
+
- 'Dangerfile'
|
18
|
+
|
19
|
+
# Offense count: 9
|
20
|
+
Metrics/AbcSize:
|
21
|
+
Max: 67
|
22
|
+
|
23
|
+
# Offense count: 2
|
24
|
+
# Configuration parameters: CountComments.
|
25
|
+
Metrics/ClassLength:
|
26
|
+
Max: 445
|
27
|
+
|
28
|
+
# Offense count: 7
|
29
|
+
Metrics/CyclomaticComplexity:
|
30
|
+
Max: 17
|
31
|
+
|
32
|
+
# Offense count: 1
|
33
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
34
|
+
# URISchemes: http, https
|
35
|
+
Metrics/LineLength:
|
36
|
+
Max: 137
|
37
|
+
|
38
|
+
# Offense count: 11
|
39
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
40
|
+
Metrics/MethodLength:
|
41
|
+
Max: 45
|
42
|
+
|
43
|
+
# Offense count: 2
|
44
|
+
# Configuration parameters: CountKeywordArgs.
|
45
|
+
Metrics/ParameterLists:
|
46
|
+
Max: 8
|
47
|
+
|
48
|
+
# Offense count: 5
|
49
|
+
Metrics/PerceivedComplexity:
|
50
|
+
Max: 19
|
51
|
+
|
52
|
+
# Offense count: 2
|
53
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
|
54
|
+
# NamePrefix: is_, has_, have_
|
55
|
+
# NamePrefixBlacklist: is_, has_, have_
|
56
|
+
# NameWhitelist: is_a?
|
57
|
+
# MethodDefinitionMacros: define_method, define_singleton_method
|
58
|
+
Naming/PredicateName:
|
59
|
+
Exclude:
|
60
|
+
- 'spec/**/*'
|
61
|
+
- 'lib/bootstrap_form/form_builder.rb'
|
62
|
+
|
63
|
+
# Offense count: 1
|
64
|
+
# Configuration parameters: EnforcedStyle.
|
65
|
+
# SupportedStyles: slashes, arguments
|
66
|
+
Rails/FilePath:
|
67
|
+
Exclude:
|
68
|
+
- 'demo/config/environments/development.rb'
|
69
|
+
|
70
|
+
# Offense count: 23
|
71
|
+
Rails/OutputSafety:
|
72
|
+
Exclude:
|
73
|
+
- 'bootstrap_error_rendering_test.rb'
|
74
|
+
- 'lib/bootstrap_form/form_builder.rb'
|
75
|
+
- 'lib/bootstrap_form/helpers/bootstrap.rb'
|
76
|
+
- 'test/bootstrap_checkbox_test.rb'
|
77
|
+
- 'test/bootstrap_form_group_test.rb'
|
78
|
+
- 'test/bootstrap_other_components_test.rb'
|
79
|
+
- 'test/bootstrap_radio_button_test.rb'
|
80
|
+
|
81
|
+
# Offense count: 1
|
82
|
+
Style/CaseEquality:
|
83
|
+
Exclude:
|
84
|
+
- 'test/test_helper.rb'
|
85
|
+
|
86
|
+
# Offense count: 6
|
87
|
+
# Configuration parameters: MinBodyLength.
|
88
|
+
Style/GuardClause:
|
89
|
+
Exclude:
|
90
|
+
- 'lib/bootstrap_form/form_builder.rb'
|
91
|
+
- 'lib/bootstrap_form/helpers/bootstrap.rb'
|
92
|
+
|
93
|
+
# Offense count: 2
|
94
|
+
# Cop supports --auto-correct.
|
95
|
+
Style/IfUnlessModifier:
|
96
|
+
Exclude:
|
97
|
+
- 'demo/config/application.rb'
|
98
|
+
- 'lib/bootstrap_form/helper.rb'
|
99
|
+
|
100
|
+
# Offense count: 2
|
101
|
+
Style/MixinUsage:
|
102
|
+
Exclude:
|
103
|
+
- 'demo/bin/setup'
|
104
|
+
- 'demo/bin/update'
|
data/.travis.yml
CHANGED
@@ -9,8 +9,10 @@ gemfile:
|
|
9
9
|
- test/gemfiles/5.1.gemfile
|
10
10
|
- test/gemfiles/5.2.gemfile
|
11
11
|
before_install:
|
12
|
-
- gem update
|
13
|
-
- gem install bundler --no-document
|
12
|
+
- gem i rubygems-update -v '<3' && update_rubygems
|
13
|
+
- gem install bundler -v 1.17.3 --no-document
|
14
|
+
script:
|
15
|
+
- bundle exec rake test
|
14
16
|
|
15
17
|
matrix:
|
16
18
|
include:
|
@@ -18,12 +20,13 @@ matrix:
|
|
18
20
|
- rvm: ruby-head
|
19
21
|
gemfile: test/gemfiles/5.2.gemfile
|
20
22
|
|
21
|
-
# Running one job to execute DANGER bot
|
23
|
+
# Running one job to execute DANGER bot and linting
|
22
24
|
- rvm: 2.5.0
|
23
25
|
gemfile: test/gemfiles/5.2.gemfile
|
24
26
|
script:
|
25
27
|
- gem install danger
|
26
28
|
- danger
|
29
|
+
- bundle exec rake rubocop
|
27
30
|
|
28
31
|
allow_failures:
|
29
32
|
- rvm: ruby-head
|
data/CHANGELOG.md
CHANGED
@@ -12,6 +12,16 @@
|
|
12
12
|
|
13
13
|
* Your contribution here!
|
14
14
|
|
15
|
+
## [4.1.0][] (2019-01-19)
|
16
|
+
|
17
|
+
### New features
|
18
|
+
|
19
|
+
- [#259] Allow to render input without wrapper [@yevhene].
|
20
|
+
|
21
|
+
### Bugfixes
|
22
|
+
|
23
|
+
* [#496] Ensure required attribute is passed through to input tag.
|
24
|
+
|
15
25
|
## [4.0.0][] (2018-10-27)
|
16
26
|
|
17
27
|
🚨 **This release adds support for Bootstrap v4 and drops support for Bootstrap v3.** 🚨
|
@@ -31,6 +41,7 @@ In addition to these necessary markup changes, the bootstrap_form API itself has
|
|
31
41
|
* [#476] Give a way to pass classes to the `div.form-check` wrapper for check boxes and radio buttons - [@lcreid](https://github.com/lcreid).
|
32
42
|
* [461](https://github.com/bootstrap-ruby/bootstrap_form/pull/461): default form-inline class applied to parent content div on date select helpers. Can override with a :skip_inline option on the field helper - [@lancecarlson](https://github.com/lancecarlson).
|
33
43
|
* The `button`, `submit`, and `primary` helpers can now receive an additional option, `extra_class`. This option allows us to specify additional CSS classes to be added to the corresponding button/input, _while_ maintaining the original default ones. E.g., a primary button with an `extra_class` 'test-button' will have its final CSS classes declaration as 'btn btn-primary test-button'.
|
44
|
+
* [#488](https://github.com/bootstrap-ruby/bootstrap_form/pull/488): add required option on form_group_builder - [@ThomasSevestre](https://github.com/ThomasSevestre).
|
34
45
|
|
35
46
|
### Bugfixes
|
36
47
|
|
@@ -75,6 +86,7 @@ In addition to these necessary markup changes, the bootstrap_form API itself has
|
|
75
86
|
* [#449](https://github.com/bootstrap-ruby/bootstrap_form/pull/449): Passing `.form-row` overrides default `.form-group.row` in horizontal layouts.
|
76
87
|
* Added an option to the `submit` (and `primary`, by transitivity) form tag helper, `render_as_button`, which when truthy makes the submit button render as a button instead of an input. This allows you to easily provide further styling to your form submission buttons, without requiring you to reinvent the wheel and use the `button` helper (and having to manually insert the typical Bootstrap classes). - [@jsaraiva](https://github.com/jsaraiva).
|
77
88
|
* Add `:error_message` option to `check_box` and `radio_button`, so they can output validation error messages if needed. [@lcreid](https://github.com/lcreid).
|
89
|
+
* [#487](https://github.com/bootstrap-ruby/bootstrap_form/pull/487): Add add_control_col_class option on form_group. - [@ThomasSevestre](https://github.com/ThomasSevestre).
|
78
90
|
* Your contribution here!
|
79
91
|
|
80
92
|
### Bugfixes
|
@@ -243,7 +255,8 @@ Features:
|
|
243
255
|
- Added support for bootstrap_form_tag (@baldwindavid)
|
244
256
|
|
245
257
|
|
246
|
-
[Pending Release]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.
|
258
|
+
[Pending Release]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.1.0...HEAD
|
259
|
+
[4.1.0]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.0.0...v4.1.0
|
247
260
|
[4.0.0]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v4.0.0.alpha1...v4.0.0
|
248
261
|
[4.0.0.alpha1]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.7.0...v4.0.0.alpha1
|
249
262
|
[2.7.0]: https://github.com/bootstrap-ruby/bootstrap_form/compare/v2.6.0...v2.7.0
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at lcreid@jadesystems.ca. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
data/CONTRIBUTING.md
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
# Contributing
|
2
2
|
|
3
|
-
|
4
|
-
direction of `bootstrap_form`. Don't worry. We plan to move this gem forward to
|
5
|
-
Bootstrap 4 and to support Rails 5.1 and beyond. If you're thinking of
|
6
|
-
contributing to `bootstrap_form`, please read
|
7
|
-
[issue #361](https://github.com/bootstrap-ruby/bootstrap_form/issues/361).
|
3
|
+
Thanks so much for considering a contribution to bootstrap_form. We love pull requests!
|
8
4
|
|
9
|
-
|
5
|
+
We want everyone to feel welcome to contribute. We encourage respectful exchanges of ideas. We govern ourselves with the Contributor Covenant [Code of Conduct](/CODE_OF_CONDUCT.md).
|
10
6
|
|
11
|
-
|
7
|
+
There are a number of ways you can contribute to `bootstrap_form`:
|
8
|
+
|
9
|
+
- Fix a bug or add a new feature
|
10
|
+
- Add to the documentation
|
11
|
+
- Review pull requests
|
12
|
+
|
13
|
+
## Code Contributions
|
12
14
|
|
13
|
-
Here's a quick guide for
|
15
|
+
Here's a quick guide for code contributions:
|
14
16
|
|
15
17
|
### 1. Check if issue or feature is available to work on
|
16
18
|
|
@@ -19,38 +21,65 @@ and pull requests for anything that looks like the issue or feature you want to
|
|
19
21
|
address. If no one else is working on your issue or feature, carry on with the
|
20
22
|
following steps.
|
21
23
|
|
22
|
-
### 2.
|
24
|
+
### 2. (Optional) Create an issue, and wait a few days for someone to respond
|
23
25
|
|
24
|
-
|
26
|
+
If you create an issue for your feature request or bug, it gives the maintainers a chance to comment on your ideas before you invest a lot of work on a contribution. It may save you some re-work compared to simply submitting a pull request. It's up to you whether you submit an issue.
|
25
27
|
|
26
|
-
### 3.
|
28
|
+
### 3. Fork the repo
|
29
|
+
|
30
|
+
Fork the project. Optionally, create a branch you want to work on.
|
31
|
+
|
32
|
+
### 4. Get it running locally
|
27
33
|
|
28
34
|
- Install the required dependencies with `bundle install`
|
29
35
|
- Run tests via: `bundle exec rake`
|
30
36
|
|
31
|
-
###
|
37
|
+
### 5. Hack away
|
32
38
|
|
33
|
-
- Try to keep your changes small. Consider making several smaller pull requests.
|
39
|
+
- Try to keep your changes small. Consider making several smaller pull requests if your changes are extensive.
|
34
40
|
- Don't forget to add necessary tests.
|
35
41
|
- Update the README if necessary.
|
36
42
|
- Add a line to the CHANGELOG for your bug fix or feature.
|
43
|
+
- Read the [Coding Guidelines](#coding-guidelines) section and make sure that `rake lint` doesn't find any offences.
|
37
44
|
|
38
|
-
You may find
|
45
|
+
You may find the demo application useful for development and debugging.
|
39
46
|
|
40
47
|
- `cd demo`
|
41
48
|
- `rake db:schema:load`
|
42
49
|
- `rails s`
|
43
50
|
- Navigate to http://localhost:3000
|
44
51
|
|
45
|
-
###
|
52
|
+
### 6. Make a pull request
|
53
|
+
|
54
|
+
- If you've never made a pull request (PR) before, read this: https://help.github.com/articles/about-pull-requests/.
|
55
|
+
- If your PR fixes an issues, be sure to put "Fixes #nnn" in the description of the PR (where `nnn` is the issue number). Github will automatically close the issue when the PR is merged.
|
56
|
+
- When the PR is submitted, check if Travis CI ran all the tests successfully, and didn't raise any issues.
|
57
|
+
|
58
|
+
### 7. Done!
|
59
|
+
|
60
|
+
Somebody will shortly review your pull request and if everything is good, it will be
|
61
|
+
merged into the master branch. Eventually the gem will be published with your changes.
|
62
|
+
|
63
|
+
### Coding guidelines
|
64
|
+
|
65
|
+
This project uses [RuboCop](https://github.com/bbatsov/rubocop) to enforce standard Ruby coding
|
66
|
+
guidelines. Currently we run RuboCop's as described by [this post](https://tech.offgrid-electric.com/rubocop-getting-to-green-in-a-huge-rails-app-12d1ad6678eb), under the section "How to make CI pass". That means we allow certain existing RuboCop offences in the code, but prevent people from adding any new offences. So you might copy some existing code, and then discover that it doesn't pass. Please fix the new code, and if you're ambitious, fix the old code as well.
|
67
|
+
|
68
|
+
* Test that your contribution passes with `rake rubocop`.
|
69
|
+
* RuboCop is also run as part of the full test suite with `bundle exec rake`.
|
70
|
+
* Note the Travis build will fail and your PR cannot be merged if RuboCop finds offences.
|
71
|
+
|
72
|
+
Note that most editors have plugins to run RuboCop as you type, or when you save a file. You may find it well worth your time to install and configure the RuboCop plugin for your editor. Read the [RuboCop documentation](https://rubocop.readthedocs.io/en/latest/integration_with_other_tools/).
|
73
|
+
|
74
|
+
## Documentation Contributions
|
75
|
+
|
76
|
+
Contributions to documentation are always welcome. Even fixing one typo improves the quality of `bootstrap_form`. To make a documentation contribution, follow steps 1-3 of Code Contributions, then make the documentation changes, then make the pull request (step 6 of Code Contributions).
|
46
77
|
|
47
|
-
|
48
|
-
- When PR is submitted check if TravisCI ran all tests successfully didn't raise any issues
|
78
|
+
If you put `[ci skip]` in the commit message of the most recent commit of the PR, you'll be a good citizen by not causing Travis CI to run all the tests when it's not necessary.
|
49
79
|
|
50
|
-
|
80
|
+
## Reviewing Pull Requests
|
51
81
|
|
52
|
-
|
53
|
-
merged into master branch. Eventually gem will be published with your changes.
|
82
|
+
We are an entirely volunteer project. Sometimes it's hard for people to find the time to review pull requests. You can help! If you see a pull request that's waiting to be merged, it could be because no one has reviewed it yet. Your review could help move the pull request forward to be merged.
|
54
83
|
|
55
84
|
---
|
56
85
|
|