Skip to content

Commit

Permalink
Update Ruby version to 3.2
Browse files Browse the repository at this point in the history
- Remove Travis CI config
- Bump Rake to 13.x
- Remove Rake dependency on last_comment
- Add CI workflow for Github
- Added SimpleCov JSON Formatter
  • Loading branch information
matthewl authored and robkilby committed Sep 6, 2023
1 parent d43d156 commit 29d2cf5
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 47 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI
on:
- push
jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true

- name: Run tests
run: bundle exec rspec

- name: Code Coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageLocations: |
${{github.workspace}}/coverage/.coverage.json:simplecov
publish:
needs: test
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/build-')
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build yaml_normalizer.gemspec
gem push yaml_normalizer-*.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require:
- rubocop-performance

AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 3.2

# Commonly used screens these days easily fit more than 80 characters.
Metrics/LineLength:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5
3.2.0
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Removed

## [2.0.0.rc1] - 2023-08-14
### Changed
- Update Ruby version to 3.2

## [1.2.0] - 2019-08-08
### Added
- Versioning and help messages for CLI

### Changed
- Extended allowed line length to 120
- Change the mutant to only scan the latest commits
- Change the mutant to only scan the latest commits


## [1.1.0] - 2019-05-21
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

source 'https://rubygems.org'

ruby '~> 2.5'
ruby '~> 3.2'

gem 'simplecov', require: false, group: :test
gem 'simplecov', '0.21.2', require: false, group: :test

gemspec
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Yaml Normalizer

[![Build Status](https://travis-ci.org/Sage/yaml_normalizer.svg?branch=master)](https://travis-ci.org/Sage/yaml_normalizer)
[![Build Status](https://github.com/Sage/yaml_normalizer/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Sage/yaml_normalizer/actions/workflows/ci.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/8dccb6c06fcd8bc0e587/maintainability)](https://codeclimate.com/github/Sage/yaml_normalizer/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/8dccb6c06fcd8bc0e587/test_coverage)](https://codeclimate.com/github/Sage/yaml_normalizer/test_coverage)
[![Gem Version](https://badge.fury.io/rb/yaml_normalizer.svg)](https://badge.fury.io/rb/yaml_normalizer)
Expand Down Expand Up @@ -112,7 +112,7 @@ Guard keeps track of file changes and automatically runs the unit tests related

##### Run RSpec
$ bundle exec rake spec
This task runs the full unit test suite based on RSpec.
This task runs the full unit test suite based on RSpec.

#### Test Tests using mutant
$ bundle exec rake mutant
Expand Down
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require './tmpfix/rake_application'
require './spec/ci_helper'

require 'rspec/core/rake_task'
Expand Down
2 changes: 1 addition & 1 deletion lib/yaml_normalizer/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

module YamlNormalizer
# The current Yaml Normalizer version
VERSION = '1.2.1'
VERSION = '2.0.0.rc1'
end
3 changes: 3 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
ENV['ENV'] = 'test'
unless defined?(Mutant)
require 'simplecov'
require 'simplecov_json_formatter'

SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter
SimpleCov.start do
add_filter '/spec'
end
Expand Down
13 changes: 0 additions & 13 deletions tmpfix/rake_application.rb

This file was deleted.

4 changes: 2 additions & 2 deletions yaml_normalizer.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

spec.add_dependency 'peach', '~> 0.5'
spec.add_dependency 'psych', '~> 2.2'
spec.add_dependency 'rake', '~> 12.0'
spec.add_dependency 'psych', '~> 5.0.1'
spec.add_dependency 'rake', '< 14.0'

spec.add_development_dependency 'awesome_print'
spec.add_development_dependency 'bundler'
Expand Down

0 comments on commit 29d2cf5

Please sign in to comment.