wy_wecall 0.1.11 → 0.1.12
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/wy_wecall/client.rb +6 -6
- data/lib/wy_wecall/configuration.rb +5 -0
- data/lib/wy_wecall/version.rb +1 -1
- data/wy_wecall.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d600d1d8b97391b7b1c389c3c526c9027a001f05b1da574d55c5adeb8937869a
|
4
|
+
data.tar.gz: faffd103fe2da06ccbcfc69697441e8f8b6579c7059639f7ed277a64af98d623
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e4f98423de3276816f7ae5a28a595be249ff687a783a95316de3a65d79a81d85cef4e8ff993a9098f253fdb2488a32cf197167d404671f7dc7255b465a0995e
|
7
|
+
data.tar.gz: a361c8946bb52bb4a7dada93319fafa67d955cd87cbc5d30c7c02b66dadcf0398959ad680ab4d8b86ce90101a5fa9e8c48f21251b919f1f139e93e6eb231d613
|
data/lib/wy_wecall/client.rb
CHANGED
@@ -26,15 +26,15 @@ module WyWecall
|
|
26
26
|
@app_key = options[:app_key] || WyWecall.configuration.app_key
|
27
27
|
@app_secret = options[:app_secret] || WyWecall.configuration.app_secret
|
28
28
|
@app_type = options[:app_type] || WyWecall.configuration.app_type
|
29
|
-
@algorithm = options[:algorithm] || WyWecall.configuration.algorithm
|
30
|
-
@headers = options[:headers] || WyWecall.configuration.headers
|
29
|
+
@algorithm = options[:algorithm] || WyWecall.configuration.algorithm || WyWecall::Configuration::DEFAULT_ALGORITHM
|
30
|
+
@headers = options[:headers] || WyWecall.configuration.headers || WyWecall::Configuration::DEFAULT_HEADERS
|
31
31
|
@base_url = options[:base_url] || WyWecall.configuration.base_url || WyWecall::Configuration::DEFAULT_BASE_URL
|
32
|
-
@connection_adapter = options[:connection_adapter] || WyWecall.configuration.connection_adapter
|
33
|
-
@timeout = options[:timeout] || WyWecall.configuration.timeout
|
34
|
-
@open_timeout = options[:open_timeout] || WyWecall.configuration.open_timeout
|
32
|
+
@connection_adapter = options[:connection_adapter] || WyWecall.configuration.connection_adapter || WyWecall::Configuration::DEFAULT_CONNECTION_ADAPTER
|
33
|
+
@timeout = options[:timeout] || WyWecall.configuration.timeout || WyWecall::Configuration::DEFAULT_TIMEOUT
|
34
|
+
@open_timeout = options[:open_timeout] || WyWecall.configuration.open_timeout || WyWecall::Configuration::DEFAULT_OPEN_TIMEOUT
|
35
35
|
@api_path = options[:api_path] || WyWecall.configuration.api_path || WyWecall::Configuration::DEFAULT_API_PATH
|
36
36
|
@api_version = options[:api_version] || WyWecall.configuration.api_version || WyWecall::Configuration::DEFAULT_API_VERSION
|
37
|
-
@debug_flag = options[:debug_flag] || WyWecall.configuration.debug_flag
|
37
|
+
@debug_flag = options[:debug_flag] || WyWecall.configuration.debug_flag || WyWecall::Configuration::DEFAULT_DEBUG_FLAG
|
38
38
|
end
|
39
39
|
|
40
40
|
def log_debug(message)
|
@@ -6,6 +6,11 @@ module WyWecall
|
|
6
6
|
DEFAULT_API_PATH = '/open/api/wecall'
|
7
7
|
DEFAULT_API_VERSION = 'v1'
|
8
8
|
DEFAULT_ALGORITHM = 'SHA256'
|
9
|
+
DEFAULT_TIMEOUT = 10
|
10
|
+
DEFAULT_OPEN_TIMEOUT = 10
|
11
|
+
DEFAULT_HEADERS = { 'Content-Type' => 'application/json' }
|
12
|
+
DEFAULT_DEBUG_FLAG = false
|
13
|
+
DEFAULT_CONNECTION_ADAPTER = Faraday.default_adapter
|
9
14
|
attr_accessor :app_key, :app_secret, :app_type, :algorithm, :base_url,
|
10
15
|
:connection_adapter, :headers, :timeout, :open_timeout,
|
11
16
|
:api_path, :api_version, :debug_flag
|
data/lib/wy_wecall/version.rb
CHANGED
data/wy_wecall.gemspec
CHANGED
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
spec.add_dependency "faraday", "~> 1.8.0"
|
30
|
-
spec.add_dependency "faraday_middleware", "~> 1.2.1"
|
30
|
+
spec.add_dependency "faraday_middleware", "~> 1.2.1"
|
31
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wy_wecall
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TryCatch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|