[Debian-ha-commits] [pcs] 01/10: Replace orderedhash with active_support
Valentin Vidic
vvidic-guest at moszumanska.debian.org
Fri Jun 17 11:35:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
vvidic-guest pushed a commit to branch master
in repository pcs.
commit a5b67243f7657d1f059475e884a86c862719224b
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date: Fri Jun 17 11:21:44 2016 +0200
Replace orderedhash with active_support
---
debian/control | 1 +
debian/patches/0006-Replace-orderedhash.patch | 85 +++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 87 insertions(+)
diff --git a/debian/control b/debian/control
index d39866c..01cadf8 100644
--- a/debian/control
+++ b/debian/control
@@ -23,6 +23,7 @@ Depends: ${shlibs:Depends},
fonts-liberation,
python2.7 (>=2.7.9),
ruby,
+ ruby-activesupport,
ruby-backports,
ruby-eventmachine,
ruby-highline,
diff --git a/debian/patches/0006-Replace-orderedhash.patch b/debian/patches/0006-Replace-orderedhash.patch
new file mode 100644
index 0000000..9093dab
--- /dev/null
+++ b/debian/patches/0006-Replace-orderedhash.patch
@@ -0,0 +1,85 @@
+--- a/pcsd/config.rb
++++ b/pcsd/config.rb
+@@ -1,5 +1,5 @@
+ require 'json'
+-require 'orderedhash'
++require 'active_support/ordered_hash'
+
+ require 'cluster.rb'
+ require 'permissions.rb'
+@@ -94,15 +94,15 @@
+ end
+
+ def text()
+- out_hash = OrderedHash.new
++ out_hash = ActiveSupport::OrderedHash.new
+ out_hash['format_version'] = CURRENT_FORMAT
+ out_hash['data_version'] = @data_version
+ out_hash['clusters'] = []
+- out_hash['permissions'] = OrderedHash.new
++ out_hash['permissions'] = ActiveSupport::OrderedHash.new
+ out_hash['permissions']['local_cluster'] = []
+
+ @clusters.each { |c|
+- c_hash = OrderedHash.new
++ c_hash = ActiveSupport::OrderedHash.new
+ c_hash['name'] = c.name
+ c_hash['nodes'] = c.nodes.uniq.sort
+ out_hash['clusters'] << c_hash
+@@ -190,10 +190,10 @@
+ end
+
+ def text()
+- tokens_hash = OrderedHash.new
++ tokens_hash = ActiveSupport::OrderedHash.new
+ @tokens.keys.sort.each { |key| tokens_hash[key] = @tokens[key] }
+
+- out_hash = OrderedHash.new
++ out_hash = ActiveSupport::OrderedHash.new
+ out_hash['format_version'] = CURRENT_FORMAT
+ out_hash['data_version'] = @data_version
+ out_hash['tokens'] = tokens_hash
+--- a/pcsd/pcsd-cli.rb
++++ b/pcsd/pcsd-cli.rb
+@@ -4,14 +4,14 @@
+ require 'etc'
+ require 'json'
+ require 'stringio'
+-require 'orderedhash'
++require 'active_support/ordered_hash'
+
+ require 'bootstrap.rb'
+ require 'pcs.rb'
+ require 'auth.rb'
+
+ def cli_format_response(status, text=nil, data=nil)
+- response = OrderedHash.new
++ response = ActiveSupport::OrderedHash.new
+ response['status'] = status
+ response['text'] = text if text
+ response['data'] = data if data
+--- a/pcsd/permissions.rb
++++ b/pcsd/permissions.rb
+@@ -1,4 +1,4 @@
+-require 'orderedhash'
++require 'active_support/ordered_hash'
+
+ module Permissions
+
+@@ -104,7 +104,7 @@
+ end
+
+ def to_hash()
+- perm_hash = OrderedHash.new
++ perm_hash = ActiveSupport::OrderedHash.new
+ perm_hash['type'] = @type
+ perm_hash['name'] = @name
+ perm_hash['allow'] = @allow_list.uniq.sort
+--- a/pcsd/Gemfile
++++ b/pcsd/Gemfile
+@@ -18,4 +18,4 @@
+ gem 'json'
+ gem 'multi_json'
+ gem 'open4'
+-gem 'orderedhash'
++gem 'activesupport'
diff --git a/debian/patches/series b/debian/patches/series
index 710d00a..aedca27 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
0003-Remove-pcsd-.gitignore-file.patch
0004-Remove-pcsd-test-.gitignore-file.patch
0005-settings.py
+0006-Replace-orderedhash.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/pcs.git
More information about the Debian-HA-Commits
mailing list