From 7a1ca4f1d1f153875c3e44256ac61bc1f1db533a Mon Sep 17 00:00:00 2001 From: Nick Campbell Date: Wed, 18 Dec 2019 15:07:39 +0000 Subject: [PATCH 1/5] Drop support for Ruby 2.2 Official support ended in June 2018 [1] - Statesman may continue to work with this version of Ruby but we won't promise to retain that compatibility. [1]: https://www.ruby-lang.org/en/news/2018/06/20/support-of-ruby-2-2-has-ended/ --- .circleci/config.yml | 85 +------------------------------------------- 1 file changed, 1 insertion(+), 84 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 39880d45..e1e6e8b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -266,84 +266,7 @@ jobs: - POSTGRES_USER=postgres - POSTGRES_DB=statesman_test steps: *steps - build-ruby227-rails-429-mysql: - docker: - - image: circleci/ruby:2.2.7-node - environment: - - RAILS_VERSION=4.2.9 - - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test - - DATABASE_DEPENDENCY_PORT=3306 - - image: circleci/mysql:5.7.18 - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=true - - MYSQL_USER=root - - MYSQL_PASSWORD= - - MYSQL_DATABASE=statesman_test - steps: *steps - build-ruby227-rails-429-postgres: - docker: - - image: circleci/ruby:2.2.7-node - environment: - - RAILS_VERSION=4.2.9 - - DATABASE_URL=postgres://postgres@localhost/statesman_test - - DATABASE_DEPENDENCY_PORT=5432 - - image: circleci/postgres:9.6 - environment: - - POSTGRES_USER=postgres - - POSTGRES_DB=statesman_test - steps: *steps - build-ruby227-rails-505-mysql: - docker: - - image: circleci/ruby:2.2.7-node - environment: - - RAILS_VERSION=5.0.5 - - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test - - DATABASE_DEPENDENCY_PORT=3306 - - image: circleci/mysql:5.7.18 - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=true - - MYSQL_USER=root - - MYSQL_PASSWORD= - - MYSQL_DATABASE=statesman_test - steps: *steps - build-ruby227-rails-505-postgres: - docker: - - image: circleci/ruby:2.2.7-node - environment: - - RAILS_VERSION=5.0.5 - - DATABASE_URL=postgres://postgres@localhost/statesman_test - - DATABASE_DEPENDENCY_PORT=5432 - - image: circleci/postgres:9.6 - environment: - - POSTGRES_USER=postgres - - POSTGRES_DB=statesman_test - steps: *steps - build-ruby227-rails-513-mysql: - docker: - - image: circleci/ruby:2.2.7-node - environment: - - RAILS_VERSION=5.1.3 - - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test - - DATABASE_DEPENDENCY_PORT=3306 - - image: circleci/mysql:5.7.18 - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=true - - MYSQL_USER=root - - MYSQL_PASSWORD= - - MYSQL_DATABASE=statesman_test - steps: *steps - build-ruby227-rails-513-postgres: - docker: - - image: circleci/ruby:2.2.7-node - environment: - - RAILS_VERSION=5.1.3 - - DATABASE_URL=postgres://postgres@localhost/statesman_test - - DATABASE_DEPENDENCY_PORT=5432 - - image: circleci/postgres:9.6 - environment: - - POSTGRES_USER=postgres - - POSTGRES_DB=statesman_test - steps: *steps + workflows: version: 2 @@ -367,9 +290,3 @@ workflows: - build-ruby233-rails-505-postgres - build-ruby233-rails-513-mysql - build-ruby233-rails-513-postgres - - build-ruby227-rails-429-mysql - - build-ruby227-rails-429-postgres - - build-ruby227-rails-505-mysql - - build-ruby227-rails-505-postgres - - build-ruby227-rails-513-mysql - - build-ruby227-rails-513-postgres From 38815e153a5b5f1e04f67a9209a2f5ebe4db25fe Mon Sep 17 00:00:00 2001 From: Nick Campbell Date: Wed, 18 Dec 2019 15:09:11 +0000 Subject: [PATCH 2/5] Drop support for Ruby 2.3 Official support ended in March 2019 [1] - Statesman may continue to work with this version of Ruby but we won't promise to retain that compatibility. [1]: https://www.ruby-lang.org/en/news/2019/03/31/support-of-ruby-2-3-has-ended/ --- .circleci/config.yml | 84 -------------------------------------------- 1 file changed, 84 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e1e6e8b7..c8023a3b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -188,84 +188,6 @@ jobs: - POSTGRES_USER=postgres - POSTGRES_DB=statesman_test steps: *steps - build-ruby233-rails-429-mysql: - docker: - - image: circleci/ruby:2.3.3-node - environment: - - RAILS_VERSION=4.2.9 - - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test - - DATABASE_DEPENDENCY_PORT=3306 - - image: circleci/mysql:5.7.18 - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=true - - MYSQL_USER=root - - MYSQL_PASSWORD= - - MYSQL_DATABASE=statesman_test - steps: *steps - build-ruby233-rails-429-postgres: - docker: - - image: circleci/ruby:2.3.3-node - environment: - - RAILS_VERSION=4.2.9 - - DATABASE_URL=postgres://postgres@localhost/statesman_test - - DATABASE_DEPENDENCY_PORT=5432 - - image: circleci/postgres:9.6 - environment: - - POSTGRES_USER=postgres - - POSTGRES_DB=statesman_test - steps: *steps - build-ruby233-rails-505-mysql: - docker: - - image: circleci/ruby:2.3.3-node - environment: - - RAILS_VERSION=5.0.5 - - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test - - DATABASE_DEPENDENCY_PORT=3306 - - image: circleci/mysql:5.7.18 - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=true - - MYSQL_USER=root - - MYSQL_PASSWORD= - - MYSQL_DATABASE=statesman_test - steps: *steps - build-ruby233-rails-505-postgres: - docker: - - image: circleci/ruby:2.3.3-node - environment: - - RAILS_VERSION=5.0.5 - - DATABASE_URL=postgres://postgres@localhost/statesman_test - - DATABASE_DEPENDENCY_PORT=5432 - - image: circleci/postgres:9.6 - environment: - - POSTGRES_USER=postgres - - POSTGRES_DB=statesman_test - steps: *steps - build-ruby233-rails-513-mysql: - docker: - - image: circleci/ruby:2.3.3-node - environment: - - RAILS_VERSION=5.1.3 - - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test - - DATABASE_DEPENDENCY_PORT=3306 - - image: circleci/mysql:5.7.18 - environment: - - MYSQL_ALLOW_EMPTY_PASSWORD=true - - MYSQL_USER=root - - MYSQL_PASSWORD= - - MYSQL_DATABASE=statesman_test - steps: *steps - build-ruby233-rails-513-postgres: - docker: - - image: circleci/ruby:2.3.3-node - environment: - - RAILS_VERSION=5.1.3 - - DATABASE_URL=postgres://postgres@localhost/statesman_test - - DATABASE_DEPENDENCY_PORT=5432 - - image: circleci/postgres:9.6 - environment: - - POSTGRES_USER=postgres - - POSTGRES_DB=statesman_test - steps: *steps workflows: @@ -284,9 +206,3 @@ workflows: - build-ruby262-rails-600-postgres - build-ruby262-rails-master-mysql - build-ruby262-rails-master-postgres - - build-ruby233-rails-429-mysql - - build-ruby233-rails-429-postgres - - build-ruby233-rails-505-mysql - - build-ruby233-rails-505-postgres - - build-ruby233-rails-513-mysql - - build-ruby233-rails-513-postgres From 8d6cb3fe175cc589f688af3b86db708921ada743 Mon Sep 17 00:00:00 2001 From: Nick Campbell Date: Wed, 18 Dec 2019 15:10:33 +0000 Subject: [PATCH 3/5] Update Rubocop target to 2.4+ --- .rubocop.yml | 2 +- .rubocop_todo.yml | 3 +++ Gemfile | 2 ++ Guardfile | 2 ++ Rakefile | 2 ++ .../statesman/active_record_transition_generator.rb | 2 ++ lib/generators/statesman/generator_helpers.rb | 2 ++ lib/generators/statesman/migration_generator.rb | 2 ++ lib/statesman.rb | 2 ++ lib/statesman/adapters/active_record.rb | 2 ++ lib/statesman/adapters/active_record_queries.rb | 2 ++ lib/statesman/adapters/active_record_transition.rb | 2 ++ lib/statesman/adapters/memory.rb | 2 ++ lib/statesman/adapters/memory_transition.rb | 2 ++ lib/statesman/callback.rb | 2 ++ lib/statesman/config.rb | 2 ++ lib/statesman/exceptions.rb | 2 ++ lib/statesman/guard.rb | 2 ++ lib/statesman/machine.rb | 2 ++ lib/statesman/railtie.rb | 2 ++ lib/statesman/utils.rb | 2 ++ lib/statesman/version.rb | 4 +++- lib/tasks/statesman.rake | 2 ++ ...to_most_recent_for_bacon_transitions_with_partial_index.rb | 2 ++ ...most_recent_for_bacon_transitions_without_partial_index.rb | 2 ++ spec/fixtures/add_most_recent_to_bacon_transitions.rb | 2 ++ .../statesman/active_record_transition_generator_spec.rb | 2 ++ spec/generators/statesman/migration_generator_spec.rb | 2 ++ spec/spec_helper.rb | 2 ++ spec/statesman/adapters/active_record_queries_spec.rb | 2 ++ spec/statesman/adapters/active_record_spec.rb | 2 ++ spec/statesman/adapters/active_record_transition_spec.rb | 2 ++ spec/statesman/adapters/memory_spec.rb | 2 ++ spec/statesman/adapters/memory_transition_spec.rb | 2 ++ spec/statesman/adapters/shared_examples.rb | 2 ++ spec/statesman/callback_spec.rb | 2 ++ spec/statesman/config_spec.rb | 2 ++ spec/statesman/guard_spec.rb | 2 ++ spec/statesman/machine_spec.rb | 2 ++ spec/statesman/utils_spec.rb | 2 ++ spec/support/active_record.rb | 2 ++ spec/support/generators_shared_examples.rb | 2 ++ statesman.gemspec | 2 ++ 43 files changed, 87 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 3a5e944e..5497b63e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,4 +4,4 @@ inherit_gem: gc_ruboconfig: rubocop.yml AllCops: - TargetRubyVersion: 2.2 + TargetRubyVersion: 2.4 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 16db4b9e..e9b9584a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -6,6 +6,9 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. +Gemspec/RequiredRubyVersion: + Enabled: false # We want to allow Ruby 2.2 even though we don't test on it + # Offense count: 5 Metrics/AbcSize: Max: 18 diff --git a/Gemfile b/Gemfile index 31c78bad..1c2f0d85 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source 'https://rubygems.org' gemspec diff --git a/Guardfile b/Guardfile index ed0e5c55..d30e4fa6 100644 --- a/Guardfile +++ b/Guardfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # A sample Guardfile # More info at https://github.com/guard/guard#readme diff --git a/Rakefile b/Rakefile index 11c9969e..de6032c8 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "bundler/gem_tasks" require "rspec/core/rake_task" diff --git a/lib/generators/statesman/active_record_transition_generator.rb b/lib/generators/statesman/active_record_transition_generator.rb index 60c40294..b95fc0ac 100644 --- a/lib/generators/statesman/active_record_transition_generator.rb +++ b/lib/generators/statesman/active_record_transition_generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rails/generators" require "generators/statesman/generator_helpers" diff --git a/lib/generators/statesman/generator_helpers.rb b/lib/generators/statesman/generator_helpers.rb index ad2dd3de..2fa07e12 100644 --- a/lib/generators/statesman/generator_helpers.rb +++ b/lib/generators/statesman/generator_helpers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Statesman module GeneratorHelpers def class_name_option diff --git a/lib/generators/statesman/migration_generator.rb b/lib/generators/statesman/migration_generator.rb index 433c8187..e0b23f01 100644 --- a/lib/generators/statesman/migration_generator.rb +++ b/lib/generators/statesman/migration_generator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rails/generators" require "generators/statesman/generator_helpers" diff --git a/lib/statesman.rb b/lib/statesman.rb index fe6c6159..0381a228 100644 --- a/lib/statesman.rb +++ b/lib/statesman.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Statesman autoload :Config, "statesman/config" autoload :Machine, "statesman/machine" diff --git a/lib/statesman/adapters/active_record.rb b/lib/statesman/adapters/active_record.rb index 84c11a8f..c98eadfb 100644 --- a/lib/statesman/adapters/active_record.rb +++ b/lib/statesman/adapters/active_record.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "../exceptions" module Statesman diff --git a/lib/statesman/adapters/active_record_queries.rb b/lib/statesman/adapters/active_record_queries.rb index 9514fd77..d39d7bd5 100644 --- a/lib/statesman/adapters/active_record_queries.rb +++ b/lib/statesman/adapters/active_record_queries.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Statesman module Adapters module ActiveRecordQueries diff --git a/lib/statesman/adapters/active_record_transition.rb b/lib/statesman/adapters/active_record_transition.rb index c6c9070e..bdbb6c15 100644 --- a/lib/statesman/adapters/active_record_transition.rb +++ b/lib/statesman/adapters/active_record_transition.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "json" module Statesman diff --git a/lib/statesman/adapters/memory.rb b/lib/statesman/adapters/memory.rb index 2acdebe6..0cb8afb8 100644 --- a/lib/statesman/adapters/memory.rb +++ b/lib/statesman/adapters/memory.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "json" module Statesman diff --git a/lib/statesman/adapters/memory_transition.rb b/lib/statesman/adapters/memory_transition.rb index 33b2da70..1dfb2f4d 100644 --- a/lib/statesman/adapters/memory_transition.rb +++ b/lib/statesman/adapters/memory_transition.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Statesman module Adapters class MemoryTransition diff --git a/lib/statesman/callback.rb b/lib/statesman/callback.rb index 6955cd4b..9c0623ea 100644 --- a/lib/statesman/callback.rb +++ b/lib/statesman/callback.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "exceptions" module Statesman diff --git a/lib/statesman/config.rb b/lib/statesman/config.rb index b2316e9b..f0d45f87 100644 --- a/lib/statesman/config.rb +++ b/lib/statesman/config.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "json" require_relative "exceptions" diff --git a/lib/statesman/exceptions.rb b/lib/statesman/exceptions.rb index a61c9b7b..346a6d5d 100644 --- a/lib/statesman/exceptions.rb +++ b/lib/statesman/exceptions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Statesman class InvalidStateError < StandardError; end class InvalidTransitionError < StandardError; end diff --git a/lib/statesman/guard.rb b/lib/statesman/guard.rb index d3966b76..475f04b3 100644 --- a/lib/statesman/guard.rb +++ b/lib/statesman/guard.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "callback" require_relative "exceptions" diff --git a/lib/statesman/machine.rb b/lib/statesman/machine.rb index 3a5b86b3..11feaf6f 100644 --- a/lib/statesman/machine.rb +++ b/lib/statesman/machine.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "version" require_relative "exceptions" require_relative "guard" diff --git a/lib/statesman/railtie.rb b/lib/statesman/railtie.rb index 05bad7ef..229b9fb3 100644 --- a/lib/statesman/railtie.rb +++ b/lib/statesman/railtie.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Statesman class Railtie < ::Rails::Railtie railtie_name :statesman diff --git a/lib/statesman/utils.rb b/lib/statesman/utils.rb index 8073c4f7..534599e3 100644 --- a/lib/statesman/utils.rb +++ b/lib/statesman/utils.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Statesman module Utils def self.rails_major_version diff --git a/lib/statesman/version.rb b/lib/statesman/version.rb index 5d33cf41..0f9d7b6f 100644 --- a/lib/statesman/version.rb +++ b/lib/statesman/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Statesman - VERSION = "5.2.0".freeze + VERSION = "5.2.0" end diff --git a/lib/tasks/statesman.rake b/lib/tasks/statesman.rake index c0af6000..b0b48233 100644 --- a/lib/tasks/statesman.rake +++ b/lib/tasks/statesman.rake @@ -1,3 +1,5 @@ +# frozen_string_literal: true + namespace :statesman do desc "Set most_recent to false for old transitions and to true for the "\ "latest one. Safe to re-run" diff --git a/spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb b/spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb index 100e98c6..dc16e308 100644 --- a/spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb +++ b/spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_with_partial_index.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddConstraintsToMostRecentForBaconTransitions < ActiveRecord::Migration disable_ddl_transaction! diff --git a/spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_without_partial_index.rb b/spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_without_partial_index.rb index bfe7da87..ddc3a1e1 100644 --- a/spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_without_partial_index.rb +++ b/spec/fixtures/add_constraints_to_most_recent_for_bacon_transitions_without_partial_index.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddConstraintsToMostRecentForBaconTransitions < ActiveRecord::Migration disable_ddl_transaction! diff --git a/spec/fixtures/add_most_recent_to_bacon_transitions.rb b/spec/fixtures/add_most_recent_to_bacon_transitions.rb index 0b56617e..777bb6cb 100644 --- a/spec/fixtures/add_most_recent_to_bacon_transitions.rb +++ b/spec/fixtures/add_most_recent_to_bacon_transitions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class AddMostRecentToBaconTransitions < ActiveRecord::Migration def up add_column :bacon_transitions, :most_recent, :boolean, null: true diff --git a/spec/generators/statesman/active_record_transition_generator_spec.rb b/spec/generators/statesman/active_record_transition_generator_spec.rb index 44c9ce9e..68431391 100644 --- a/spec/generators/statesman/active_record_transition_generator_spec.rb +++ b/spec/generators/statesman/active_record_transition_generator_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" require "support/generators_shared_examples" require "generators/statesman/active_record_transition_generator" diff --git a/spec/generators/statesman/migration_generator_spec.rb b/spec/generators/statesman/migration_generator_spec.rb index b08819f5..03966bae 100644 --- a/spec/generators/statesman/migration_generator_spec.rb +++ b/spec/generators/statesman/migration_generator_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" require "support/generators_shared_examples" require "generators/statesman/migration_generator" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 50031320..3ea09693 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "statesman" require "sqlite3" require "mysql2" diff --git a/spec/statesman/adapters/active_record_queries_spec.rb b/spec/statesman/adapters/active_record_queries_spec.rb index 14bbb873..4071912c 100644 --- a/spec/statesman/adapters/active_record_queries_spec.rb +++ b/spec/statesman/adapters/active_record_queries_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe Statesman::Adapters::ActiveRecordQueries, active_record: true do diff --git a/spec/statesman/adapters/active_record_spec.rb b/spec/statesman/adapters/active_record_spec.rb index 149610e2..c65bb406 100644 --- a/spec/statesman/adapters/active_record_spec.rb +++ b/spec/statesman/adapters/active_record_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" require "timecop" require "statesman/adapters/shared_examples" diff --git a/spec/statesman/adapters/active_record_transition_spec.rb b/spec/statesman/adapters/active_record_transition_spec.rb index a166ba3d..b321d7eb 100644 --- a/spec/statesman/adapters/active_record_transition_spec.rb +++ b/spec/statesman/adapters/active_record_transition_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" require "json" diff --git a/spec/statesman/adapters/memory_spec.rb b/spec/statesman/adapters/memory_spec.rb index da2989bc..f54df755 100644 --- a/spec/statesman/adapters/memory_spec.rb +++ b/spec/statesman/adapters/memory_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" require "statesman/adapters/shared_examples" require "statesman/adapters/memory_transition" diff --git a/spec/statesman/adapters/memory_transition_spec.rb b/spec/statesman/adapters/memory_transition_spec.rb index f54e82ac..467ee68c 100644 --- a/spec/statesman/adapters/memory_transition_spec.rb +++ b/spec/statesman/adapters/memory_transition_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" require "statesman/adapters/memory_transition" diff --git a/spec/statesman/adapters/shared_examples.rb b/spec/statesman/adapters/shared_examples.rb index 16392bdb..459bf4cd 100644 --- a/spec/statesman/adapters/shared_examples.rb +++ b/spec/statesman/adapters/shared_examples.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" # All adpators must define seven methods: diff --git a/spec/statesman/callback_spec.rb b/spec/statesman/callback_spec.rb index 72b9d989..59f2aaba 100644 --- a/spec/statesman/callback_spec.rb +++ b/spec/statesman/callback_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe Statesman::Callback do diff --git a/spec/statesman/config_spec.rb b/spec/statesman/config_spec.rb index 37f4ba63..f693e4ea 100644 --- a/spec/statesman/config_spec.rb +++ b/spec/statesman/config_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe Statesman::Config do diff --git a/spec/statesman/guard_spec.rb b/spec/statesman/guard_spec.rb index 16635201..2345665e 100644 --- a/spec/statesman/guard_spec.rb +++ b/spec/statesman/guard_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe Statesman::Guard do diff --git a/spec/statesman/machine_spec.rb b/spec/statesman/machine_spec.rb index 6b1e2e11..006ee293 100644 --- a/spec/statesman/machine_spec.rb +++ b/spec/statesman/machine_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe Statesman::Machine do diff --git a/spec/statesman/utils_spec.rb b/spec/statesman/utils_spec.rb index 72e08b6e..b3e76b8b 100644 --- a/spec/statesman/utils_spec.rb +++ b/spec/statesman/utils_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe Statesman::Utils do diff --git a/spec/support/active_record.rb b/spec/support/active_record.rb index a60ffb3a..2c6997de 100644 --- a/spec/support/active_record.rb +++ b/spec/support/active_record.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "json" MIGRATION_CLASS = if Rails.version.split(".").map(&:to_i).first >= 5 diff --git a/spec/support/generators_shared_examples.rb b/spec/support/generators_shared_examples.rb index a6a8099f..83fbcd24 100644 --- a/spec/support/generators_shared_examples.rb +++ b/spec/support/generators_shared_examples.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rails/version" require "rspec/rails" require "ammeter/init" diff --git a/statesman.gemspec b/statesman.gemspec index 63cbb51d..0c556dc1 100644 --- a/statesman.gemspec +++ b/statesman.gemspec @@ -1,3 +1,5 @@ +# frozen_string_literal: true + lib = File.expand_path("lib", __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "statesman/version" From 8247d1f9b44771dff437e92dfdb4cf5d82c20371 Mon Sep 17 00:00:00 2001 From: Nick Campbell Date: Wed, 18 Dec 2019 15:10:13 +0000 Subject: [PATCH 4/5] Update patch versions for Ruby 2.4 and Ruby 2.6 --- .circleci/config.yml | 72 ++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c8023a3b..24491ae9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,9 +31,9 @@ references: path: /tmp/test-results jobs: - build-ruby241-rails-429-mysql: + build-ruby249-rails-429-mysql: docker: - - image: circleci/ruby:2.4.1-node + - image: circleci/ruby:2.4.9-node environment: - RAILS_VERSION=4.2.9 - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test @@ -45,9 +45,9 @@ jobs: - MYSQL_PASSWORD= - MYSQL_DATABASE=statesman_test steps: *steps - build-ruby241-rails-429-postgres: + build-ruby249-rails-429-postgres: docker: - - image: circleci/ruby:2.4.1-node + - image: circleci/ruby:2.4.9-node environment: - RAILS_VERSION=4.2.9 - DATABASE_URL=postgres://postgres@localhost/statesman_test @@ -57,9 +57,9 @@ jobs: - POSTGRES_USER=postgres - POSTGRES_DB=statesman_test steps: *steps - build-ruby241-rails-505-mysql: + build-ruby249-rails-505-mysql: docker: - - image: circleci/ruby:2.4.1-node + - image: circleci/ruby:2.4.9-node environment: - RAILS_VERSION=5.0.5 - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test @@ -71,9 +71,9 @@ jobs: - MYSQL_PASSWORD= - MYSQL_DATABASE=statesman_test steps: *steps - build-ruby241-rails-505-postgres: + build-ruby249-rails-505-postgres: docker: - - image: circleci/ruby:2.4.1-node + - image: circleci/ruby:2.4.9-node environment: - RAILS_VERSION=5.0.5 - DATABASE_URL=postgres://postgres@localhost/statesman_test @@ -83,9 +83,9 @@ jobs: - POSTGRES_USER=postgres - POSTGRES_DB=statesman_test steps: *steps - build-ruby241-rails-513-mysql: + build-ruby249-rails-513-mysql: docker: - - image: circleci/ruby:2.4.1-node + - image: circleci/ruby:2.4.9-node environment: - RAILS_VERSION=5.1.3 - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test @@ -97,9 +97,9 @@ jobs: - MYSQL_PASSWORD= - MYSQL_DATABASE=statesman_test steps: *steps - build-ruby241-rails-513-postgres: + build-ruby249-rails-513-postgres: docker: - - image: circleci/ruby:2.4.1-node + - image: circleci/ruby:2.4.9-node environment: - RAILS_VERSION=5.1.3 - DATABASE_URL=postgres://postgres@localhost/statesman_test @@ -109,9 +109,9 @@ jobs: - POSTGRES_USER=postgres - POSTGRES_DB=statesman_test steps: *steps - build-ruby262-rails-600-mysql: + build-ruby265-rails-600-mysql: docker: - - image: circleci/ruby:2.6.2-node + - image: circleci/ruby:2.6.5-node environment: - RAILS_VERSION=6.0.0 - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test @@ -123,9 +123,9 @@ jobs: - MYSQL_PASSWORD= - MYSQL_DATABASE=statesman_test steps: *steps - build-ruby262-rails-600-postgres: + build-ruby265-rails-600-postgres: docker: - - image: circleci/ruby:2.6.2-node + - image: circleci/ruby:2.6.5-node environment: - RAILS_VERSION=6.0.0 - DATABASE_URL=postgres://postgres@localhost/statesman_test @@ -135,9 +135,9 @@ jobs: - POSTGRES_USER=postgres - POSTGRES_DB=statesman_test steps: *steps - build-ruby262-rails-master-mysql: + build-ruby265-rails-master-mysql: docker: - - image: circleci/ruby:2.6.2-node + - image: circleci/ruby:2.6.5-node environment: - RAILS_VERSION=master - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test @@ -149,9 +149,9 @@ jobs: - MYSQL_PASSWORD= - MYSQL_DATABASE=statesman_test steps: *steps - build-ruby262-rails-master-postgres: + build-ruby265-rails-master-postgres: docker: - - image: circleci/ruby:2.6.2-node + - image: circleci/ruby:2.6.5-node environment: - RAILS_VERSION=master - DATABASE_URL=postgres://postgres@localhost/statesman_test @@ -162,9 +162,9 @@ jobs: - POSTGRES_USER=postgres - POSTGRES_DB=statesman_test steps: *steps - build-ruby241-rails-523-mysql: + build-ruby249-rails-523-mysql: docker: - - image: circleci/ruby:2.4.1-node + - image: circleci/ruby:2.4.9-node environment: - RAILS_VERSION=5.2.3 - DATABASE_URL=mysql2://root@127.0.0.1/statesman_test @@ -176,9 +176,9 @@ jobs: - MYSQL_PASSWORD= - MYSQL_DATABASE=statesman_test steps: *steps - build-ruby241-rails-523-postgres: + build-ruby249-rails-523-postgres: docker: - - image: circleci/ruby:2.4.1-node + - image: circleci/ruby:2.4.9-node environment: - RAILS_VERSION=5.2.3 - DATABASE_URL=postgres://postgres@localhost/statesman_test @@ -194,15 +194,15 @@ workflows: version: 2 tests: jobs: - - build-ruby241-rails-429-mysql - - build-ruby241-rails-429-postgres - - build-ruby241-rails-505-mysql - - build-ruby241-rails-505-postgres - - build-ruby241-rails-513-mysql - - build-ruby241-rails-513-postgres - - build-ruby241-rails-523-mysql - - build-ruby241-rails-523-postgres - - build-ruby262-rails-600-mysql - - build-ruby262-rails-600-postgres - - build-ruby262-rails-master-mysql - - build-ruby262-rails-master-postgres + - build-ruby249-rails-429-mysql + - build-ruby249-rails-429-postgres + - build-ruby249-rails-505-mysql + - build-ruby249-rails-505-postgres + - build-ruby249-rails-513-mysql + - build-ruby249-rails-513-postgres + - build-ruby249-rails-523-mysql + - build-ruby249-rails-523-postgres + - build-ruby265-rails-600-mysql + - build-ruby265-rails-600-postgres + - build-ruby265-rails-master-mysql + - build-ruby265-rails-master-postgres From 1531cb3b44ecb5a9227f93ee9f00f2707382c44a Mon Sep 17 00:00:00 2001 From: Nick Campbell Date: Thu, 19 Dec 2019 10:54:43 +0000 Subject: [PATCH 5/5] Bump version to v6.0.0 --- CHANGELOG.md | 8 ++++++++ lib/statesman/version.rb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96cfd5f6..b12a185d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v6.0.0, 20th December 2019 + +**Breaking changes** + +- Drop official support for Ruby 2.2 and 2.3 following our [compatibility + policy](https://github.com/gocardless/statesman/blob/master/docs/COMPATIBILITY.md). + + ## v5.2.0, 17th December 2019 - Issue `most_recent_transition_join` query as a single-line string [#381](https://github.com/gocardless/statesman/pull/381) diff --git a/lib/statesman/version.rb b/lib/statesman/version.rb index 0f9d7b6f..a416a651 100644 --- a/lib/statesman/version.rb +++ b/lib/statesman/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Statesman - VERSION = "5.2.0" + VERSION = "6.0.0" end