michael 0.1.0

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.
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'pull_request_formatter'
4
+
5
+ module Michael
6
+ module Models
7
+ class RepositoryFormatter
8
+ def initialize(reponame, prs)
9
+ @reponame = reponame
10
+ @prs = prs
11
+ @pastel = Pastel.new
12
+ end
13
+
14
+ def pretty
15
+ [
16
+ pastel.bold(reponame + ':'),
17
+ prs.map { |pr| PullRequestFormatter.new(pr).pretty }.join("\n")
18
+ ].join("\n")
19
+ end
20
+
21
+ private
22
+
23
+ attr_reader :reponame, :prs, :pastel
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Michael
4
+ VERSION = '0.1.0'
5
+ end
data/lib/michael.rb ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'michael/version'
4
+
5
+ module Michael
6
+ class Error < StandardError; end
7
+
8
+ end
data/michael.gemspec ADDED
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'michael/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'michael'
9
+ spec.license = 'MIT'
10
+ spec.version = Michael::VERSION
11
+ spec.authors = ['Vitaliy Kudryk']
12
+ spec.email = ['kudryk.v@gmail.com']
13
+
14
+ spec.summary = 'Operate with github to get PRs'
15
+ spec.description = 'Operate with github to get PRs'
16
+ spec.homepage = 'https://github.com/kudrykv/michael'
17
+
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata['homepage_uri'] = spec.homepage
20
+ spec.metadata['source_code_uri'] = spec.homepage
21
+ end
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
27
+ end
28
+ spec.bindir = 'exe'
29
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ['lib']
31
+
32
+ spec.add_dependency 'octokit', '~> 4.0'
33
+ spec.add_dependency 'parallel', '~> 1.18.0'
34
+ spec.add_dependency 'pastel', '~> 0.7.2'
35
+ spec.add_dependency 'ruby-duration', '~> 3.2.3'
36
+ spec.add_dependency 'thor', '~> 0.20.0'
37
+ spec.add_dependency 'tty-box', '~> 0.4.1'
38
+ spec.add_dependency 'tty-color', '~> 0.5'
39
+ spec.add_dependency 'tty-command', '~> 0.9.0'
40
+ spec.add_dependency 'tty-config', '~> 0.3.2'
41
+ spec.add_dependency 'tty-cursor', '~> 0.7'
42
+ spec.add_dependency 'tty-editor', '~> 0.5'
43
+ spec.add_dependency 'tty-file', '~> 0.8.0'
44
+ spec.add_dependency 'tty-font', '~> 0.4.0'
45
+ spec.add_dependency 'tty-logger', '~> 0.2.0'
46
+ spec.add_dependency 'tty-markdown', '~> 0.6.0'
47
+ spec.add_dependency 'tty-pager', '~> 0.12'
48
+ spec.add_dependency 'tty-pie', '~> 0.3.0'
49
+ spec.add_dependency 'tty-platform', '~> 0.2'
50
+ spec.add_dependency 'tty-progressbar', '~> 0.17'
51
+ spec.add_dependency 'tty-prompt', '~> 0.19'
52
+ spec.add_dependency 'tty-screen', '~> 0.7'
53
+ spec.add_dependency 'tty-spinner', '~> 0.9'
54
+ spec.add_dependency 'tty-table', '~> 0.11.0'
55
+ spec.add_dependency 'tty-tree', '~> 0.3'
56
+ spec.add_dependency 'tty-which', '~> 0.4'
57
+
58
+ spec.add_development_dependency 'bundler', '~> 1.17'
59
+ spec.add_development_dependency 'pry'
60
+ spec.add_development_dependency 'rake', '~> 10.0'
61
+ spec.add_development_dependency 'rspec', '~> 3.0'
62
+ spec.add_development_dependency 'simplecov', '~> 0.17.0'
63
+ end
metadata ADDED
@@ -0,0 +1,499 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: michael
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Vitaliy Kudryk
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-10-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: octokit
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: parallel
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.18.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.18.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: pastel
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.7.2
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.7.2
55
+ - !ruby/object:Gem::Dependency
56
+ name: ruby-duration
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 3.2.3
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 3.2.3
69
+ - !ruby/object:Gem::Dependency
70
+ name: thor
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.20.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.20.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: tty-box
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.4.1
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.4.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: tty-color
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.5'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.5'
111
+ - !ruby/object:Gem::Dependency
112
+ name: tty-command
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.9.0
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.9.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: tty-config
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.3.2
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.3.2
139
+ - !ruby/object:Gem::Dependency
140
+ name: tty-cursor
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.7'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.7'
153
+ - !ruby/object:Gem::Dependency
154
+ name: tty-editor
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '0.5'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '0.5'
167
+ - !ruby/object:Gem::Dependency
168
+ name: tty-file
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 0.8.0
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: 0.8.0
181
+ - !ruby/object:Gem::Dependency
182
+ name: tty-font
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: 0.4.0
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: 0.4.0
195
+ - !ruby/object:Gem::Dependency
196
+ name: tty-logger
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: 0.2.0
202
+ type: :runtime
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: 0.2.0
209
+ - !ruby/object:Gem::Dependency
210
+ name: tty-markdown
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: 0.6.0
216
+ type: :runtime
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: 0.6.0
223
+ - !ruby/object:Gem::Dependency
224
+ name: tty-pager
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - "~>"
228
+ - !ruby/object:Gem::Version
229
+ version: '0.12'
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - "~>"
235
+ - !ruby/object:Gem::Version
236
+ version: '0.12'
237
+ - !ruby/object:Gem::Dependency
238
+ name: tty-pie
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: 0.3.0
244
+ type: :runtime
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "~>"
249
+ - !ruby/object:Gem::Version
250
+ version: 0.3.0
251
+ - !ruby/object:Gem::Dependency
252
+ name: tty-platform
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: '0.2'
258
+ type: :runtime
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
263
+ - !ruby/object:Gem::Version
264
+ version: '0.2'
265
+ - !ruby/object:Gem::Dependency
266
+ name: tty-progressbar
267
+ requirement: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - "~>"
270
+ - !ruby/object:Gem::Version
271
+ version: '0.17'
272
+ type: :runtime
273
+ prerelease: false
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - "~>"
277
+ - !ruby/object:Gem::Version
278
+ version: '0.17'
279
+ - !ruby/object:Gem::Dependency
280
+ name: tty-prompt
281
+ requirement: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - "~>"
284
+ - !ruby/object:Gem::Version
285
+ version: '0.19'
286
+ type: :runtime
287
+ prerelease: false
288
+ version_requirements: !ruby/object:Gem::Requirement
289
+ requirements:
290
+ - - "~>"
291
+ - !ruby/object:Gem::Version
292
+ version: '0.19'
293
+ - !ruby/object:Gem::Dependency
294
+ name: tty-screen
295
+ requirement: !ruby/object:Gem::Requirement
296
+ requirements:
297
+ - - "~>"
298
+ - !ruby/object:Gem::Version
299
+ version: '0.7'
300
+ type: :runtime
301
+ prerelease: false
302
+ version_requirements: !ruby/object:Gem::Requirement
303
+ requirements:
304
+ - - "~>"
305
+ - !ruby/object:Gem::Version
306
+ version: '0.7'
307
+ - !ruby/object:Gem::Dependency
308
+ name: tty-spinner
309
+ requirement: !ruby/object:Gem::Requirement
310
+ requirements:
311
+ - - "~>"
312
+ - !ruby/object:Gem::Version
313
+ version: '0.9'
314
+ type: :runtime
315
+ prerelease: false
316
+ version_requirements: !ruby/object:Gem::Requirement
317
+ requirements:
318
+ - - "~>"
319
+ - !ruby/object:Gem::Version
320
+ version: '0.9'
321
+ - !ruby/object:Gem::Dependency
322
+ name: tty-table
323
+ requirement: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - "~>"
326
+ - !ruby/object:Gem::Version
327
+ version: 0.11.0
328
+ type: :runtime
329
+ prerelease: false
330
+ version_requirements: !ruby/object:Gem::Requirement
331
+ requirements:
332
+ - - "~>"
333
+ - !ruby/object:Gem::Version
334
+ version: 0.11.0
335
+ - !ruby/object:Gem::Dependency
336
+ name: tty-tree
337
+ requirement: !ruby/object:Gem::Requirement
338
+ requirements:
339
+ - - "~>"
340
+ - !ruby/object:Gem::Version
341
+ version: '0.3'
342
+ type: :runtime
343
+ prerelease: false
344
+ version_requirements: !ruby/object:Gem::Requirement
345
+ requirements:
346
+ - - "~>"
347
+ - !ruby/object:Gem::Version
348
+ version: '0.3'
349
+ - !ruby/object:Gem::Dependency
350
+ name: tty-which
351
+ requirement: !ruby/object:Gem::Requirement
352
+ requirements:
353
+ - - "~>"
354
+ - !ruby/object:Gem::Version
355
+ version: '0.4'
356
+ type: :runtime
357
+ prerelease: false
358
+ version_requirements: !ruby/object:Gem::Requirement
359
+ requirements:
360
+ - - "~>"
361
+ - !ruby/object:Gem::Version
362
+ version: '0.4'
363
+ - !ruby/object:Gem::Dependency
364
+ name: bundler
365
+ requirement: !ruby/object:Gem::Requirement
366
+ requirements:
367
+ - - "~>"
368
+ - !ruby/object:Gem::Version
369
+ version: '1.17'
370
+ type: :development
371
+ prerelease: false
372
+ version_requirements: !ruby/object:Gem::Requirement
373
+ requirements:
374
+ - - "~>"
375
+ - !ruby/object:Gem::Version
376
+ version: '1.17'
377
+ - !ruby/object:Gem::Dependency
378
+ name: pry
379
+ requirement: !ruby/object:Gem::Requirement
380
+ requirements:
381
+ - - ">="
382
+ - !ruby/object:Gem::Version
383
+ version: '0'
384
+ type: :development
385
+ prerelease: false
386
+ version_requirements: !ruby/object:Gem::Requirement
387
+ requirements:
388
+ - - ">="
389
+ - !ruby/object:Gem::Version
390
+ version: '0'
391
+ - !ruby/object:Gem::Dependency
392
+ name: rake
393
+ requirement: !ruby/object:Gem::Requirement
394
+ requirements:
395
+ - - "~>"
396
+ - !ruby/object:Gem::Version
397
+ version: '10.0'
398
+ type: :development
399
+ prerelease: false
400
+ version_requirements: !ruby/object:Gem::Requirement
401
+ requirements:
402
+ - - "~>"
403
+ - !ruby/object:Gem::Version
404
+ version: '10.0'
405
+ - !ruby/object:Gem::Dependency
406
+ name: rspec
407
+ requirement: !ruby/object:Gem::Requirement
408
+ requirements:
409
+ - - "~>"
410
+ - !ruby/object:Gem::Version
411
+ version: '3.0'
412
+ type: :development
413
+ prerelease: false
414
+ version_requirements: !ruby/object:Gem::Requirement
415
+ requirements:
416
+ - - "~>"
417
+ - !ruby/object:Gem::Version
418
+ version: '3.0'
419
+ - !ruby/object:Gem::Dependency
420
+ name: simplecov
421
+ requirement: !ruby/object:Gem::Requirement
422
+ requirements:
423
+ - - "~>"
424
+ - !ruby/object:Gem::Version
425
+ version: 0.17.0
426
+ type: :development
427
+ prerelease: false
428
+ version_requirements: !ruby/object:Gem::Requirement
429
+ requirements:
430
+ - - "~>"
431
+ - !ruby/object:Gem::Version
432
+ version: 0.17.0
433
+ description: Operate with github to get PRs
434
+ email:
435
+ - kudryk.v@gmail.com
436
+ executables:
437
+ - michael
438
+ extensions: []
439
+ extra_rdoc_files: []
440
+ files:
441
+ - ".gitignore"
442
+ - ".rspec"
443
+ - ".rubocop.yml"
444
+ - ".travis.yml"
445
+ - CODE_OF_CONDUCT.md
446
+ - Gemfile
447
+ - Gemfile.lock
448
+ - README.md
449
+ - Rakefile
450
+ - exe/michael
451
+ - lib/michael.rb
452
+ - lib/michael/cli.rb
453
+ - lib/michael/command.rb
454
+ - lib/michael/commands/.gitkeep
455
+ - lib/michael/commands/auth.rb
456
+ - lib/michael/commands/repos.rb
457
+ - lib/michael/commands/repos/edit.rb
458
+ - lib/michael/commands/repos/pull_requests.rb
459
+ - lib/michael/models/configuration.rb
460
+ - lib/michael/models/github/octokit_initializer.rb
461
+ - lib/michael/models/github/pr_wrapper.rb
462
+ - lib/michael/models/github/pull_request.rb
463
+ - lib/michael/models/github/review.rb
464
+ - lib/michael/models/github/reviewer.rb
465
+ - lib/michael/models/github/status.rb
466
+ - lib/michael/models/github/team.rb
467
+ - lib/michael/models/github/token_validator.rb
468
+ - lib/michael/models/github/user.rb
469
+ - lib/michael/models/guard.rb
470
+ - lib/michael/models/pull_request_formatter.rb
471
+ - lib/michael/models/repository_formatter.rb
472
+ - lib/michael/version.rb
473
+ - michael.gemspec
474
+ homepage: https://github.com/kudrykv/michael
475
+ licenses:
476
+ - MIT
477
+ metadata:
478
+ homepage_uri: https://github.com/kudrykv/michael
479
+ source_code_uri: https://github.com/kudrykv/michael
480
+ post_install_message:
481
+ rdoc_options: []
482
+ require_paths:
483
+ - lib
484
+ required_ruby_version: !ruby/object:Gem::Requirement
485
+ requirements:
486
+ - - ">="
487
+ - !ruby/object:Gem::Version
488
+ version: '0'
489
+ required_rubygems_version: !ruby/object:Gem::Requirement
490
+ requirements:
491
+ - - ">="
492
+ - !ruby/object:Gem::Version
493
+ version: '0'
494
+ requirements: []
495
+ rubygems_version: 3.0.3
496
+ signing_key:
497
+ specification_version: 4
498
+ summary: Operate with github to get PRs
499
+ test_files: []