gitlab_client 0.1.0.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5e2071d6c7fc92d058cff4d793ffc24b8fac2990464aee08525f8cfa15e81a4c
4
+ data.tar.gz: 3e68ca1275c5ce5d80b900b2af8d738c9d97510feb5e94914e1ccd87af734f6c
5
+ SHA512:
6
+ metadata.gz: c670045a8ab2b663f19626cd33f6b6bfd095d8dfd506fd08e360f2d1a8388a4fbc9c38242a807e8d8b160b1b9a7830a08fe3a64ce7419be9f32b11982907880b
7
+ data.tar.gz: e1b9dba06c5546a531f76e743a0109eb14195cac1bdaec8cdcc13b2163786f9615b3c2ffae2a504cb73069d3d556825a4ddbce43d3d98ec927859996557294cd
data/.rubocop.yml ADDED
@@ -0,0 +1,14 @@
1
+ ---
2
+ AllCops:
3
+ TargetRubyVersion: 2.7
4
+
5
+ Style/StringLiterals:
6
+ Enabled: true
7
+ EnforcedStyle: double_quotes
8
+
9
+ Style/StringLiteralsInInterpolation:
10
+ Enabled: true
11
+ EnforcedStyle: double_quotes
12
+
13
+ Layout/LineLength:
14
+ Max: 120
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2022-09-22
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at aboobackervyd@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in gitlab_client.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "minitest", "~> 5.0"
11
+
12
+ gem "rubocop", "~> 1.21"
13
+
14
+ gem "steep"
data/Gemfile.lock ADDED
@@ -0,0 +1,86 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ gitlab_client (0.1.0.pre.alpha)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ activesupport (7.0.4)
10
+ concurrent-ruby (~> 1.0, >= 1.0.2)
11
+ i18n (>= 1.6, < 2)
12
+ minitest (>= 5.1)
13
+ tzinfo (~> 2.0)
14
+ ast (2.4.2)
15
+ concurrent-ruby (1.1.10)
16
+ csv (3.2.6)
17
+ ffi (1.15.5)
18
+ fileutils (1.7.0)
19
+ i18n (1.12.0)
20
+ concurrent-ruby (~> 1.0)
21
+ json (2.6.2)
22
+ language_server-protocol (3.17.0.2)
23
+ listen (3.7.1)
24
+ rb-fsevent (~> 0.10, >= 0.10.3)
25
+ rb-inotify (~> 0.9, >= 0.9.10)
26
+ logger (1.5.3)
27
+ minitest (5.16.3)
28
+ parallel (1.22.1)
29
+ parser (3.1.2.1)
30
+ ast (~> 2.4.1)
31
+ rainbow (3.1.1)
32
+ rake (13.0.6)
33
+ rb-fsevent (0.11.2)
34
+ rb-inotify (0.10.1)
35
+ ffi (~> 1.0)
36
+ rbs (2.8.3)
37
+ regexp_parser (2.5.0)
38
+ rexml (3.2.5)
39
+ rubocop (1.36.0)
40
+ json (~> 2.3)
41
+ parallel (~> 1.10)
42
+ parser (>= 3.1.2.1)
43
+ rainbow (>= 2.2.2, < 4.0)
44
+ regexp_parser (>= 1.8, < 3.0)
45
+ rexml (>= 3.2.5, < 4.0)
46
+ rubocop-ast (>= 1.20.1, < 2.0)
47
+ ruby-progressbar (~> 1.7)
48
+ unicode-display_width (>= 1.4.0, < 3.0)
49
+ rubocop-ast (1.21.0)
50
+ parser (>= 3.1.1.0)
51
+ ruby-progressbar (1.11.0)
52
+ securerandom (0.2.2)
53
+ steep (1.3.0)
54
+ activesupport (>= 5.1)
55
+ csv (>= 3.0.9)
56
+ fileutils (>= 1.1.0)
57
+ json (>= 2.1.0)
58
+ language_server-protocol (>= 3.15, < 4.0)
59
+ listen (~> 3.0)
60
+ logger (>= 1.3.0)
61
+ parallel (>= 1.0.0)
62
+ parser (>= 3.1)
63
+ rainbow (>= 2.2.2, < 4.0)
64
+ rbs (>= 2.8.0)
65
+ securerandom (>= 0.1)
66
+ strscan (>= 1.0.0)
67
+ terminal-table (>= 2, < 4)
68
+ strscan (3.0.5)
69
+ terminal-table (3.0.2)
70
+ unicode-display_width (>= 1.1.1, < 3)
71
+ tzinfo (2.0.5)
72
+ concurrent-ruby (~> 1.0)
73
+ unicode-display_width (2.3.0)
74
+
75
+ PLATFORMS
76
+ arm64-darwin-21
77
+
78
+ DEPENDENCIES
79
+ gitlab_client!
80
+ minitest (~> 5.0)
81
+ rake (~> 13.0)
82
+ rubocop (~> 1.21)
83
+ steep
84
+
85
+ BUNDLED WITH
86
+ 2.2.33
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Aboobacker MK
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # GitlabClient
2
+
3
+ Opiniated and minimal Gitlab client for ruby with zero dependencies
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'gitlab_client'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle install
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install gitlab_client
20
+
21
+ ## Usage
22
+
23
+ ### Rest API
24
+
25
+
26
+ ```ruby
27
+ GitlabClient::Rest.new(private_token: '<TOKEN>').call( path: 'api/v4/version')
28
+ ```
29
+ ## Development
30
+
31
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
32
+
33
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
34
+
35
+ ## Contributing
36
+
37
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/gitlab_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/tachyons/gitlab_client/blob/master/CODE_OF_CONDUCT.md).
38
+
39
+ ## License
40
+
41
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
42
+
43
+ ## Code of Conduct
44
+
45
+ Everyone interacting in the GitlabClient project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/tachyons/gitlab_client/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/*_test.rb"]
10
+ end
11
+
12
+ require "rubocop/rake_task"
13
+
14
+ RuboCop::RakeTask.new
15
+
16
+ task default: %i[test rubocop]
data/Steepfile ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ D = Steep::Diagnostic
4
+
5
+ target :lib do
6
+ signature "sig"
7
+
8
+ check "lib" # Directory name
9
+ check "Gemfile" # File name
10
+
11
+ library "json", "uri", "net-http" # Standard libraries
12
+
13
+ configure_code_diagnostics(D::Ruby.strict) # `strict` diagnostics setting
14
+ end
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "gitlab_client"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/gitlab_client/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "gitlab_client"
7
+ spec.version = GitlabClient::VERSION
8
+ spec.authors = ["Aboobacker MK"]
9
+ spec.email = ["aboobackervyd@gmail.com"]
10
+
11
+ spec.summary = "Gitlab Client"
12
+ spec.description = "Gitlab API client"
13
+ spec.homepage = "https://gitlab.com/tachyons/oauth2"
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"] = spec.homepage
19
+ spec.metadata["changelog_uri"] = spec.homepage
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(?:(?: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 "oauth2", "~> 2.0"
34
+
35
+ # For more information and examples about making a new gem, checkout our
36
+ # guide at: https://bundler.io/guides/creating_gem.html
37
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+ # typed: true
3
+
4
+ require "net/http"
5
+ require "json"
6
+
7
+ module GitlabClient
8
+ class Error < StandardError; end
9
+
10
+ # Gitlab client
11
+ class Graphql
12
+ DEFAULT_HEADERS = { "Accept" => "application/json" }.freeze
13
+ GRAPHQL_ENDPOINT = "api/graphql"
14
+ MAXIMUM_REDIRECTS = 5
15
+ attr_reader :access_token, :refresh_token, :private_token
16
+
17
+ def initialize(access_token: nil, refresh_token: nil, private_token: nil, host: "https://gitlab.com/")
18
+ @host = host
19
+ @access_token = access_token
20
+ @refresh_token = refresh_token
21
+ @private_token = private_token
22
+ end
23
+
24
+ def access_token?
25
+ !access_token.nil?
26
+ end
27
+
28
+ def valid?
29
+ !(access_token || refresh_token).nil?
30
+ end
31
+
32
+ def headers
33
+ return DEFAULT_HEADERS.merge({ "PRIVATE-TOKEN" => private_token }) if private_token
34
+ return DEFAULT_HEADERS.merge({ "Authorization" => "Bearer #{access_token}" }) if access_token
35
+
36
+ {}
37
+ end
38
+
39
+ def uri
40
+ URI.join(@host, GRAPHQL_ENDPOINT)
41
+ end
42
+
43
+ def call(query:)
44
+ response = Net::HTTP.post(uri, query)
45
+
46
+ response
47
+ .then { |res| handle_error(res) }
48
+ .then { |res| JSON.parse(res) }
49
+ end
50
+
51
+ private
52
+
53
+ def handle_error(response)
54
+ case response
55
+ when Net::HTTPClientError
56
+ raise Error, JSON.parse(response.body)
57
+ end
58
+ response
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+ # typed: true
3
+
4
+ require "net/http"
5
+ require "json"
6
+
7
+ module GitlabClient
8
+ class Error < StandardError; end
9
+
10
+ # Gitlab client
11
+ class Rest
12
+ DEFAULT_HEADERS = { "Accept" => "application/json" }.freeze
13
+ MAXIMUM_REDIRECTS = 5
14
+ attr_reader :access_token, :refresh_token, :private_token
15
+
16
+ def initialize(access_token: nil, refresh_token: nil, private_token: nil, host: "https://gitlab.com/")
17
+ @host = host
18
+ @access_token = access_token
19
+ @refresh_token = refresh_token
20
+ @private_token = private_token
21
+ end
22
+
23
+ def access_token?
24
+ !access_token.nil?
25
+ end
26
+
27
+ def valid?
28
+ !(access_token || refresh_token).nil?
29
+ end
30
+
31
+ def headers
32
+ return DEFAULT_HEADERS.merge({ "PRIVATE-TOKEN" => private_token }) if private_token
33
+ return DEFAULT_HEADERS.merge({ "Authorization" => "Bearer #{access_token}" }) if access_token
34
+
35
+ {}
36
+ end
37
+
38
+ # rubocop:disable Metrics/MethodLength,Metrics/AbcSize
39
+ def call(path:, method: "GET", custom_headers: {}, data: {})
40
+ uri = URI(@host + path)
41
+ case method
42
+ when "GET"
43
+ response = Net::HTTP.get_response(uri, headers.merge(custom_headers))
44
+ when "POST"
45
+ response = Net::HTTP.post(uri, data.to_json, headers.merge(custom_headers))
46
+ when "PATCH"
47
+ response = Net::HTTP.patch(uri, data, headers.merge(custom_headers))
48
+ when "DELETE"
49
+ response = Net::HTTP.patch(uri, data, headers.merge(custom_headers))
50
+
51
+ end
52
+
53
+ response
54
+ .then { |res| handle_redirect(res) }
55
+ .then { |res| handle_error(res) }
56
+ .then { |res| JSON.parse(res.body) }
57
+ end
58
+ # rubocop:enable Metrics/MethodLength,Metrics/AbcSize
59
+
60
+ private
61
+
62
+ # rubocop:disable Metrices/MethodLength
63
+ def handle_redirect(response, limit = MAXIMUM_REDIRECTS)
64
+ raise ArgumentError, "too many HTTP redirects" if limit.zero?
65
+
66
+ case response
67
+ when Net::HTTPSuccess
68
+ response
69
+ when Net::HTTPRedirection
70
+ location = response["location"]
71
+ if location
72
+ response = Net::HTTP.get_response(URI(location))
73
+ handle_redirect(response, limit - 1)
74
+ end
75
+ else
76
+ response
77
+ end
78
+ end
79
+
80
+ # rubocop:enable Metrices/MethodLength
81
+
82
+ def handle_error(response)
83
+ case response
84
+ when Net::HTTPClientError
85
+ raise Error, JSON.parse(response.body)
86
+ end
87
+ response
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GitlabClient
4
+ VERSION = "0.1.0-alpha"
5
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+ # typed: true
3
+
4
+ require_relative "gitlab_client/version"
5
+ require_relative "gitlab_client/rest"
6
+ require_relative "gitlab_client/graphql"
7
+
8
+ module GitlabClient
9
+ class Error < StandardError; end
10
+ end
@@ -0,0 +1,24 @@
1
+ module GitlabClient
2
+ class Error < StandardError
3
+ end
4
+
5
+ class Graphql
6
+ DEFAULT_HEADERS: Hash[String, String?]
7
+ GRAPHQL_ENDPOINT: String
8
+ MAXIMUM_REDIRECTS: Integer
9
+ @host: String
10
+
11
+ attr_reader access_token: nil
12
+ attr_reader refresh_token: nil
13
+ attr_reader private_token: nil
14
+ def initialize: (?access_token: nil, ?refresh_token: nil, ?private_token: nil, ?host: String) -> void
15
+ def access_token?: -> false
16
+ def valid?: -> bool
17
+ def headers: -> Hash[String, String?]
18
+ def uri: -> URI::Generic
19
+ def call: (query: untyped) -> untyped
20
+
21
+ private
22
+ def handle_error: (untyped response) -> untyped
23
+ end
24
+ end
@@ -0,0 +1,23 @@
1
+ module GitlabClient
2
+ class Error < StandardError
3
+ end
4
+
5
+ class Rest
6
+ DEFAULT_HEADERS: Hash[String, String?]
7
+ MAXIMUM_REDIRECTS: Integer
8
+ @host: String
9
+
10
+ attr_reader access_token: nil
11
+ attr_reader refresh_token: nil
12
+ attr_reader private_token: nil
13
+ def initialize: (?access_token: nil, ?refresh_token: nil, ?private_token: nil, ?host: String) -> void
14
+ def access_token?: -> false
15
+ def valid?: -> false
16
+ def headers: -> Hash[String, String?]
17
+ def call: (path: untyped, ?method: String, ?custom_headers: Hash[untyped, untyped], ?data: Hash[untyped, untyped]) -> untyped
18
+
19
+ private
20
+ def handle_redirect: (Net::HTTP | ::Net::HTTPResponse response, ?Integer limit) -> (Net::HTTP | Net::HTTPSuccess| ::Net::HTTPResponse| nil)
21
+ def handle_error: (Net::HTTP? response) -> Net::HTTP?
22
+ end
23
+ end
@@ -0,0 +1,6 @@
1
+ module GitlabClient
2
+ VERSION: String
3
+
4
+ class Error < StandardError
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gitlab_client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0.pre.alpha
5
+ platform: ruby
6
+ authors:
7
+ - Aboobacker MK
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-01-08 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Gitlab API client
14
+ email:
15
+ - aboobackervyd@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".rubocop.yml"
21
+ - CHANGELOG.md
22
+ - CODE_OF_CONDUCT.md
23
+ - Gemfile
24
+ - Gemfile.lock
25
+ - LICENSE.txt
26
+ - README.md
27
+ - Rakefile
28
+ - Steepfile
29
+ - bin/console
30
+ - bin/setup
31
+ - gitlab_client.gemspec
32
+ - lib/gitlab_client.rb
33
+ - lib/gitlab_client/graphql.rb
34
+ - lib/gitlab_client/rest.rb
35
+ - lib/gitlab_client/version.rb
36
+ - sig/gitlab_client.rbs
37
+ - sig/gitlab_client/graphql.rbs
38
+ - sig/gitlab_client/rest.rbs
39
+ homepage: https://gitlab.com/tachyons/oauth2
40
+ licenses:
41
+ - MIT
42
+ metadata:
43
+ homepage_uri: https://gitlab.com/tachyons/oauth2
44
+ source_code_uri: https://gitlab.com/tachyons/oauth2
45
+ changelog_uri: https://gitlab.com/tachyons/oauth2
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 2.7.0
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">"
58
+ - !ruby/object:Gem::Version
59
+ version: 1.3.1
60
+ requirements: []
61
+ rubygems_version: 3.2.33
62
+ signing_key:
63
+ specification_version: 4
64
+ summary: Gitlab Client
65
+ test_files: []