puffing-billy | A rewriting web proxy for testing interactions between your browser and external sites. Works with | Proxy library

 by   oesmith Ruby Version: v3.1.0 License: MIT

kandi X-RAY | puffing-billy Summary

kandi X-RAY | puffing-billy Summary

puffing-billy is a Ruby library typically used in Networking, Proxy applications. puffing-billy has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Billy spawns an EventMachine-based proxy server, which it uses to intercept requests sent by your browser. It has a simple API for configuring which requests need stubbing and what they should return.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              puffing-billy has a low active ecosystem.
              It has 641 star(s) with 168 fork(s). There are 14 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 142 have been closed. On average issues are closed in 433 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of puffing-billy is v3.1.0

            kandi-Quality Quality

              puffing-billy has 0 bugs and 0 code smells.

            kandi-Security Security

              puffing-billy has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              puffing-billy code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              puffing-billy is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              puffing-billy releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              puffing-billy saves you 1450 person hours of effort in developing the same functionality from scratch.
              It has 3247 lines of code, 135 functions and 61 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed puffing-billy and discovered the below as its top functions. This is intended to give you an instant insight into puffing-billy implemented functionality, and help decide if they suit your requirements.
            • Sends a request to the server
            • Reset all cached options
            • Stores the cache .
            • Generate a hash key
            • Formats an HTTP url
            • main loop
            • Build HTTP request
            • Record an HTTP request .
            • Handle HTTP request
            • Handle HTTP request
            Get all kandi verified functions for this library.

            puffing-billy Key Features

            No Key Features are available at this moment for puffing-billy.

            puffing-billy Examples and Code Snippets

            No Code Snippets are available at this moment for puffing-billy.

            Community Discussions

            QUESTION

            Am I stubbing data correctly?
            Asked 2019-Jan-09 at 06:13

            Imagine I have an app that uses Twitter API. In my app I only have a textarea and a button in which if I submit the form it will tweet to my account.

            In my app I have the following routes:

            ...

            ANSWER

            Answered 2019-Jan-09 at 06:13

            Puffing Billy is a programmable proxy which can be used to stub requests from the browser. In your case the requests you are looking to stub are coming from your app instead of the browser. Generally requests from your app would be stubbed using something like WebMock or by writing a fake service. The article - https://robots.thoughtbot.com/how-to-stub-external-services-in-tests - has a good summary of stubbing requests from inside your app.

            Another potential option is if whatever library you're using to communicate with twitter provides it's own test mode.

            Source https://stackoverflow.com/questions/54102206

            QUESTION

            Uninitialized constant Capybara::Webkit::Configuration
            Asked 2018-Feb-06 at 21:43

            I have an issue due adding the puffing-billy to my capybara-webkit features. I followed by instructions:

            rails_helper.rb:

            ...

            ANSWER

            Answered 2018-Feb-06 at 21:43

            This is most likely because you're using a very old version of capybara-webkit. If you don't need the latest Capybara lock the version of capybara-webkit in your Gemfile to ~>1.14 (latest release) If you do need the latest Capybara you'll have to tell your Gemfile to use the master branch of capybara-webkit.

            Source https://stackoverflow.com/questions/48637818

            QUESTION

            Puffing Billy with Poltergeist error: "rack-test requires a rack application, but none was given"
            Asked 2017-Jul-28 at 04:51

            Using the Puffing Billy instructions for rspec with capybara I created a simple test to stub a request using the :poltergeist_billy driver resulting in error:

            ...

            ANSWER

            Answered 2017-Jul-28 at 04:51

            The errors are many here, so let's just start at the beginning

            1. You don't have require capybara/rails in your spec_helper.rb or rails_helper.rb - https://github.com/teamcapybara/capybara#setup - this means Capybara.app isn't getting set and is why you're getting the "rack-test requires a rack application" - of course you don't really want to be using the rack-test driver for your current test which #3 will deal with.

            2. Capybara already includes Capybara::DSL into feature specs, so use feature specs, and remove the include Capybara::DSL from your RSpec config shown above. This requires either putting your spec file into spec/features/my_spec.rb and enabling the RSpec config to determine test type by directory, or manually specifying that the test is a feature spec

            Source https://stackoverflow.com/questions/45362118

            QUESTION

            How can I use VCR with Rails 5.1 system tests?
            Asked 2017-May-25 at 23:09

            Many things on the web seem to suggest that VCR can be used with Capybara.

            I have three problems.

            1. This doesn't make much sense to me, because the test driver and the application code don't share memory.
            2. I'm not finding full recipes on how to set this up.
            3. I'm finding bits and pieces of how people have set this up, but it's outside of the context of rails 5.1, which does the capybara setup behind the scenes.

            How do I configure a Rails 5.1 app, Capybara, and VCR to work together for system tests?

            (My headless browser is phantomjs, driven by poltergeist. But I don't need to intercept requests from the browser, only server-side requests. If I needed to intercept from the browser I would probably use a full http proxy server, like puffing-billy.)

            ...

            ANSWER

            Answered 2017-May-25 at 22:09

            I'm assuming you mean Rails 5.1 since Rails 5 doesn't have system tests.

            1. The copy of the application Capybara runs for testing is run in a separate thread, not a separate process. This means they do have access to the same memory, and loaded classes

            2. There is nothing special required for configuring WebMock or VCR beyond what their READMEs already provide

            3. The setup of Capybara and how Rails handles it is irrelevant to the configuration of WebMock or VCR. Additionally, even when using Rails 5.1 system tests all of the normal Capybara configuration options are still usable.

            That all being said, there are a couple of things to be aware of here. Firstly, WebMock/VCR can only deal with requests made by your app (not from the browser which you stated you don't need) and it's generally better to use faked services (if possible) rather than WebMock/VCR when doing end to end system tests since there is less interference with the code under test.

            If this doesn't answer your issues, post a question with a specific issue you're having, the code that's causing your issue, and the error you're getting.

            Source https://stackoverflow.com/questions/44124072

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install puffing-billy

            Add this line to your application's Gemfile:.
            Note: :poltergeist_billy doesn't support proxying any localhosts, so you must use :webkit_billy, :apparition_billy, or a custom headless selenium registration for headless specs when using puffing-billy for other local rack apps. See this phantomjs issue for any updates.
            It's good practice to reset the driver after each scenario, so having an @billy tag switches the drivers on for a given scenario. Also note that stubs are reset after each step, so any usage of a stub should be in the same step that it was created in.

            Support

            Fork itCreate your feature branch (git checkout -b my-new-feature)Commit your changes (git commit -am 'Added some feature')Push to the branch (git push origin my-new-feature)Create new Pull Request
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Proxy Libraries

            frp

            by fatedier

            shadowsocks-windows

            by shadowsocks

            v2ray-core

            by v2ray

            caddy

            by caddyserver

            XX-Net

            by XX-net

            Try Top Libraries by oesmith

            OpenANPR

            by oesmithPython

            obdgpslogger

            by oesmithC

            ralio

            by oesmithJavaScript

            pyselectmonitor

            by oesmithPython

            wp-trustlogo

            by oesmithPHP