bullet_train 1.0.61 → 1.0.64
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/controllers/base.rb +1 -0
- data/app/helpers/concerns/helpers/base.rb +6 -0
- data/config/initializers/concerns/inflections_base.rb +6 -0
- data/docs/super-scaffolding.md +5 -0
- data/lib/bullet_train/resolver.rb +11 -2
- data/lib/bullet_train/version.rb +1 -1
- data/lib/tasks/bullet_train_tasks.rake +22 -22
- metadata +45 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93d142860f60bb40085ed4b5eb0cd69e5f86b486f133989ceff74e6dcd0ddf8d
|
4
|
+
data.tar.gz: e4c3d1fd54f92bc813452fe42e39e206d62d736638e9e59298689b826a8371c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5aad86cbc4c699e8dd68d00ee83f383c15d8fafec49433aaa9493d9fe59664500c46d1ebb36d8ac6b9c4fe86529f0e5782cf1b49e29a9de85318b9b69fa7aef3
|
7
|
+
data.tar.gz: 8eaefe2917709c48a2cb66f9a450bb47be0952cdc7fbe15d354e372fc59597a996bcf013c2cccfe0e06cb79d7b47458e578140a87429375e9332158ac0ff68b2
|
@@ -0,0 +1,6 @@
|
|
1
|
+
ActiveSupport::Inflector.inflections(:en) do |inflect|
|
2
|
+
# "_by" is a particularly common suffix for associations in Bullet Train applications (e.g. `created_by`, etc.)
|
3
|
+
# but it gets pluralized incorrectly as "_bies". This should fix both Super Scaffolding for those fields and
|
4
|
+
# the resulting invocations of the scope validator that are generated by Super Scaffolding.
|
5
|
+
inflect.irregular "by", "bys"
|
6
|
+
end
|
data/docs/super-scaffolding.md
CHANGED
@@ -108,6 +108,11 @@ rake db:migrate
|
|
108
108
|
|
109
109
|
As you can see, when we're using `crud-field`, we don't need to supply the chain of ownership back to `Team`.
|
110
110
|
|
111
|
+
If you want to scaffold a new field to use for read-only purposes, add the following option to omit the field from the form and all other files that apply:
|
112
|
+
```
|
113
|
+
bin/super-scaffold crud-field Project description:trix_editor{readonly}
|
114
|
+
```
|
115
|
+
|
111
116
|
### 4. Adding Option Fields with Fixed, Translatable Options
|
112
117
|
|
113
118
|
Continuing with the earlier example, let's address the following new requirement:
|
@@ -92,7 +92,16 @@ module BulletTrain
|
|
92
92
|
result[:absolute_path] = class_path || partial_path || locale_path || file_path
|
93
93
|
|
94
94
|
if result[:absolute_path]
|
95
|
-
|
95
|
+
if result[:absolute_path].include?("devise")
|
96
|
+
# The annotated path for devise doesn't actually return an absolute path,
|
97
|
+
# so we have to do some extra steps to get the correct string.
|
98
|
+
relative_partial_path = result[:absolute_path]
|
99
|
+
# If it's a devise partial, it should be coming from bullet_train-base
|
100
|
+
base_path = "#{`bundle show bullet_train`.chomp}/" + relative_partial_path
|
101
|
+
result[:absolute_path] = base_path
|
102
|
+
else
|
103
|
+
base_path = "bullet_train" + result[:absolute_path].partition("/bullet_train").last
|
104
|
+
end
|
96
105
|
|
97
106
|
# Try to calculate which package the file is from, and what it's path is within that project.
|
98
107
|
["app", "config", "lib"].each do |directory|
|
@@ -127,7 +136,7 @@ module BulletTrain
|
|
127
136
|
|
128
137
|
def partial_path
|
129
138
|
annotated_path = ApplicationController.render(template: "bullet_train/partial_resolver", layout: nil, assigns: {needle: @needle}).lines[1].chomp
|
130
|
-
if annotated_path =~ /<!-- BEGIN (
|
139
|
+
if annotated_path =~ /<!-- BEGIN (\S*) -->/
|
131
140
|
$1
|
132
141
|
else
|
133
142
|
raise "It looks like `config.action_view.annotate_rendered_view_with_filenames` isn't enabled?"
|
data/lib/bullet_train/version.rb
CHANGED
@@ -79,64 +79,64 @@ namespace :bullet_train do
|
|
79
79
|
# TODO Extract this into a YAML file.
|
80
80
|
framework_packages = {
|
81
81
|
"bullet_train" => {
|
82
|
-
git: "
|
82
|
+
git: "bullet-train-co/bullet_train-base",
|
83
83
|
npm: "@bullet-train/bullet-train"
|
84
84
|
},
|
85
85
|
"bullet_train-api" => {
|
86
|
-
git: "
|
86
|
+
git: "bullet-train-co/bullet_train-api",
|
87
87
|
},
|
88
88
|
"bullet_train-fields" => {
|
89
|
-
git: "
|
89
|
+
git: "bullet-train-co/bullet_train-fields",
|
90
90
|
npm: "@bullet-train/fields"
|
91
91
|
},
|
92
92
|
"bullet_train-has_uuid" => {
|
93
|
-
git: "
|
93
|
+
git: "bullet-train-co/bullet_train-has_uuid",
|
94
94
|
},
|
95
95
|
"bullet_train-incoming_webhooks" => {
|
96
|
-
git: "
|
96
|
+
git: "bullet-train-co/bullet_train-incoming_webhooks",
|
97
97
|
},
|
98
98
|
"bullet_train-integrations" => {
|
99
|
-
git: "
|
99
|
+
git: "bullet-train-co/bullet_train-integrations",
|
100
100
|
},
|
101
101
|
"bullet_train-integrations-stripe" => {
|
102
|
-
git: "
|
102
|
+
git: "bullet-train-co/bullet_train-base-integrations-stripe",
|
103
103
|
},
|
104
104
|
"bullet_train-obfuscates_id" => {
|
105
|
-
git: "
|
105
|
+
git: "bullet-train-co/bullet_train-obfuscates_id",
|
106
106
|
},
|
107
107
|
"bullet_train-outgoing_webhooks" => {
|
108
|
-
git: "
|
108
|
+
git: "bullet-train-co/bullet_train-outgoing_webhooks",
|
109
109
|
},
|
110
110
|
"bullet_train-outgoing_webhooks-core" => {
|
111
|
-
git: "
|
111
|
+
git: "bullet-train-co/bullet_train-outgoing_webhooks-core",
|
112
112
|
},
|
113
113
|
"bullet_train-scope_questions" => {
|
114
|
-
git: "
|
114
|
+
git: "bullet-train-co/bullet_train-scope_questions",
|
115
115
|
},
|
116
116
|
"bullet_train-scope_validator" => {
|
117
|
-
git: "
|
117
|
+
git: "bullet-train-co/bullet_train-scope_validator",
|
118
118
|
},
|
119
119
|
"bullet_train-sortable" => {
|
120
|
-
git: "
|
120
|
+
git: "bullet-train-co/bullet_train-sortable",
|
121
121
|
npm: "@bullet-train/bullet-train-sortable"
|
122
122
|
},
|
123
123
|
"bullet_train-super_scaffolding" => {
|
124
|
-
git: "
|
124
|
+
git: "bullet-train-co/bullet_train-super_scaffolding",
|
125
125
|
},
|
126
126
|
"bullet_train-super_load_and_authorize_resource" => {
|
127
|
-
git: "
|
127
|
+
git: "bullet-train-co/bullet_train-super_load_and_authorize_resource",
|
128
128
|
},
|
129
129
|
"bullet_train-themes" => {
|
130
|
-
git: "
|
130
|
+
git: "bullet-train-co/bullet_train-themes",
|
131
131
|
},
|
132
132
|
"bullet_train-themes-base" => {
|
133
|
-
git: "
|
133
|
+
git: "bullet-train-co/bullet_train-themes-base",
|
134
134
|
},
|
135
135
|
"bullet_train-themes-light" => {
|
136
|
-
git: "
|
136
|
+
git: "bullet-train-co/bullet_train-themes-light",
|
137
137
|
},
|
138
138
|
"bullet_train-themes-tailwind_css" => {
|
139
|
-
git: "
|
139
|
+
git: "bullet-train-co/bullet_train-themes-tailwind_css",
|
140
140
|
},
|
141
141
|
}
|
142
142
|
|
@@ -169,7 +169,7 @@ namespace :bullet_train do
|
|
169
169
|
# TODO We should check whether the local copy is in a clean state, and if it is, check out `main`.
|
170
170
|
# TODO We should also pull `origin/main` to make sure we're on the most up-to-date version of the package.
|
171
171
|
else
|
172
|
-
stream "git clone
|
172
|
+
stream "git clone git@github.com:#{details[:git]}.git local/#{gem}"
|
173
173
|
end
|
174
174
|
|
175
175
|
# TODO Ask them whether they want to check out a specific branch to work on. (List available remote branches.)
|
@@ -210,12 +210,12 @@ namespace :bullet_train do
|
|
210
210
|
puts ""
|
211
211
|
if details[:npm]
|
212
212
|
puts "This package also has an npm package, so we'll link that up as well.".blue
|
213
|
-
stream "cd local/#{gem} && yarn install &&
|
213
|
+
stream "cd local/#{gem} && yarn install && npx yalc link && cd ../.. && npx yalc link \"#{details[:npm]}\""
|
214
214
|
|
215
215
|
puts ""
|
216
216
|
puts "And now we're going to watch for any changes you make to the JavaScript and recompile as we go.".blue
|
217
217
|
puts "When you're done, you can hit <Control + C> and we'll clean all off this up.".blue
|
218
|
-
stream "cd local/#{gem} && yarn
|
218
|
+
stream "cd local/#{gem} && yarn watch"
|
219
219
|
else
|
220
220
|
puts "This package has no npm package, so we'll just hang out here and do nothing. However, when you hit <Enter> here, we'll start the process of cleaning all of this up.".blue
|
221
221
|
$stdin.gets
|
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.0.
|
4
|
+
version: 1.0.64
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -193,7 +193,7 @@ dependencies:
|
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
196
|
+
name: awesome_print
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
199
|
- - ">="
|
@@ -207,7 +207,7 @@ dependencies:
|
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
|
-
name:
|
210
|
+
name: microscope
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
213
|
- - ">="
|
@@ -221,7 +221,7 @@ dependencies:
|
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
|
-
name:
|
224
|
+
name: http_accept_language
|
225
225
|
requirement: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
227
|
- - ">="
|
@@ -235,21 +235,21 @@ dependencies:
|
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
|
-
name:
|
238
|
+
name: cable_ready
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
|
-
- -
|
241
|
+
- - '='
|
242
242
|
- !ruby/object:Gem::Version
|
243
|
-
version:
|
243
|
+
version: 5.0.0.pre9
|
244
244
|
type: :runtime
|
245
245
|
prerelease: false
|
246
246
|
version_requirements: !ruby/object:Gem::Requirement
|
247
247
|
requirements:
|
248
|
-
- -
|
248
|
+
- - '='
|
249
249
|
- !ruby/object:Gem::Version
|
250
|
-
version:
|
250
|
+
version: 5.0.0.pre9
|
251
251
|
- !ruby/object:Gem::Dependency
|
252
|
-
name:
|
252
|
+
name: hiredis
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
254
254
|
requirements:
|
255
255
|
- - ">="
|
@@ -263,21 +263,21 @@ dependencies:
|
|
263
263
|
- !ruby/object:Gem::Version
|
264
264
|
version: '0'
|
265
265
|
- !ruby/object:Gem::Dependency
|
266
|
-
name:
|
266
|
+
name: nice_partials
|
267
267
|
requirement: !ruby/object:Gem::Requirement
|
268
268
|
requirements:
|
269
|
-
- -
|
269
|
+
- - "~>"
|
270
270
|
- !ruby/object:Gem::Version
|
271
|
-
version:
|
271
|
+
version: '0.1'
|
272
272
|
type: :runtime
|
273
273
|
prerelease: false
|
274
274
|
version_requirements: !ruby/object:Gem::Requirement
|
275
275
|
requirements:
|
276
|
-
- -
|
276
|
+
- - "~>"
|
277
277
|
- !ruby/object:Gem::Version
|
278
|
-
version:
|
278
|
+
version: '0.1'
|
279
279
|
- !ruby/object:Gem::Dependency
|
280
|
-
name:
|
280
|
+
name: premailer-rails
|
281
281
|
requirement: !ruby/object:Gem::Requirement
|
282
282
|
requirements:
|
283
283
|
- - ">="
|
@@ -291,21 +291,21 @@ dependencies:
|
|
291
291
|
- !ruby/object:Gem::Version
|
292
292
|
version: '0'
|
293
293
|
- !ruby/object:Gem::Dependency
|
294
|
-
name:
|
294
|
+
name: figaro
|
295
295
|
requirement: !ruby/object:Gem::Requirement
|
296
296
|
requirements:
|
297
|
-
- - "
|
297
|
+
- - ">="
|
298
298
|
- !ruby/object:Gem::Version
|
299
|
-
version: '0
|
299
|
+
version: '0'
|
300
300
|
type: :runtime
|
301
301
|
prerelease: false
|
302
302
|
version_requirements: !ruby/object:Gem::Requirement
|
303
303
|
requirements:
|
304
|
-
- - "
|
304
|
+
- - ">="
|
305
305
|
- !ruby/object:Gem::Version
|
306
|
-
version: '0
|
306
|
+
version: '0'
|
307
307
|
- !ruby/object:Gem::Dependency
|
308
|
-
name:
|
308
|
+
name: valid_email
|
309
309
|
requirement: !ruby/object:Gem::Requirement
|
310
310
|
requirements:
|
311
311
|
- - ">="
|
@@ -319,7 +319,7 @@ dependencies:
|
|
319
319
|
- !ruby/object:Gem::Version
|
320
320
|
version: '0'
|
321
321
|
- !ruby/object:Gem::Dependency
|
322
|
-
name:
|
322
|
+
name: commonmarker
|
323
323
|
requirement: !ruby/object:Gem::Requirement
|
324
324
|
requirements:
|
325
325
|
- - ">="
|
@@ -333,7 +333,7 @@ dependencies:
|
|
333
333
|
- !ruby/object:Gem::Version
|
334
334
|
version: '0'
|
335
335
|
- !ruby/object:Gem::Dependency
|
336
|
-
name:
|
336
|
+
name: extended_email_reply_parser
|
337
337
|
requirement: !ruby/object:Gem::Requirement
|
338
338
|
requirements:
|
339
339
|
- - ">="
|
@@ -347,13 +347,13 @@ dependencies:
|
|
347
347
|
- !ruby/object:Gem::Version
|
348
348
|
version: '0'
|
349
349
|
- !ruby/object:Gem::Dependency
|
350
|
-
name:
|
350
|
+
name: pry
|
351
351
|
requirement: !ruby/object:Gem::Requirement
|
352
352
|
requirements:
|
353
353
|
- - ">="
|
354
354
|
- !ruby/object:Gem::Version
|
355
355
|
version: '0'
|
356
|
-
type: :
|
356
|
+
type: :development
|
357
357
|
prerelease: false
|
358
358
|
version_requirements: !ruby/object:Gem::Requirement
|
359
359
|
requirements:
|
@@ -361,13 +361,13 @@ dependencies:
|
|
361
361
|
- !ruby/object:Gem::Version
|
362
362
|
version: '0'
|
363
363
|
- !ruby/object:Gem::Dependency
|
364
|
-
name:
|
364
|
+
name: pry-stack_explorer
|
365
365
|
requirement: !ruby/object:Gem::Requirement
|
366
366
|
requirements:
|
367
367
|
- - ">="
|
368
368
|
- !ruby/object:Gem::Version
|
369
369
|
version: '0'
|
370
|
-
type: :
|
370
|
+
type: :development
|
371
371
|
prerelease: false
|
372
372
|
version_requirements: !ruby/object:Gem::Requirement
|
373
373
|
requirements:
|
@@ -388,6 +388,20 @@ dependencies:
|
|
388
388
|
- - ">="
|
389
389
|
- !ruby/object:Gem::Version
|
390
390
|
version: '0'
|
391
|
+
- !ruby/object:Gem::Dependency
|
392
|
+
name: pagy
|
393
|
+
requirement: !ruby/object:Gem::Requirement
|
394
|
+
requirements:
|
395
|
+
- - ">="
|
396
|
+
- !ruby/object:Gem::Version
|
397
|
+
version: '0'
|
398
|
+
type: :runtime
|
399
|
+
prerelease: false
|
400
|
+
version_requirements: !ruby/object:Gem::Requirement
|
401
|
+
requirements:
|
402
|
+
- - ">="
|
403
|
+
- !ruby/object:Gem::Version
|
404
|
+
version: '0'
|
391
405
|
description: Bullet Train
|
392
406
|
email:
|
393
407
|
- andrew.culver@gmail.com
|
@@ -434,6 +448,7 @@ files:
|
|
434
448
|
- app/helpers/account/users_helper.rb
|
435
449
|
- app/helpers/attributes_helper.rb
|
436
450
|
- app/helpers/base_helper.rb
|
451
|
+
- app/helpers/concerns/helpers/base.rb
|
437
452
|
- app/helpers/email_helper.rb
|
438
453
|
- app/helpers/images_helper.rb
|
439
454
|
- app/helpers/invitation_only_helper.rb
|
@@ -522,6 +537,7 @@ files:
|
|
522
537
|
- app/views/public/home/docs.html.erb
|
523
538
|
- app/views/user_mailer/invited.html.erb
|
524
539
|
- app/views/user_mailer/welcome.html.erb
|
540
|
+
- config/initializers/concerns/inflections_base.rb
|
525
541
|
- config/locales/en/base.yml
|
526
542
|
- config/locales/en/devise.en.yml
|
527
543
|
- config/locales/en/doorkeeper.en.yml
|