44
55# Disabe paging in pry, to avoid having to keep hitting j/space on big output
66# on small screens
7- Pry . config . pager = false
7+ # On second thought I want this on because printing a huge object is not
8+ # cancellable
9+ # Pry.config.pager = false
810
911# -----------------------------------------------------------------------------
1012# Rails app spits out lots of startup garbage, separate this
3133# Enables FactoryBot in a pry session
3234begin
3335 require 'factory_bot_rails'
34- rescue Exception => ex
3536 puts "✅ #{ 'require' . light_red } #{ "'factory_bot_rails'" . cyan } "
37+ rescue Exception => ex
3638 notice_me "Warning: factory_bot_rails gem not found, #{ ex } "
3739end
3840
41+ # -----------------------------------------------------------------------------
42+ # Required to create a covered_member patient, apparently?
43+ begin
44+ require './spec/support/anna_spec_helper'
45+ puts "✅ #{ 'require' . light_red } #{ "'./spec/support/anna_spec_helper'" . cyan } "
46+ rescue StandardError
47+ notice_me "Warning: ./spec/support/anna_spec_helper not found"
48+ end
49+
3950# -----------------------------------------------------------------------------
4051# Enables a lot more factories which explicilty need the domestic_phone_number
4152# gem for creating factories that use phone numbers
@@ -46,6 +57,7 @@ rescue StandardError
4657 notice_me "Warning: ./spec/support/faker_phones.rb not found"
4758end
4859
60+
4961# -----------------------------------------------------------------------------
5062# Load the route helpers in the terminal so you can generate page URLs
5163# admin_stark_user_path / admin_stark_user_url
@@ -118,12 +130,12 @@ end
118130
119131# -----------------------------------------------------------------------------
120132# Copy some text to the clipboard
121- def copy ( input )
133+ def cpy ( input )
122134 _max_display_string_length = 50
123135 str = input . to_s
124136 IO . popen ( 'pbcopy' , 'w' ) { |f | f << str }
125- truncated = str . length > _max_display_string_length ? str [ 0 .._max_display_string_length ] + '... ' : str
126- puts "Copied \" #{ truncated } \" to system clipboard!"
137+ truncated = str . length > _max_display_string_length ? str [ 0 .._max_display_string_length ] + '… ' : str
138+ puts "✅ Copied \" #{ truncated } \" to system clipboard!" . green ;
127139end
128140
129141# -----------------------------------------------------------------------------
0 commit comments