summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-10 12:20:59 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-10 12:20:59 +0000
commit8972aef55865263833f7d30188c4a49c83e7f001 (patch)
tree0ec942a4a69f0df195a05f0fc6194c7928defc05
parent354b69dde2ba399a4269a0f544fd7a4e399d8b7e (diff)
parentddd3dd72fec5d31fc76023e10f824cc079f65b63 (diff)
downloadgitlab-ce-8972aef55865263833f7d30188c4a49c83e7f001.tar.gz
Merge branch 'state-machine-to-state-machines-activerecord' into 'master'
Switch to state_machines-activerecord (Fixes: #3374) state_machine is unmaintained See merge request !1764
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock10
-rw-r--r--config/initializers/state_machine_patch.rb9
3 files changed, 9 insertions, 12 deletions
diff --git a/Gemfile b/Gemfile
index 51848621b64..c73aa26bd0a 100644
--- a/Gemfile
+++ b/Gemfile
@@ -109,7 +109,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'
diff --git a/Gemfile.lock b/Gemfile.lock
index d358e236302..1688ea4d9d8 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -686,7 +686,13 @@ GEM
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
stamp (0.6.0)
- state_machine (1.2.0)
+ state_machines (0.4.0)
+ state_machines-activemodel (0.3.0)
+ activemodel (~> 4.1)
+ state_machines (>= 0.4.0)
+ state_machines-activerecord (0.3.0)
+ activerecord (~> 4.1)
+ state_machines-activemodel (>= 0.3.0)
stringex (2.5.2)
systemu (2.6.5)
task_list (1.0.2)
@@ -905,7 +911,7 @@ DEPENDENCIES
spring-commands-teaspoon (~> 0.0.2)
sprockets (~> 2.12.3)
stamp (~> 0.6.0)
- state_machine (~> 1.2.0)
+ state_machines-activerecord (~> 0.3.0)
task_list (~> 1.0.2)
teaspoon (~> 1.0.0)
teaspoon-jasmine (~> 2.2.0)
diff --git a/config/initializers/state_machine_patch.rb b/config/initializers/state_machine_patch.rb
deleted file mode 100644
index 72d010fa5de..00000000000
--- a/config/initializers/state_machine_patch.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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 Integrations
- module ActiveModel
- public :around_validation
- end
- end
-end