mandarin-api 1.0.0 → 1.0.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
  SHA1:
3
- metadata.gz: d84ee559361d1d97dae3c114dc85adb59e47b4af
4
- data.tar.gz: b87a8eb6b57c209ea8a378899ac848675bf194f5
3
+ metadata.gz: b22bc6561b923411d3b2317ebced6cca0b93d5de
4
+ data.tar.gz: ce8cb2a29077f27b45f40658fab2e625e45fb980
5
5
  SHA512:
6
- metadata.gz: 722e27b9a71289c02dfb62da6fd33f6e8aa64bc987d9788a1b14784c052ec9f90355bede7e227539105359151d9701345cd7d10d48d37daaca1510d9760be518
7
- data.tar.gz: c97df2fe2d0a0be03acc7a9ac173eec02c62ce351245b8f44a60dfb21595df7e1e17470dafc4d4a1448998c3087f48b5fbcb7b3a859bc283d0f1a27da1d2540b
6
+ metadata.gz: e3e12153a925f4971587b7902b31abf4a766d875e56c4e7adbb239121cc124f9f1d1e86a77bc0b3eeac6b3a37da8c7dc96800deae802cb32023c38639423a772
7
+ data.tar.gz: 5d8f9f2c9530b88a9548b402e9f018a72feed890d0bd24a3ad5807ce0ab442189708d616af75cd9bd61d1a24d86e9be6362d78acf0ce20134d6ca51ed7db63b2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mandarin-api (1.0.0)
4
+ mandarin-api (1.0.1)
5
5
  curb (~> 0.9.4)
6
6
 
7
7
  GEM
@@ -18,7 +18,7 @@ module MandarinApi
18
18
  perform_loging url, params, header
19
19
  curl = Curl::Easy.new(url)
20
20
  curl.headers = header
21
- curl.post(json(params))
21
+ curl.post(json(params))
22
22
  body = JSON.parse(curl.body_str)
23
23
  return body if curl.response_code == 200
24
24
  { 'status' => curl.response_code, 'error' => body }
@@ -33,8 +33,8 @@ module MandarinApi
33
33
 
34
34
  def header
35
35
  {
36
- 'content_type' => 'application/json',
37
- 'x_auth' => generate_x_auth_header(@merchant_id, @secret)
36
+ 'Content-Type' => 'application/json',
37
+ 'X-Auth' => generate_x_auth_header(@merchant_id, @secret)
38
38
  }
39
39
  end
40
40
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'mandarin-api'
5
- s.version = '1.0.0'
5
+ s.version = '1.0.1'
6
6
  s.authors = ['Vladimir Bogaevsky']
7
7
  s.email = 'gitvbogaevsky@gmail.com'
8
8
  s.licenses = ['MIT']
@@ -42,7 +42,7 @@ RSpec.describe MandarinApi::Wrapper do
42
42
  end
43
43
 
44
44
  let(:expected) do
45
- header = { 'content_type' => 'application/json', 'x_auth' => x_auth }
45
+ header = { 'Content-Type' => 'application/json', 'X-Auth' => x_auth }
46
46
  url = URI.join(MandarinApi.config.request_url, 'api/card-bindings').to_s
47
47
  "Calling MandarinBank at: #{url}; body: #{params}, header: #{header}\n"
48
48
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mandarin-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Bogaevsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-11 00:00:00.000000000 Z
11
+ date: 2017-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec