Skip to content

Commit 4269bd9

Browse files
authored
SRCH-3528 update bundler, gems, & repo files (#11)
- bump bundler & gem versions - install searchgov_style & debug gems - check in Gemfile.lock - update CircleCI config - relax versions for development dependencies - add PR template
1 parent 034c25f commit 4269bd9

File tree

6 files changed

+178
-21
lines changed

6 files changed

+178
-21
lines changed

.circleci/config.yml

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,65 @@
22
#
33
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
44
#
5-
version: 2
5+
version: 2.1
6+
7+
orbs:
8+
ruby: circleci/ruby@2.0.0
9+
610
jobs:
7-
build:
11+
build_and_test:
12+
parameters:
13+
ruby_version:
14+
type: string
815
environment:
916
CC_TEST_REPORTER_ID: 04c5e730214438ccb56fa2e218bc65bcc1ae4ea86efb5c1f58f7eb9cc065c82a
1017
COVERAGE: true
1118
docker:
12-
- image: circleci/ruby:2.4.1-node-browsers
19+
- image: cimg/ruby:<< parameters.ruby_version >>
1320

1421
working_directory: ~/robots_tag_parser
1522

1623
steps:
1724
- checkout
1825

19-
- run:
20-
name: Install Dependencies
21-
command: |
22-
bundle install --jobs=4 --retry=3 --path vendor/bundle
26+
# Install gems with Bundler
27+
- ruby/install-deps:
28+
# Need to clear the gem cache? Set or bump the CACHE_VERSION in your
29+
# CircleCi project: Project Settings > Environment Variables
30+
key: gems-ruby-<< parameters.ruby_version >>-v{{ .Environment.CACHE_VERSION }}
2331

2432
- run:
25-
name: Install Code Climate Test Reporter
33+
name: Prepare Code Climate Test Reporter
2634
command: |
2735
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
2836
chmod +x ./cc-test-reporter
37+
./cc-test-reporter before-build
38+
39+
- ruby/rspec-test:
40+
# Need to temporarily test with a particular seed? Use:
41+
# order: rand:123
42+
order: rand
2943

3044
- run:
31-
name: Run Tests
45+
name: Report Test Results
3246
command: |
33-
mkdir /tmp/test-results
34-
./cc-test-reporter before-build
35-
36-
bundle exec rspec --format progress --format documentation --out /tmp/test-results/rspec.txt \
37-
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
38-
./cc-test-reporter after-build --exit-code $?
47+
./cc-test-reporter after-build
3948
4049
# collect reports
4150
- store_test_results:
4251
path: /tmp/test-results
4352
- store_artifacts:
4453
path: /tmp/test-results
4554
destination: test-results
55+
56+
workflows:
57+
build_and_test:
58+
jobs:
59+
- build_and_test:
60+
name: "Ruby << matrix.ruby_version >>"
61+
matrix:
62+
parameters:
63+
ruby_version:
64+
- 2.7.6
65+
- 3.0.4
66+
- 3.1.2

.github/pull_request_template.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Summary
2+
- Brief summary of the changes included in this PR
3+
- Any additional information or context which may help the reviewer
4+
5+
### Checklist
6+
Please ensure you have addressed all concerns below before marking a PR "ready for review" or before requesting a re-review. If you cannot complete an item below, replace the checkbox with the ⚠️ `:warning:` emoji and explain why the step was not completed.
7+
8+
#### Functionality Checks
9+
- [ ] You have merged the latest changes from the target branch (usually `main`) into your branch.
10+
11+
- [ ] Your primary commit message is of the format **SRCH-#### \<description\>** matching the associated Jira ticket.
12+
13+
- [ ] PR title is either of the format **SRCH-#### \<description\>** matching the associated Jira ticket (i.e. "SRCH-123 implement feature X"), or **Release - SRCH-####, SRCH-####, SRCH-####** matching the Jira ticket numbers in the release.
14+
15+
- [ ] Automated checks pass, if applicable. If Code Climate checks do not pass, explain reason for failures:
16+
17+
#### Process Checks
18+
19+
- [ ] You have specified at least one "Reviewer".

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/.bundle/
22
/.yardoc
3-
/Gemfile.lock
43
/_yardoc/
54
/coverage/
65
/doc/
@@ -10,3 +9,6 @@
109

1110
# rspec failure tracking
1211
.rspec_status
12+
13+
# Ignore the rubocop YAML file that is downloaded when running `rubocop` locally
14+
.rubocop*default-yml

.rubocop.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
inherit_from:
2+
- https://raw.githubusercontent.com/GSA/searchgov_style/main/.default.yml

Gemfile.lock

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
PATH
2+
remote: .
3+
specs:
4+
robots_tag_parser (0.1.0)
5+
6+
GEM
7+
remote: https://rubygems.org/
8+
specs:
9+
activesupport (7.0.4)
10+
concurrent-ruby (~> 1.0, >= 1.0.2)
11+
i18n (>= 1.6, < 2)
12+
minitest (>= 5.1)
13+
tzinfo (~> 2.0)
14+
ast (2.4.2)
15+
coderay (1.1.3)
16+
concurrent-ruby (1.1.10)
17+
debug (1.6.3)
18+
irb (>= 1.3.6)
19+
reline (>= 0.3.1)
20+
diff-lcs (1.5.0)
21+
docile (1.4.0)
22+
i18n (1.12.0)
23+
concurrent-ruby (~> 1.0)
24+
io-console (0.5.11)
25+
irb (1.4.2)
26+
reline (>= 0.3.0)
27+
method_source (1.0.0)
28+
minitest (5.16.3)
29+
parallel (1.22.1)
30+
parser (3.1.2.1)
31+
ast (~> 2.4.1)
32+
pry (0.14.1)
33+
coderay (~> 1.1)
34+
method_source (~> 1.0)
35+
rack (3.0.0)
36+
rainbow (3.1.1)
37+
rake (13.0.6)
38+
regexp_parser (2.6.0)
39+
reline (0.3.1)
40+
io-console (~> 0.5)
41+
rexml (3.2.5)
42+
rspec (3.12.0)
43+
rspec-core (~> 3.12.0)
44+
rspec-expectations (~> 3.12.0)
45+
rspec-mocks (~> 3.12.0)
46+
rspec-core (3.12.0)
47+
rspec-support (~> 3.12.0)
48+
rspec-expectations (3.12.0)
49+
diff-lcs (>= 1.2.0, < 2.0)
50+
rspec-support (~> 3.12.0)
51+
rspec-mocks (3.12.0)
52+
diff-lcs (>= 1.2.0, < 2.0)
53+
rspec-support (~> 3.12.0)
54+
rspec-support (3.12.0)
55+
rspec_junit_formatter (0.5.1)
56+
rspec-core (>= 2, < 4, != 2.12.0)
57+
rubocop (1.31.0)
58+
parallel (~> 1.10)
59+
parser (>= 3.1.0.0)
60+
rainbow (>= 2.2.2, < 4.0)
61+
regexp_parser (>= 1.8, < 3.0)
62+
rexml (>= 3.2.5, < 4.0)
63+
rubocop-ast (>= 1.18.0, < 2.0)
64+
ruby-progressbar (~> 1.7)
65+
unicode-display_width (>= 1.4.0, < 3.0)
66+
rubocop-ast (1.23.0)
67+
parser (>= 3.1.1.0)
68+
rubocop-performance (1.15.0)
69+
rubocop (>= 1.7.0, < 2.0)
70+
rubocop-ast (>= 0.4.0)
71+
rubocop-rails (2.15.2)
72+
activesupport (>= 4.2.0)
73+
rack (>= 1.1)
74+
rubocop (>= 1.7.0, < 2.0)
75+
rubocop-rake (0.6.0)
76+
rubocop (~> 1.0)
77+
rubocop-rspec (2.12.1)
78+
rubocop (~> 1.31)
79+
ruby-progressbar (1.11.0)
80+
searchgov_style (0.1.20)
81+
rubocop (= 1.31.0)
82+
rubocop-performance (~> 1.9)
83+
rubocop-rails (~> 2.9)
84+
rubocop-rake (~> 0.5)
85+
rubocop-rspec (~> 2.5)
86+
simplecov (0.21.2)
87+
docile (~> 1.1)
88+
simplecov-html (~> 0.11)
89+
simplecov_json_formatter (~> 0.1)
90+
simplecov-html (0.12.3)
91+
simplecov_json_formatter (0.1.4)
92+
tzinfo (2.0.5)
93+
concurrent-ruby (~> 1.0)
94+
unicode-display_width (2.3.0)
95+
96+
PLATFORMS
97+
ruby
98+
99+
DEPENDENCIES
100+
bundler (>= 2.3)
101+
debug
102+
pry
103+
rake
104+
robots_tag_parser!
105+
rspec (~> 3.0)
106+
rspec_junit_formatter
107+
searchgov_style
108+
simplecov
109+
110+
BUNDLED WITH
111+
2.3.15

robots_tag_parser.gemspec

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# coding: utf-8
21
lib = File.expand_path("../lib", __FILE__)
32
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
43
require "robots_tag_parser/version"
@@ -21,9 +20,12 @@ Gem::Specification.new do |spec|
2120
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
2221
spec.require_paths = ["lib"]
2322

24-
spec.add_development_dependency "bundler", "~> 1.15"
25-
spec.add_development_dependency "rake", "~> 10.0"
23+
spec.add_development_dependency "bundler", ">= 2.3"
24+
spec.add_development_dependency "rake"
2625
spec.add_development_dependency "rspec", "~> 3.0"
27-
spec.add_development_dependency "pry", "~> 0.10.4"
28-
spec.add_development_dependency "simplecov", "~> 0.12.0"
26+
spec.add_development_dependency "rspec_junit_formatter" # used in CircleCI
27+
spec.add_development_dependency "pry"
28+
spec.add_development_dependency "simplecov"
29+
spec.add_development_dependency "debug"
30+
spec.add_development_dependency "searchgov_style"
2931
end

0 commit comments

Comments
 (0)