rongcloud-server-sdk 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: 59cfd97613387ba8f0d9935ee385ea2cd22b63ec3af3cbf9eb0d20621e163607
4
- data.tar.gz: 9ad92c2b7ee3326c6785899d5f576d3e1f6a58d436e03e37e90832acc64b11e8
3
+ metadata.gz: dcb4e6f2555e86fcf2ca28b4bfdf8f2607dcf76dbcaf8f7ef0c96a60abf75954
4
+ data.tar.gz: 3cf79649378bad6ffd15700496f5c7ea56837a94546c3927a6c74fdbf31aa419
5
5
  SHA512:
6
- metadata.gz: 519d20363f451a358dba1bd6a01c3a446d82e3bd548f0d61e2d901411092c5e60e29a34f603773ff4d159a2d9b3db91736cef67e553c22ab9cd333c99fe33532
7
- data.tar.gz: f233475c85c2d2a1aee92253d6a0661a569fe10ea4b55b3ccad16f2a8b3c17a2b1be72dbccbda89383c3d9bd342c6b9bf1aa5dab21376e7ec3c4331f05594eef
6
+ metadata.gz: f960322de7803e1a16ab378937185ad0e6c775833aeeaaf34e81036b7ab4d6a9b3ddba91b1a6b2a6ffc94303e60201efa15b403405fc8adabaae66c25e414f94
7
+ data.tar.gz: 00ec6b5d2256a59bd2552f83edf88bd39a6fcf72121326f4218c4ba770df22f1f9a6630d257f87859a87a0da1c4bc1a63932d8bef019d05fc0e9388decb7cc57
data/.overcommit.yml CHANGED
@@ -15,6 +15,10 @@
15
15
  #
16
16
  # Uncomment the following lines to make the configuration take effect.
17
17
 
18
+ CommitMsg:
19
+ CapitalizedSubject:
20
+ enabled: false
21
+
18
22
  PreCommit:
19
23
  RuboCop:
20
24
  enabled: true
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rongcloud-server-sdk (1.0.1)
4
+ rongcloud-server-sdk (1.0.2)
5
5
  http (~> 5.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -23,7 +23,9 @@ Or install it yourself as:
23
23
  ## Usage
24
24
 
25
25
  ```ruby
26
- rongcloud = RongCloud::Client::new(
26
+ require "rongcloud"
27
+
28
+ rongcloud = RongCloud::Client.new(
27
29
  app_key: ENV["RONGCLOUD_APP_KEY"],
28
30
  app_secret: ENV["RONGCLOUD_APP_SECRET"],
29
31
  host: "api-cn.ronghub.com"
@@ -49,13 +51,13 @@ The API name is converted from the corresponding URI, E.g.
49
51
  ### Timeout
50
52
 
51
53
  ```ruby
52
- rongcloud = RongCloud::Client::new(
54
+ rongcloud = RongCloud::Client.new(
53
55
  app_key: ENV["RONGCLOUD_APP_KEY"],
54
56
  app_secret: ENV["RONGCLOUD_APP_SECRET"],
55
57
  host: "api-cn.ronghub.com",
56
58
  http: {
57
59
  timeout_class: HTTP::Timeout::Global,
58
- timeout_options: {global_timeout: 2}
60
+ timeout_options: {global_timeout: 5}
59
61
  }
60
62
  )
61
63
  ```
@@ -63,7 +65,7 @@ rongcloud = RongCloud::Client::new(
63
65
  ### Logging
64
66
 
65
67
  ```ruby
66
- rongcloud = RongCloud::Client::new(
68
+ rongcloud = RongCloud::Client.new(
67
69
  app_key: ENV["RONGCLOUD_APP_KEY"],
68
70
  app_secret: ENV["RONGCLOUD_APP_SECRET"],
69
71
  host: "api-cn.ronghub.com",
@@ -75,6 +77,17 @@ rongcloud = RongCloud::Client::new(
75
77
  )
76
78
  ```
77
79
 
80
+ ### Signature Verify
81
+
82
+ ```ruby
83
+ verified = RongCloud::Signer.verify?(
84
+ app_secret: ENV["RONGCLOUD_APP_SECRET"],
85
+ nonce: params["nonce"],
86
+ timestamp: params["timestamp"],
87
+ signature: params["signature"]
88
+ )
89
+ ```
90
+
78
91
 
79
92
  ## Development
80
93
 
@@ -7,6 +7,9 @@ module RongCloud
7
7
  member "/user/token/expire.json"
8
8
  member "/user/info.json"
9
9
  member "/user/refresh.json"
10
+ member "/user/tag/set.json", format: :json
11
+ member "/user/tag/batch/set.json", format: :json
12
+ member "/user/tags/get.json"
10
13
 
11
14
  member "/user/block.json"
12
15
  member "/user/block/query.json"
@@ -1,3 +1,3 @@
1
1
  module RongCloud
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/rongcloud/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "rongcloud-server-sdk"
7
+ spec.version = RongCloud::VERSION
8
+ spec.authors = ["John Doe"]
9
+ spec.email = ["johndoe@example.com"]
10
+
11
+ spec.summary = "RongCloud Server SDK in Ruby."
12
+ spec.description = "RongCloud Server SDK in Ruby."
13
+ spec.homepage = "https://github.com/souk4711/rongcloud-server-sdk-ruby"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.7.0"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/souk4711/rongcloud-server-sdk-ruby"
19
+ spec.metadata["changelog_uri"] = "https://github.com/souk4711/rongcloud-server-sdk-ruby"
20
+
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
+ `git ls-files -z`.split("\x0").reject do |f|
25
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
26
+ end
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ # Uncomment to register a new dependency of your gem
33
+ spec.add_dependency "http", "~> 5.0"
34
+
35
+ # For more information and examples about making a new gem, check out our
36
+ # guide at: https://bundler.io/guides/creating_gem.html
37
+ spec.metadata["rubygems_mfa_required"] = "true"
38
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rongcloud-server-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Doe
@@ -62,6 +62,7 @@ files:
62
62
  - lib/rongcloud/http.rb
63
63
  - lib/rongcloud/signer.rb
64
64
  - lib/rongcloud/version.rb
65
+ - rongcloud-server-sdk.gemspec
65
66
  homepage: https://github.com/souk4711/rongcloud-server-sdk-ruby
66
67
  licenses:
67
68
  - MIT