whatsup_github 0.2.0 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/linters/.ruby-lint.yml +11 -0
- data/.github/workflows/linter.yml +48 -0
- data/.ruby-version +1 -1
- data/.travis.yml +2 -1
- data/CHANGELOG.md +47 -0
- data/Gemfile +4 -2
- data/Gemfile.lock +94 -57
- data/README.md +39 -10
- data/Rakefile +7 -5
- data/bin/console +4 -3
- data/exe/whatsup_github +1 -0
- data/lib/template/.whatsup.yml +10 -0
- data/lib/whatsup_github.rb +2 -2
- data/lib/whatsup_github/cli.rb +5 -4
- data/lib/whatsup_github/client.rb +40 -0
- data/lib/whatsup_github/{config-reader.rb → config_reader.rb} +21 -5
- data/lib/whatsup_github/generator.rb +3 -1
- data/lib/whatsup_github/pulls.rb +51 -13
- data/lib/whatsup_github/row.rb +31 -6
- data/lib/whatsup_github/row_collector.rb +37 -7
- data/lib/whatsup_github/runner.rb +6 -4
- data/lib/whatsup_github/table.rb +2 -1
- data/lib/whatsup_github/version.rb +3 -1
- data/lib/whatsup_github/{yaml-formatter.rb → yaml_formatter.rb} +8 -2
- data/whatsup_github.gemspec +27 -26
- metadata +36 -33
@@ -1,12 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'fileutils'
|
2
4
|
require_relative 'generator'
|
3
|
-
require_relative '
|
4
|
-
require_relative '
|
5
|
+
require_relative 'config_reader'
|
6
|
+
require_relative 'yaml_formatter'
|
5
7
|
require_relative 'table'
|
6
8
|
|
7
9
|
module WhatsupGithub
|
8
10
|
class Runner
|
9
|
-
|
10
11
|
def initialize(date)
|
11
12
|
@generator = Generator.new date
|
12
13
|
@config = Config.instance
|
@@ -16,11 +17,12 @@ module WhatsupGithub
|
|
16
17
|
def run
|
17
18
|
format = @config.output_format
|
18
19
|
raise 'Cannot find "output_format" in config.yml' unless format
|
20
|
+
|
19
21
|
table if format.include? 'markdown'
|
20
22
|
data if format.include? 'yaml'
|
21
23
|
end
|
22
24
|
|
23
|
-
def write_results
|
25
|
+
def write_results(file, formatter)
|
24
26
|
formatted_content = @generator.run formatter, @content
|
25
27
|
check_dir_at File.dirname file
|
26
28
|
File.write file, formatted_content
|
data/lib/whatsup_github/table.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'yaml'
|
2
4
|
module WhatsupGithub
|
3
5
|
# Table containing Rows
|
@@ -12,9 +14,13 @@ module WhatsupGithub
|
|
12
14
|
{
|
13
15
|
'description' => object.description,
|
14
16
|
'versions' => object.versions,
|
15
|
-
'type' =>
|
17
|
+
'type' => object.type,
|
16
18
|
'date' => object.date,
|
17
|
-
'link' => object.link
|
19
|
+
'link' => object.link,
|
20
|
+
'merge_commit' => object.merge_commit,
|
21
|
+
'contributor' => object.author,
|
22
|
+
'membership' => object.membership,
|
23
|
+
'labels' => object.labels
|
18
24
|
}
|
19
25
|
end
|
20
26
|
output =
|
data/whatsup_github.gemspec
CHANGED
@@ -1,48 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
|
2
|
-
lib = File.expand_path(
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
5
|
+
require 'whatsup_github/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
8
|
+
spec.name = 'whatsup_github'
|
8
9
|
spec.version = WhatsupGithub::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
10
|
+
spec.authors = ['Dima Shevtsov']
|
11
|
+
spec.email = ['shevtsov@adobe.com']
|
11
12
|
|
12
|
-
spec.summary =
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
13
|
+
spec.summary = 'Collect info from GitHub pull requests.'
|
14
|
+
spec.homepage = 'https://github.com/dshevtsov/whatsup_github'
|
15
|
+
spec.license = 'MIT'
|
15
16
|
|
16
17
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
18
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
19
|
if spec.respond_to?(:metadata)
|
19
|
-
spec.metadata[
|
20
|
-
spec.metadata[
|
21
|
-
spec.metadata[
|
20
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
21
|
+
spec.metadata['source_code_uri'] = 'https://github.com/dshevtsov/whatsup_github'
|
22
|
+
spec.metadata['changelog_uri'] = 'https://github.com/dshevtsov/whatsup_github/blob/master/CHANGELOG.md'
|
22
23
|
else
|
23
|
-
raise
|
24
|
-
|
24
|
+
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
25
|
+
'public gem pushes.'
|
25
26
|
end
|
26
27
|
|
27
28
|
# Specify which files should be added to the gem when it is released.
|
28
29
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
29
|
-
spec.files
|
30
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
30
31
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
31
32
|
end
|
32
|
-
spec.bindir =
|
33
|
+
spec.bindir = 'exe'
|
33
34
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
34
|
-
spec.require_paths = [
|
35
|
+
spec.require_paths = ['lib']
|
35
36
|
|
36
|
-
spec.required_ruby_version = '>= 2.
|
37
|
+
spec.required_ruby_version = '>= 2.5.0'
|
37
38
|
|
38
|
-
spec.add_dependency
|
39
|
-
spec.add_dependency
|
40
|
-
spec.add_dependency
|
39
|
+
spec.add_dependency 'netrc', '~> 0.11'
|
40
|
+
spec.add_dependency 'octokit', '~> 4.20'
|
41
|
+
spec.add_dependency 'thor', '~> 1.1'
|
41
42
|
|
42
|
-
spec.add_development_dependency
|
43
|
-
spec.add_development_dependency
|
44
|
-
spec.add_development_dependency
|
45
|
-
spec.add_development_dependency
|
46
|
-
spec.add_development_dependency
|
47
|
-
spec.add_development_dependency
|
43
|
+
spec.add_development_dependency 'aruba', '~> 1.0'
|
44
|
+
spec.add_development_dependency 'bundler', '~> 2.2'
|
45
|
+
spec.add_development_dependency 'cucumber', '~> 5.3'
|
46
|
+
spec.add_development_dependency 'pry', '~> 0.14'
|
47
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
48
|
+
spec.add_development_dependency 'rspec', '~> 3.10'
|
48
49
|
end
|
metadata
CHANGED
@@ -1,141 +1,141 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whatsup_github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dima Shevtsov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: netrc
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0.11'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0.11'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: octokit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '4.20'
|
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: '
|
40
|
+
version: '4.20'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: thor
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1.1'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: aruba
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '2.2'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '2.2'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: cucumber
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3
|
89
|
+
version: '5.3'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3
|
96
|
+
version: '5.3'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: pry
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '0.14'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '0.14'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0
|
117
|
+
version: '13.0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '0
|
124
|
+
version: '13.0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: rspec
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '3.10'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '3.10'
|
139
139
|
description:
|
140
140
|
email:
|
141
141
|
- shevtsov@adobe.com
|
@@ -144,6 +144,8 @@ executables:
|
|
144
144
|
extensions: []
|
145
145
|
extra_rdoc_files: []
|
146
146
|
files:
|
147
|
+
- ".github/linters/.ruby-lint.yml"
|
148
|
+
- ".github/workflows/linter.yml"
|
147
149
|
- ".gitignore"
|
148
150
|
- ".rspec"
|
149
151
|
- ".ruby-version"
|
@@ -160,7 +162,8 @@ files:
|
|
160
162
|
- lib/template/.whatsup.yml
|
161
163
|
- lib/whatsup_github.rb
|
162
164
|
- lib/whatsup_github/cli.rb
|
163
|
-
- lib/whatsup_github/
|
165
|
+
- lib/whatsup_github/client.rb
|
166
|
+
- lib/whatsup_github/config_reader.rb
|
164
167
|
- lib/whatsup_github/generator.rb
|
165
168
|
- lib/whatsup_github/pulls.rb
|
166
169
|
- lib/whatsup_github/row.rb
|
@@ -168,7 +171,7 @@ files:
|
|
168
171
|
- lib/whatsup_github/runner.rb
|
169
172
|
- lib/whatsup_github/table.rb
|
170
173
|
- lib/whatsup_github/version.rb
|
171
|
-
- lib/whatsup_github/
|
174
|
+
- lib/whatsup_github/yaml_formatter.rb
|
172
175
|
- whatsup_github.gemspec
|
173
176
|
homepage: https://github.com/dshevtsov/whatsup_github
|
174
177
|
licenses:
|
@@ -185,14 +188,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
185
188
|
requirements:
|
186
189
|
- - ">="
|
187
190
|
- !ruby/object:Gem::Version
|
188
|
-
version: 2.
|
191
|
+
version: 2.5.0
|
189
192
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
193
|
requirements:
|
191
194
|
- - ">="
|
192
195
|
- !ruby/object:Gem::Version
|
193
196
|
version: '0'
|
194
197
|
requirements: []
|
195
|
-
rubygems_version: 3.
|
198
|
+
rubygems_version: 3.0.9
|
196
199
|
signing_key:
|
197
200
|
specification_version: 4
|
198
201
|
summary: Collect info from GitHub pull requests.
|