pubcontrol 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pubcontrol.rb +3 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f33ca2ceb255910c312e0b69deb7b52c8d54e72
4
- data.tar.gz: b08ded6c1962af3d18cc8117a1aa043717c34078
3
+ metadata.gz: 3e6fcb8db8ed8cda62abecf09a037501fb5ae547
4
+ data.tar.gz: ef00fbf3e4963a288125f5743c9015d85f8d5b52
5
5
  SHA512:
6
- metadata.gz: 89c5fec887b3a7837822e4140d013dd4d62bfb864215feff77c64f43570b9ab7edaf23ff57b391d8a7718f3abd37e086a7d2369222905b5af88dfd6676d6ff18
7
- data.tar.gz: 23f45ef2508d4104d3995f8639078cdade3027a4e8075951abf8cb167a482074c890de73275db04257e9236404d46a39b8aba96be6520c50b17c27e0b2c9f6f0
6
+ metadata.gz: de5f3cc596bdbffdf7ff2c4bd1b1d6d2419847800e1624c0f942198466d6842bc04113a8cd6b2d8a298eee69dec243627d06f4d3002c07a532e1475f19a758fe
7
+ data.tar.gz: 300373c255dde069f23af2aa014814f909367a3748b40399e72824d178aeec831de17a7a8228d714796f7d377da78b2b0d303c2223dd2184c0984f8d1d3bd4f0
data/lib/pubcontrol.rb CHANGED
@@ -113,14 +113,14 @@ class PubControl
113
113
  content = Hash.new
114
114
  content['items'] = items
115
115
  # REVIEW: POST implementation
116
- request = Net::HTTP::Post.new(uri.path)
116
+ request = Net::HTTP::Post.new(uri.request_uri)
117
117
  # REVIEW: is simply encoding in UTF-8 correct here?
118
- request.body = content.to_json.encode('utf-8')
118
+ request.body = content.to_json
119
119
  if !auth_header.nil?
120
120
  request['Authorization'] = auth_header
121
121
  end
122
122
  request['Content-Type'] = 'application/json'
123
- response = Net::HTTP.start(uri.host, use_ssl: use_ssl) do |http|
123
+ response = Net::HTTP.start(uri.host, uri.port, use_ssl: use_ssl) do |http|
124
124
  http.request(request)
125
125
  end
126
126
  # REVIEW: HTTPSuccess does not include 3xx status codes.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubcontrol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Bokarius
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-05 00:00:00.000000000 Z
11
+ date: 2015-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: algorithms