Skip to content

Commit df03872

Browse files
authored
Technical/Update CircleCI config (#38)
* Updated gem development dependencies * Updated CircleCI config
1 parent 0c5199f commit df03872

File tree

6 files changed

+44
-21
lines changed

6 files changed

+44
-21
lines changed

circle.yml renamed to .circleci/config.yml

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@ version: 2.1
33
defaults: &defaults
44
working_directory: ~/ruby-dns-mock
55
docker:
6-
- image: circleci/ruby:2.5.0-node
6+
- image: cimg/ruby:<< parameters.ruby-version >>
77
environment:
88
CC_TEST_REPORTER_ID: 18fba9e7d6885c48453a80a0f019a60d9ffa3fd80467652a6b3c95fef5ea9a50
99

1010
orbs:
11-
ruby: circleci/[email protected].2
11+
ruby: circleci/[email protected].3
1212

1313
references:
14+
install_bundler: &install_bundler
15+
run:
16+
name: Installing bundler
17+
command: gem i bundler -v $(tail -1 Gemfile.lock | tr -d ' ')
18+
1419
restore_bundle_cache: &restore_bundle_cache
1520
restore_cache:
1621
keys:
@@ -29,18 +34,23 @@ references:
2934

3035
install_codeclimate_reporter: &install_codeclimate_reporter
3136
run:
32-
name: Install Code Climate Test Reporter
37+
name: Install Code Climate test reporter
3338
command: |
3439
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
3540
chmod +x ./cc-test-reporter
3641
3742
jobs:
38-
linters:
43+
linters-with-ruby:
44+
parameters:
45+
ruby-version:
46+
type: string
47+
3948
<<: *defaults
4049

4150
steps:
4251
- checkout
4352

53+
- <<: *install_bundler
4454
- <<: *restore_bundle_cache
4555
- <<: *bundle_install
4656
- <<: *save_bundle_cache
@@ -51,12 +61,17 @@ jobs:
5161
bundle exec overcommit -s
5262
SKIP=AuthorEmail,AuthorName bundle exec overcommit -r
5363
54-
tests:
64+
tests-and-coverage-with-ruby:
65+
parameters:
66+
ruby-version:
67+
type: string
68+
5569
<<: *defaults
5670

5771
steps:
5872
- checkout
5973

74+
- <<: *install_bundler
6075
- <<: *restore_bundle_cache
6176
- <<: *bundle_install
6277
- <<: *save_bundle_cache
@@ -65,7 +80,6 @@ jobs:
6580
- run:
6681
name: Running tests
6782
command: |
68-
mkdir /tmp/test-results
6983
./cc-test-reporter before-build
7084
bundle exec rspec
7185
@@ -74,12 +88,9 @@ jobs:
7488
command: |
7589
./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json"
7690
77-
- store_test_results:
78-
path: /tmp/test-results
79-
8091
- store_artifacts:
81-
path: /tmp/test-results
82-
destination: test-results
92+
path: ~/ruby-dns-mock/coverage
93+
destination: coverage
8394

8495
- deploy:
8596
command: |
@@ -94,7 +105,6 @@ jobs:
94105
steps:
95106
- checkout
96107
- ruby/install-deps:
97-
bundler-version: '1.16.6'
98108
with-cache: false
99109
path: './vendor/custom_bundle'
100110
- run:
@@ -104,8 +114,14 @@ jobs:
104114
workflows:
105115
build_and_test:
106116
jobs:
107-
- linters
108-
- tests
117+
- linters-with-ruby:
118+
matrix:
119+
parameters:
120+
ruby-version: ["2.5"]
121+
- tests-and-coverage-with-ruby:
122+
matrix:
123+
parameters:
124+
ruby-version: ["2.5"]
109125
- compatibility-with-ruby:
110126
matrix:
111127
parameters:

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## [1.2.3] - 2021-05-11
6+
7+
### Changed
8+
9+
- Updated gem development dependencies
10+
- Updated CircleCI config
11+
512
## [1.2.2] - 2021-05-06
613

714
### Changed

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
dns_mock (1.2.2)
4+
dns_mock (1.2.3)
55

66
GEM
77
remote: https://rubygems.org/
@@ -104,10 +104,10 @@ GEM
104104
unicode-display_width (2.0.0)
105105

106106
PLATFORMS
107-
ruby
107+
x86_64-darwin-19
108108

109109
DEPENDENCIES
110-
bundler (~> 1.16)
110+
bundler (~> 2.2, >= 2.2.17)
111111
bundler-audit (~> 0.8.0)
112112
dns_mock!
113113
faker (~> 2.17)
@@ -124,4 +124,4 @@ DEPENDENCIES
124124
simplecov (~> 0.17.1)
125125

126126
BUNDLED WITH
127-
1.16.6
127+
2.2.17

dns_mock.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
3131
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
3232
spec.require_paths = ['lib']
3333

34-
spec.add_development_dependency 'bundler', '~> 1.16'
34+
spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.17'
3535
spec.add_development_dependency 'bundler-audit', '~> 0.8.0'
3636
spec.add_development_dependency 'faker', '~> 2.17'
3737
spec.add_development_dependency 'fasterer', '~> 0.9.0'

lib/dns_mock/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module DnsMock
4-
VERSION = '1.2.2'
4+
VERSION = '1.2.3'
55
end

spec/support/config/simplecov.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
if ::RUBY_VERSION.eql?('2.5.0')
3+
if ::RUBY_VERSION[/\A2\.5.+\z/]
44
require 'simplecov'
55

66
SimpleCov.minimum_coverage(100)

0 commit comments

Comments
 (0)