Module: Wisp

Defined in:
lib/wisp-schema.rb,
lib/version.rb

Overview

Provides factory methods that will return the correct schemer instance to use

Defined Under Namespace

Classes: NotSupportedAction

Constant Summary collapse

VERSION =
"1.18.3"
STABLE_VERSION =
"1.18.3"
SCHEMA_PATH =
File.expand_path("../wisp.json", __dir__)
NOUNS_PATH =
File.expand_path("../nouns.json", __dir__)
ACTIONS =
[
  "ai_confirmation",
  "click",
  "close_tab",
  "comment",
  "conditional_observe",
  "double_click",
  "drag_and_drop",
  "fill",
  "generate_steps",
  "hover",
  "navigate",
  "observe",
  "refresh",
  "scroll",
  "select",
  "send_key",
  "tester_confirmation",
  "tester_instruction",
  "type",
  "wait",
].freeze

Class Method Summary collapse

Class Method Details

.action_schemer(action) ⇒ Object

Raises:



49
50
51
52
53
# File 'lib/wisp-schema.rb', line 49

def action_schemer(action)
  raise NotSupportedAction unless ACTIONS.include?(action)

  JSONSchemer.schema(Pathname.new(File.expand_path("../stable/actions/#{action}.json", __dir__)))
end

.embedded_test_schemerObject



61
62
63
# File 'lib/wisp-schema.rb', line 61

def embedded_test_schemer
  JSONSchemer.schema(Pathname.new(File.expand_path("../stable/embeddings/embedded_test.json", __dir__)))
end

.nouns_schemerObject



44
45
46
# File 'lib/wisp-schema.rb', line 44

def nouns_schemer
  JSONSchemer.schema(Pathname.new(Wisp::NOUNS_PATH))
end

.verbs_schemerObject



56
57
58
# File 'lib/wisp-schema.rb', line 56

def verbs_schemer
  JSONSchemer.schema(Pathname.new(File.expand_path("../stable/verbs.json", __dir__)))
end

.wisp_schemerObject



39
40
41
# File 'lib/wisp-schema.rb', line 39

def wisp_schemer
  JSONSchemer.schema(Pathname.new(Wisp::SCHEMA_PATH))
end