bullet_train-super_scaffolding 1.1.1 → 1.1.4

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: 50a466be7f9a4dfe155fc7cf7dfab2b1bda99677dd90f4f263ad3a4e8cf62689
4
- data.tar.gz: 195aebbb30ba1ad1ae2251edaa4f8a0867fea4d0b00eacbcaaf8e17fa9005a53
3
+ metadata.gz: f88ca373c6c57904a106dcacb49ce986bfa7886cda322b333014246f682aaf6b
4
+ data.tar.gz: b04380241e8cecc6e5ab834d9436b9e9d8ca893192b533095487c3348a71ba78
5
5
  SHA512:
6
- metadata.gz: 1375e436763d2afa346376453aa9b751225d8dd3861d426764f63b7248a1957e87be059e8bf3f98e1139c187226dee02d85c1e1ccd9c0a4977cfc9875e5d2306
7
- data.tar.gz: c15501096af6bf2d5090c441c4eaaf886ee5c11436f3ee822cabdf6bebab9f88d3e3ba1734258e4455d0823714fb7ce00e280db5a7f2454c7bb32b88f6223c3f
6
+ metadata.gz: fe032c66808db7f976dee3efac3ec10a4251766b265d3e36b37f5f78318c687a81a635ea3b60c39709b00e8a56e8aa6ef377c246a6115c5492c4bd798dcfc1e1
7
+ data.tar.gz: d2483e060165cadbbda4d2324b45e32575eaeb80598fd6f3e8f7b2383f1735962473e2f4eba769e012b975456bd46873b06a5de2743da8ea75ee52dfefffca49
@@ -0,0 +1,29 @@
1
+ openapi: 3.1.0
2
+ info:
3
+ title: Bullet Train API
4
+ description: |
5
+ The baseline API of a new Bullet Train application.
6
+ license:
7
+ name: MIT
8
+ url: https://opensource.org/licenses/MIT
9
+ version: "<%= @version.upcase %>"
10
+ servers:
11
+ - url: <%= ENV["BASE_URL"] %>/api/<%= @version %>
12
+ components:
13
+ schemas:
14
+ <%= components_for Team %>
15
+ <%= components_for User %>
16
+ <%= components_for Scaffolding::CompletelyConcrete::TangibleThing unless scaffolding_things_disabled? %>
17
+ <%# 🚅 super scaffolding will insert new components above this line. %>
18
+ parameters:
19
+ id:
20
+ name: id
21
+ in: path
22
+ required: true
23
+ schema:
24
+ type: string
25
+ paths:
26
+ <%= paths_for Team %>
27
+ <%= paths_for User %>
28
+ <%= paths_for Scaffolding::CompletelyConcrete::TangibleThing unless scaffolding_things_disabled? %>
29
+ <%# 🚅 super scaffolding will insert new paths above this line. %>
@@ -0,0 +1,32 @@
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. %>
@@ -0,0 +1,93 @@
1
+ /scaffolding/absolutely_abstract/creative_concepts/{absolutely_abstract_creative_concepts_id}/completely_concrete/tangible_things:
2
+ get:
3
+ tags:
4
+ - "Scaffolding/Completely Concrete/Tangible Things"
5
+ summary: "List Tangible Things"
6
+ operationId: listScaffoldingCompletelyConcreteTangibleThings
7
+ parameters:
8
+ - name: absolutely_abstract_creative_concepts_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/Scaffolding::CompletelyConcrete::TangibleThing::Attributes"
27
+ has_more:
28
+ type: boolean
29
+ post:
30
+ tags:
31
+ - "Scaffolding/Completely Concrete/Tangible Things"
32
+ summary: "Create Tangible Thing"
33
+ operationId: createScaffoldingCompletelyConcreteTangibleThings
34
+ parameters:
35
+ - name: absolutely_abstract_creative_concepts_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/Scaffolding::CompletelyConcrete::TangibleThing::Attributes"
49
+ /scaffolding/completely_concrete/tangible_things/{id}:
50
+ get:
51
+ tags:
52
+ - "Scaffolding/Completely Concrete/Tangible Things"
53
+ summary: "Fetch Tangible Thing"
54
+ operationId: getScaffoldingCompletelyConcreteTangibleThings
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/Scaffolding::CompletelyConcrete::TangibleThing::Attributes"
66
+ put:
67
+ tags:
68
+ - "Scaffolding/Completely Concrete/Tangible Things"
69
+ summary: "Update Tangible Thing"
70
+ operationId: updateScaffoldingCompletelyConcreteTangibleThings
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/Scaffolding::CompletelyConcrete::TangibleThing::Parameters"
82
+ delete:
83
+ tags:
84
+ - "Scaffolding/Completely Concrete/Tangible Things"
85
+ summary: "Remove Tangible Thing"
86
+ operationId: removeScaffoldingCompletelyConcreteTangibleThings
87
+ parameters:
88
+ - $ref: "#/components/parameters/id"
89
+ responses:
90
+ "404":
91
+ description: "Not Found"
92
+ "200":
93
+ description: "OK"
@@ -17,7 +17,7 @@ en:
17
17
  destroy: Delete
