ozon_api 0.3.0 → 0.3.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: d684e437f4b845352017d133924e46fdbb01f87e
4
- data.tar.gz: 69321089aa802d65e05bf9da8463831c9625632a
3
+ metadata.gz: 69ce41d66c36d8309175dfc2a93326a371a695e9
4
+ data.tar.gz: 43712995a299d6453626d9ef1a70d3d837fcc6f4
5
5
  SHA512:
6
- metadata.gz: 1de2dd5cdf07d217148726afa5967b4b4acae3fde0b2739315899a2ccf18b578cfe3197aa8f3e454a814a95c93320594523b52ca8bfee62cf09e7415f79c77e7
7
- data.tar.gz: e288ac0490e78c3e10fad0203eb4c701ba4cda32352d728bf85fc01ac1cecfc5c30449fe0534391c3c30a8f097ff65a74dbabb58a7723d6231d09695f5619fc5
6
+ metadata.gz: c06b01d610bba19f13492f2fe4e37f1f1fd5a94546875eae3497d36dc275eefa84ca5149a84bc5074bfe34e785988618f10b37f3374d1fe476e8c5065f5b42c1
7
+ data.tar.gz: ff5b6f95a8ca988cfb606261dc2290c52989564a6f7057b53e9ed4542291dfe39889198ff3d29e22eeb691ad40e63dde2ab00fa8cb0898c2d817772768b904b9
@@ -22,7 +22,7 @@ module OzonApi
22
22
  out << "Ozon get:\n"
23
23
  out << uri.to_s
24
24
  out << "\n"
25
- out << "Ozon response:\n"
25
+ out << "Ozon plain response:\n"
26
26
  out << response
27
27
  out << "\n"
28
28
  end
@@ -86,8 +86,17 @@ module OzonApi
86
86
  @config.out
87
87
  end
88
88
 
89
+ def debug
90
+ @config.debug
91
+ end
92
+
89
93
  def parse_response(data)
90
94
  result = JSON.parse(data)
95
+ if out && debug
96
+ out << "Ozon response json:\n"
97
+ out << result
98
+ out << "\n"
99
+ end
91
100
 
92
101
  if result['Status'] == SUCCESS_STATUS && result['Error'].nil?
93
102
  result
@@ -6,7 +6,7 @@ module OzonApi
6
6
  include ActiveModel::Validations
7
7
 
8
8
  def self.attribute_names
9
- [:scheme, :host, :base_path, :login, :password, :out]
9
+ [:scheme, :host, :base_path, :login, :password, :out, :debug]
10
10
  end
11
11
 
12
12
  def attribute_names
@@ -24,6 +24,7 @@ module OzonApi
24
24
  @login = ENV['OZON_LOGIN']
25
25
  @password = ENV['OZON_PASSWORD']
26
26
  @out = STDOUT
27
+ @debug = false
27
28
 
28
29
  yield(self) if block_given?
29
30
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module OzonApi
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ozon_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Kotov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-04 00:00:00.000000000 Z
11
+ date: 2017-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  version: '0'
64
64
  requirements: []
65
65
  rubyforge_project:
66
- rubygems_version: 2.5.1
66
+ rubygems_version: 2.6.10
67
67
  signing_key:
68
68
  specification_version: 4
69
69
  summary: Ruby Ozon API wrapper.