labclient 0.1.4 → 0.1.5

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: '09bb30f5014cb0b4a37d7f4aa421549337b6177bf132580974cf1a35199c6242'
4
- data.tar.gz: cc354dc398276bba64db00bc9adafd23e9c341eba16c4c2dd315788f3ab72fb1
3
+ metadata.gz: 6891782100fb734939767870fa735c9a0f34127582767b4b67c47bdad1f64646
4
+ data.tar.gz: 503518a6a45eba73b86bf44c8997d969cd78396210943753c59e330fe06b3be4
5
5
  SHA512:
6
- metadata.gz: f492cb23a182293f165733d7d54830a2a34b9666c487cf63b5bd2dded2dbd58a7713f513eeba0813e382f1efe0d2c50cb8204f485678448b76f109bf289b8887
7
- data.tar.gz: 0d558d85cea6f58bddf600dd36962b9a3fe1bc0c91e9b398ff6d2c35103fd61d88e4b6d47d24aa06bff15a5c2c195561847f495400ddef1eabaf78cfd7c65498
6
+ metadata.gz: b8f5c439041953cf54681ead1caddc945e913d397cfb3b5b12d3abe81415bcebe0878c5cf13f4c541c1bc7481035d490144d429ac0e37adb82f02da21199f906
7
+ data.tar.gz: d160894003a7d1e48fbc952a6f3e8c27de913816162938b4b77bb67114e3294e04ce46ef866e08ca0696e6cbbb4f2762d7f811cee6721f6b8c4c447fc22e6c85
@@ -50,10 +50,14 @@ module LabClient
50
50
  end
51
51
 
52
52
  def desc(value)
53
- # @result[:desc] = simple_format value
54
53
  @result[:desc] = value
55
54
  end
56
55
 
56
+ def demo(value)
57
+ @result[:demo_url] = "https://asciinema.org/a/#{value}.js"
58
+ @result[:demo] = "<script id='asciicast-#{value}' src='#{@result[:demo_url]}' data-autoplay='true' data-loop='true' async></script>"
59
+ end
60
+
57
61
  def example(value)
58
62
  @result[:example] = value
59
63
  end
@@ -73,7 +73,7 @@ module Typhoeus
73
73
  def process_body
74
74
  if body.empty?
75
75
  nil
76
- elsif headers['content-type'] == 'text/plain'
76
+ elsif headers['content-type']&.include? 'text/plain'
77
77
  body
78
78
  else
79
79
  Oj.load(body, mode: :compat, object_class: LabClient::LabStruct)
@@ -96,6 +96,13 @@ module LabClient
96
96
  update_self client.issues.show(project_id, iid)
97
97
  end
98
98
 
99
+ def project
100
+ # If from List Project ID isn't stored
101
+ project_id = collect_project_id if project_id.nil?
102
+
103
+ client.projects.show(project_id)
104
+ end
105
+
99
106
  help do
100
107
  subtitle 'Issue'
101
108
  option 'update', 'Update issue (accepts hash).'
@@ -11,6 +11,14 @@ module LabClient
11
11
  DOC
12
12
  end
13
13
 
14
+ doc 'Epics' do
15
+ desc 'Via Epic'
16
+ example <<~DOC
17
+ epic = client.epics.show(16, 2)
18
+ epic.note_create(body: 'There!')
19
+ DOC
20
+ end
21
+
14
22
  doc 'Epics' do
15
23
  markdown <<~DOC
16
24
  | Attribute | Type | Required | Description |
@@ -11,6 +11,14 @@ module LabClient
11
11
  DOC
12
12
  end
13
13
 
14
+ doc 'Issues' do
15
+ desc 'Via Issue'
16
+ example <<~DOC
17
+ issue = client.issues.show(16, 1)
18
+ issue.note_create(body: 'There!')
19
+ DOC
20
+ end
21
+
14
22
  doc 'Issues' do
15
23
  markdown <<~DOC
16
24
  | Attribute | Type | Required | Description |
@@ -11,6 +11,14 @@ module LabClient
11
11
  DOC
12
12
  end
13
13
 
14
+ doc 'Merge Request' do
15
+ desc 'Via Merge Request'
16
+ example <<~DOC
17
+ merge_request = client.merge_requests.show(16, 2)
18
+ merge_request.note_create(body: 'There!')
19
+ DOC
20
+ end
21
+
14
22
  doc 'Merge Requests' do
15
23
  markdown <<~DOC
16
24
  | Attribute | Type | Required | Description |
@@ -7,11 +7,15 @@ module LabClient
7
7
 
8
8
  doc 'Overview' do
9
9
  title 'About'
10
- desc <<~DOC
10
+ markdown <<~DOC
11
11
  Labclient is another Gitlab API Gem. A focus on ease of use and helpers and snippets.
12
12
 
13
13
  <a href="https://github.com/NARKOZ/gitlab">Gitlab</a> is an excellent gem, and is nearly complete in its implementation. While this is still a work in progress and you are looking for general use you should use it.
14
+
15
+ Here's a quick whirlwind example of some of the features:
14
16
  DOC
17
+
18
+ demo '350689'
15
19
  end
16
20
 
17
21
  doc 'Overview' do
@@ -1,3 +1,3 @@
1
1
  module LabClient
2
- VERSION = '0.1.4'.freeze
2
+ VERSION = '0.1.5'.freeze
3
3
  end
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
4
+ version: 0.1.5
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-07-28 00:00:00.000000000 Z
11
+ date: 2020-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport