diff --git a/pcsd/Gemfile b/pcsd/Gemfile index e01b31cae..6418fd41a 100644 --- a/pcsd/Gemfile +++ b/pcsd/Gemfile @@ -1,9 +1,5 @@ source 'https://rubygems.org' -source 'https://tojeline.fedorapeople.org/rubygems/' do - gem 'rpam-ruby19-feist', :platform => :ruby_18 -end - gem 'sinatra' gem 'sinatra-contrib' gem 'rack' @@ -11,10 +7,9 @@ gem 'rack-protection' gem 'tilt' gem 'rack-test' gem 'backports' -gem 'rpam-ruby19', :platform => [:ruby_19, :ruby_20, :ruby_21, :ruby_22] +gem 'rpam-ruby19' gem 'json' gem 'multi_json' gem 'open4' -gem 'orderedhash' gem 'ffi' gem 'ethon' diff --git a/pcsd/Gemfile.lock b/pcsd/Gemfile.lock index dcb0d0538..83d067cbc 100644 --- a/pcsd/Gemfile.lock +++ b/pcsd/Gemfile.lock @@ -1,6 +1,5 @@ GEM remote: https://rubygems.org/ - remote: https://tojeline.fedorapeople.org/rubygems/ specs: backports (3.9.1) ethon (0.10.1) @@ -8,7 +7,6 @@ GEM json (2.1.0) multi_json (1.12.2) open4 (1.3.4) - orderedhash (0.0.6) rack (1.6.4) rack-protection (1.5.3) rack @@ -38,7 +36,6 @@ DEPENDENCIES json multi_json open4 - orderedhash rack rack-protection rack-test diff --git a/pcsd/Makefile b/pcsd/Makefile index d452ac06b..8979d61ba 100644 --- a/pcsd/Makefile +++ b/pcsd/Makefile @@ -12,9 +12,7 @@ build_gems: get_gems fi; \ done; -# RHEL6 needs special rpam-ruby19 gem to work with 1.8.7 -# also bundler is not available on RHEL6 in rpm -build_gems_rhel6: +build_gems_without_bundler: mkdir -p vendor/bundle/ruby gem install --verbose --no-rdoc --no-ri -l -i vendor/bundle/ruby \ vendor/cache/backports-3.6.8.gem \ @@ -23,11 +21,10 @@ build_gems_rhel6: vendor/cache/json-2.0.3.gem \ vendor/cache/multi_json-1.12.1.gem \ vendor/cache/open4-1.3.4.gem \ - vendor/cache/orderedhash-0.0.6.gem \ vendor/cache/rack-1.6.4.gem \ vendor/cache/rack-protection-1.5.3.gem \ vendor/cache/rack-test-0.6.3.gem \ - vendor/cache/rpam-ruby19-feist-1.2.1.1.gem \ + vendor/cache/rpam-ruby19-1.2.1.gem \ vendor/cache/sinatra-1.4.8.gem \ vendor/cache/sinatra-contrib-1.4.7.gem \ vendor/cache/tilt-2.0.6.gem \ diff --git a/pcsd/config.rb b/pcsd/config.rb index 23738a360..acd08f8af 100644 --- a/pcsd/config.rb +++ b/pcsd/config.rb @@ -1,5 +1,4 @@ require 'json' -require 'orderedhash' require 'cluster.rb' require 'permissions.rb' @@ -124,15 +123,15 @@ def update_cluster(cluster_name, node_list) end def text() - out_hash = OrderedHash.new + out_hash = Hash.new out_hash['format_version'] = CURRENT_FORMAT out_hash['data_version'] = @data_version out_hash['clusters'] = [] - out_hash['permissions'] = OrderedHash.new + out_hash['permissions'] = Hash.new out_hash['permissions']['local_cluster'] = [] @clusters.each { |c| - c_hash = OrderedHash.new + c_hash = Hash.new c_hash['name'] = c.name c_hash['nodes'] = c.nodes.uniq.sort out_hash['clusters'] << c_hash @@ -182,7 +181,7 @@ def cluster_nodes_equal?(cluster_name, nodes) end def hash_to_ordered_hash(hash) - new_hash = OrderedHash.new + new_hash = Hash.new hash.keys.sort.each { |key| new_hash[key] = hash[key] } return new_hash end @@ -235,7 +234,7 @@ def initialize(cfg_text) end def text() - out_hash = OrderedHash.new + out_hash = Hash.new out_hash['format_version'] = CURRENT_FORMAT out_hash['data_version'] = @data_version out_hash['tokens'] = hash_to_ordered_hash(@tokens) diff --git a/pcsd/pcsd-cli.rb b/pcsd/pcsd-cli.rb index 3c1d07823..08a09ca55 100755 --- a/pcsd/pcsd-cli.rb +++ b/pcsd/pcsd-cli.rb @@ -4,7 +4,6 @@ require 'etc' require 'json' require 'stringio' -require 'orderedhash' require 'bootstrap.rb' require 'pcs.rb' @@ -12,7 +11,7 @@ require 'remote.rb' def cli_format_response(status, text=nil, data=nil) - response = OrderedHash.new + response = Hash.new response['status'] = status response['text'] = text if text response['data'] = data if data diff --git a/pcsd/permissions.rb b/pcsd/permissions.rb index 760186585..a7ff6823f 100644 --- a/pcsd/permissions.rb +++ b/pcsd/permissions.rb @@ -1,5 +1,3 @@ -require 'orderedhash' - module Permissions TYPE_USER = 'user' @@ -104,7 +102,7 @@ def merge!(other) end def to_hash() - perm_hash = OrderedHash.new + perm_hash = Hash.new perm_hash['type'] = @type perm_hash['name'] = @name perm_hash['allow'] = @allow_list.uniq.sort