pr_comet 0.2.0 → 0.2.1
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 +4 -4
- data/.circleci/config.yml +128 -107
- data/.rubocop_todo.yml +1 -1
- data/Gemfile.lock +13 -13
- data/lib/pr_comet/github/client.rb +0 -6
- data/lib/pr_comet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4c89befe4fe216196ff74e572a7c0661e7ebd30c914ee8e805ea6abd12b5f37e
|
|
4
|
+
data.tar.gz: 1f74020285bc9816f5b015c78d23309c2136f40e854d07b745c0eadf3a378471
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 44c3a4cc2a2970b8940421158971fb4936edb9317496dc835a173274f6ef627837f74b79744c900b28383d6c9144fada4b7ab9a72c27724108cc87639a3a20a2
|
|
7
|
+
data.tar.gz: a4a1bb1b077668648d5e4926fbb21341e0a98f4b9fe948bbcd0a8e118c109f77b8f7a03526dbac5840cd254efe01117727077865ef238e4caa2e7d578e5638a2
|
data/.circleci/config.yml
CHANGED
|
@@ -2,136 +2,88 @@
|
|
|
2
2
|
#
|
|
3
3
|
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
|
4
4
|
#
|
|
5
|
-
version: 2
|
|
5
|
+
version: 2.1
|
|
6
|
+
|
|
7
|
+
orbs:
|
|
8
|
+
ruby-orbs: sue445/ruby-orbs@1.4.3
|
|
9
|
+
code-climate: rvla/code-climate@0.0.2
|
|
6
10
|
|
|
7
11
|
references:
|
|
8
|
-
- &
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter
|
|
14
|
-
chmod +x ./tmp/cc-test-reporter
|
|
15
|
-
- &restore_bundle_install_cache
|
|
16
|
-
restore_cache:
|
|
17
|
-
keys:
|
|
18
|
-
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
|
19
|
-
- v1-dependencies-
|
|
20
|
-
- &bundle_install
|
|
21
|
-
run:
|
|
22
|
-
name: Bundle Install
|
|
23
|
-
command: |
|
|
24
|
-
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
|
25
|
-
- &save_bundle_install_cache
|
|
26
|
-
save_cache:
|
|
27
|
-
paths:
|
|
28
|
-
- ./vendor/bundle
|
|
29
|
-
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
|
30
|
-
- &run_rspec
|
|
31
|
-
run:
|
|
32
|
-
name: Run Rspec
|
|
33
|
-
command: |
|
|
34
|
-
mkdir /tmp/test-results
|
|
35
|
-
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
|
|
36
|
-
./tmp/cc-test-reporter before-build
|
|
37
|
-
bundle exec rspec --format documentation \
|
|
38
|
-
--color \
|
|
39
|
-
--format RspecJunitFormatter \
|
|
40
|
-
--out /tmp/test-results/rspec.xml \
|
|
41
|
-
$TEST_FILES
|
|
42
|
-
./tmp/cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
|
|
12
|
+
- &ruby_version
|
|
13
|
+
ruby_version:
|
|
14
|
+
type: enum
|
|
15
|
+
enum: ['2.4', '2.5', '2.6', 'latest']
|
|
16
|
+
default: '2.4'
|
|
43
17
|
|
|
44
|
-
|
|
18
|
+
executors:
|
|
19
|
+
default:
|
|
20
|
+
parameters:
|
|
21
|
+
<<: *ruby_version
|
|
22
|
+
docker:
|
|
23
|
+
- image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
|
|
45
24
|
working_directory: ~/repo
|
|
25
|
+
|
|
26
|
+
commands:
|
|
27
|
+
run_rspec:
|
|
28
|
+
description: Run RSpec
|
|
46
29
|
steps:
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
30
|
+
- code-climate/install
|
|
31
|
+
- run:
|
|
32
|
+
name: Execute RSpec
|
|
33
|
+
command: |
|
|
34
|
+
mkdir /tmp/test-results
|
|
35
|
+
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
|
|
36
|
+
cc-test-reporter before-build
|
|
37
|
+
bundle exec rspec --format documentation \
|
|
38
|
+
--color \
|
|
39
|
+
--format RspecJunitFormatter \
|
|
40
|
+
--out /tmp/test-results/rspec.xml \
|
|
41
|
+
$TEST_FILES
|
|
42
|
+
- code-climate/format-coverage:
|
|
43
|
+
input-type: simplecov
|
|
44
|
+
prefix: $(readlink -f .)
|
|
45
|
+
coverage-file: coverage/.resultset.json
|
|
46
|
+
output: coverage/codeclimate.$CIRCLE_BUILD_NUM.json
|
|
47
|
+
- persist_to_workspace:
|
|
48
|
+
root: coverage
|
|
49
|
+
paths:
|
|
50
|
+
- codeclimate.*.json
|
|
53
51
|
- store_test_results:
|
|
54
52
|
path: /tmp/test-results
|
|
55
53
|
- store_artifacts:
|
|
56
54
|
path: /tmp/test-results
|
|
57
55
|
destination: test-results
|
|
58
|
-
|
|
59
|
-
name: Rake Build
|
|
60
|
-
command: |
|
|
61
|
-
bundle exec rake build
|
|
62
|
-
|
|
63
|
-
- &rubocop
|
|
64
|
-
working_directory: ~/repo
|
|
56
|
+
rubocop:
|
|
65
57
|
steps:
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- &yardoc
|
|
73
|
-
working_directory: ~/repo
|
|
58
|
+
- run:
|
|
59
|
+
name: Run RuboCop
|
|
60
|
+
command: bundle exec rubocop
|
|
61
|
+
yardoc:
|
|
62
|
+
description: 'Generate YARDoc'
|
|
74
63
|
steps:
|
|
75
|
-
-
|
|
76
|
-
- *restore_bundle_install_cache
|
|
77
|
-
- *bundle_install
|
|
78
|
-
- *save_bundle_install_cache
|
|
79
|
-
- run: bundle exec yardoc -o ./yardoc
|
|
64
|
+
- run: bundle exec yardoc -o ./yardoc
|
|
80
65
|
- store_artifacts:
|
|
81
66
|
path: ./yardoc
|
|
82
67
|
destination: yardoc
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<<: *build
|
|
89
|
-
build_on_ruby_2.5:
|
|
90
|
-
docker:
|
|
91
|
-
- image: circleci/ruby:2.5-node-browsers
|
|
92
|
-
<<: *build
|
|
93
|
-
build_on_ruby_2.6:
|
|
94
|
-
docker:
|
|
95
|
-
- image: circleci/ruby:2.6-node-browsers
|
|
96
|
-
<<: *build
|
|
97
|
-
build_on_ruby_latest:
|
|
98
|
-
docker:
|
|
99
|
-
- image: circleci/ruby:latest-node-browsers-legacy
|
|
100
|
-
<<: *build
|
|
101
|
-
rubocop:
|
|
102
|
-
docker:
|
|
103
|
-
- image: circleci/ruby:2.4-node-browsers
|
|
104
|
-
<<: *rubocop
|
|
105
|
-
yardoc:
|
|
106
|
-
docker:
|
|
107
|
-
- image: circleci/ruby:2.4-node-browsers
|
|
108
|
-
<<: *yardoc
|
|
109
|
-
|
|
68
|
+
rake_build:
|
|
69
|
+
steps:
|
|
70
|
+
- run:
|
|
71
|
+
name: Rake Build
|
|
72
|
+
command: bundle exec rake build
|
|
110
73
|
rubocop_challenge:
|
|
111
|
-
docker:
|
|
112
|
-
- image: circleci/ruby:2.4-node-browsers
|
|
113
|
-
working_directory: ~/repo
|
|
114
74
|
steps:
|
|
115
|
-
- checkout
|
|
116
75
|
- run:
|
|
117
76
|
name: Rubocop Challenge
|
|
118
77
|
command: |
|
|
119
78
|
gem install rubocop_challenger --pre
|
|
120
79
|
rubocop_challenger go --email=ryz310@gmail.com --name=ryz310
|
|
121
|
-
|
|
122
80
|
release:
|
|
123
|
-
|
|
124
|
-
- image: circleci/ruby:2.4-node-browsers
|
|
125
|
-
working_directory: ~/repo
|
|
81
|
+
description: Release to RubyGems.org
|
|
126
82
|
steps:
|
|
127
|
-
- checkout
|
|
128
|
-
- *restore_bundle_install_cache
|
|
129
|
-
- *bundle_install
|
|
130
|
-
- *save_bundle_install_cache
|
|
131
83
|
- run:
|
|
132
84
|
name: Create Rubygems Credentials
|
|
133
85
|
command: |
|
|
134
|
-
mkdir ~/.gem
|
|
86
|
+
mkdir ~/.gem || true
|
|
135
87
|
echo -e "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}" > ~/.gem/credentials
|
|
136
88
|
chmod 0600 ~/.gem/credentials
|
|
137
89
|
- run:
|
|
@@ -139,18 +91,87 @@ jobs:
|
|
|
139
91
|
command: |
|
|
140
92
|
git push --set-upstream origin ${CIRCLE_BRANCH}
|
|
141
93
|
bundle exec rake release --trace
|
|
94
|
+
setup:
|
|
95
|
+
description: Setup for Job Working
|
|
96
|
+
parameters:
|
|
97
|
+
<<: *ruby_version
|
|
98
|
+
steps:
|
|
99
|
+
- checkout
|
|
100
|
+
- ruby-orbs/bundle-install:
|
|
101
|
+
cache_key_prefix: v1-dependencies-<< parameters.ruby_version >>
|
|
102
|
+
test_and_build:
|
|
103
|
+
description: Build the RubyGem
|
|
104
|
+
steps:
|
|
105
|
+
- run_rspec
|
|
106
|
+
- rake_build
|
|
107
|
+
|
|
108
|
+
jobs:
|
|
109
|
+
build:
|
|
110
|
+
parameters:
|
|
111
|
+
<<: *ruby_version
|
|
112
|
+
executor:
|
|
113
|
+
name: default
|
|
114
|
+
ruby_version: << parameters.ruby_version >>
|
|
115
|
+
steps:
|
|
116
|
+
- setup:
|
|
117
|
+
ruby_version: << parameters.ruby_version >>
|
|
118
|
+
- test_and_build
|
|
119
|
+
upload-coverage:
|
|
120
|
+
executor: default
|
|
121
|
+
steps:
|
|
122
|
+
- attach_workspace:
|
|
123
|
+
at: ~/repo
|
|
124
|
+
- code-climate/install
|
|
125
|
+
- code-climate/sum-coverage:
|
|
126
|
+
input: codeclimate.*.json
|
|
127
|
+
parts: 4
|
|
128
|
+
- code-climate/upload-coverage
|
|
129
|
+
rubocop:
|
|
130
|
+
executor: default
|
|
131
|
+
steps:
|
|
132
|
+
- setup
|
|
133
|
+
- rubocop
|
|
134
|
+
yardoc:
|
|
135
|
+
executor: default
|
|
136
|
+
steps:
|
|
137
|
+
- setup
|
|
138
|
+
- yardoc
|
|
139
|
+
rubocop_challenge:
|
|
140
|
+
executor: default
|
|
141
|
+
steps:
|
|
142
|
+
- checkout
|
|
143
|
+
- rubocop_challenge
|
|
144
|
+
release:
|
|
145
|
+
executor: default
|
|
146
|
+
steps:
|
|
147
|
+
- setup
|
|
148
|
+
- release
|
|
142
149
|
|
|
143
150
|
workflows:
|
|
144
151
|
version: 2
|
|
145
152
|
|
|
146
153
|
commit:
|
|
147
154
|
jobs:
|
|
148
|
-
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
-
|
|
155
|
+
- build:
|
|
156
|
+
name: build_on_ruby_2.4
|
|
157
|
+
ruby_version: '2.4'
|
|
158
|
+
- build:
|
|
159
|
+
name: build_on_ruby_2.5
|
|
160
|
+
ruby_version: '2.5'
|
|
161
|
+
- build:
|
|
162
|
+
name: build_on_ruby_2.6
|
|
163
|
+
ruby_version: '2.6'
|
|
164
|
+
- build:
|
|
165
|
+
name: build_on_ruby_latest
|
|
166
|
+
ruby_version: 'latest'
|
|
152
167
|
- rubocop
|
|
153
168
|
- yardoc
|
|
169
|
+
- upload-coverage:
|
|
170
|
+
requires:
|
|
171
|
+
- build_on_ruby_2.4
|
|
172
|
+
- build_on_ruby_2.5
|
|
173
|
+
- build_on_ruby_2.6
|
|
174
|
+
- build_on_ruby_latest
|
|
154
175
|
- release:
|
|
155
176
|
context: RubyGems API Key
|
|
156
177
|
requires:
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2019-
|
|
3
|
+
# on 2019-06-28 23:30:29 +0000 using RuboCop version 0.72.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
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
pr_comet (0.2.
|
|
4
|
+
pr_comet (0.2.1)
|
|
5
5
|
octokit
|
|
6
6
|
rainbow
|
|
7
7
|
|
|
@@ -14,10 +14,10 @@ GEM
|
|
|
14
14
|
byebug (11.0.1)
|
|
15
15
|
coderay (1.1.2)
|
|
16
16
|
diff-lcs (1.3)
|
|
17
|
-
docile (1.3.
|
|
17
|
+
docile (1.3.2)
|
|
18
18
|
faraday (0.15.4)
|
|
19
19
|
multipart-post (>= 1.2, < 3)
|
|
20
|
-
jaro_winkler (1.5.
|
|
20
|
+
jaro_winkler (1.5.3)
|
|
21
21
|
json (2.2.0)
|
|
22
22
|
method_source (0.9.2)
|
|
23
23
|
multipart-post (2.1.1)
|
|
@@ -32,46 +32,46 @@ GEM
|
|
|
32
32
|
pry-byebug (3.7.0)
|
|
33
33
|
byebug (~> 11.0)
|
|
34
34
|
pry (~> 0.10)
|
|
35
|
-
public_suffix (3.1.
|
|
35
|
+
public_suffix (3.1.1)
|
|
36
36
|
rainbow (3.0.0)
|
|
37
37
|
rake (10.5.0)
|
|
38
38
|
rspec (3.8.0)
|
|
39
39
|
rspec-core (~> 3.8.0)
|
|
40
40
|
rspec-expectations (~> 3.8.0)
|
|
41
41
|
rspec-mocks (~> 3.8.0)
|
|
42
|
-
rspec-core (3.8.
|
|
42
|
+
rspec-core (3.8.2)
|
|
43
43
|
rspec-support (~> 3.8.0)
|
|
44
|
-
rspec-expectations (3.8.
|
|
44
|
+
rspec-expectations (3.8.4)
|
|
45
45
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
46
46
|
rspec-support (~> 3.8.0)
|
|
47
|
-
rspec-mocks (3.8.
|
|
47
|
+
rspec-mocks (3.8.1)
|
|
48
48
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
49
49
|
rspec-support (~> 3.8.0)
|
|
50
|
-
rspec-support (3.8.
|
|
50
|
+
rspec-support (3.8.2)
|
|
51
51
|
rspec_junit_formatter (0.4.1)
|
|
52
52
|
rspec-core (>= 2, < 4, != 2.12.0)
|
|
53
|
-
rubocop (0.
|
|
53
|
+
rubocop (0.72.0)
|
|
54
54
|
jaro_winkler (~> 1.5.1)
|
|
55
55
|
parallel (~> 1.10)
|
|
56
56
|
parser (>= 2.6)
|
|
57
57
|
rainbow (>= 2.2.2, < 4.0)
|
|
58
58
|
ruby-progressbar (~> 1.7)
|
|
59
59
|
unicode-display_width (>= 1.4.0, < 1.7)
|
|
60
|
-
rubocop-performance (1.
|
|
61
|
-
rubocop (>= 0.
|
|
60
|
+
rubocop-performance (1.4.0)
|
|
61
|
+
rubocop (>= 0.71.0)
|
|
62
62
|
rubocop-rspec (1.33.0)
|
|
63
63
|
rubocop (>= 0.60.0)
|
|
64
64
|
ruby-progressbar (1.10.1)
|
|
65
65
|
sawyer (0.8.2)
|
|
66
66
|
addressable (>= 2.3.5)
|
|
67
67
|
faraday (> 0.8, < 2.0)
|
|
68
|
-
simplecov (0.
|
|
68
|
+
simplecov (0.17.0)
|
|
69
69
|
docile (~> 1.1)
|
|
70
70
|
json (>= 1.8, < 3)
|
|
71
71
|
simplecov-html (~> 0.10.0)
|
|
72
72
|
simplecov-html (0.10.2)
|
|
73
73
|
unicode-display_width (1.6.0)
|
|
74
|
-
yard (0.9.
|
|
74
|
+
yard (0.9.20)
|
|
75
75
|
|
|
76
76
|
PLATFORMS
|
|
77
77
|
ruby
|
|
@@ -71,8 +71,6 @@ class PrComet
|
|
|
71
71
|
# @return [Integer, nil] Project column ID
|
|
72
72
|
def get_project_column_id(project_id, column_name)
|
|
73
73
|
find_project_columns(project_id).find { |c| c.name == column_name }.id
|
|
74
|
-
rescue StandardError
|
|
75
|
-
raise "Cannot find the GitHub project column with '#{column_name}'"
|
|
76
74
|
end
|
|
77
75
|
|
|
78
76
|
# Returns the issue (or pull request) ID
|
|
@@ -91,8 +89,6 @@ class PrComet
|
|
|
91
89
|
# @see http://octokit.github.io/octokit.rb/Octokit/Client/Projects.html#projects-instance_method
|
|
92
90
|
def default_project_id
|
|
93
91
|
client.projects(repository).first.id
|
|
94
|
-
rescue Octokit::Error
|
|
95
|
-
raise 'Project does not found on this repository'
|
|
96
92
|
end
|
|
97
93
|
|
|
98
94
|
# Finds project columns with supplied project ID.
|
|
@@ -102,8 +98,6 @@ class PrComet
|
|
|
102
98
|
# @see http://octokit.github.io/octokit.rb/Octokit/Client/Projects.html#project_columns-instance_method
|
|
103
99
|
def find_project_columns(project_id)
|
|
104
100
|
client.project_columns(project_id)
|
|
105
|
-
rescue Octokit::Error
|
|
106
|
-
raise "Project columns does not found at project_id:#{project_id}"
|
|
107
101
|
end
|
|
108
102
|
end
|
|
109
103
|
end
|
data/lib/pr_comet/version.rb
CHANGED
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.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ryz310
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-07-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: octokit
|