18
18
  confirmations:
19
19
  # TODO customize for your use-case.
20
- destroy: Are you sure you want to remove %{tangible_thing_name}? This will also remove it's associated data. This can't be undone.
20
+ destroy: Are you sure you want to remove %{tangible_thing_name}? This will also remove any child resources and can't be undone.
21
21
  fields: &fields
22
22
  id:
23
23
  heading: Tangible Thing ID
data/config/routes.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  Rails.application.routes.draw do
2
2
  # See `config/routes.rb` for details.
3
- collection_actions = [:index, :new, :create] # standard:disable Lint/UselessAssignment
3
+ collection_actions = [:index, :new, :create]
4
4
  extending = {only: []}
5
5
 
6
6
  namespace :api do
@@ -60,12 +60,12 @@ module BulletTrain
60
60
  puts "but after you hit enter I'll open a page where you can view other icon options."
61
61
  puts "When you find one you like, hover your mouse over it and then come back here and"
62
62
  puts "and enter the name of the icon you want to use."
63
- response = STDIN.gets.chomp
63
+ response = $stdin.gets.chomp
64
64
  TerminalCommands.open_file_or_link("http://light.pinsupreme.com/icon_fonts_themefy.html")
65
65
  puts ""
66
66
  puts "Did you find an icon you wanted to use? Enter the name here or hit enter to just"
67
67
  puts "use the dollar symbol:"
68
- icon_name = STDIN.gets.chomp
68
+ icon_name = $stdin.gets.chomp
69
69
  puts ""
70
70
  unless icon_name.length > 0 || icon_name.downcase == "y"
71
71
  icon_name = "icon-puzzle"
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module SuperScaffolding
3
- VERSION = "1.1.1"
3
+ VERSION = "1.1.4"
4
4
  end
5
5
  end
@@ -92,6 +92,18 @@ class Scaffolding::ClassNamesTransformer
92
92
  parent.pluralize
93
93
  when "Scaffolding::CompletelyConcrete::TangibleThings"
94
94
  child.pluralize
95
+ when "ScaffoldingAbsolutelyAbstractCreativeConcepts"
96
+ parent.pluralize.gsub("::", "")
97
+ when "ScaffoldingCompletelyConcreteTangibleThings"
98
+ child.pluralize.gsub("::", "")
99
+ when "Scaffolding Absolutely Abstract Creative Concepts"
100
+ parent.pluralize.titlecase.tr("/", " ")
101
+ when "Scaffolding Completely Concrete Tangible Things"
102
+ child.pluralize.titlecase.tr("/", " ")
103
+ when "Scaffolding/Absolutely Abstract/Creative Concepts"
104
+ parent.pluralize.titlecase
105
+ when "Scaffolding/Completely Concrete/Tangible Things"
106
+ child.pluralize.titlecase
95
107
  when "scaffolding/absolutely_abstract/creative_concepts"
96
108
  parent.underscore.pluralize
97
109
  when "scaffolding/completely_concrete/tangible_things"
@@ -113,6 +125,18 @@ class Scaffolding::ClassNamesTransformer
113
125
  parent
114
126
  when "Scaffolding::CompletelyConcrete::TangibleThing"
115
127
  child
128
+ when "ScaffoldingAbsolutelyAbstractCreativeConcept"
129
+ parent.gsub("::", "")
130
+ when "ScaffoldingCompletelyConcreteTangibleThing"
131
+ child.gsub("::", "")
132
+ when "Scaffolding Absolutely Abstract Creative Concept"
133
+ parent.titlecase.tr("/", " ")
134
+ when "Scaffolding Completely Concrete Tangible Thing"
135
+ child.titlecase.tr("/", " ")
136
+ when "Scaffolding/Absolutely Abstract/Creative Concept"
137
+ parent.titlecase
138
+ when "Scaffolding/Completely Concrete/Tangible Thing"
139
+ child.titlecase
116
140
  when "scaffolding/absolutely_abstract/creative_concept"
117
141
  parent.underscore
118
142
  when "scaffolding/completely_concrete/tangible_thing"
@@ -72,6 +72,12 @@ class Scaffolding::Transformer
72
72
  # full class name plural.
73
73
  "Scaffolding::AbsolutelyAbstract::CreativeConcepts",
74
74
  "Scaffolding::CompletelyConcrete::TangibleThings",
75
+ "ScaffoldingAbsolutelyAbstractCreativeConcepts",
76
+ "ScaffoldingCompletelyConcreteTangibleThings",
77
+ "Scaffolding Absolutely Abstract Creative Concepts",
78
+ "Scaffolding Completely Concrete Tangible Things",
79
+ "Scaffolding/Absolutely Abstract/Creative Concepts",
80
+ "Scaffolding/Completely Concrete/Tangible Things",
75
81
  "scaffolding/absolutely_abstract/creative_concepts",
76
82
  "scaffolding/completely_concrete/tangible_things",
77
83
  "scaffolding/completely_concrete/_tangible_things",
@@ -83,6 +89,12 @@ class Scaffolding::Transformer
83
89
  # full class name singular.
84
90
  "Scaffolding::AbsolutelyAbstract::CreativeConcept",
