修复:users tokens 无法使用post

This commit is contained in:
viletyy 2022-12-12 11:34:21 +08:00
parent 3d0e6d927a
commit f000c702fc
5 changed files with 19 additions and 24 deletions

View File

@ -5,6 +5,6 @@ gemspec
gem "rake", "~> 13.0"
gem "standard", "~> 1.3"
gem "standard"
gem 'rest-client'

View File

@ -11,55 +11,50 @@ GEM
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
http-accept (1.7.0)
http-cookie (1.0.4)
http-cookie (1.0.5)
domain_name (~> 0.5)
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105)
netrc (0.11.0)
parallel (1.22.1)
parallel (1.20.1)
parser (3.1.2.0)
ast (~> 2.4.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.3.1)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.5)
rubocop (1.28.2)
rubocop (0.83.0)
parallel (~> 1.10)
parser (>= 3.1.0.0)
parser (>= 2.7.0.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.17.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.17.0)
parser (>= 3.1.1.0)
rubocop-performance (1.13.3)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-performance (1.5.2)
rubocop (>= 0.71.0)
ruby-progressbar (1.11.0)
standard (1.11.0)
rubocop (= 1.28.2)
rubocop-performance (= 1.13.3)
standard (0.4.6)
rubocop (~> 0.83.0)
rubocop-performance (~> 1.5.2)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.1)
unicode-display_width (2.1.0)
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
PLATFORMS
-darwin-21
x86_64-darwin-20
DEPENDENCIES
gitea-client!
rake (~> 13.0)
rest-client
standard (~> 1.3)
standard
BUNDLED WITH
2.2.19
2.3.26

View File

@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.description = ""
spec.homepage = "https://github.com/viletyy/gitea-client"
spec.license = "MIT"
spec.required_ruby_version = ">= 2.6.0"
spec.required_ruby_version = ">= 2.4.0"
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/viletyy/gitea-client"

View File

@ -187,7 +187,7 @@ module Gitea
end
def post_users_token_by_username(username, opt={})
@http.get("/users/#{username}/tokens", opt)
@http.post("/users/#{username}/tokens", opt)
end
def delete_users_token_by_username_token(username, token, opt={})

View File

@ -1,5 +1,5 @@
# frozen_string_literal: true
module Gitea
VERSION = "0.10.0"
VERSION = "0.11.0"
end