improvmx 0.2 → 0.2.1

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
  SHA256:
3
- metadata.gz: cda727e34e3f195024c8f79b1c1b1ea1f2fd91513bf5fbfb673259ba214f8905
4
- data.tar.gz: b2614061c64a98dabe42ca0cd7fc50b8b2229178b745d1a775ab958f6ab5ba26
3
+ metadata.gz: b12b228c6012e97a24779f8dedff5328e3c909fdf3fca8f1ba799c359596aa49
4
+ data.tar.gz: 93256d0996e9e539f9a8a2e787a38ea7de4476bfc29d33f1f15bc93c414eb090
5
5
  SHA512:
6
- metadata.gz: a8f566d825c3c781dd2b6054d06dded9b703ed897b179fbed7857cbd39312c468a52f9c48db4e73321c3e2daf97da41fe12f0e2a0b1b6b21f694beea37c5458d
7
- data.tar.gz: cf9a201d07085fadc677d321d62acfb27a97025f8ceb27c8338763a21b7781feddf388eb62f501a8f73c935b2a4ba4374425551b1387f636c3204b714805c373
6
+ metadata.gz: 772ad470ee9dfd6663d9423213b82cc5c7ac75548499fe6d13e963c533d0e2b88f7ce7a574abe23ef4033ca9b6a130ac468b393939c65a9e85a91da47559bfdd
7
+ data.tar.gz: f4e1fc091cbdd0784861603d558e9e429d552a90bd1827d933d19bbc92ccb1e74e06d4d6ef678770f1d28a31680d4b1b32e1633944a3fffd3367a95cf52d830f
data/README.md CHANGED
@@ -77,5 +77,5 @@ Deployment
77
77
  This part is for maintaincers only. In order to deploy this gem to rubygem follow those steps:
78
78
 
79
79
  1. Bump the version in `lib/improvmx/version.rb`
80
- 1. Build the gem using `gem build improvmx.gemspec`
81
- 1. Push it to rubygems `gem push improvmx-x.x.x.gem`
80
+ 2. Build the gem using `gem build improvmx.gemspec`
81
+ 3. Push it to rubygems `gem push improvmx-x.x.x.gem`
@@ -14,14 +14,17 @@ module Improvmx
14
14
  rest_client_params = {
15
15
  user: 'api',
16
16
  password: api_key,
17
- user_agent: "improvmx-ruby/#{Improvmx::VERSION}"
17
+ user_agent: "improvmx-ruby/#{Improvmx::VERSION}",
18
+ headers: {
19
+ content_type: "application/json"
20
+ }
18
21
  }
19
22
 
20
23
  @http_client = RestClient::Resource.new('https://api.improvmx.com/v3', rest_client_params)
21
24
  end
22
25
 
23
26
  def post(resource_path, data, headers = {})
24
- response = @http_client[resource_path].post(data, headers)
27
+ response = @http_client[resource_path].post(data.to_json, headers)
25
28
  Response.new(response)
26
29
  rescue StandardError => e
27
30
  raise communication_error e
@@ -35,7 +38,7 @@ module Improvmx
35
38
  end
36
39
 
37
40
  def put(resource_path, data)
38
- response = @http_client[resource_path].put(data)
41
+ response = @http_client[resource_path].put(data.to_json)
39
42
  Response.new(response)
40
43
  rescue StandardError => e
41
44
  raise communication_error e
@@ -1,3 +1,3 @@
1
1
  module Improvmx
2
- VERSION = '0.2'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: improvmx
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - C.S.V. Alpha
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-04-29 00:00:00.000000000 Z
12
+ date: 2023-09-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []
64
- rubygems_version: 3.2.14
64
+ rubygems_version: 3.2.33
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: Ruby interface for the ImprovMX API