0
votes
3answers
37 views

Ruby ternary operator method name?

What is the name of the method corresponding to the ternary operator? By name I mean :+ for addition, :== for equality, etc. I want to override the ternary operator to build a proxy class (same idea ...
0
votes
3answers
1k views

accessing a website through a proxy using Net::HTTP proxy in ruby

I'm trying to access a QA environment website using Net::HTTP::Proxy to get the response.But I keep getting a SocketError whenever I try to connect. Please find the code snippet that I'm trying to ...
0
votes
0answers
25 views

Faraday with Proxy authentication

I need to connect with Faraday using a squid proxy server that requires user and password, my code is as follows: @connection = Faraday.new(url, ssl: {verify: false}) do |conn| conn.request ...
3
votes
2answers
4k views

How to catch all HTTP traffic (local proxy)

I am looking to get access to all HTTP traffic on my machine (my windows machine - not a server). From what I understand having a local proxy through which all traffic routes is the way to go. I have ...
3
votes
1answer
142 views

Using a VPN to get a static IP on Heroku

I need to connect to an API with my Heroku/Rails app where I need to have a static IP. I know about the add-on proximo - https://devcenter.heroku.com/articles/proximo - but it is insanely priced, so ...
0
votes
1answer
34 views

How to initialise an instance other than the current class in Ruby?

I want to initialize instances of different class based on the initial params. For example, I want to have different behavior for Hello.new(true) and Hello.new(false). Be precise, I want them to ...
0
votes
0answers
22 views

Proxy in ruby gem “twitter_oauth”

My test environment for my ruby (sinatra/ twitter_oauth) project is behind a proxy. On the documentation I read how to use the twitter_oauth gem with a proxy. But there the author says: First you ...
0
votes
0answers
27 views

Ruby Tool (recorder, proxy) to generate Mechanize code

I'm looking for a tool to record http requests and generate ruby mechanize code. The idea is to navigate in the browser through a proxy and all requests are recorded as mechanize code. Th only ...
1
vote
1answer
25 views

How to set a proxy in rubys net/http?

I'm trying to set a proxy and to use it in a simple get request like in the documentation. But I always receive an error! The adress and port are right with open-uri it worked.. it's ...
0
votes
0answers
119 views

Twitter proxy configuration

I want to use the twitter gem in a simple application, but my test environment is behind a proxy. How can I configurate my requests so that the proxy is used?
0
votes
1answer
49 views

WEBrick socket returns eof? == true

I'm writing a MITM proxy with webrick and ssl support (for mocking out requests with VCR on client side, see this thread VCRProxy: Record PhantomJS ajax calls with VCR inside Capybara or my github ...
0
votes
0answers
23 views

Testing a Mongoid::Relations::Proxy model

I recently came across some models in an application that I'm working on (that I didn't write) that extend from Mongoid::Relations::Proxy. I'm not familiar with the purpose of this class and how I ...
0
votes
1answer
116 views

Webrick proxy + cURL returns bad request

I'm going nuts, I have a very simple WEBrickProxy (WEBrick 1.3.1, with Ruby 1.9.3), and I want to try it out with curl. Here is the proxy: require 'webrick' require 'webrick/httpproxy' server = ...
0
votes
2answers
55 views

Make ruby automacially find the values for the proxy/authentication settings for http?

I'm using the ruby gem Mechanize to access a website through a proxy and it's working find I'm just wondering if it's possible to have ruby automatically fill in my proxy settings. require ...
1
vote
3answers
3k views

How to install gem through proxy with authorization

I am behind a corporate proxy and it needs authorization to use it. When I try just to use option -p http://ip.of.my.proxy:3128, it throws error 407. Is there a workaround?

1 2 3 4 5 6
15 30 50 per page