85
91
  "Scaffolding::CompletelyConcrete::TangibleThing",
92
+ "ScaffoldingAbsolutelyAbstractCreativeConcept",
93
+ "ScaffoldingCompletelyConcreteTangibleThing",
94
+ "Scaffolding Absolutely Abstract Creative Concept",
95
+ "Scaffolding Completely Concrete Tangible Thing",
96
+ "Scaffolding/Absolutely Abstract/Creative Concept",
97
+ "Scaffolding/Completely Concrete/Tangible Thing",
86
98
  "scaffolding/absolutely_abstract/creative_concept",
87
99
  "scaffolding/completely_concrete/tangible_thing",
88
100
  "scaffolding_absolutely_abstract_creative_concept",
@@ -1069,6 +1081,26 @@ class Scaffolding::Transformer
1069
1081
  end
1070
1082
  end
1071
1083
 
1084
+ #
1085
+ # OPENAPI DOCUMENTS
1086
+ #
1087
+
1088
+ unless cli_options["skip-api"]
1089
+ scaffold_add_line_to_file(
1090
+ "./app/views/api/v1/open_api/scaffolding/completely_concrete/tangible_things/_components.yaml.erb",
1091
+ "<%= attribute :#{name} %>",
1092
+ "<%# 🚅 super scaffolding will insert new attributes above this line. %>",
1093
+ prepend: true
1094
+ )
1095
+
1096
+ scaffold_add_line_to_file(
1097
+ "./app/views/api/v1/open_api/scaffolding/completely_concrete/tangible_things/_components.yaml.erb",
1098
+ "<%= parameter :#{name} %>",
1099
+ "<%# 🚅 super scaffolding will insert new parameter above this line. %>",
1100
+ prepend: true
1101
+ )
1102
+ end
1103
+
1072
1104
  #
1073
1105
  # MODEL ASSOCATIONS
1074
1106
  #
@@ -1252,6 +1284,7 @@ class Scaffolding::Transformer
1252
1284
  "./app/controllers/account/scaffolding/completely_concrete/tangible_things_controller.rb",
1253
1285
  "./app/views/account/scaffolding/completely_concrete/tangible_things",
1254
1286
  "./app/views/api/v1/scaffolding/completely_concrete/tangible_things",
1287
+ "./app/views/api/v1/open_api/scaffolding/completely_concrete/tangible_things",
1255
1288
  ("./config/locales/en/scaffolding/completely_concrete/tangible_things.en.yml" unless cli_options["skip-locales"]),
1256
1289
  ("./app/controllers/api/v1/scaffolding/completely_concrete/tangible_things_controller.rb" unless cli_options["skip-api"]),
1257
1290
  ("./test/controllers/api/v1/scaffolding/completely_concrete/tangible_things_controller_test.rb" unless cli_options["skip-api"])
@@ -1317,6 +1350,24 @@ class Scaffolding::Transformer
1317
1350
  )
1318
1351
  end
1319
1352
 
1353
+ unless cli_options["skip-api"]
1354
+ # add children to the show page of their parent.
1355
+ scaffold_add_line_to_file(
1356
+ "./app/views/api/#{BulletTrain::Api.current_version}/open_api/index.yaml.erb",
1357
+ "<%= components_for Scaffolding::CompletelyConcrete::TangibleThing %>",
1358
+ "<%# 🚅 super scaffolding will insert new components above this line. %>",
1359
+ prepend: true
1360
+ )
1361
+
1362
+ # add children to the show page of their parent.
1363
+ scaffold_add_line_to_file(
1364
+ "./app/views/api/#{BulletTrain::Api.current_version}/open_api/index.yaml.erb",
1365
+ "<%= paths_for Scaffolding::CompletelyConcrete::TangibleThing %>",
1366
+ "<%# 🚅 super scaffolding will insert new paths above this line. %>",
1367
+ prepend: true
1368
+ )
1369
+ end
1370
+
1320
1371
  unless cli_options["skip-model"]
1321
1372
  add_scaffolding_hooks_to_model
1322
1373
  end
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.1.1
4
+ version: 1.1.4
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-09-04 00:00:00.000000000 Z
11
+ date: 2022-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -128,6 +128,9 @@ files:
128
128
  - app/views/account/scaffolding/completely_concrete/tangible_things/index.html.erb
129
129
  - app/views/account/scaffolding/completely_concrete/tangible_things/new.html.erb
130
130
  - app/views/account/scaffolding/completely_concrete/tangible_things/show.html.erb
131
+ - app/views/api/v1/open_api/index.yaml.erb
132
+ - app/views/api/v1/open_api/scaffolding/completely_concrete/tangible_things/_components.yaml.erb
133
+ - app/views/api/v1/open_api/scaffolding/completely_concrete/tangible_things/_paths.yaml.erb
131
134
  - app/views/api/v1/scaffolding/completely_concrete/tangible_things/_tangible_thing.json.jbuilder
132
135
  - app/views/api/v1/scaffolding/completely_concrete/tangible_things/index.json.jbuilder
133
136
  - app/views/api/v1/scaffolding/completely_concrete/tangible_things/show.json.jbuilder