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.
@@ -1,12 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'fileutils'
2
4
  require_relative 'generator'
3
- require_relative 'config-reader'
4
- require_relative 'yaml-formatter'
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 file, formatter
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
@@ -1,9 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'row_collector'
2
4
 
3
5
  module WhatsupGithub
4
6
  # Table containing Rows
5
7
  class Table
6
-
7
8
  # def initialize(since)
8
9
  # @collector = RowCollector.new(since: since)
9
10
  # end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WhatsupGithub
2
- VERSION = "0.2.0"
4
+ VERSION = '0.4.2'
3
5
  end
@@ -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' => object.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 =
@@ -1,48 +1,49 @@
1
+ # frozen_string_literal: true
1
2
 
2
- lib = File.expand_path("../lib", __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "whatsup_github/version"
5
+ require 'whatsup_github/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = "whatsup_github"
8
+ spec.name = 'whatsup_github'
8
9
  spec.version = WhatsupGithub::VERSION
9
- spec.authors = ["Dima Shevtsov"]
10
- spec.email = ["shevtsov@adobe.com"]
10
+ spec.authors = ['Dima Shevtsov']
11
+ spec.email = ['shevtsov@adobe.com']
11
12
 
12
- spec.summary = %q{Collect info from GitHub pull requests.}
13
- spec.homepage = "https://github.com/dshevtsov/whatsup_github"
14
- spec.license = "MIT"
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["homepage_uri"] = spec.homepage
20
- spec.metadata["source_code_uri"] = "https://github.com/dshevtsov/whatsup_github"
21
- spec.metadata["changelog_uri"] = "https://github.com/dshevtsov/whatsup_github/blob/master/CHANGELOG.md"
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 "RubyGems 2.0 or newer is required to protect against " \
24
- "public gem pushes."
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 = Dir.chdir(File.expand_path('..', __FILE__)) do
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 = "exe"
33
+ spec.bindir = 'exe'
33
34
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
34
- spec.require_paths = ["lib"]
35
+ spec.require_paths = ['lib']
35
36
 
36
- spec.required_ruby_version = '>= 2.4.0'
37
+ spec.required_ruby_version = '>= 2.5.0'
37
38
 
38
- spec.add_dependency "octokit", "~> 4.14"
39
- spec.add_dependency "thor", "~> 0.20"
40
- spec.add_dependency "netrc", "~> 0.10"
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 "bundler", "~> 1.17"
43
- spec.add_development_dependency "rake", "~> 13.0"
44
- spec.add_development_dependency "rspec", "~> 3.0"
45
- spec.add_development_dependency "cucumber", "~> 3.1"
46
- spec.add_development_dependency "aruba", "~> 0.14"
47
- spec.add_development_dependency "pry", "~> 0.12"
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.0
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: 2020-06-25 00:00:00.000000000 Z
11
+ date: 2021-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: octokit
14
+ name: netrc
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.14'
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: '4.14'
26
+ version: '0.11'
27
27
  - !ruby/object:Gem::Dependency
28
- name: thor
28
+ name: octokit
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.20'
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: '0.20'
40
+ version: '4.20'
41
41
  - !ruby/object:Gem::Dependency
42
- name: netrc
42
+ name: thor
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.10'
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: '0.10'
54
+ version: '1.1'
55
55
  - !ruby/object:Gem::Dependency
56
- name: bundler
56
+ name: aruba
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.17'
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.17'
68
+ version: '1.0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '13.0'
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: '13.0'
82
+ version: '2.2'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rspec
84
+ name: cucumber
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.0'
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.0'
96
+ version: '5.3'
97
97
  - !ruby/object:Gem::Dependency
98
- name: cucumber
98
+ name: pry
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '3.1'
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: '3.1'
110
+ version: '0.14'
111
111
  - !ruby/object:Gem::Dependency
112
- name: aruba
112
+ name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0.14'
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.14'
124
+ version: '13.0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: pry
126
+ name: rspec
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0.12'
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: '0.12'
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/config-reader.rb
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/yaml-formatter.rb
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.4.0
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.1.4
198
+ rubygems_version: 3.0.9
196
199
  signing_key:
197
200
  specification_version: 4
198
201
  summary: Collect info from GitHub pull requests.