Giter Site home page Giter Site logo

evil-client's People

Contributors

darthsim avatar envek avatar holywalley avatar kalashnikovisme avatar mrexox avatar nepalez avatar paderinandrey avatar palkan avatar poporul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evil-client's Issues

Need to revise ValidationErrors

The problematic place is: f4e2858#diff-a76cfc1380d763d073577d9d3d19ef3bR64

Here we throw out any original exception and make it ValidationError even if it is apparently not a such.

I have faced it several times while contributing to ebay_api or even bugs in the evil-client itself (e.g., with I18n error fixed in 89e3a8b) and it was always a pain to find the root cause of the problem.

So we need to distinguish usual exceptions (bugs) from real validation errors somehow. Have no idea how to do it at the moment though.

Add support for integration tests

Quoting a comment of @palkan :

What about adding some support for integration tests too? I mean something like that:

before { stub_operation(CatClient, "cats.fetch") }

# or
before { stub_operation(CatClient, /cats\..*/) }

# or with return value
before { stub_operation(CatClient, /.*/).and_return(double("Cat")) }

# or with constraints
before { stub_operation(CatClient, "cats.fetch").with(token: "valid") }

# etc

Now I'm testing evil-client integration the following way:

let(:candidates) do 
  double('candidates').tap do |stub|
    allow(client).to receive(:candidates).and_return(stub)
  end
end

it "works" do
  expect(candidates).to receive(:create).with(
        ...
   ).and_return(double('response', id: 'checkr-123'))

  # check some code that handles the response
end

Correct response handling

A client should return with nil when a server responded without content. (For now it returns empty string).

Bypassing ssl verification with HTTPClient

Hi guys! First of all, it's awesome client!

During development I stucked with self-signed certificate problem.
Can't figure out how to use connection writer with Faraday or HTTPClient, for example.

Supposing to use HTTPClient:

client = HTTPClient.new
client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE

But I can't figure out how to use it with Evil::Client descendant ๐Ÿคท

Any thoughts?

Fix RSpec warning on repetitive `with`

In the example

allow(client)
  .to receive_request(:get)
  .with { |req| req.path == '/foo/:id' }
  .with { |req| req.body == { bar: :baz } }
  .and_respond(200, foo: :qux }

RSpec warns about the second with re-writes previous stub.

Evil::Client::Dictionary will not support keyword arguments?

---
# config.yml
- name: "A"
  code: 65
- name: "B"
  code: 66
class Codepoint < Evil::Client::Model
  extend  Evil::Client::Dictionary["config.yml"]

  option :name
  option :code
end

Codepoint.all
# => `new': wrong number of arguments (given 1, expected 0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.