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 +4 -4
- data/lib/ozon_api/client.rb +10 -1
- data/lib/ozon_api/configuration.rb +2 -1
- data/lib/ozon_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 69ce41d66c36d8309175dfc2a93326a371a695e9
|
|
4
|
+
data.tar.gz: 43712995a299d6453626d9ef1a70d3d837fcc6f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c06b01d610bba19f13492f2fe4e37f1f1fd5a94546875eae3497d36dc275eefa84ca5149a84bc5074bfe34e785988618f10b37f3374d1fe476e8c5065f5b42c1
|
|
7
|
+
data.tar.gz: ff5b6f95a8ca988cfb606261dc2290c52989564a6f7057b53e9ed4542291dfe39889198ff3d29e22eeb691ad40e63dde2ab00fa8cb0898c2d817772768b904b9
|
data/lib/ozon_api/client.rb
CHANGED
|
@@ -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
|
|
data/lib/ozon_api/version.rb
CHANGED
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.
|
|
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:
|
|
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.
|
|
66
|
+
rubygems_version: 2.6.10
|
|
67
67
|
signing_key:
|
|
68
68
|
specification_version: 4
|
|
69
69
|
summary: Ruby Ozon API wrapper.
|