bullet_train-super_scaffolding 1.0.36 → 1.0.39

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: 30dd9442fbb5400db351e8fadda4d5e7f3ef507f75c4f5b3c64d732ce19479ca
4
- data.tar.gz: 3fa36089c706d784cd8b7c0ae242c90ee368b46c323e719352acbaccbef4667d
3
+ metadata.gz: 8c3c71ca0044007dd52267ebd4f349230a570603cf0c36f422c8009a31d4782e
4
+ data.tar.gz: 68427dec662496dba68dd3892eeef389d68e464c1188cccafd11ed37e62dfe23
5
5
  SHA512:
6
- metadata.gz: c21f060eec865120112f53fd75cb26f704441afd85b812d36978505920a17c5737004b1a207ce63ba64ea00c002ab8b1b1a6bf59a01e7a91eb656737790e8144
7
- data.tar.gz: 51f21322647be010eb36d1bd4c11b0f9350f8030136d63ca96ca63bd9f77e36b836b4f5ad67a7fd6ba270cc7b86717160dd6eaa2ea69c53687a8f959637ad3e7
6
+ metadata.gz: 7d4a4a1e0ea47b0e3fdb5cc8aec490176281eb5628ddf73d0188c6a4f482cf98237229b4fea48ea642b2dc161acd4395ff7ae073a2b1093efc84a68b9d8ed37b
7
+ data.tar.gz: 02bfaa8f516ac9bb9c85d443164939bcbbd16dac8e54521410902dd11a4f177ec600660d1a6c2203346ca8bc5668b057b51de1b97bad587b3ed73db56106e32c
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module SuperScaffolding
3
- VERSION = "1.0.36"
3
+ VERSION = "1.0.39"
4
4
  end
5
5
  end
@@ -160,6 +160,14 @@ class Scaffolding::ClassNamesTransformer
160
160
  parent_in_namespace_class_name.titlecase.pluralize
161
161
  when "Tangible Things"
162
162
  in_namespace_class_name.titlecase.pluralize
163
+ when "Creative concepts"
164
+ parent_in_namespace_class_name.titlecase.downcase.capitalize.pluralize
165
+ when "Tangible things"
166
+ in_namespace_class_name.titlecase.downcase.capitalize.pluralize
167
+ when "creative concepts"
168
+ parent_in_namespace_class_name.titlecase.downcase.pluralize
169
+ when "tangible things"
170
+ in_namespace_class_name.titlecase.downcase.pluralize
163
171
  when "creative-concepts"
164
172
  parent_in_namespace_class_name.underscore.gsub(/[\/_]/, "-").pluralize
165
173
  when "tangible-things"
@@ -173,6 +181,14 @@ class Scaffolding::ClassNamesTransformer
173
181
  parent_in_namespace_class_name.titlecase
174
182
  when "Tangible Thing"
175
183
  in_namespace_class_name.titlecase
184
+ when "Creative concept"
185
+ parent_in_namespace_class_name.titlecase.downcase.capitalize
186
+ when "Tangible thing"
187
+ in_namespace_class_name.titlecase.downcase.capitalize
188
+ when "creative concept"
189
+ parent_in_namespace_class_name.titlecase.downcase
190
+ when "tangible thing"
191
+ in_namespace_class_name.titlecase.downcase
176
192
  when "creative-concept"
177
193
  parent_in_namespace_class_name.underscore.gsub(/[\/_]/, "-")
178
194
  when "tangible-thing"
@@ -6,6 +6,29 @@ require "scaffolding/class_names_transformer"
6
6
  class Scaffolding::Transformer
7
7
  attr_accessor :child, :parent, :parents, :class_names_transformer, :cli_options, :additional_steps, :namespace, :suppress_could_not_find
8
8
 
9
+ def code_for_child_on_parent_show_page
10
+ end
11
+
12
+ def update_models_abstract_class
13
+ end
14
+
15
+ def created_by_reference(created_by_index_name)
16
+ end
17
+
18
+ def approved_by_reference(approved_by_index_name)
19
+ end
20
+
21
+ def permit_parents
22
+ ["Team"]
23
+ end
24
+
25
+ def last_joinable_parent
26
+ "Team"
27
+ end
28
+
29
+ def update_action_models_abstract_class(targets_n)
30
+ end
31
+
9
32
  def initialize(child, parents, cli_options = {})
