labclient 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/labclient.rb +7 -4
- data/lib/labclient/branches/branch.rb +25 -0
- data/lib/labclient/branches/create.rb +33 -0
- data/lib/labclient/client.rb +2 -2
- data/lib/labclient/epics/epic.rb +13 -0
- data/lib/labclient/error.rb +1 -0
- data/lib/labclient/files/create.rb +14 -8
- data/lib/labclient/generator/generator.rb +2 -14
- data/lib/labclient/generator/names.rb +17 -3
- data/lib/labclient/generator/template_helper.rb +82 -0
- data/lib/labclient/generator/templates/environments.rb +98 -0
- data/lib/labclient/generator/templates/pages.rb +24 -30
- data/lib/labclient/generator/templates/pipeline_trigger.rb +82 -0
- data/lib/labclient/generator/wizard.rb +23 -7
- data/lib/labclient/http.rb +2 -1
- data/lib/labclient/issues/issue.rb +6 -1
- data/lib/labclient/klass.rb +3 -2
- data/lib/labclient/lab_struct.rb +17 -0
- data/lib/labclient/license/list.rb +2 -2
- data/lib/labclient/merge_requests/accept.rb +15 -6
- data/lib/labclient/merge_requests/create.rb +12 -0
- data/lib/labclient/merge_requests/merge_request.rb +49 -4
- data/lib/labclient/notes/epics/create.rb +4 -4
- data/lib/labclient/notes/epics/delete.rb +3 -3
- data/lib/labclient/notes/epics/list.rb +21 -4
- data/lib/labclient/notes/epics/show.rb +4 -4
- data/lib/labclient/notes/epics/update.rb +4 -4
- data/lib/labclient/notes/issues/create.rb +3 -1
- data/lib/labclient/notes/issues/list.rb +18 -3
- data/lib/labclient/notes/issues/show.rb +1 -1
- data/lib/labclient/notes/merge_requests/list.rb +20 -2
- data/lib/labclient/notes/snippets/create.rb +1 -1
- data/lib/labclient/notes/snippets/list.rb +20 -3
- data/lib/labclient/notes/snippets/show.rb +1 -1
- data/lib/labclient/notifications/update.rb +1 -1
- data/lib/labclient/paginated_response.rb +1 -1
- data/lib/labclient/pipelines/pipeline.rb +41 -0
- data/lib/labclient/projects/methods.rb +30 -2
- data/lib/labclient/projects/reference.rb +5 -0
- data/lib/labclient/projects/snippets/project_snippet.rb +12 -0
- data/lib/labclient/snippets/snippet.rb +2 -2
- data/lib/labclient/users/user.rb +6 -0
- data/lib/labclient/version.rb +1 -1
- metadata +10 -7
- data/lib/labclient/generator/templates/template.rb +0 -23
- data/lib/labclient/open_struct.rb +0 -14
@@ -35,6 +35,14 @@ module LabClient
|
|
35
35
|
client.projects.snippets.delete(project_id, id)
|
36
36
|
end
|
37
37
|
|
38
|
+
def notes
|
39
|
+
client.notes.snippets.list(project_id, id)
|
40
|
+
end
|
41
|
+
|
42
|
+
def note_create(query)
|
43
|
+
client.notes.snippets.create(project_id, id, query)
|
44
|
+
end
|
45
|
+
|
38
46
|
date_time_attrs %i[updated_at created_at]
|
39
47
|
|
40
48
|
user_attrs %i[author]
|
@@ -45,6 +53,10 @@ module LabClient
|
|
45
53
|
option 'agent_detail', 'Hash of user agent details.'
|
46
54
|
option 'delete', 'Delete this deploy key.'
|
47
55
|
option 'update', 'Update this this deploy key.'
|
56
|
+
|
57
|
+
# Notes
|
58
|
+
option 'notes', 'List notes/comments. [Hash]'
|
59
|
+
option 'note_create', 'Creates a new note. [Hash]'
|
48
60
|
end
|
49
61
|
end
|
50
62
|
end
|
@@ -32,8 +32,8 @@ module LabClient
|
|
32
32
|
subtitle 'Snippet'
|
33
33
|
option 'raw', 'Retrieves the raw snippet content.'
|
34
34
|
option 'agent_detail', 'Hash of user agent details.'
|
35
|
-
option 'delete', 'Delete this
|
36
|
-
option 'update', 'Update this this
|
35
|
+
option 'delete', 'Delete this snippet.'
|
36
|
+
option 'update', 'Update this this snippet.'
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
data/lib/labclient/users/user.rb
CHANGED
@@ -105,6 +105,11 @@ module LabClient
|
|
105
105
|
client.users.memberships(id, type)
|
106
106
|
end
|
107
107
|
|
108
|
+
# Events
|
109
|
+
def events(query = {})
|
110
|
+
client.events.user(id, query)
|
111
|
+
end
|
112
|
+
|
108
113
|
# Reload Helper
|
109
114
|
def reload
|
110
115
|
update_self client.users.show(id)
|
@@ -133,6 +138,7 @@ module LabClient
|
|
133
138
|
option 'emails', 'List user emails'
|
134
139
|
option 'email_create', 'Create email for user [Email Address]'
|
135
140
|
option 'email_delete', 'Delete email for user [Email ID]'
|
141
|
+
option 'events', 'List user events [Hash]'
|
136
142
|
option 'impersonation_tokens', 'List impersonation tokesn for user [Filter(Optional)]'
|
137
143
|
option 'impersonation_token_create', 'Create impersonation tokesn [Hash]'
|
138
144
|
option 'impersonation_token_revoke', 'Revoke impersonation tokesn [Token ID]'
|
data/lib/labclient/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: labclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davin Walker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '6.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: amazing_print
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: gitlab_chronic_duration
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -309,6 +309,7 @@ files:
|
|
309
309
|
- lib/labclient/awards/snippets/list.rb
|
310
310
|
- lib/labclient/awards/snippets/show.rb
|
311
311
|
- lib/labclient/branches/branch.rb
|
312
|
+
- lib/labclient/branches/create.rb
|
312
313
|
- lib/labclient/branches/delete.rb
|
313
314
|
- lib/labclient/branches/delete_merged.rb
|
314
315
|
- lib/labclient/branches/list.rb
|
@@ -403,8 +404,10 @@ files:
|
|
403
404
|
- lib/labclient/files/update.rb
|
404
405
|
- lib/labclient/generator/generator.rb
|
405
406
|
- lib/labclient/generator/names.rb
|
407
|
+
- lib/labclient/generator/template_helper.rb
|
408
|
+
- lib/labclient/generator/templates/environments.rb
|
406
409
|
- lib/labclient/generator/templates/pages.rb
|
407
|
-
- lib/labclient/generator/templates/
|
410
|
+
- lib/labclient/generator/templates/pipeline_trigger.rb
|
408
411
|
- lib/labclient/generator/wizard.rb
|
409
412
|
- lib/labclient/groups/access_requests/access_request.rb
|
410
413
|
- lib/labclient/groups/access_requests/approve.rb
|
@@ -509,6 +512,7 @@ files:
|
|
509
512
|
- lib/labclient/keys/show.rb
|
510
513
|
- lib/labclient/keys/user.rb
|
511
514
|
- lib/labclient/klass.rb
|
515
|
+
- lib/labclient/lab_struct.rb
|
512
516
|
- lib/labclient/license/add.rb
|
513
517
|
- lib/labclient/license/delete.rb
|
514
518
|
- lib/labclient/license/license.rb
|
@@ -579,7 +583,6 @@ files:
|
|
579
583
|
- lib/labclient/notes/snippets/update.rb
|
580
584
|
- lib/labclient/notifications/list.rb
|
581
585
|
- lib/labclient/notifications/update.rb
|
582
|
-
- lib/labclient/open_struct.rb
|
583
586
|
- lib/labclient/overview.rb
|
584
587
|
- lib/labclient/paginated_response.rb
|
585
588
|
- lib/labclient/pipelines/cancel.rb
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module LabClient
|
2
|
-
module Generator
|
3
|
-
# Common Helper Class
|
4
|
-
class TemplateHelper
|
5
|
-
attr_reader :client
|
6
|
-
attr_accessor :opts
|
7
|
-
|
8
|
-
def inspect
|
9
|
-
"#<LabClient::Template #{self.class.to_s.demodulize}>"
|
10
|
-
end
|
11
|
-
|
12
|
-
def initialize(client, opts = {})
|
13
|
-
@client = client
|
14
|
-
self.opts = opts
|
15
|
-
setup
|
16
|
-
end
|
17
|
-
|
18
|
-
def setup
|
19
|
-
# Blank Place Holder
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|