bullet_train 1.3.21 → 1.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/address.rb +24 -0
- data/app/models/addresses/continent.rb +22 -0
- data/app/models/addresses/country.rb +22 -0
- data/app/models/addresses/region.rb +22 -0
- data/app/models/addresses/subcontinent.rb +22 -0
- data/app/models/concerns/addresses/base.rb +18 -0
- data/app/models/concerns/addresses/continents/base.rb +7 -0
- data/app/models/concerns/addresses/countries/base.rb +9 -0
- data/app/models/concerns/addresses/regions/base.rb +13 -0
- data/app/models/concerns/addresses/subcontinents/base.rb +7 -0
- data/app/models/concerns/records/base.rb +9 -0
- data/app/views/account/onboarding/user_details/edit.html.erb +3 -3
- data/app/views/account/teams/_breadcrumbs.html.erb +2 -2
- data/app/views/devise/registrations/new.html.erb +1 -1
- data/config/addresses/countries.json +10975 -0
- data/config/addresses/states.json +43841 -0
- data/config/locales/en/addresses.en.yml +51 -0
- data/config/locales/en/framework_packages.yml +2 -0
- data/docs/field-partials.md +10 -0
- data/lib/bullet_train/version.rb +1 -1
- data/lib/tasks/bullet_train_tasks.rake +2 -0
- metadata +15 -2
@@ -0,0 +1,51 @@
|
|
1
|
+
en:
|
2
|
+
addresses:
|
3
|
+
label: "Address"
|
4
|
+
contact: "Contact"
|
5
|
+
fields:
|
6
|
+
address_one:
|
7
|
+
_: &address_one Address
|
8
|
+
label: *address_one
|
9
|
+
heading: *address_one
|
10
|
+
address_two:
|
11
|
+
_: &address_two Address cont.
|
12
|
+
label: *address_two
|
13
|
+
heading: *address_two
|
14
|
+
city:
|
15
|
+
_: &city City
|
16
|
+
label: *city
|
17
|
+
heading: *city
|
18
|
+
region_id: ®ion
|
19
|
+
_: ®ion_id State / Province / Region
|
20
|
+
label: *region_id
|
21
|
+
heading: *region_id
|
22
|
+
region: *region
|
23
|
+
region_name:
|
24
|
+
_: ®ion_name Region name
|
25
|
+
label: *region_name
|
26
|
+
heading: *region_name
|
27
|
+
admin_divisions:
|
28
|
+
states: State
|
29
|
+
provinces_territories: Province or Territory
|
30
|
+
prefectures: Prefecture
|
31
|
+
provinces: Province
|
32
|
+
states_territories: State or Territory
|
33
|
+
regions: Region
|
34
|
+
federal_states: Federal State
|
35
|
+
departments: Department
|
36
|
+
counties: County
|
37
|
+
cantons: Canton
|
38
|
+
default: State / Province / Region
|
39
|
+
country_id: &country
|
40
|
+
_: &country_id Country
|
41
|
+
label: *country_id
|
42
|
+
heading: *country_id
|
43
|
+
country: *country
|
44
|
+
postal_code:
|
45
|
+
_: &postal_code Postal code
|
46
|
+
label: *postal_code
|
47
|
+
heading: *postal_code
|
48
|
+
zip_code:
|
49
|
+
_: &zip_code Zip code
|
50
|
+
label: *zip_code
|
51
|
+
heading: *zip_code
|
@@ -20,6 +20,8 @@ en:
|
|
20
20
|
git: "bullet-train-co/bullet_train-core"
|
21
21
|
bullet_train-outgoing_webhooks:
|
22
22
|
git: "bullet-train-co/bullet_train-core"
|
23
|
+
bullet_train-roles:
|
24
|
+
git: "bullet-train-co/bullet_train-core"
|
23
25
|
bullet_train-scope_questions:
|
24
26
|
git: "bullet-train-co/bullet_train-core"
|
25
27
|
bullet_train-scope_validator:
|
data/docs/field-partials.md
CHANGED
@@ -63,6 +63,16 @@ For example, to suppress a label on any field, we can use the `hide_label` optio
|
|
63
63
|
| `help` | string | Display a specific help string. |
|
64
64
|
| `error` | string | Display a specific error string. |
|
65
65
|
| `hide_label` | boolean | Hide the field label. |
|
66
|
+
| `required` | boolean | Display an asterisk by the field label to indicate the field is required. |
|
67
|
+
|
68
|
+
## `required`: through presence validation vs. `options: {required: true}` vs. `other_options:{required: true}`
|
69
|
+
|
70
|
+
By default, where there's a presence validation on the model attribute, we add an asterisk to indicate the field is required. For fields without a presence validation, you have options to pass the `:required` detail:
|
71
|
+
|
72
|
+
1. `other_options: {required: true}` adds the asterisk to the field manually.
|
73
|
+
2. `options: {required: true}` adds asterisk but also triggers client-side validation via the [`required`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/required) attribute.
|
74
|
+
|
75
|
+
Since client-side validations vary from browser to browser, we recommend relying on server-side validation for most forms, and thus mostly using `other_options[:required]`.
|
66
76
|
|
67
77
|
## Reducing Repetition
|
68
78
|
When you're including multiple fields, you can DRY up redundant settings (e.g. `form: form`) like so:
|
data/lib/bullet_train/version.rb
CHANGED
@@ -311,6 +311,8 @@ namespace :bullet_train do
|
|
311
311
|
"#{original_path.chomp}, git: 'http://github.com/bullet-train-co/bullet_train-core.git'\n"
|
312
312
|
elsif link_flag_value&.match?(version_regexp)
|
313
313
|
"#{original_path.chomp}, \"#{link_flag_value}\"\n"
|
314
|
+
elsif link_flag_value
|
315
|
+
"#{original_path.chomp}, path: \"#{link_flag_value}/#{package}\"\n"
|
314
316
|
else
|
315
317
|
"#{local_path}\n"
|
316
318
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -553,7 +553,17 @@ files:
|
|
553
553
|
- app/mailers/concerns/mailers/base.rb
|
554
554
|
- app/mailers/devise_mailer.rb
|
555
555
|
- app/mailers/user_mailer.rb
|
556
|
+
- app/models/address.rb
|
557
|
+
- app/models/addresses/continent.rb
|
558
|
+
- app/models/addresses/country.rb
|
559
|
+
- app/models/addresses/region.rb
|
560
|
+
- app/models/addresses/subcontinent.rb
|
556
561
|
- app/models/billing/mock_limiter.rb
|
562
|
+
- app/models/concerns/addresses/base.rb
|
563
|
+
- app/models/concerns/addresses/continents/base.rb
|
564
|
+
- app/models/concerns/addresses/countries/base.rb
|
565
|
+
- app/models/concerns/addresses/regions/base.rb
|
566
|
+
- app/models/concerns/addresses/subcontinents/base.rb
|
557
567
|
- app/models/concerns/current_attributes/base.rb
|
558
568
|
- app/models/concerns/invitations/base.rb
|
559
569
|
- app/models/concerns/memberships/base.rb
|
@@ -627,8 +637,11 @@ files:
|
|
627
637
|
- app/views/showcase/engine/_stylesheets.html.erb
|
628
638
|
- app/views/user_mailer/invited.html.erb
|
629
639
|
- app/views/user_mailer/welcome.html.erb
|
640
|
+
- config/addresses/countries.json
|
641
|
+
- config/addresses/states.json
|
630
642
|
- config/initializers/concerns/inflections_base.rb
|
631
643
|
- config/initializers/concerns/turbo_failure_app.rb
|
644
|
+
- config/locales/en/addresses.en.yml
|
632
645
|
- config/locales/en/base.yml
|
633
646
|
- config/locales/en/billing/products.en.yml
|
634
647
|
- config/locales/en/devise.en.yml
|