scorn 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/README.md +3 -0
  4. data/lib/scorn.rb +3 -5
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85cc3564b52b437e8e8f4310cfcede5d5696f627d5b0525acb78b8160edbe694
4
- data.tar.gz: 29aae9d5ec45908f599c3e2cba875a0568d80cfa6c831393d1f45d0d0daa15de
3
+ metadata.gz: cebb2eff53282bd30d083de64a8ed4ed2beba5fe05b6b61d2faf2c32dea4ed91
4
+ data.tar.gz: bfd2381a856f11c5ebe4f278a25d207b76ef1ab5415ac2c448e68f5766c259ec
5
5
  SHA512:
6
- metadata.gz: c4fc2fc03aa541256700c41971be22617aba2025db4d7770bd5f8983a0b97f2c4f030ce67f89ef5a0823a2f126c1da73fe10fdd8d6e45e3e2bd11be6f838d24a
7
- data.tar.gz: 4f142484e9ea9296f5d1da76cc5213ee85da9cb1862c4c37d7e376805c4961ec3490ea286fc3364e2ff80821ee09e54ea80fdbf10f28f39660fe0f221fc18c38
6
+ metadata.gz: 45151e4ce0f25e4213d6fdd645bf09ce93df55f1a5bbe9036927884cbe555fc45189a3fa0b0724efc8520eded294944e38d76395cf05bcc07ff52276c33049a5
7
+ data.tar.gz: 1523769e1a4bf6efa6132d0e3c9bedb81cb7580c28d48918f226cdc5ca73c128937440df6fbafb7ce468fd10b3127cdbdaadf2080442e3b23bdd25128c30cdbd
@@ -2,6 +2,11 @@
2
2
  # CHANGELOG.md
3
3
 
4
4
 
5
+ ## scorn 0.3.1 released 2021-01-12
6
+
7
+ * Fix duplicate Content-Type headers when POSTing
8
+
9
+
5
10
  ## scorn 0.3.0 released 2021-01-11
6
11
 
7
12
  * Implement basic POST form data
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
 
2
2
  # scorn
3
3
 
4
+ [![tests](https://github.com/jmettraux/scorn/workflows/test/badge.svg)](https://github.com/jmettraux/scorn/actions)
5
+ [![gem version](https://badge.fury.io/rb/scorn.svg)](http://badge.fury.io/rb/scorn)
6
+
4
7
  A stupid HTTP client library.
5
8
 
6
9
  ```ruby
@@ -10,7 +10,7 @@ require 'net/http'
10
10
 
11
11
  module Scorn
12
12
 
13
- VERSION = '0.3.0'
13
+ VERSION = '0.3.1'
14
14
 
15
15
  class << self
16
16
 
@@ -35,7 +35,7 @@ module Scorn
35
35
 
36
36
  @user_agent =
37
37
  opts[:user_agent] ||
38
- "Scorn #{VERSION} - " +
38
+ "scorn #{VERSION} - " +
39
39
  [ 'Ruby', RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM ].join(' ')
40
40
 
41
41
  @ssl_verify_mode =
@@ -101,8 +101,6 @@ module Scorn
101
101
  when :post then Net::HTTP::Post.new(u)
102
102
  else fail ArgumentError.new("HTTP #{type} not implemented")
103
103
  end
104
- req.instance_eval { @header.clear }
105
- def req.set_header(k, v); @header[k] = [ v ]; end
106
104
 
107
105
  headers.each do |k, v|
108
106
  hk =
@@ -112,7 +110,7 @@ module Scorn
112
110
  when :type then 'Content-Type'
113
111
  else k.to_s
114
112
  end
115
- req.set_header(hk, v)
113
+ req[hk] = v
116
114
  end
117
115
 
118
116
  req
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-10 00:00:00.000000000 Z
11
+ date: 2021-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec