Module: Crabfarm::GlobalState

Extended by:
GlobalState
Included in:
GlobalState
Defined in:
lib/crabfarm/global_state.rb

Instance Method Summary collapse

Instance Method Details

#app_pathObject



8
9
10
# File 'lib/crabfarm/global_state.rb', line 8

def app_path
  CF_PATH
end

#inside_crawler_app?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/crabfarm/global_state.rb', line 4

def inside_crawler_app?
  defined? CF_PATH
end

#memento_path(_name) ⇒ Object



12
13
14
# File 'lib/crabfarm/global_state.rb', line 12

def memento_path(_name)
  File.join(app_path, 'spec/mementos', _name + '.json.gz')
end

#snapshot_path(_file) ⇒ Object



16
17
18
# File 'lib/crabfarm/global_state.rb', line 16

def snapshot_path(_file)
  File.join(app_path, 'spec/snapshots', _file)
end