ali_ots 0.0.3 → 0.0.4

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: 4c338769e4ced44e55b25257752e797165f3e7b2
4
- data.tar.gz: c7b074ca39ab54563ca33dadefa1c4d8a9a01954
3
+ metadata.gz: 2dc92461c285533a538266e584d909e92ae9b2d2
4
+ data.tar.gz: 7d9a6ad903bbfe13b944ea8a96a1a50a61043571
5
5
  SHA512:
6
- metadata.gz: 7c382a6742fdf689944bac34e32e37fe2f62f924bd974e8daf93c29347998d5c4507e2e17d7ecce515c7996638bcca4071222bb7be139af048f2278f54654073
7
- data.tar.gz: c4daf1497ed4006dc36ba18ca121e9afa09f586b0b03e4165e6608f8a2a44944432c43a43579b6c7ae94da74773ea39c8a66922acfb68fcfdf113c6091e7d314
6
+ metadata.gz: 95ee463771a8a7cfbd1840a74b6baabcee203fd30f5a88f3550b951f66a0b7d311feb94817952b7484818bb3e25135e6cbcbd8227c9b091f2d1699a91670897e
7
+ data.tar.gz: 9220f1af85a2adce1bb355a549c8de5bee956542b948d4ffddfb6da2b42ec28cda622d3eed0b9dc97dda90d82f9c690b65c1604b54e5715131d93bf29b44a51d
@@ -97,17 +97,17 @@ module AliOts
97
97
  'x-ots-date',
98
98
  'x-ots-contenttype',
99
99
  ]
100
- raise AliOts::Exceptions::ResponseException.new("Missing Parameter: #{(header_names-headers.symbolize_keys.keys).join(", ")}") unless header_names == header_names&&headers.symbolize_keys.keys
100
+ self.logger.error("Missing Parameter: #{(header_names-headers.symbolize_keys.keys).join(", ")}") unless header_names == header_names&&headers.symbolize_keys.keys
101
101
 
102
102
  # 2, check md5
103
103
  md5 = Base64.encode64(Digest::MD5.digest(body)).gsub("\n", "")
104
- raise AliOts::Exceptions::ResponseException.new("MD5 mismatch in response") unless md5 == headers['x-ots-contentmd5']
104
+ self.logger.error("MD5 mismatch in response") unless md5 == headers['x-ots-contentmd5']
105
105
 
106
106
  # 3, check date
107
- raise AliOts::Exceptions::ResponseException.new("Invalid date format in response") unless server_time = (Time.parse(headers['x-ots-date']) rescue nil)
107
+ self.logger.error("Invalid date format in response") unless server_time = (Time.parse(headers['x-ots-date']) rescue nil)
108
108
 
109
109
  # 4, check date range
110
- raise AliOts::Exceptions::ResponseException.new("The difference between date in response and system time is more than 15 minutes") unless (Time.now - server_time).abs < 15.minute
110
+ self.logger.error("The difference between date in response and system time is more than 15 minutes") unless (Time.now - server_time).abs < 15.minute
111
111
  end
112
112
  end
113
113
  end
@@ -1,3 +1,3 @@
1
1
  module AliOts
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
data/lib/ali_ots.rb CHANGED
@@ -2,7 +2,6 @@ require 'logger'
2
2
  require 'protobuf'
3
3
  require 'faraday'
4
4
  require 'addressable/uri'
5
- require 'exception'
6
5
 
7
6
  require 'ali_ots/client'
8
7
  require 'ali_ots/connection'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ali_ots
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Backkom