bullet_train-super_scaffolding 1.2.21 → 1.2.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/api/v1/open_api/scaffolding/absolutely_abstract/creative_concepts/_paths.yaml.erb +93 -0
- data/app/views/api/v1/scaffolding/absolutely_abstract/creative_concepts/_creative_concept.json.jbuilder +1 -0
- data/lib/bullet_train/super_scaffolding/version.rb +1 -1
- data/lib/scaffolding/routes_file_manipulator.rb +3 -2
- data/lib/scaffolding/transformer.rb +18 -0
- metadata +4 -4
- data/app/views/api/v1/open_api/scaffolding/completely_concrete/tangible_things/_components.yaml.erb +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ae4d41c90779494af4d4427d5276c90caca051037eafc0efd2257640a4d620a
|
4
|
+
data.tar.gz: adc894551f63c86d432fc9c1bffda8accd68e2392a7f31c3b6ff6a7d51e724bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b688d18806f6a0d91cd1f239ac1826d2c772f88cb0dee70e9a7eca16deae595a9848fe03c31de7c970c1b3272ba35acda00c22a5318bbfee6434b278b75a2b80
|
7
|
+
data.tar.gz: 3ef0799686ac18e00730eb174856d4152ed0b73d9dab9629c8b2d9546682347b1d5fb285b656b22fc37ca361c2640bc2a218157aec62fc349b993f58554fcd97
|
data/app/views/api/v1/open_api/scaffolding/absolutely_abstract/creative_concepts/_paths.yaml.erb
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
/teams/{team_id}/scaffolding/absolutely_abstract/creative_concepts:
|
2
|
+
get:
|
3
|
+
tags:
|
4
|
+
- "Scaffolding/Absolutely Abstract/Creative Concept"
|
5
|
+
summary: "List Creative Concept"
|
6
|
+
operationId: listScaffoldingAbsolutelyAbstractCreativeConcepts
|
7
|
+
parameters:
|
8
|
+
- name: team_id
|
9
|
+
in: path
|
10
|
+
required: true
|
11
|
+
schema:
|
12
|
+
type: string
|
13
|
+
responses:
|
14
|
+
"404":
|
15
|
+
description: "Not Found"
|
16
|
+
"200":
|
17
|
+
description: "OK"
|
18
|
+
content:
|
19
|
+
application/json:
|
20
|
+
schema:
|
21
|
+
type: object
|
22
|
+
properties:
|
23
|
+
data:
|
24
|
+
type: array
|
25
|
+
items:
|
26
|
+
$ref: "#/components/schemas/ScaffoldingAbsolutelyAbstractCreativeConceptAttributes"
|
27
|
+
has_more:
|
28
|
+
type: boolean
|
29
|
+
post:
|
30
|
+
tags:
|
31
|
+
- "Scaffolding/Absolutely Abstract/Creative Concept"
|
32
|
+
summary: "Create Creative Concept"
|
33
|
+
operationId: createScaffoldingAbsolutelyAbstractCreativeConcepts
|
34
|
+
parameters:
|
35
|
+
- name: team_id
|
36
|
+
in: path
|
37
|
+
required: true
|
38
|
+
schema:
|
39
|
+
type: string
|
40
|
+
responses:
|
41
|
+
"404":
|
42
|
+
description: "Not Found"
|
43
|
+
"201":
|
44
|
+
description: "Created"
|
45
|
+
content:
|
46
|
+
application/json:
|
47
|
+
schema:
|
48
|
+
$ref: "#/components/schemas/ScaffoldingAbsolutelyAbstractCreativeConceptParameters"
|
49
|
+
/scaffolding/absolutely_abstract/creative_concepts/{id}:
|
50
|
+
get:
|
51
|
+
tags:
|
52
|
+
- "Scaffolding/Absolutely Abstract/Creative Concept"
|
53
|
+
summary: "Fetch Creative Concept"
|
54
|
+
operationId: getScaffoldingAbsolutelyAbstractCreativeConcepts
|
55
|
+
parameters:
|
56
|
+
- $ref: "#/components/parameters/id"
|
57
|
+
responses:
|
58
|
+
"404":
|
59
|
+
description: "Not Found"
|
60
|
+
"200":
|
61
|
+
description: "OK"
|
62
|
+
content:
|
63
|
+
application/json:
|
64
|
+
schema:
|
65
|
+
$ref: "#/components/schemas/ScaffoldingAbsolutelyAbstractCreativeConceptAttributes"
|
66
|
+
put:
|
67
|
+
tags:
|
68
|
+
- "Scaffolding/Absolutely Abstract/Creative Concept"
|
69
|
+
summary: "Update Creative Concept"
|
70
|
+
operationId: updateScaffoldingAbsolutelyAbstractCreativeConcepts
|
71
|
+
parameters:
|
72
|
+
- $ref: "#/components/parameters/id"
|
73
|
+
responses:
|
74
|
+
"404":
|
75
|
+
description: "Not Found"
|
76
|
+
"200":
|
77
|
+
description: "OK"
|
78
|
+
content:
|
79
|
+
application/json:
|
80
|
+
schema:
|
81
|
+
$ref: "#/components/schemas/ScaffoldingAbsolutelyAbstractCreativeConceptParameters"
|
82
|
+
delete:
|
83
|
+
tags:
|
84
|
+
- "Scaffolding/Absolutely Abstract/Creative Concept"
|
85
|
+
summary: "Remove Creative Concept"
|
86
|
+
operationId: removeScaffoldingAbsolutelyAbstractCreativeConcepts
|
87
|
+
parameters:
|
88
|
+
- $ref: "#/components/parameters/id"
|
89
|
+
responses:
|
90
|
+
"404":
|
91
|
+
description: "Not Found"
|
92
|
+
"200":
|
93
|
+
description: "OK"
|
@@ -398,10 +398,11 @@ class Scaffolding::RoutesFileManipulator
|
|
398
398
|
existing_concerns.map! { |e| e.tr(":", "").tr("\"", "").squish&.to_sym }
|
399
399
|
existing_concerns.filter! { |e| e.present? }
|
400
400
|
existing_concerns << concern
|
401
|
+
existing_concerns.uniq!
|
401
402
|
if line.include?("concerns:")
|
402
403
|
lines[line_number].gsub!(/concerns: \[(.*)\]/, "concerns: [#{existing_concerns.map { |e| ":#{e}" }.join(", ")}]")
|
403
|
-
elsif line.ends_with?(" do")
|
404
|
-
lines[line_number].gsub!(/ do$/, " concerns: [#{existing_concerns.map { |e| ":#{e}" }.join(", ")}] do")
|
404
|
+
elsif line.squish.ends_with?(" do")
|
405
|
+
lines[line_number].gsub!(/ do$/, ", concerns: [#{existing_concerns.map { |e| ":#{e}" }.join(", ")}] do")
|
405
406
|
else
|
406
407
|
lines[line_number].gsub!(/resources :(.*)$/, "resources :\\1, concerns: [#{existing_concerns.map { |e| ":#{e}" }.join(", ")}]")
|
407
408
|
end
|
@@ -668,6 +668,18 @@ class Scaffolding::Transformer
|
|
668
668
|
type = parts.join(":")
|
669
669
|
boolean_buttons = type == "boolean"
|
670
670
|
|
671
|
+
if first_table_cell && ["trix_editor", "ckeditor", "text_area"].include?(type)
|
672
|
+
puts ""
|
673
|
+
puts "The first attribute of your model cannot be any of the following types:".red
|
674
|
+
puts "1. trix_editor"
|
675
|
+
puts "2. ckeditor"
|
676
|
+
puts "3. text_area"
|
677
|
+
puts ""
|
678
|
+
puts "Please ensure you have another attribute type as the first attribute for your model and try again."
|
679
|
+
|
680
|
+
exit
|
681
|
+
end
|
682
|
+
|
671
683
|
# extract any options they passed in with the field.
|
672
684
|
# will extract options declared with either [] or {}.
|
673
685
|
type, attribute_options = type.scan(/^(.*){(.*)}/).first || type
|
@@ -1523,6 +1535,12 @@ class Scaffolding::Transformer
|
|
1523
1535
|
unless cli_options["skip-model"]
|
1524
1536
|
scaffold_add_line_to_file("./app/models/scaffolding/completely_concrete/tangible_thing.rb", "def collection\n absolutely_abstract_creative_concept.completely_concrete_tangible_things\nend\n\n", METHODS_HOOK, prepend: true)
|
1525
1537
|
scaffold_add_line_to_file("./app/models/scaffolding/completely_concrete/tangible_thing.rb", "include Sortable\n", CONCERNS_HOOK, prepend: true)
|
1538
|
+
|
1539
|
+
migration = Dir.glob("db/migrate/*").last
|
1540
|
+
migration_lines = File.open(migration).readlines
|
1541
|
+
parent_line_idx = Scaffolding::FileManipulator.find(migration_lines, "t.references :#{parent.downcase}")
|
1542
|
+
new_lines = Scaffolding::BlockManipulator.insert_line("t.integer :sort_order", parent_line_idx, migration_lines, false)
|
1543
|
+
Scaffolding::FileManipulator.write(migration, new_lines)
|
1526
1544
|
end
|
1527
1545
|
|
1528
1546
|
unless cli_options["skip-table"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-super_scaffolding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.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-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -125,7 +125,7 @@ files:
|
|
125
125
|
- app/views/account/scaffolding/completely_concrete/tangible_things/index.html.erb
|
126
126
|
- app/views/account/scaffolding/completely_concrete/tangible_things/new.html.erb
|
127
127
|
- app/views/account/scaffolding/completely_concrete/tangible_things/show.html.erb
|
128
|
-
- app/views/api/v1/open_api/scaffolding/
|
128
|
+
- app/views/api/v1/open_api/scaffolding/absolutely_abstract/creative_concepts/_paths.yaml.erb
|
129
129
|
- app/views/api/v1/open_api/scaffolding/completely_concrete/tangible_things/_paths.yaml.erb
|
130
130
|
- app/views/api/v1/scaffolding/absolutely_abstract/creative_concepts/_creative_concept.json.jbuilder
|
131
131
|
- app/views/api/v1/scaffolding/absolutely_abstract/creative_concepts/index.json.jbuilder
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
- !ruby/object:Gem::Version
|
193
193
|
version: '0'
|
194
194
|
requirements: []
|
195
|
-
rubygems_version: 3.
|
195
|
+
rubygems_version: 3.3.7
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: Bullet Train Super Scaffolding
|
data/app/views/api/v1/open_api/scaffolding/completely_concrete/tangible_things/_components.yaml.erb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
Scaffolding::CompletelyConcrete::TangibleThing::Attributes:
|
2
|
-
type: object
|
3
|
-
properties:
|
4
|
-
<%= attribute :id %>
|
5
|
-
<%= attribute :absolutely_abstract_creative_concept_id %>
|
6
|
-
<%# 🚅 skip this section when scaffolding. %>
|
7
|
-
<%= attribute :text_field_value %>
|
8
|
-
<%= attribute :button_value %>
|
9
|
-
<%= attribute :boolean_button_value %>
|
10
|
-
<%= attribute :cloudinary_image_value %>
|
11
|
-
<%= attribute :date_field_value %>
|
12
|
-
<%= attribute :email_field_value %>
|
13
|
-
<%= attribute :file_field_value %>
|
14
|
-
<%= attribute :password_field_value %>
|
15
|
-
<%= attribute :phone_field_value %>
|
16
|
-
<%= attribute :option_value %>
|
17
|
-
<%= attribute :multiple_option_values %>
|
18
|
-
<%= attribute :super_select_value %>
|
19
|
-
<%= attribute :text_area_value %>
|
20
|
-
<%= attribute :action_text_value %>
|
21
|
-
<%# 🚅 stop any skipping we're doing now. %>
|
22
|
-
<%# 🚅 super scaffolding will insert new attributes above this line. %>
|
23
|
-
<%= attribute :created_at %>
|
24
|
-
<%= attribute :updated_at %>
|
25
|
-
|
26
|
-
Scaffolding::CompletelyConcrete::TangibleThing::Parameters:
|
27
|
-
type: object
|
28
|
-
properties:
|
29
|
-
<%# 🚅 skip this section when scaffolding. %>
|
30
|
-
<%= parameter :text_field_value %>
|
31
|
-
<%# 🚅 stop any skipping we're doing now. %>
|
32
|
-
<%# 🚅 super scaffolding will insert new parameter above this line. %>
|