authentise 0.2.2 → 0.2.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b6afe61dda050f1f2f3c824094a955283fd65cb
4
- data.tar.gz: e74ca3c9eb0e435355fb56ca74a251d5049b5044
3
+ metadata.gz: 8831efc0f80e0d3cbc488c684dba2cf68c084380
4
+ data.tar.gz: 685b461ee213f942ed733faf08c5a90a0f2b5749
5
5
  SHA512:
6
- metadata.gz: 1b987be80ec91669d0ee14907b4a0e6d0ce1c8b8ca42abd1238103ce7d57d3b026fcd526a8314ef9e0be39b5e32000387a9ea43a5f13169f259794e4a5c40dd3
7
- data.tar.gz: 1bc534d3a936961dd3a245ea647d8767091b9cda000d27ebe6227cd019db29d34d18f2dd44bacb4fbd33c288bef9d1c86929a850f271a776b625c7481fcc7bf0
6
+ metadata.gz: 059140001e9dce738fd90447531375cacfec7f3c6bee96eee3adbabf804462780f98906f3a74dcc3a0193b632c5042eb5089ef150df623316ca9f7298d2fb424
7
+ data.tar.gz: 0cb7c4ce7993280a175c8ee928bb75ef2caa5c5ae24fd130d68a7cd14807e97c979af9cc0b21cf97d99396bafdae47d36e957f40d2fddbad91dd5cef3ab22bce
@@ -25,7 +25,9 @@ module Authentise
25
25
  open_timeout: 2,
26
26
  timeout: 2,
27
27
  }
28
- RestClient.post(url, params, options) do |response, _request, _result|
28
+ body = params.to_json
29
+
30
+ RestClient.post(url, body, options) do |response, _request, _result|
29
31
  json = JSON.parse(response)
30
32
  if response.code == 201
31
33
  {
@@ -54,7 +56,9 @@ module Authentise
54
56
  open_timeout: 2,
55
57
  timeout: 2,
56
58
  }
57
- RestClient.post(url, params, options) do |response, _request, _result|
59
+ body = params.to_json
60
+
61
+ RestClient.post(url, body, options) do |response, _request, _result|
58
62
  if response.code == 201
59
63
  {
60
64
  token: response.cookies["session"],
@@ -39,6 +39,7 @@ module Authentise
39
39
  open_timeout: 2,
40
40
  timeout: 2,
41
41
  }
42
+
42
43
  RestClient.post(url, body, options) do |response, _request, _result|
43
44
  if response.code == 201
44
45
  {
@@ -1,3 +1,3 @@
1
1
  module Authentise
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -15,11 +15,13 @@ describe Authentise::API::Users do
15
15
  name: "Test User",
16
16
  username: "testuser",
17
17
  password: "password",
18
- }
18
+ }.to_json
19
+
19
20
  @request_headers = {
20
21
  "Accept" => "application/json",
21
- "Content-Type" => "application/x-www-form-urlencoded",
22
+ "Content-Type" => "application/json",
22
23
  }
24
+
23
25
  @response_body = {
24
26
  name: "Test User",
25
27
  username: "testuser",
@@ -68,11 +70,13 @@ describe Authentise::API::Users do
68
70
  @request_body = {
69
71
  username: "testuser",
70
72
  password: "password",
71
- }
73
+ }.to_json
74
+
72
75
  @request_headers = {
73
76
  "Accept" => "application/json",
74
- "Content-Type" => "application/x-www-form-urlencoded",
77
+ "Content-Type" => "application/json",
75
78
  }
79
+
76
80
  @response_headers = {
77
81
  "Set-Cookie" => "session=f4242aef; " \
78
82
  "expires=Thu, 27-Apr-2017 08:49:20 GMT; " \
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authentise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sunny Ripert