universal-git-client 1.2.9 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -1
- data/VERSION +1 -1
- data/lib/universal-git-client/client.rb +18 -18
- data/lib/universal-git-client/client_factory.rb +5 -5
- data/lib/universal-git-client/configuration.rb +4 -4
- data/lib/universal-git-client/normalizers/base.rb +3 -5
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa1b373b0d8b5adc4ee8bad9a2af137f4e94ca85bdaa482ba61d6cc5e7b2c87c
|
4
|
+
data.tar.gz: cb00d62dc94cfdff34666189b063fb9c75c16058ad696428125fbb5546b8f53a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7eab118a450f3c486109589938660450aee799b051def96d2af720605aeababc67e499f9a17da1f141dd7d8c1dbdbb1f6c11455fc5721327af112dbd4063a415
|
7
|
+
data.tar.gz: 5af8cb50f0c53769f5a9672a0ae6d35041318738c73796852b988ef35b35c9749e9ec00311aec62a76b262ad0489a90de138592f4a4683e9c068c0a2feff0842
|
data/README.md
CHANGED
@@ -14,7 +14,16 @@
|
|
14
14
|
- Release title: version number, for example v0.4.0
|
15
15
|
- Write: release notes
|
16
16
|
|
17
|
-
To validate, click on "Publish release"
|
17
|
+
5 - To validate, click on "Publish release".
|
18
|
+
|
19
|
+
6 - Log on rubygems by using the shell command `gem signin` and the account of `cukebot@cucumber.io`
|
20
|
+
If you don't have access to this account. Please contact cucumber open to give you access
|
21
|
+
|
22
|
+
7 - Execute the shell command `gem build universal-git-client.gemspec`. It will generate a gem file
|
23
|
+
|
24
|
+
8 - Execute the shell command `gem push universal-git-client-<GEM_VERSION>.gem`
|
25
|
+
|
26
|
+
That's it!
|
18
27
|
|
19
28
|
## Contributing to universal-git-client
|
20
29
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.0.0
|
@@ -19,47 +19,47 @@ module UniversalGitClient
|
|
19
19
|
normalize(response, :User)
|
20
20
|
end
|
21
21
|
|
22
|
-
def organizations(
|
23
|
-
response = http_client.organizations(
|
22
|
+
def organizations(**args)
|
23
|
+
response = http_client.organizations(**args)
|
24
24
|
normalize(response, :Organization)
|
25
25
|
end
|
26
26
|
|
27
|
-
def user_repos(
|
28
|
-
response = http_client.user_repos(
|
27
|
+
def user_repos(**args)
|
28
|
+
response = http_client.user_repos(**args)
|
29
29
|
normalize(response, :Repository)
|
30
30
|
end
|
31
31
|
|
32
|
-
def orga_repos(
|
33
|
-
response = http_client.orga_repos(
|
32
|
+
def orga_repos(**args)
|
33
|
+
response = http_client.orga_repos(**args)
|
34
34
|
normalize(response, :Repository)
|
35
35
|
end
|
36
36
|
|
37
|
-
def repository(
|
38
|
-
response = http_client.repository(
|
37
|
+
def repository(**args)
|
38
|
+
response = http_client.repository(**args)
|
39
39
|
normalize(response, :Repository)
|
40
40
|
end
|
41
41
|
|
42
|
-
def branches(
|
43
|
-
response = http_client.branches(
|
42
|
+
def branches(**args)
|
43
|
+
response = http_client.branches(**args)
|
44
44
|
normalize(response, :Branch)
|
45
45
|
end
|
46
46
|
|
47
|
-
def branch(
|
48
|
-
response = http_client.branch(
|
47
|
+
def branch(**args)
|
48
|
+
response = http_client.branch(**args)
|
49
49
|
normalize(response, :Branch)
|
50
50
|
end
|
51
51
|
|
52
|
-
def download_repo_archive(
|
53
|
-
http_client.download_repo_archive(
|
52
|
+
def download_repo_archive(**args)
|
53
|
+
http_client.download_repo_archive(**args)
|
54
54
|
end
|
55
55
|
|
56
|
-
def setup_repo_webhook(
|
57
|
-
response = http_client.setup_repo_webhook(
|
56
|
+
def setup_repo_webhook(**args)
|
57
|
+
response = http_client.setup_repo_webhook(**args)
|
58
58
|
normalize(response, :Webhook)
|
59
59
|
end
|
60
60
|
|
61
|
-
def delete_repo_webhook(
|
62
|
-
http_client.delete_repo_webhook(
|
61
|
+
def delete_repo_webhook(**args)
|
62
|
+
http_client.delete_repo_webhook(**args)
|
63
63
|
end
|
64
64
|
|
65
65
|
private
|
@@ -7,16 +7,16 @@ require 'universal-git-client/http/bitbucket_server'
|
|
7
7
|
module UniversalGitClient
|
8
8
|
class ClientFactory
|
9
9
|
class << self
|
10
|
-
def build(provider,
|
10
|
+
def build(provider, **args)
|
11
11
|
case provider
|
12
12
|
when :github
|
13
|
-
Client.new('GitHub', UniversalGitClient::Http::Github.new(
|
13
|
+
Client.new('GitHub', UniversalGitClient::Http::Github.new(**args))
|
14
14
|
when :gitlab
|
15
|
-
Client.new('GitLab', UniversalGitClient::Http::Gitlab.new(
|
15
|
+
Client.new('GitLab', UniversalGitClient::Http::Gitlab.new(**args))
|
16
16
|
when :bitbucket
|
17
|
-
Client.new('Bitbucket', UniversalGitClient::Http::Bitbucket.new(
|
17
|
+
Client.new('Bitbucket', UniversalGitClient::Http::Bitbucket.new(**args))
|
18
18
|
when :bitbucket_server
|
19
|
-
Client.new('Bitbucket Server', UniversalGitClient::Http::BitbucketServer.new(
|
19
|
+
Client.new('Bitbucket Server', UniversalGitClient::Http::BitbucketServer.new(**args))
|
20
20
|
else
|
21
21
|
raise ArgumentError, 'Unknown provider'
|
22
22
|
end
|
@@ -5,9 +5,9 @@ module UniversalGitClient
|
|
5
5
|
extend Dry::Configurable
|
6
6
|
|
7
7
|
setting :logger
|
8
|
-
setting :log_level, :debug
|
9
|
-
setting :log_format, :apache
|
10
|
-
setting :user_agent, 'UniversalGitClient-Ruby'
|
11
|
-
setting :default_pagination, 30
|
8
|
+
setting :log_level, default: :debug
|
9
|
+
setting :log_format, default: :apache
|
10
|
+
setting :user_agent, default: 'UniversalGitClient-Ruby'
|
11
|
+
setting :default_pagination, default: 30
|
12
12
|
end
|
13
13
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'json'
|
4
|
-
require '
|
4
|
+
require 'jsonapi/serializer'
|
5
5
|
require 'deep_merge'
|
6
6
|
require 'uri'
|
7
7
|
require 'nitlink'
|
@@ -20,9 +20,7 @@ module UniversalGitClient
|
|
20
20
|
object = body_as_object
|
21
21
|
serializer = serializer_for_resource
|
22
22
|
serializer_options = {}
|
23
|
-
if object.is_a?(Array)
|
24
|
-
serializer_options.deep_merge!(pagination_options)
|
25
|
-
end
|
23
|
+
serializer_options.deep_merge!(pagination_options) if object.is_a?(Array)
|
26
24
|
serializer.new(object, serializer_options)
|
27
25
|
end
|
28
26
|
|
@@ -99,7 +97,7 @@ module UniversalGitClient
|
|
99
97
|
end
|
100
98
|
|
101
99
|
class BaseSerializer
|
102
|
-
include
|
100
|
+
include ::JSONAPI::Serializer
|
103
101
|
end
|
104
102
|
end
|
105
103
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: universal-git-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HipTest
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deep_merge
|
@@ -87,47 +87,47 @@ dependencies:
|
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0.8'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
90
|
+
name: jsonapi-serializer
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- - "
|
93
|
+
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
95
|
+
version: '0'
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - "
|
100
|
+
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
102
|
+
version: '0'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: rdoc
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
109
|
+
version: 6.2.1
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
116
|
+
version: 6.2.1
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: bundler
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
123
|
+
version: '2.0'
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
130
|
+
version: '2.0'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: juwelier
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -306,14 +306,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
306
306
|
requirements:
|
307
307
|
- - ">="
|
308
308
|
- !ruby/object:Gem::Version
|
309
|
-
version: '
|
309
|
+
version: '2.7'
|
310
310
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
311
311
|
requirements:
|
312
312
|
- - ">="
|
313
313
|
- !ruby/object:Gem::Version
|
314
314
|
version: '0'
|
315
315
|
requirements: []
|
316
|
-
rubygems_version: 3.
|
316
|
+
rubygems_version: 3.2.33
|
317
317
|
signing_key:
|
318
318
|
specification_version: 4
|
319
319
|
summary: Use this gem to normalize git providers api responses
|