10
33
  self.child = child
11
34
  self.parent = parents.first
@@ -91,6 +114,10 @@ class Scaffolding::Transformer
91
114
  "tangible-things",
92
115
  "Creative Concepts",
93
116
  "Tangible Things",
117
+ "Creative concepts",
118
+ "Tangible things",
119
+ "creative concepts",
120
+ "tangible things",
94
121
 
95
122
  # just class name plural.
96
123
  "creative_concept",
@@ -99,6 +126,10 @@ class Scaffolding::Transformer
99
126
  "tangible-thing",
100
127
  "Creative Concept",
101
128
  "Tangible Thing",
129
+ "Creative concept",
130
+ "Tangible thing",
131
+ "creative concept",
132
+ "tangible thing",
102
133
 
103
134
  # Account namespace vs. others.
104
135
  ":account",
@@ -1291,6 +1322,8 @@ class Scaffolding::Transformer
1291
1322
  scaffold_replace_line_in_file("./app/models/scaffolding/completely_concrete/tangible_thing.rb", transform_string("belongs_to :absolutely_abstract_creative_concept, class_name: \"Scaffolding::AbsolutelyAbstract::CreativeConcept\"\n"), transform_string("belongs_to :absolutely_abstract_creative_concept\n"))
1292
1323
  end
1293
1324
 
1325
+ update_models_abstract_class
1326
+
1294
1327
  # add user permissions.
1295
1328
  add_ability_line_to_roles_yml
1296
1329
  end
@@ -1301,7 +1334,12 @@ class Scaffolding::Transformer
1301
1334
 
1302
1335
  # add children to the show page of their parent.
1303
1336
  unless cli_options["skip-parent"] || parent == "None"
1304
- scaffold_add_line_to_file("./app/views/account/scaffolding/absolutely_abstract/creative_concepts/show.html.erb", "<%= render 'account/scaffolding/completely_concrete/tangible_things/index', tangible_things: @creative_concept.completely_concrete_tangible_things, hide_back: true %>", "<%# 🚅 super scaffolding will insert new children above this line. %>", prepend: true)
1337
+ scaffold_add_line_to_file(
1338
+ "./app/views/account/scaffolding/absolutely_abstract/creative_concepts/show.html.erb",
1339
+ code_for_child_on_parent_show_page || "<%= render 'account/scaffolding/completely_concrete/tangible_things/index', tangible_things: @creative_concept.completely_concrete_tangible_things, hide_back: true %>",
1340
+ "<%# 🚅 super scaffolding will insert new children above this line. %>",
1341
+ prepend: true
1342
+ )
1305
1343
  end
1306
1344
 
1307
1345
  unless cli_options["skip-model"]
data/lib/scaffolding.rb CHANGED
@@ -1,4 +1,10 @@
1
1
  module Scaffolding
2
+ mattr_accessor :database, default: :postgresql
3
+
4
+ def self.mysql?
5
+ database == :mysql
6
+ end
7
+
2
8
  def self.valid_attribute_type?(type)
3
9
  [
4
10
  "boolean",
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.0.36
4
+ version: 1.0.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-26 00:00:00.000000000 Z
11
+ date: 2022-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -178,7 +178,7 @@ licenses:
178
178
  metadata:
179
179
  homepage_uri: https://github.com/bullet-train-co/bullet_train-super_scaffolding
180
180
  source_code_uri: https://github.com/bullet-train-co/bullet_train-super_scaffolding
181
- post_install_message:
181
+ post_install_message:
182
182
  rdoc_options: []
183
183
  require_paths:
184
184
  - lib
@@ -193,8 +193,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  requirements: []
196
- rubygems_version: 3.3.7
197
- signing_key:
196
+ rubygems_version: 3.1.6
197
+ signing_key:
198
198
  specification_version: 4
199
199
  summary: Bullet Train Super Scaffolding
200
200
  test_files: []