22
33module CypressRails
44 class Config
5- attr_accessor :dir , :host , :port , :base_path , :transactional_server , :cypress_cli_opts
5+ attr_accessor :rails_dir , :cypress_dir , :host , :port , :base_path , :transactional_server , :cypress_cli_opts
66
77 def initialize (
8- dir : Env . fetch ( "CYPRESS_RAILS_DIR" , default : Dir . pwd ) ,
8+ rails_dir : Env . fetch ( "CYPRESS_RAILS_DIR" , default : Dir . pwd ) ,
9+ cypress_dir : Env . fetch ( "CYPRESS_RAILS_CYPRESS_DIR" , default : rails_dir ) ,
910 host : Env . fetch ( "CYPRESS_RAILS_HOST" , default : "127.0.0.1" ) ,
1011 port : Env . fetch ( "CYPRESS_RAILS_PORT" ) ,
1112 base_path : Env . fetch ( "CYPRESS_RAILS_BASE_PATH" , default : "/" ) ,
1213 transactional_server : Env . fetch ( "CYPRESS_RAILS_TRANSACTIONAL_SERVER" , type : :boolean , default : true ) ,
1314 cypress_cli_opts : Env . fetch ( "CYPRESS_RAILS_CYPRESS_OPTS" , default : "" )
1415 )
15- @dir = dir
16+ @rails_dir = rails_dir
17+ @cypress_dir = cypress_dir
1618 @host = host
1719 @port = port
1820 @base_path = base_path
@@ -25,7 +27,8 @@ def to_s
2527
2628 cypress-rails configuration:
2729 ============================
28- CYPRESS_RAILS_DIR.....................#{ dir . inspect }
30+ CYPRESS_RAILS_DIR.....................#{ rails_dir . inspect }
31+ CYPRESS_RAILS_CYPRESS_DIR.............#{ cypress_dir . inspect }
2932 CYPRESS_RAILS_HOST....................#{ host . inspect }
3033 CYPRESS_RAILS_PORT....................#{ port . inspect }
3134 CYPRESS_RAILS_BASE_PATH...............#{ base_path . inspect }
0 commit comments