diff --git a/debian/patches/0200-switch-to-state-machine.patch b/debian/patches/0200-switch-to-state-machine.patch new file mode 100644 index 0000000000..e5f355c7c8 --- /dev/null +++ b/debian/patches/0200-switch-to-state-machine.patch @@ -0,0 +1,35 @@ +From 2e5d32e07a75b98e57a0476a4cdb7a1ec41cadda Mon Sep 17 00:00:00 2001 +From: Pirate Praveen +Date: Sun, 8 Nov 2015 12:15:58 -0500 +Subject: [PATCH] Switch to state_machines-activerecord (Fixes: #3374) + +--- + Gemfile | 2 +- + config/initializers/state_machine_patch.rb | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: gitlab/Gemfile +=================================================================== +--- gitlab.orig/Gemfile ++++ gitlab/Gemfile +@@ -112,7 +112,7 @@ group :unicorn do + end + + # State machine +-gem "state_machine", '~> 1.2.0' ++gem "state_machines-activerecord", '~> 0.3.0' + # Run events after state machine commits + gem 'after_commit_queue' + +Index: gitlab/config/initializers/state_machine_patch.rb +=================================================================== +--- gitlab.orig/config/initializers/state_machine_patch.rb ++++ gitlab/config/initializers/state_machine_patch.rb +@@ -1,6 +1,6 @@ + # This is a patch to address the issue in https://github.com/pluginaweek/state_machine/issues/251 + # where gem 'state_machine' was not working for Rails 4.1 +-module StateMachine ++module StateMachines + module Integrations + module ActiveModel + public :around_validation diff --git a/debian/patches/series b/debian/patches/series index 90c9fc195a..4c958e6be7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -30,3 +30,4 @@ loosen-rails-version.patch 0101-disable-newrelic.patch 0102-loosen-octokit.patch 0106-loosen-gollum-lib.patch +0200-switch-to-state-machine.patch