Files
ubicloud/bin/pry
2024-10-27 21:00:50 +02:00

32 lines
614 B
Ruby
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env ruby
# frozen_string_literal: true
REPL = true
require_relative "../loader"
require "pry"
if Config.development?
require "awesome_print"
end
def dev_project
return unless Config.development?
ac = Account[email: "dev@ubicloud.com"] || Account.create_with_id(email: "dev@ubicloud.com")
ac.projects.first || ac.create_project_with_default_policy("default")
end
def udec(*)
UBID.decode(*)
end
opts = Pry::CLI.parse_options
Pry.config.prompt_name = if Config.production?
"\e[41m⚠ %s\e[0m" % "clover-#{Config.rack_env}"
else
"clover-#{Config.rack_env}"
end
Pry::CLI.start(opts)