Module: Rambo

Defined in:
lib/cli.rb,
lib/rambo.rb,
lib/version.rb,
lib/rambo/rake/task.rb,
lib/rambo/rspec/examples.rb,
lib/rambo/raml_models/api.rb,
lib/rambo/rspec/spec_file.rb,
lib/rambo/raml_models/body.rb,
lib/rambo/rspec/helper_file.rb,
lib/rambo/document_generator.rb,
lib/rambo/raml_models/method.rb,
lib/rambo/raml_models/headers.rb,
lib/rambo/rspec/example_group.rb,
lib/rambo/raml_models/resource.rb,
lib/rambo/raml_models/response.rb

Defined Under Namespace

Modules: RSpec, Rake, RamlModels Classes: CLI, DocumentGenerator

Constant Summary collapse

MAJOR =
'0'
MINOR =
'2'
PATCH =
'2'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.fileObject (readonly)

Returns the value of attribute file.



7
8
9
# File 'lib/rambo.rb', line 7

def file
  @file
end

.optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/rambo.rb', line 7

def options
  @options
end

Class Method Details

.generate_contract_tests!(file = nil, opts = {}) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/rambo.rb', line 9

def generate_contract_tests!(file = nil, opts = {})
  @options         = yaml_options.merge(opts)
  @options[:rails] = true unless @options.fetch(:rails, nil) == false
  @file            = file || @options.delete(:raml) || raml_file

  DocumentGenerator.generate!(@file, @options)
end

.versionObject



6
7
8
# File 'lib/version.rb', line 6

def self.version
  [Rambo::MAJOR, Rambo::MINOR, Rambo::PATCH].join('.')
end