noun-project-api 0.2.1 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c7ae7b8b1f25961ef2fe19d378c2d94055e98dd
4
- data.tar.gz: c2530ecfc949d889e96118a6d9f954ee3a5348a8
3
+ metadata.gz: 11f21fc8fa8332fb270247aba04d4ac778c5cff9
4
+ data.tar.gz: 9cf63e9099b5f9b1b777aa0191cf80fd516b3b90
5
5
  SHA512:
6
- metadata.gz: 4a72e78652f89a94ca39594381818889b65e942e912541d9c4180f5c8e2fe6549de04596caedb23267c832406d4bb789659e0bc32ebccace3334d64350f14726
7
- data.tar.gz: acbd1591de900a72773d6de5f664f0a4f42a6fa94606e01dac602830fad0572f2ef8476f028d2afbf56dc60042f59ca8f929fc4c9ba1aea6d5083f0944f8811c
6
+ metadata.gz: 1d1e4725b6dd873d4f4f66cc9d0636123196cbd02a4b090d3fdf548df54d2ecc40b16eecac4050c2e6bbb6e9b190f84f4706cfbf4d04c5391b85bab302d715de
7
+ data.tar.gz: 5ade878aa4c75eb4cd0e0875be509fd381381ce090789784307f8e5f6e74631a23b9097f05a837300200b4547aeeabef5ce9148e7f43952c6e2dd6098c9e0ea0
@@ -9,7 +9,11 @@ module NounProjectApi
9
9
  ids = [ids] if ids.is_a?(String) || ids.is_a?(Fixnum)
10
10
  fail(ArgumentError, 'Missing ids') if ids.nil? || ids.empty?
11
11
 
12
- result = access_token.post("#{API_BASE}#{API_PATH}", icons: ids.join(','))
12
+ result = access_token.post(
13
+ "#{API_BASE}#{API_PATH}",
14
+ { icons: ids.join(',') }.to_json,
15
+ { 'Accept' => 'application/json', 'Content-Type' => 'application/json' }
16
+ )
13
17
  result.code == '200'
14
18
  end
15
19
  end
@@ -37,7 +37,8 @@ RSpec.describe NounProjectApi::Reporter do
37
37
  :post
38
38
  ).with(
39
39
  "#{NounProjectApi::API_BASE}#{NounProjectApi::Reporter::API_PATH}",
40
- icons: id.to_s
40
+ { icons: id.to_s }.to_json,
41
+ { 'Accept' => 'application/json', 'Content-Type' => 'application/json' }
41
42
  ).and_return(
42
43
  valid_response
43
44
  )
@@ -58,7 +59,8 @@ RSpec.describe NounProjectApi::Reporter do
58
59
  :post
59
60
  ).with(
60
61
  "#{NounProjectApi::API_BASE}#{NounProjectApi::Reporter::API_PATH}",
61
- icons: id
62
+ { icons: id }.to_json,
63
+ { 'Accept' => 'application/json', 'Content-Type' => 'application/json' }
62
64
  ).and_return(
63
65
  valid_response
64
66
  )
@@ -81,7 +83,8 @@ RSpec.describe NounProjectApi::Reporter do
81
83
  :post
82
84
  ).with(
83
85
  "#{NounProjectApi::API_BASE}#{NounProjectApi::Reporter::API_PATH}",
84
- icons: ids.join(',')
86
+ { icons: ids.join(',') }.to_json,
87
+ { 'Accept' => 'application/json', 'Content-Type' => 'application/json' }
85
88
  ).and_return(
86
89
  valid_response
87
90
  )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noun-project-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nadav Shatz