pr_comet 0.4.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -3
- data/.rubocop_todo.yml +1 -13
- data/CHANGELOG.md +26 -1
- data/Gemfile.lock +13 -13
- data/lib/pr_comet.rb +4 -4
- data/lib/pr_comet/command_line.rb +4 -2
- data/lib/pr_comet/git/command.rb +2 -1
- data/lib/pr_comet/version.rb +1 -1
- data/pr_comet.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1de5a702a941ad3f61b8a3b87f765da115e1feadd39210b45f80e3809d5e123f
|
4
|
+
data.tar.gz: 50a81dd0413e6a0d22e992a6f4d757a7180678e54221f1004590a1821f12e345
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81d78d0f2aaabbc1a28374d42591b2e6e413ed18dbf62a5989b206e81b5651534ba8c5115c42dfc2c8731f6fa2865a5857bc4dc50e6f8e5e7e0ead19c5a49a5e
|
7
|
+
data.tar.gz: 4a9951f3871295496a7f956d4452d1d5120ee198d00c076f7272f9a271a8f30531c9b49d6c4d95edce5d26d1d80b0c18d2b281cd55c3e8cfefc423a8cb8863e3
|
data/.circleci/config.yml
CHANGED
@@ -42,7 +42,7 @@ commands:
|
|
42
42
|
- code-climate/format-coverage:
|
43
43
|
input-type: simplecov
|
44
44
|
prefix: $(readlink -f .)
|
45
|
-
coverage-file: coverage
|
45
|
+
coverage-file: coverage/coverage.json
|
46
46
|
output: coverage/codeclimate.$CIRCLE_BUILD_NUM.json
|
47
47
|
- persist_to_workspace:
|
48
48
|
root: coverage
|
@@ -98,8 +98,8 @@ commands:
|
|
98
98
|
steps:
|
99
99
|
- checkout
|
100
100
|
- run:
|
101
|
-
name: Install bundler
|
102
|
-
command: gem install bundler
|
101
|
+
name: Install bundler v2.x for ruby 2.5 & 2.6
|
102
|
+
command: gem install bundler
|
103
103
|
- ruby-orbs/bundle-install:
|
104
104
|
cache_key_prefix: v1-dependencies-<< parameters.ruby_version >>
|
105
105
|
test_and_build:
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2021-01-11 09:02:52 UTC using RuboCop version 1.8.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -13,18 +13,6 @@ Gemspec/RequiredRubyVersion:
|
|
13
13
|
Exclude:
|
14
14
|
- 'pr_comet.gemspec'
|
15
15
|
|
16
|
-
# Offense count: 1
|
17
|
-
# Configuration parameters: AllowedMethods.
|
18
|
-
# AllowedMethods: enums
|
19
|
-
Lint/ConstantDefinitionInBlock:
|
20
|
-
Exclude:
|
21
|
-
- 'spec/pr_comet/command_line_spec.rb'
|
22
|
-
|
23
|
-
# Offense count: 1
|
24
|
-
RSpec/LeakyConstantDeclaration:
|
25
|
-
Exclude:
|
26
|
-
- 'spec/pr_comet/command_line_spec.rb'
|
27
|
-
|
28
16
|
# Offense count: 15
|
29
17
|
# Configuration parameters: AllowSubject.
|
30
18
|
RSpec/MultipleMemoizedHelpers:
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,36 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## v0.5.1 (Jan 11, 2021)
|
4
|
+
|
5
|
+
### Bugfix
|
6
|
+
|
7
|
+
* [#220](https://github.com/ryz310/pr_comet/pull/220) Fix verbose option ([@ryz310](https://github.com/ryz310))
|
8
|
+
|
9
|
+
### Dependabot
|
10
|
+
|
11
|
+
* [#199](https://github.com/ryz310/pr_comet/pull/199) Update bundler requirement from ~> 1.16 to ~> 2.2 ([@ryz310](https://github.com/ryz310))
|
12
|
+
* [#219](https://github.com/ryz310/pr_comet/pull/219) ryz310/dependabot/bundler/rubocop-1.8.1 ([@ryz310](https://github.com/ryz310))
|
13
|
+
|
14
|
+
## v0.5.0 (Jan 11, 2021)
|
15
|
+
|
16
|
+
### Feature
|
17
|
+
|
18
|
+
* [#216](https://github.com/ryz310/pr_comet/pull/216) Add verbose option ([@ryz310](https://github.com/ryz310))
|
19
|
+
|
20
|
+
### Dependabot
|
21
|
+
|
22
|
+
* [#215](https://github.com/ryz310/pr_comet/pull/215) Update simplecov requirement from = 0.17.1 to = 0.21.2 ([@ryz310](https://github.com/ryz310))
|
23
|
+
* [#214](https://github.com/ryz310/pr_comet/pull/214) ryz310/dependabot/bundler/rubocop-1.8.0 ([@ryz310](https://github.com/ryz310))
|
24
|
+
|
3
25
|
## v0.4.0 (Jan 04, 2021)
|
4
26
|
|
27
|
+
### Feature
|
28
|
+
|
29
|
+
* [#210](https://github.com/ryz310/pr_comet/pull/210) Support ruby 3.0 ([@ryz310](https://github.com/ryz310))
|
30
|
+
|
5
31
|
### Breaking Change
|
6
32
|
|
7
33
|
* [#176](https://github.com/ryz310/pr_comet/pull/176) End of support for Ruby 2.4 ([@ryz310](https://github.com/ryz310))
|
8
|
-
* [#210](https://github.com/ryz310/pr_comet/pull/210) Support ruby 3.0 ([@ryz310](https://github.com/ryz310))
|
9
34
|
|
10
35
|
### Rubocop Challenge
|
11
36
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pr_comet (0.
|
4
|
+
pr_comet (0.5.1)
|
5
5
|
octokit
|
6
6
|
rainbow
|
7
7
|
|
@@ -20,7 +20,6 @@ GEM
|
|
20
20
|
multipart-post (>= 1.2, < 3)
|
21
21
|
ruby2_keywords
|
22
22
|
faraday-net_http (1.0.0)
|
23
|
-
json (2.5.1)
|
24
23
|
method_source (1.0.0)
|
25
24
|
multipart-post (2.1.1)
|
26
25
|
octokit (4.20.0)
|
@@ -55,15 +54,15 @@ GEM
|
|
55
54
|
rspec-support (3.10.1)
|
56
55
|
rspec_junit_formatter (0.4.1)
|
57
56
|
rspec-core (>= 2, < 4, != 2.12.0)
|
58
|
-
rubocop (1.
|
57
|
+
rubocop (1.8.1)
|
59
58
|
parallel (~> 1.10)
|
60
|
-
parser (>=
|
59
|
+
parser (>= 3.0.0.0)
|
61
60
|
rainbow (>= 2.2.2, < 4.0)
|
62
61
|
regexp_parser (>= 1.8, < 3.0)
|
63
62
|
rexml
|
64
63
|
rubocop-ast (>= 1.2.0, < 2.0)
|
65
64
|
ruby-progressbar (~> 1.7)
|
66
|
-
unicode-display_width (>= 1.4.0, <
|
65
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
67
66
|
rubocop-ast (1.4.0)
|
68
67
|
parser (>= 2.7.1.5)
|
69
68
|
rubocop-performance (1.9.2)
|
@@ -77,19 +76,20 @@ GEM
|
|
77
76
|
sawyer (0.8.2)
|
78
77
|
addressable (>= 2.3.5)
|
79
78
|
faraday (> 0.8, < 2.0)
|
80
|
-
simplecov (0.
|
79
|
+
simplecov (0.21.2)
|
81
80
|
docile (~> 1.1)
|
82
|
-
|
83
|
-
|
84
|
-
simplecov-html (0.
|
85
|
-
|
81
|
+
simplecov-html (~> 0.11)
|
82
|
+
simplecov_json_formatter (~> 0.1)
|
83
|
+
simplecov-html (0.12.3)
|
84
|
+
simplecov_json_formatter (0.1.2)
|
85
|
+
unicode-display_width (2.0.0)
|
86
86
|
yard (0.9.26)
|
87
87
|
|
88
88
|
PLATFORMS
|
89
89
|
ruby
|
90
90
|
|
91
91
|
DEPENDENCIES
|
92
|
-
bundler (~>
|
92
|
+
bundler (~> 2.2)
|
93
93
|
pr_comet!
|
94
94
|
pry-byebug
|
95
95
|
rake (~> 13.0)
|
@@ -98,8 +98,8 @@ DEPENDENCIES
|
|
98
98
|
rubocop
|
99
99
|
rubocop-performance
|
100
100
|
rubocop-rspec
|
101
|
-
simplecov (= 0.
|
101
|
+
simplecov (= 0.21.2)
|
102
102
|
yard
|
103
103
|
|
104
104
|
BUNDLED WITH
|
105
|
-
|
105
|
+
2.2.4
|
data/lib/pr_comet.rb
CHANGED
@@ -13,16 +13,16 @@ require 'pr_comet/github/client'
|
|
13
13
|
class PrComet
|
14
14
|
# @note You have to set ENV['GITHUB_ACCESS_TOKEN']
|
15
15
|
# @param base [String] The branch you want your changes pulled into
|
16
|
-
# @param branch [String] The branch where your changes are going to
|
17
|
-
# implement.
|
16
|
+
# @param branch [String] The branch where your changes are going to implement.
|
18
17
|
# @param user_name [String] The username to use for committer and author
|
19
18
|
# @param user_email [String] The email to use for committer and author
|
20
|
-
|
19
|
+
# @param verbose [Boolean] Displays executing commands
|
20
|
+
def initialize(base:, branch:, user_name: nil, user_email: nil, verbose: false)
|
21
21
|
raise "You have to set ENV['GITHUB_ACCESS_TOKEN']" if access_token.nil?
|
22
22
|
|
23
23
|
@base_branch = base
|
24
24
|
@topic_branch = branch
|
25
|
-
@git = Git::Command.new(user_name: user_name, user_email: user_email)
|
25
|
+
@git = Git::Command.new(user_name: user_name, user_email: user_email, verbose: verbose)
|
26
26
|
@github = Github::Client.new(access_token, git.remote_url('origin'))
|
27
27
|
@initial_sha1 = git.current_sha1
|
28
28
|
end
|
@@ -3,6 +3,8 @@
|
|
3
3
|
class PrComet
|
4
4
|
# To execute command line. You should inherit this class to use.
|
5
5
|
module CommandLine
|
6
|
+
attr_reader :verbose
|
7
|
+
|
6
8
|
private
|
7
9
|
|
8
10
|
# Execute a command
|
@@ -10,10 +12,10 @@ class PrComet
|
|
10
12
|
# @param command [String] The command you want to execute
|
11
13
|
# @return [String] The result in the execution
|
12
14
|
def execute(command)
|
13
|
-
puts "$ #{command}"
|
15
|
+
puts "$ #{command}" if verbose
|
14
16
|
`#{command}`.chomp.tap do |result|
|
15
17
|
color = $CHILD_STATUS.success? ? :green : :red
|
16
|
-
puts Rainbow(result).color(color)
|
18
|
+
puts Rainbow(result).color(color) if verbose
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
data/lib/pr_comet/git/command.rb
CHANGED
@@ -6,9 +6,10 @@ class PrComet
|
|
6
6
|
class Command
|
7
7
|
include CommandLine
|
8
8
|
|
9
|
-
def initialize(user_name: nil, user_email: nil)
|
9
|
+
def initialize(user_name: nil, user_email: nil, verbose: false)
|
10
10
|
@user_name = user_name
|
11
11
|
@user_email = user_email
|
12
|
+
@verbose = verbose
|
12
13
|
end
|
13
14
|
|
14
15
|
def user_name
|
data/lib/pr_comet/version.rb
CHANGED
data/pr_comet.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_runtime_dependency 'octokit'
|
26
26
|
spec.add_runtime_dependency 'rainbow'
|
27
27
|
|
28
|
-
spec.add_development_dependency 'bundler', '~>
|
28
|
+
spec.add_development_dependency 'bundler', '~> 2.2'
|
29
29
|
spec.add_development_dependency 'pry-byebug'
|
30
30
|
spec.add_development_dependency 'rake', '~> 13.0'
|
31
31
|
spec.add_development_dependency 'rspec'
|
@@ -33,6 +33,6 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_development_dependency 'rubocop'
|
34
34
|
spec.add_development_dependency 'rubocop-performance'
|
35
35
|
spec.add_development_dependency 'rubocop-rspec'
|
36
|
-
spec.add_development_dependency 'simplecov', '0.
|
36
|
+
spec.add_development_dependency 'simplecov', '0.21.2'
|
37
37
|
spec.add_development_dependency 'yard'
|
38
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pr_comet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ryz310
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.2'
|
48
48
|
type: :development
|
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: '2.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry-byebug
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - '='
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.
|
159
|
+
version: 0.21.2
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - '='
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.
|
166
|
+
version: 0.21.2
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: yard
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|