govuk_design_system_formbuilder 2.0.0b4 → 2.0.0

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: d1a220934d67c1a26afea6d623bd2424156b6b4b71ef88411703da5ae761d778
4
- data.tar.gz: 808f12be46a25c60e1b1f97d074778bb1a8e1245a78a37672b6282dc4cdeb1fd
3
+ metadata.gz: f87c2ecd9fbd0615a3061159d7e87b42254115db22f59c260a6e4209f7ff742d
4
+ data.tar.gz: a167bde412b2158d9ed303af32e730d5ae27876b1ac4ee80d675b9bc81d15126
5
5
  SHA512:
6
- metadata.gz: 8fa051693840ca2463c6115bb0e4e4e53d68a0322697d49d186f83328635abee391466474da54cdc82fcbc77c28b055b10d7cb8374495965d00d8c4a8562134f
7
- data.tar.gz: e8e93bdcbcd3d00b6d62477c52e0f2b4fa387de30825c479db38e1dfb4a1be89e316ff091c3eef1a0f0a917ad12581c26a565dc46cdfa55e1f5212053e459992
6
+ metadata.gz: 4d184b3fa9ed93c35ea9ef15a72bf79f3520632fd3f501d93cc089a2e4b4e73fb73c2078083a9e0785f812802f2b406c972b568033148c9875bf1c4906ee9122
7
+ data.tar.gz: 3462d38207e9220b41bc3bc899d5218bc9ef982e609e2c96f58abbe0d8d20d9e9bd515b1be4566f77b37a4b543e0929a02fd9fa18bb0001815067aa0e6b07ea9
data/README.md CHANGED
@@ -7,41 +7,32 @@
7
7
  [![Test Coverage](https://api.codeclimate.com/v1/badges/fde73b5dc9476197281b/test_coverage)](https://codeclimate.com/github/DFE-Digital/govuk_design_system_formbuilder/test_coverage)
8
8
  [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=DFE-Digital/govuk_design_system_formbuilder)](https://dependabot.com)
9
9
  [![GitHub license](https://img.shields.io/github/license/DFE-Digital/govuk_design_system_formbuilder)](https://github.com/DFE-Digital/govuk_design_system_formbuilder/blob/master/LICENSE)
10
- [![GOV.UK Design System Version](https://img.shields.io/badge/GOV.UK%20Design%20System-3.9.0-brightgreen)](https://design-system.service.gov.uk)
10
+ [![GOV.UK Design System Version](https://img.shields.io/badge/GOV.UK%20Design%20System-3.9.1-brightgreen)](https://design-system.service.gov.uk)
11
11
 
12
- This gem provides a easy-to-use form builder that generates forms that are
13
- fully-compliant with version 3.9.0 of the [GOV.UK Design System](https://design-system.service.gov.uk/),
14
- minimising the amount of markup you need to write.
12
+ This library provides an easy-to-use form builder for the [GOV.UK Design System](https://design-system.service.gov.uk/).
15
13
 
16
- In addition to the basic markup, the more-advanced functionality of the Design
17
- System is exposed via the API. Adding [JavaScript-enhanced word count
18
- checking](https://govuk-form-builder.netlify.app/form-elements/text-area/)
19
- to text areas or [setting the size and weight of
20
- labels](https://govuk-form-builder.netlify.app/introduction/labels-hints-and-legends/)
21
- on text fields requires only a single argument.
14
+ It is intended to make creating forms **quick**, **easy** and **familiar** for Ruby on Rails developers.
22
15
 
23
16
  ## Documentation 📚
24
17
 
25
18
  The gem comes with [a full guide](https://govuk-form-builder.netlify.app/) that
26
- covers most aspects of day-to-day use, along with code and output examples. The guide
27
- is generated from the builder itself so it will always be up to date.
28
-
29
- If you're still not sure what a form builder is or how it works, don't worry!
30
- [This screencast](https://www.youtube.com/watch?v=PhoFZ0qXAlA) should give you
31
- an idea of what's on offer and the official guide goes into a bit more depth on
32
- how everything works.
19
+ covers most aspects of day-to-day use, along with code and output examples. The
20
+ examples in the guide are generated from the builder itself so it will always
21
+ be up to date.
33
22
 
34
23
  [![Netlify Status](https://api.netlify.com/api/v1/badges/d4c50b8d-6ca3-4797-9ab3-6e0731c72b44/deploy-status)](https://app.netlify.com/sites/govuk-form-builder/deploys)
35
24
 
36
25
  ## What's included 🧳
37
26
 
38
27
  * 100% compatibility with the GOV.UK Design System
39
- * Full control of labels, hints, fieldsets and legends
28
+ * Full control of labels, legends, hints, captions and fieldsets
40
29
  * No overwriting of Rails' default form helpers
41
30
  * Automatic ARIA associations between hints, errors and inputs
42
31
  * Most helpers take blocks for arbitrary content
43
32
  * Additional params for programmatically adding hints to check box and radio
44
33
  button collections
34
+ * Full I18n support
35
+ * Automatic handling of ActiveRecord validation error messages
45
36
  * No external dependencies
46
37
  * An exhaustive test suite
47
38
  * [Extensive technical documentation](https://www.rubydoc.info/gems/govuk_design_system_formbuilder/GOVUKDesignSystemFormBuilder/Builder)
@@ -68,8 +59,9 @@ pre-configured template:
68
59
 
69
60
  ## Setup 🔧
70
61
 
71
- To use the form builder in an ad hoc basis you can specify it
72
- as an argument to `form_for` or `form_with`:
62
+ To use the form builder in an ad hoc basis you can specify it as an argument to
63
+ `form_for` or `form_with`. These examples are written in [Slim](https://slim-lang.com) but
64
+ other templating languages like ERB and [Haml](https://haml.info/) work just as well.
73
65
 
74
66
  ```slim
75
67
  = form_for @some_object, builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f|
@@ -99,16 +91,16 @@ Now we can get started!
99
91
  :name,
100
92
  :description,
101
93
  label: { text: "Which department do you work for?" },
102
- hint_text: "If you don't know ask your manager" }
94
+ hint: { text: "If you don't know ask your manager" }
103
95
 
104
96
  = f.govuk_submit 'Away we go!'
105
97
  ```
106
98
 
107
99
  ## Developing and running the tests 👨🏻‍🏭
108
100
 
109
- The form builder is covered by RSpec, to run all the tests first ensure that
110
- all of the development and testing prerequisite gems are installed. At the root
111
- of a freshly-cloned repo run:
101
+ The form builder is tested with RSpec. To run all the tests first ensure that
102
+ the development and testing prerequisite gems are installed. At the root of a
103
+ freshly-cloned repo run:
112
104
 
113
105
  ```sh
114
106
  bundle
@@ -117,7 +109,7 @@ bundle
117
109
  Now, if everything was successful, run RSpec:
118
110
 
119
111
  ```sh
120
- bundle exec rspec -fd
112
+ bundle exec rspec
121
113
  ```
122
114
 
123
115
  ## Contributing 📦
@@ -1,3 +1,3 @@
1
1
  module GOVUKDesignSystemFormBuilder
2
- VERSION = '2.0.0b4'.freeze
2
+ VERSION = '2.0.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_design_system_formbuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0b4
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Yates
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-15 00:00:00.000000000 Z
11
+ date: 2020-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -314,9 +314,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
314
314
  version: '0'
315
315
  required_rubygems_version: !ruby/object:Gem::Requirement
316
316
  requirements:
317
- - - ">"
317
+ - - ">="
318
318
  - !ruby/object:Gem::Version
319
- version: 1.3.1
319
+ version: '0'
320
320
  requirements: []
321
321
  rubygems_version: 3.1.2
322
322
  signing_key: