Skip to content

Commit 7bfe7d0

Browse files
committed
Remove verify task
We aren't using it.
1 parent 2839916 commit 7bfe7d0

File tree

2 files changed

+0
-73
lines changed

2 files changed

+0
-73
lines changed

Rakefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ require "tools/preview_docs"
1010
desc "Build gem files for all projects"
1111
task build: "all:build"
1212

13-
desc "Build, install and verify the gem files in a generated Rails app."
14-
task verify: "all:verify"
15-
1613
desc "Prepare the release"
1714
task prep_release: "all:prep_release"
1815

tasks/release.rb

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -190,76 +190,6 @@
190190
end
191191
end
192192

193-
task verify: :install do
194-
require "tmpdir"
195-
196-
cd Dir.tmpdir
197-
app_name = "verify-#{version}-#{Time.now.to_i}"
198-
sh "rails _#{version}_ new #{app_name} --skip-bundle" # Generate with the right version.
199-
cd app_name
200-
201-
substitute = -> (file_name, regex, replacement) do
202-
File.write(file_name, File.read(file_name).sub(regex, replacement))
203-
end
204-
205-
# Replace the generated gemfile entry with the exact version.
206-
substitute.call("Gemfile", /^gem "rails.*/, %{gem "rails", "#{version}"})
207-
substitute.call("Gemfile", /^# gem "image_processing/, 'gem "image_processing')
208-
sh "bundle"
209-
sh "rails action_mailbox:install"
210-
sh "rails action_text:install"
211-
212-
sh "rails generate scaffold user name description:text admin:boolean"
213-
sh "rails db:migrate"
214-
215-
# Replace the generated gemfile entry with the exact version.
216-
substitute.call("app/models/user.rb", /end\n\z/, <<~CODE)
217-
has_one_attached :avatar
218-
has_rich_text :description
219-
end
220-
CODE
221-
222-
substitute.call("app/views/users/_form.html.erb", /textarea :description %>\n <\/div>/, <<~CODE)
223-
rich_textarea :description %>\n </div>
224-
225-
<div class="field">
226-
Avatar: <%= form.file_field :avatar %>
227-
</div>
228-
CODE
229-
230-
substitute.call("app/views/users/show.html.erb", /description %>\n<\/p>/, <<~CODE)
231-
description %>\n</p>
232-
233-
<p>
234-
<% if @user.avatar.attached? -%>
235-
<%= image_tag @user.avatar.representation(resize_to_limit: [500, 500]) %>
236-
<% end -%>
237-
</p>
238-
CODE
239-
240-
# Permit the avatar param.
241-
substitute.call("app/controllers/users_controller.rb", /:admin/, ":admin, :avatar")
242-
243-
editor = ENV["VISUAL"] || ENV["EDITOR"]
244-
if editor
245-
`#{editor} #{File.expand_path(app_name)}`
246-
end
247-
248-
puts "Booting a Rails server. Verify the release by:"
249-
puts
250-
puts "- Seeing the correct release number on the root page"
251-
puts "- Viewing /users"
252-
puts "- Creating a user"
253-
puts "- Updating a user (e.g. disable the admin flag)"
254-
puts "- Deleting a user on /users"
255-
puts "- Whatever else you want."
256-
begin
257-
sh "rails server"
258-
rescue Interrupt
259-
# Server passes along interrupt. Prevent halting verify task.
260-
end
261-
end
262-
263193
task :bundle do
264194
sh "bundle check"
265195
end

0 commit comments

Comments
 (0)