Skip to content

Commit

Permalink
Merge pull request #56 from gocardless/deprecate_ruby_2.2
Browse files Browse the repository at this point in the history
Deprecate support for Ruby 2.2
  • Loading branch information
Harry Maclean authored Jun 13, 2019
2 parents 1b5a97b + 66126d1 commit 7c0451f
Show file tree
Hide file tree
Showing 26 changed files with 52 additions and 33 deletions.
28 changes: 0 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,30 +33,6 @@ references:

- run: bundle exec rubocop
jobs:
build-ruby22-rails515:
docker:
- image: ruby:2.2
environment:
- RAILS_VERSION=5.1.5
steps: *steps
build-ruby22-rails4210:
docker:
- image: ruby:2.2
environment:
- RAILS_VERSION=4.2.10
steps: *steps
build-ruby23-rails515:
docker:
- image: ruby:2.3
environment:
- RAILS_VERSION=5.1.5
steps: *steps
build-ruby23-rails4210:
docker:
- image: ruby:2.3
environment:
- RAILS_VERSION=4.2.10
steps: *steps
build-ruby24-rails515:
docker:
- image: ruby:2.4
Expand Down Expand Up @@ -86,10 +62,6 @@ workflows:
version: 2
tests:
jobs:
- build-ruby22-rails515
- build-ruby22-rails4210
- build-ruby23-rails515
- build-ruby23-rails4210
- build-ruby24-rails515
- build-ruby24-rails4210
- build-ruby25-rails515
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inherit_gem:
gc_ruboconfig: rubocop.yml

AllCops:
TargetRubyVersion: 2.2
TargetRubyVersion: 2.4

Metrics/MethodLength:
Max: 15
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
* `coach.handler.finish`
* `coach.request`

* [#56](https://github.com/gocardless/coach/pull/56) Support for Ruby 2.2 and 2.3 has been
dropped. See our [compatibility policy](https://github.com/gocardless/coach/blob/master/docs/COMPATIBILITY.md) for more information.

# 1.0.0 / 2018-04-19

## Breaking changes
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gemspec
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To get started, just add Coach to your `Gemfile`, and then run `bundle`:
gem 'coach'
```

Coach works with Ruby versions 2.2 and onwards.
Coach works with Ruby versions 2.4 and onwards.

## Coach by example

Expand Down
4 changes: 3 additions & 1 deletion coach.gemspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "coach/version"
Expand All @@ -10,7 +12,7 @@ Gem::Specification.new do |spec|
spec.homepage = "https://github.com/gocardless/coach"
spec.email = %w[[email protected]]
spec.license = "MIT"
spec.required_ruby_version = ">= 2.2"
spec.required_ruby_version = ">= 2.4"

spec.files = `git ls-files -z`.split("\x0")
spec.test_files = spec.files.grep(%r{^spec/})
Expand Down
2 changes: 2 additions & 0 deletions lib/coach.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "active_support"
require "action_dispatch"

Expand Down
2 changes: 2 additions & 0 deletions lib/coach/errors.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Coach
module Errors
class MiddlewareDependencyNotMet < StandardError
Expand Down
2 changes: 2 additions & 0 deletions lib/coach/handler.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "coach/errors"
require "active_support/core_ext/object/try"

Expand Down
2 changes: 2 additions & 0 deletions lib/coach/middleware.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "coach/middleware_item"

module Coach
Expand Down
4 changes: 3 additions & 1 deletion lib/coach/middleware_item.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "coach/errors"
require "coach/middleware_validator"

Expand All @@ -13,7 +15,7 @@ def initialize(middleware, config = {})
def build_middleware(context, successor)
@middleware.
new(context,
successor && successor.instrument,
successor&.instrument,
config)
end

Expand Down
2 changes: 2 additions & 0 deletions lib/coach/middleware_validator.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "coach/errors"

module Coach
Expand Down
2 changes: 2 additions & 0 deletions lib/coach/notifications.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative "request_benchmark"
require_relative "request_serializer"

Expand Down
2 changes: 2 additions & 0 deletions lib/coach/request_benchmark.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Coach
# This class is built to aggregate data during the course of the request. It relies on
# 'start_middleware.coach' and 'finish_middleware.coach' events to register the
Expand Down
2 changes: 2 additions & 0 deletions lib/coach/request_serializer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Coach
class RequestSerializer
def self.header_rules
Expand Down
2 changes: 2 additions & 0 deletions lib/coach/router.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require_relative "handler"
require_relative "errors"

Expand Down
2 changes: 2 additions & 0 deletions lib/coach/rspec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "rspec/expectations"
require "coach/middleware"

Expand Down
4 changes: 3 additions & 1 deletion lib/coach/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Coach
VERSION = "1.0.0".freeze
VERSION = "1.0.0"
end
2 changes: 2 additions & 0 deletions spec/lib/coach/handler_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "spec_helper"

require "coach/handler"
Expand Down
2 changes: 2 additions & 0 deletions spec/lib/coach/middleware_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "coach/middleware"

describe Coach::Middleware do
Expand Down
2 changes: 2 additions & 0 deletions spec/lib/coach/middleware_validator_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "spec_helper"
require "coach/middleware_validator"

Expand Down
2 changes: 2 additions & 0 deletions spec/lib/coach/notifications_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "spec_helper"
require "coach/notifications"

Expand Down
2 changes: 2 additions & 0 deletions spec/lib/coach/request_benchmark_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "spec_helper"
require "coach/request_benchmark"

Expand Down
2 changes: 2 additions & 0 deletions spec/lib/coach/request_serializer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "spec_helper"
require "active_support/core_ext/object/try"
require "coach/request_serializer"
Expand Down
2 changes: 2 additions & 0 deletions spec/lib/coach/router_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "spec_helper"

require "coach/router"
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "rspec/its"
require "pry"
require "coach"
Expand Down

0 comments on commit 7c0451f

Please sign in to comment.