class Pact::Message::CLI

Public Instance Methods

reify(json) click to toggle source
# File lib/pact/message/cli.rb, line 22
def reify(json)
  require 'pact/support'
  puts Pact::Reification.from_term(JSON.load(json)).to_json
end
update(message) click to toggle source
# File lib/pact/message/cli.rb, line 13
def update(message)
  require 'pact/message'
  require 'pact/message/consumer/update_pact'
  pact_specification_version = Pact::SpecificationVersion.new(options.pact_specification_version)
  message = Pact::Message.from_hash(JSON.load(message), { pact_specification_version: pact_specification_version })
  Pact::Message::Consumer::UpdatePact.call(message, options.pact_dir, options.consumer, options.provider, options.pact_specification_version)
end
version() click to toggle source
# File lib/pact/message/cli.rb, line 28
def version
  require 'pact/message/version.rb'
  puts Pact::Message::VERSION
end