bullet_train-super_scaffolding 1.6.27 → 1.6.29

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: db8288cb7e2656450c0d491fdf344444d18d66799d738498fab9aca35c9efac4
4
- data.tar.gz: dd9c33574ac8a887e79bb0b52ed6b5072d649d13afb18dfc2365258625817d55
3
+ metadata.gz: fb02e88f12ee2cdfa44d3d0826a9d584e646f652251e4a91fbd9c67d349f03f7
4
+ data.tar.gz: ed7646f2315b22d2661f756da5147ea7423a20f3b06f074c2a1ac0b188dc9415
5
5
  SHA512:
6
- metadata.gz: f38c1c5ce90afabcd7d600bd7fc4eb023c9d4f6d7ce1c2695a12e931c07bb30ad2413f5b49788916009bc27be89125a3af51ef9ea0d0e79d26e4ae8085e37812
7
- data.tar.gz: 4f8bfbf029b93726b7ec09d7aa71d94c8b646124594d5edb6d5d7756dc3433013b933b2482341cac3be7b2493c2a4aa2394287ff0fbbd2ba7e8b32e3e70c2829
6
+ metadata.gz: 6574a89f3a561f690eb68af1048ab7c1a62f9b46e7c9d073d7e25733c71f2d71f5c7734f2b306a04de76cb9c90be0a4cccbfd3710de99e8db650ae86417199f4
7
+ data.tar.gz: 21adfe3bf3cb602c1c25564be1cc973b93efb628311f5b10e7772eabe5bcda701037aecbe9c846f39ff670e36586367864a933205fd55284f13e7e322bee4c63
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module SuperScaffolding
3
- VERSION = "1.6.27"
3
+ VERSION = "1.6.29"
4
4
  end
5
5
  end
@@ -13,3 +13,24 @@ Example:
13
13
  config/locales/en/projects.en.yml
14
14
  app/controllers/account/projects_controller.rb
15
15
  app/controllers/api/v1/projects_controller.rb
16
+
17
+ Field Partial Types:
18
+ address_field: nil
19
+ boolean: boolean
20
+ buttons: string
21
+ cloudinary_image: string
22
+ color_picker: string
23
+ date_and_time_field: datetime
24
+ date_field: date
25
+ email_field: string
26
+ emoji_field: string
27
+ file_field: attachment
28
+ image: attachment
29
+ options: string
30
+ password_field: string
31
+ phone_field: string
32
+ super_select: string
33
+ text_area: text
34
+ text_field: string
35
+ number_field: integer
36
+ trix_editor: text
@@ -45,11 +45,6 @@ ARGV.each do |arg|
45
45
  end
46
46
  end
47
47
 
48
- def standard_protip
49
- puts "🏆 Protip: Commit your other changes before running Super Scaffolding so it's easy to undo if you (or we) make any mistakes."
50
- puts "If you do that, you can reset to your last commit state by using `git checkout .` and `git clean -d -f` ."
51
- end
52
-
53
48
  def get_untracked_files
54
49
  `git ls-files --other --exclude-standard`.split("\n")
55
50
  end
@@ -208,58 +203,10 @@ def check_required_options_for_attributes(scaffolding_type, attributes, child, p
208
203
  end
209
204
  end
210
205
 
211
- def show_usage
212
- puts ""
213
- puts "🚅 usage: bin/super-scaffold [type] (... | --help | --field-partials)"
214
- puts ""
215
- puts "Supported types of scaffolding:"
216
- puts ""
217
- BulletTrain::SuperScaffolding.scaffolders.each do |key, _|
218
- puts " #{key}"
219
- end
220
- puts ""
221
- puts "Try `bin/super-scaffold [type]` for usage examples.".blue
222
- puts ""
223
- end
224
-
225
206
  # grab the _type_ of scaffold we're doing.
226
207
  scaffolding_type = argv.shift
227
208
 
228
209
  if BulletTrain::SuperScaffolding.scaffolders.include?(scaffolding_type)
229
210
  scaffolder = BulletTrain::SuperScaffolding.scaffolders[scaffolding_type].constantize
230
211
  scaffolder.new(argv, @options).run
231
- elsif argv.empty? || !BulletTrain::SuperScaffolding.scaffolders.include?(scaffolding_type)
232
- show_usage
233
- elsif argv.count > 1
234
- puts ""
235
- puts "👋"
236
- puts "The command line options for Super Scaffolding have changed slightly:".yellow
237
- puts "To use the original Super Scaffolding that you know and love, use the `crud` option.".yellow
238
-
239
- show_usage
240
- elsif ARGV.first.present?
241
- case ARGV.first
242
- when "--field-partials"
243
- puts "Bullet Train uses the following field partials for Super Scaffolding".blue
244
- puts ""
245
-
246
- max_name_length = 0
247
- FIELD_PARTIALS.each do |key, value|
248
- if key.to_s.length > max_name_length
249
- max_name_length = key.to_s.length
250
- end
251
- end
252
-
253
- printf "\t%#{max_name_length}s:Data Type\n".bold, "Field Partial Name"
254
- FIELD_PARTIALS.each { |key, value| printf "\t%#{max_name_length}s:#{value}\n", key }
255
-
256
- puts ""
257
- puts "For more details, check out the documentation:"
258
- puts "https://bullettrain.co/docs/field-partials"
259
- when "--help"
260
- show_usage
261
- else
262
- puts "Invalid scaffolding type \"#{ARGV.first}\".".red
263
- show_usage
264
- end
265
212
  end
@@ -895,6 +895,8 @@ class Scaffolding::Transformer
895
895
  _: &#{attribute.name} #{attribute.title_case}
896
896
  label: *#{attribute.name}
897
897
  heading: *#{attribute.name}
898
+ api_title: *#{attribute.name}
899
+ api_description: *#{attribute.name}
898
900
 
899
901
  <% if attribute.type == "super_select" %>
900
902
  <% if attribute.is_required? %>
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.6.27
4
+ version: 1.6.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-19 00:00:00.000000000 Z
11
+ date: 2024-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard