Sha256: 56e042104b6d531d35ca12874ee55c478c77778da180f62c3b7b9edbc9b77393

Contents?: true

Size: 412 Bytes

Versions: 2

Compression:

Stored size: 412 Bytes

Contents

# frozen_string_literal: true

require 'sinatra/base'

class FakeCloudFlare < Sinatra::Base
  get '/zones/:id/dns_records/?page=1&per_page=50&scope_type=organization' do
    json_response 200, 'get_all_zones.json'
  end

  private

  def json_response(response_code, file_name)
    content_type :json
    status response_code
    File.open(File.dirname(__FILE__) + '/fixtures/' + file_name, 'rb').read
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cloudflare-3.2.1 spec/fake_cloudflare/cloudflare.rb
cloudflare-3.2.0 spec/fake_cloudflare/cloudflare.rb