Code Monkey home page Code Monkey logo

pisoni's Introduction

CircleCI Maintainability Gem Version

Pisoni

Pisoni is a Ruby client for the internal API of the Apisonator component of the 3scale API Management software. This API allows third parties to push model data to the Apisonator data store.

License

This Ruby gem is licensed under the Apache 2.0 license.

Install

You can add this gem to your Gemfile, or install it in your system with:

$ gem install pisoni -v '= x.y.z'

where x.y.z is the version you aim for.

Development

Environment set up

We are using Docker Compose to run the tests in an isolated environment.

You should first make pull build to download the needed images and build the one used for actual testing and development.

You can then run make test to run the test suite, and make dev to enter a container in which the code is sync'ed back to your host.

For cleaning up containers, volumes and networks you can run make clean and make destroy. If you want to also get rid of pulled images, run make destroy-all.

Running tests

You can run both tests & specs with:

$ bundle exec rake

You can also test against a different Apisonator instance. Use the environment variable THREESCALE_CORE_INTERNAL_API to point the tests to your running backend instance:

$ THREESCALE_CORE_INTERNAL_API=http://user:[email protected]:8081/internal bundle exec rake

pisoni's People

Contributors

areina avatar bors[bot] avatar davidor avatar eguzki avatar hakubjozak avatar joahking avatar koesystems avatar madadam avatar martouta avatar mayorova avatar sharnik avatar tmacedo avatar unleashed avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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

Forkers

davidor

pisoni's Issues

[Bug] ThreeScale::Core::AlertLimit.load_all - undefined method `map' for nil:NilClass

Same bug as #13 but with AlertLimit instead of ServiceError.

In development locally, it raises this error when it does ThreeScale::Core::AlertLimit.load_all(backend_id)

I can bypass it by changing this line:

results[:attributes].map { |attrs| new(attrs) }

for:

(results[:attributes] || []).map { |attrs| new(attrs) }

So it is not urgent, but it is a bug that should be fixed anyway ๐Ÿ˜„

[Bug] ThreeScale::Core::ServiceError.load_all - undefined method `map' for nil:NilClass

When I load from system in development {{provider_url}}/apiconfig/errors, I see:
image
In case you want the stacktrace:

NoMethodError (undefined method `map' for nil:NilClass
Did you mean?  tap):
  app/services/integration_errors_service.rb:4:in `list'
  app/controllers/api/errors_controller.rb:13:in `block in index'
  app/controllers/api/errors_controller.rb:12:in `index'
  lib/three_scale/middleware/dev_domain.rb:25:in `call'
  lib/three_scale/middleware/dev_domain.rb:25:in `call'
  lib/three_scale/middleware/multitenant.rb:116:in `_call'
  lib/three_scale/middleware/multitenant.rb:111:in `call'

I can bypass it by changing this line:

APIClient::Collection.new(result[:attributes].map { |attrs| new attrs },

for:

APIClient::Collection.new((result[:attributes] || []).map { |attrs| new attrs },

but this is more a workaround to don't get stuck in what I have to do than an actual fix ๐Ÿ˜„ So just saying because it is not blocking or too urgent but it should be fixed at some point ๐Ÿ˜„

Doc about how to use the client

Missing available operations, arguments and examples.

Missing doc about errors and raised exceptions on unexpected events

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.