bullet_train-super_scaffolding 1.1.2 → 1.1.5

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: ae705c580fe51003c77cefdf8a2f6e12357e873c5c5388922a417a0ccfd146eb
4
- data.tar.gz: 487c57f917e9d82b4c2f565b3d11c3843c7f503070dfc61b0aaadfd4207623dd
3
+ metadata.gz: 9241b913f0e0e5258325f8243d76d5ed2e8fe98515322f929222ca74c107d117
4
+ data.tar.gz: ecb16b7eda756f5e07f0f91d05299cf01eca768c0b98d454602872ffb3e5b8c0
5
5
  SHA512:
6
- metadata.gz: 2e7832d013870c2afeb5eab6da9e1dabe035b3e0f12d648e58f113e28893fdd41b3e3e0b1e10c1e5476a50dfac540952b29aab12f86386c110d21c0f29c66d39
7
- data.tar.gz: d54ee3b038292d838e153f51b89b7e0e4fca59f4d346ed154be935de373bebda96ae575ad92ddb5ede7d219b1b6a03c5be773016d7d0b0e4e668521eafde5e72
6
+ metadata.gz: '0391bce1d85831074245c72dbb257f1d3d5b21acdcf8ad56b15cece967406e6defd60f97192ba68c4232ea623e10b5b72b2b91ba5ddaeb6e015d7bdf905f4920'
7
+ data.tar.gz: 26b0ade2177b7204a9c7d9ebc21fee387c0d6653f90d07cd08e47a52151ca7d0d252bc62919912f20b2cadccced3f588b406b8ccff745fb16f8a6037ffbddc53
@@ -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_concept_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_concept_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_concept_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"
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.2"
3
+ VERSION = "1.1.5"
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.2
4
+ version: 1.1.5
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-05 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