hik_openapi 0.2 → 0.2.1

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
  SHA256:
3
- metadata.gz: 124810a1613f0b8e8ae9491dd535697611763308962dc61dd9dc07ddb62d4a9a
4
- data.tar.gz: fe2cbb8f1f6f87b607bc5ce1c1886c9d28553b47593a50af7e0f5ba7e73b77bf
3
+ metadata.gz: 3ab11685829c40ddecfaee62e7fef5f85b00255c7e3bf2335c4dd95ce138ceb0
4
+ data.tar.gz: 50446587e1d7415ea5e557e0a881a4464f6aae02d5dc46cf91906ed1d9c38c3e
5
5
  SHA512:
6
- metadata.gz: a7f1722cf24803942375ffc473416d40d2dee05e5e4918948b65ef635bf8d7475967c1831d77573338e607f30a5ec566f685bafd5cec9e010591987ea09cc2df
7
- data.tar.gz: b2d14d7d2419a793c9b5d05ead14adf205a241afc81ef3427f35c6d382d40633ecde524341cdfa212a47a41fc87df79e6efd20cedb68575d921d3d5db06f346e
6
+ metadata.gz: 19fba2e5303b5ac390113628da15b73944f3957a220568185959e3ac675ce03bcebf2553b4b40446f7249a8c12162c72f1ee891954fb9f1e8f61a1dfd768ee34
7
+ data.tar.gz: 827204cd85cc1cda44754b45ae718675cc746f05df28d7c5e206fb60c6535be94ed6ce440255883b1a848eb539ef0276e392b801a0ae962179b075eaa55edf3f
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  config.prefix = "/artemis"
7
7
  config.app_key = "app_key"
8
8
  config.app_secret = "app_secret"
9
- config.proxy = { host: "127.0.0.1", port: 8123 } if Rails.env.development?
9
+ config.proxy = { host: "127.0.0.1", port: 8123 }
10
10
  end
11
11
 
12
12
  params = {
data/hik_openapi.gemspec CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = 'hikvision openapi for ruby.'
12
12
  spec.description = 'hikvision openapi for ruby.'
13
13
  spec.homepage = 'https://github.com/palytoxin/hik_openapi'
14
+ spec.licenses = ['MIT']
14
15
  spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0')
15
16
 
16
17
  spec.metadata['allowed_push_host'] = 'https://rubygems.org'
data/lib/hik_openapi.rb CHANGED
@@ -42,7 +42,7 @@ module HikOpenapi
42
42
  ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE
43
43
 
44
44
  response = http_client.headers(sign_headers(@headers)).public_send(@request_method, @uri.to_s, request_options.merge(ssl_context: ctx))
45
- response_body = response.body.empty? ? '' : symbolize_keys!(response.parse)
45
+ response_body = response.code == 200 ? symbolize_keys!(response.parse) : {}
46
46
  response_headers = response.headers
47
47
  {
48
48
  headers: response_headers,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HikOpenapi
4
- VERSION = '0.2'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hik_openapi
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - palytoxin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-14 00:00:00.000000000 Z
11
+ date: 2021-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -44,7 +44,8 @@ files:
44
44
  - lib/hik_openapi.rb
45
45
  - lib/hik_openapi/version.rb
46
46
  homepage: https://github.com/palytoxin/hik_openapi
47
- licenses: []
47
+ licenses:
48
+ - MIT
48
49
  metadata:
49
50
  allowed_push_host: https://rubygems.org
50
51
  homepage_uri: https://github.com/palytoxin/hik_openapi