1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00
Commit graph

29 commits

Author SHA1 Message Date
James Brennan
e5a6edde06 Handle status codes as strings
`Net::HTTPReponse#new` will pass through whatever you give it as the
`code`, although a real `Net::HTTPResponse` status code is always a string.

http://docs.ruby-lang.org/en/2.0.0/Net/HTTPResponse.html#attribute-i-code.
2015-09-16 13:29:30 -07:00
James Billingham
539adf2c7f Added testing coverage for all 3xx status codes 2015-07-09 15:02:18 +01:00
Thomas Nys
854fb1364d Mitigates Style/ColonMethodCall 2015-04-24 07:07:28 +02:00
Thomas Nys
a37018532d Mitigates Style/IncosistentIndentation 2015-04-18 14:47:27 +02:00
Thomas Nys
fca65cdd63 Mitigates Lint/BlockAlignment 2015-04-18 14:47:27 +02:00
Thomas Nys
2637caa582 Mitigates Style/SpaceAfterComma 2015-04-18 12:29:00 +02:00
Thomas Nys
2a9683c9e7 Mitigates Style/SpaceAroundEqualsInParameterDefault 2015-04-18 12:27:50 +02:00
Thomas Nys
0e1360e8d3 Mitigates Style/SpaceAroundOperators 2015-04-18 11:58:09 +02:00
Thomas Nys
b0db829b36 Mitigates Style/SpaceBeforeBlockBraces 2015-04-18 11:57:36 +02:00
Thomas Nys
361e65647f Mitigates Style/TraillingComma 2015-04-18 01:29:25 +02:00
Michael Stock
cc0c2c85ca Convert specs to RSpec 3.1.7 syntax with Transpec
This conversion is done by Transpec 2.3.8 with the following command:
    transpec -f spec

* 328 conversions
    from: obj.should
      to: expect(obj).to

* 238 conversions
    from: == expected
      to: eq(expected)

* 42 conversions
    from: obj.should_receive(:message)
      to: expect(obj).to receive(:message)

* 26 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 26 conversions
    from: lambda { }.should
      to: expect { }.to

* 21 conversions
    from: mock('something')
      to: double('something')

* 21 conversions
    from: obj.stub(:message => value)
      to: allow(obj).to receive_messages(:message => value)

* 19 conversions
    from: be_true
      to: be_truthy

* 19 conversions
    from: its(:attr) { }
      to: describe '#attr' do subject { super().attr }; it { } end

* 18 conversions
    from: obj.stub!(:message)
      to: allow(obj).to receive(:message)

* 15 conversions
    from: obj.should_not_receive(:message)
      to: expect(obj).not_to receive(:message)

* 10 conversions
    from: obj.should_not
      to: expect(obj).not_to

* 7 conversions
    from: obj.stub(:message)
      to: allow(obj).to receive(:message)

* 6 conversions
    from: stub('something')
      to: double('something')

* 5 conversions
    from: be_false
      to: be_falsey

* 4 conversions
    from: expect { }.not_to raise_error(SpecificErrorClass)
      to: expect { }.not_to raise_error

* 4 conversions
    from: lambda { }.should_not
      to: expect { }.not_to

* 3 conversions
    from: =~ /pattern/
      to: match(/pattern/)

* 2 conversions
    from: obj.stub_chain(:message1, :message2)
      to: allow(obj).to receive_message_chain(:message1, :message2)

* 1 conversion
    from: === expected
      to: be === expected

* 1 conversion
    from: it { should_not ... }
      to: it { is_expected.not_to ... }

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2014-12-06 16:12:39 -08:00
Will Bryant
672cdae73a added option to allow for streaming large files without loading them into memory 2014-11-03 12:53:06 -08:00
Kalman Hazins
5f9eedcfda Changing symbol syntax inside hashes - take 2 2014-05-15 16:45:32 -04:00
Narsimham Chelluri
bc551bd1f2 Made SSL connections use the system certificate store by default.
- Set http.verify_mode to OpenSSL::SSL::VERIFY_PEER by default
- Use OpenSSL::X509::Store.new as certificate store unless another is specified

Adapted from Faraday.
See: b25adc0ca6/lib/faraday/adapter/net_http.rb (L100)
2013-08-01 01:32:25 -07:00
Kenichi Kamiya
d571867afa Remove unused variable in spec
It removes below ruby's warning.

* "warning: assigned but unused variable"
2013-01-26 22:41:21 +09:00
Isaac Sanders
d51884c6fe Merge branch 'master' of github.com:isaacsanders/httparty
Conflicts:
	spec/httparty/ssl_spec.rb
	spec/support/ssl_test_helper.rb
2012-04-16 09:19:57 -05:00
John Nunemaker
9d7667ff3e Formatting cleanup. 2012-04-16 09:17:54 -05:00
John Nunemaker
355f1ddb0c Cleanup ssl test helper. 2012-04-16 09:13:07 -05:00
John Nunemaker
4e6f2eb372 Formatting cleanup. 2012-04-16 09:13:06 -05:00
John Nunemaker
a48790f05c Convert pathname to string. 2012-04-16 00:18:41 -04:00
John Nunemaker
9003387a00 More ssl test helper cleanup. 2012-04-15 23:29:36 -04:00
John Nunemaker
cb79fe9ce5 Cleanup ssl test helper. 2012-04-15 23:13:48 -04:00
John Nunemaker
c0f0dc0e7b Formatting cleanup. 2012-04-15 22:51:39 -04:00
Fabio Kreusch
19a9494eed Adds support for fragmented responses 2012-02-15 17:46:01 -02:00
Sandro Turriate
7ea359d0eb Refactor redirection handling
Closes gh-56
2011-01-18 16:19:45 -05:00
Sandro Turriate
e9f8739b63 Cleanup 2011-01-18 15:42:18 -05:00
Dwayne Litzenberger
f9c74788d5 Add ssl_ca_file and ssl_ca_path options to allow SSL certificate verification. 2010-07-19 08:44:52 -04:00
Sandro Turriate
05dcf3b479 Fix ruby warnings 2010-05-08 00:43:36 -04:00
Sandro Turriate
e6e5990497 Encapsulate spec helper methods into a module
It's a good idea to encapsulate methods rather than have them hanging
around in global scope.
2010-01-29 15:20:48 -05:00