Skip to content

Commit 960c03c

Browse files
JonRoweklyonrad
andcommitted
Change build to use new templates
Co-authored-by: Luka Lüdicke <[email protected]>
1 parent 9eb8d2a commit 960c03c

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

example_app_generator/generate_stuff.rb

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ def using_source_path(path)
9393
generate('scaffold gadget') # scaffold with no attributes
9494
generate('scaffold ticket original_price:float discounted_price:float')
9595
generate('scaffold admin/account name:string') # scaffold with nested resource
96+
generate('scaffold card --api')
97+
generate('scaffold upload --no-request_specs --controller_specs')
9698
generate('rspec:feature gadget')
9799
generate('controller things custom_action')
98100

@@ -137,9 +139,21 @@ def using_source_path(path)
137139
'config.warnings = false'
138140
gsub_file '.rspec', '--warnings', ''
139141

140-
# Remove skips so we can test controller specs work
141-
gsub_file 'spec/controllers/gadgets_controller_spec.rb',
142+
# Make a generated file work
143+
gsub_file 'app/views/cards/_card.json.jbuilder',
144+
', :created_at, :updated_at',
145+
''
146+
147+
# Remove skips so we can test specs work
148+
gsub_file 'spec/requests/cards_spec.rb',
149+
'skip("Add a hash of attributes valid for your model")',
150+
'{}'
151+
152+
gsub_file 'spec/requests/gadgets_spec.rb',
142153
'skip("Add a hash of attributes valid for your model")',
143154
'{}'
144155

156+
gsub_file 'spec/controllers/uploads_controller_spec.rb',
157+
'skip("Add a hash of attributes valid for your model")',
158+
'{}'
145159
final_tasks

0 commit comments

Comments
 (0)