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 +4 -4
- data/README.md +2 -2
- data/lib/improvmx/client.rb +6 -3
- data/lib/improvmx/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b12b228c6012e97a24779f8dedff5328e3c909fdf3fca8f1ba799c359596aa49
|
4
|
+
data.tar.gz: 93256d0996e9e539f9a8a2e787a38ea7de4476bfc29d33f1f15bc93c414eb090
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
81
|
-
|
80
|
+
2. Build the gem using `gem build improvmx.gemspec`
|
81
|
+
3. Push it to rubygems `gem push improvmx-x.x.x.gem`
|
data/lib/improvmx/client.rb
CHANGED
@@ -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
|
data/lib/improvmx/version.rb
CHANGED
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:
|
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:
|
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.
|
64
|
+
rubygems_version: 3.2.33
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: Ruby interface for the ImprovMX API
|