cdek_client 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15fcbc12e006547dd670ca956ea8243f5c82a5a7
4
- data.tar.gz: 796b4e67d5b46f5addcdfc4ed4ba8bda19665932
3
+ metadata.gz: 256f923801cb7fab5d7dc1a2c7e20d2af86e0597
4
+ data.tar.gz: 61608d3f16ecce212f3f3399efe06f288b4ae36f
5
5
  SHA512:
6
- metadata.gz: cc2fa9316e0f181f9da9ead23871f65f7cc1900c5b9610abc70a96ae7755cacef1d010439240200be363485b826567997201e9686d6af8e1bb93e09f24910dfe
7
- data.tar.gz: 069c8a3411dd1b539c2423b5b3432160ca7816069617d29602f1db5552d23bfa97b2faf88bc8f943788a204f12afa87390e3b02ea68be8c0ddc0bd66fbb527b8
6
+ metadata.gz: 55ff6ecc7b38c9612ea59f3f6e539631dfb169b2ceaa576632d3c2edbd946373eef3679925ade4b6d93501d38d09fce509bfe7fe462aa796d1a0782705379773
7
+ data.tar.gz: 1dee770091b7f122e55d5ecc02583ab0b376fe110e58278ada5b2caca66f8a9ec38774af290981ad7268d9fe90716245f752ba566f3df628ac4f3f6dc96fe850
data/README.md CHANGED
@@ -414,5 +414,8 @@ result = calculator.calculate params
414
414
 
415
415
  ## Ссылки
416
416
 
417
- - [www.edostavka.ru](http://www.edostavka.ru/) - Оффициальный сайт СДЭК.
417
+ - [www.edostavka.ru](http://www.edostavka.ru/) - Сайт СДЭК.
418
418
  - [www.edostavka.ru/clients/integrator.html](http://www.edostavka.ru/clients/integrator.html/) - Документация к API.
419
+
420
+
421
+ Разработано при поддержке интернет-магазина настольных игр "[Танго и Кэш](http://tango-cash.ru/)"
@@ -12,8 +12,8 @@ module CdekClient
12
12
 
13
13
  def hash_to_xml(hash)
14
14
  root_key = hash.keys.first
15
- Nokogiri::XML::Builder.new do |xml|
16
- process_hash_to_xml(root_key, hash[root_key], xml)
15
+ Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
16
+ process_hash_to_xml(root_key, hash[root_key], xml)
17
17
  end.to_xml
18
18
  end
19
19
 
@@ -42,7 +42,7 @@ module CdekClient
42
42
  elsif keypath.length == 1
43
43
  return hash[keypath[0]]
44
44
  else
45
- return hash_value_at_keypath hash[keypath[0]], keypath[1..-1]
45
+ return hash_value_at_keypath hash[keypath[0]], keypath[1..-1]
46
46
  end
47
47
  end
48
48
 
@@ -57,7 +57,7 @@ module CdekClient
57
57
  end
58
58
 
59
59
  def blank?(value)
60
- value.nil? ||
60
+ value.nil? ||
61
61
  (value.is_a?(String) && value.strip == '') ||
62
62
  ((value.is_a?(Array) || (value.is_a?(Hash))) && value.empty?)
63
63
  end
@@ -65,7 +65,7 @@ module CdekClient
65
65
  private
66
66
 
67
67
  def xml_node_to_hash(node)
68
- # If we are at the root of the document, start the hash
68
+ # If we are at the root of the document, start the hash
69
69
  if node.element?
70
70
  result_hash = {}
71
71
  if node.attributes != {}
@@ -120,6 +120,6 @@ module CdekClient
120
120
  end
121
121
  end
122
122
  end
123
-
123
+
124
124
  end
125
- end
125
+ end
@@ -1,3 +1,3 @@
1
1
  module CdekClient
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cdek_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Babur Usenakunov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-10 00:00:00.000000000 Z
11
+ date: 2016-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  requirements: []
96
96
  rubyforge_project:
97
- rubygems_version: 2.4.6
97
+ rubygems_version: 2.4.8
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: Client for CDEK logistics service API