Hello community, here is the log from the commit of package hawk.1634 for openSUSE:12.2:Update checked in at 2013-05-06 13:40:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.2:Update/hawk.1634 (Old) and /work/SRC/openSUSE:12.2:Update/.hawk.1634.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hawk.1634" Changes: -------- New Changes file: --- /dev/null 2013-04-05 00:01:41.916011506 +0200 +++ /work/SRC/openSUSE:12.2:Update/.hawk.1634.new/hawk.changes 2013-05-06 13:40:11.000000000 +0200 @@ -0,0 +1,479 @@ +------------------------------------------------------------------- +Wed Apr 24 10:37:15 UTC 2013 - [email protected] + +- Misc: Force UTF-8 encoding to fix ActionView::TemplateError when loading + main status page (bnc#800338) + + Added force-utf8-encoding.patch + +------------------------------------------------------------------- +Tue Apr 23 05:08:53 UTC 2013 - [email protected] + +- Misc: Workaround deprecated Gem::SourceIndex#add_spec (required to + work with rubygems 1.8) + + Added gem-source-index-deprecated.patch + +------------------------------------------------------------------- +Tue Jun 19 08:58:48 UTC 2012 - [email protected] + +- Misc: main_controller: Drop ':' from 'when' (ruby 1.9 support) +- Misc: Primitve, Template models: Fix op hash construction (ruby 1.9 support) +- Add rubygem-rack-1_1 to requires for openSUSE 12.2 + +------------------------------------------------------------------- +Wed Jun 13 08:37:50 UTC 2012 - [email protected] + +- Don't try to pack rubygems and ruby-fcgi for openSUSE 12.2 + +------------------------------------------------------------------- +Thu Mar 29 07:46:46 UTC 2012 - [email protected] + +- Requite appropriate version of pacemaker package for ticket support + (bnc#752242, bnc#752241) + +------------------------------------------------------------------- +Tue Mar 27 08:58:52 UTC 2012 - [email protected] + +- GUI: summary_view, simulator: Support standby/activate tickets (bnc#752242) +- GUI: simulator: Sort ticket names in inject dialog +- Misc: Cib model: Look for ticket state in "/cib/status/tickets/ticket_state" +- Build: Bump spec file version to 0.5.2 +- Upstream version cs:aca681a3c2fb + +------------------------------------------------------------------- +Fri Mar 16 04:31:20 UTC 2012 - [email protected] + +- GUI: summary_view: show last granted time for tickets +- GUI: summary_view: Allow viewing details of all tickets, nodes, + resources simultaneously +- GUI: summary_view: Right align item counts +- GUI: simulator: Support granting/revoking tickets +- GUI: Constraints: Add arrows to ticket constraint display, show + loss policy in constraint list +- Misc: Cib model: Pick up tickets from rsc_ticket constraints in + addition to status section +- Upstream version cs:d1abac6f90da + +------------------------------------------------------------------- +Mon Mar 5 08:32:33 UTC 2012 - [email protected] + +- GUI: summary_view: Show ticket status +- GUI: Add ability to configure ticket constraints +- Misc: Cib model: Skip pending monitor ops +- Misc: Update copyright date in footer +- Upstream version cs:3eff1782dc83 + +------------------------------------------------------------------- +Fri Feb 24 06:56:18 UTC 2012 - [email protected] + +- Build: Actually die if "rake makemo" fails +- Misc: Remove obsolete .hu msgids +- Misc: Workaround deprecated Gem.all_load_paths error +- Misc: Suppress ror-sec-scanner false positives +- Upstream version cs:5957498b0c95 + +------------------------------------------------------------------- +Fri Feb 3 10:26:24 UTC 2012 - [email protected] + +- Misc: hb_report: strip tar timestamp warnings from stderr (bnc#735672) +- Misc: Colocation model: Don't modify resource list when generating + shell command +- GUI: Primitive editor: Disable "use template" checkbox when editing + existing resources +- Upstream version cs:a5fdb745d8e9 + +------------------------------------------------------------------- +Mon Dec 12 10:53:42 UTC 2011 - [email protected] + +- GUI: Fix constraint tab when logged in as regular user (was bound to + hb_report, bnc#734447) +- GUI: Constraints: Allow templates in order/colocation (bnc#732277) +- Misc: Cib model: Add failed probes (OCF_ERR_INSTALLED etc.) to failed_ops +- Misc: explorer, hb_report: Handle stale pidfiles (bnc#731282) +- Upstream version cs:ca6df475621b + +------------------------------------------------------------------- +Tue Nov 15 02:34:50 UTC 2011 - [email protected] + +- Misc: Primitive model: Fix string interpolation when creating + resources (bnc#730136) + +------------------------------------------------------------------- +Mon Nov 7 12:02:47 UTC 2011 - [email protected] + +- GUI: Add top-level tab bar for navigation (bnc#723679) +- GUI: Add top-level resource list/editor +- GUI: status: Move errorbar to content div, theme to match jquery ui errors +- GUI: Add support for resource templates +- GUI: simulator, explorer: show graphs, details etc. in dialog (bnc#726612) +- GUI: status: Display error if server down or network fault during + refresh (bnc#723125) +- Misc: Fix delay running "/etc/init.d/hawk start" when DNS unavailable +- Misc: hb_report: strip broken pipe from stderr (bnc#726611) +- Build: Bump spec file version to 0.5.1 +- Upstream version cs:4ace058c2e06 + +------------------------------------------------------------------- +Mon Oct 24 05:27:44 UTC 2011 - [email protected] + +- GUI: explorer, hb_report: Better error reporting for "successful" hb_report + runs (bnc#723336) +- GUI: hb_report: Invoke with -Z (remove destination directories) +- Misc: Refactor: Consolidate hb_report generation from explorer & hb_reports + controllers +- Misc: Update translations +- Upstream version cs:8ea83e79cded + +------------------------------------------------------------------- +Tue Oct 18 14:16:36 UTC 2011 - [email protected] + +- GUI: Simulator: Don't link to empty transition graphs (bnc#723401) +- GUI: Simulator: Auto-fill monitor interval when injecting ops (bnc#723401) +- GUI: Simulator: Default node to where resource running when injecting ops +- GUI: Simulator: More natural control order when injecting ops (resource + first) +- GUI: Simulator: Ensure ENTER doesn't close simulator when injecting ops +- GUI: Simulator: Handle dialog close event (e.g.: when clicking 'x' in + title bar) +- GUI: Simulator: explicitly hide error bar when (de)activating simulator + (bnc#723333) +- Misc: Cib model: Handle case in simulator CIB where lrm_rsc_op has no + id attribute +- Misc: hawk_{invoke,chkpwd}: Handle case where user's GID has no name + so login fails (bnc#723512) +- Upstream version cs:35b82f1ce6e4 + +------------------------------------------------------------------- +Mon Oct 10 04:42:06 UTC 2011 - [email protected] + +- Misc: Fix bogus "ra class does not support provider" error when + creating STONITH primitives +- Misc: Update Czech translations (bnc#720098) +- Upstream version cs:ac1fe14f3564 + +------------------------------------------------------------------- +Tue Sep 20 13:56:15 UTC 2011 - [email protected] + +- Build: Update package version to 0.5.0 +- GUI: Add cluster history explorer (fate#303620) +- GUI: Add ability to explore failure scenarios (fate#310186) +- GUI: Add ability to view recent node and resource events (fate#303620) +- GUI: Add ability to generate hb_report (fate#310187) +- GUI: Add setup wizard with web server & OCFS2 templates (fate#310190) +- GUI: Add summary view, table view (fate#309100) +- GUI: Add ability to see node utilization/load (fate#310135) +- GUI: Add alert icon to resources with failed ops (fate#310359) +- GUI: Base total resource count on number of configured instances +- GUI: Add overflow:auto to content DIV to prevent floats running over + footer +- Misc: Cib model: Skip delete and cancel ops when determining resource state +- Misc: Update translations +- Misc: Cib model: Reset rc_code to expected for ignored failed ops + (bnc#711002) +- Misc: Invoker: Map permission denied error to localized messages + (bnc#713917) +- Misc: Invoker: Consolidate crm functions, pick up errors even when + rc=0 (bnc#713922) +- Misc: Cib model: Internally rename running clone instances if necessary +- Remove workaround for 'String#unpack("V") busted on s390x' (bnc#581578) +- Misc: Cib model: Ignore orphaned non-clone resource instance in + clones (bnc#711180) +- Misc: Fix localization of >2 plurals (cs, pl, ru) for node and resource + labels (bnc#708328) +- Misc: Add Hawk favicon.ico +- Misc: Show hawk URL when running /etc/init.d/hawk start|status (bnc#708318) +- Misc: Cib model: Skip allegedly pending "last_failure" ops when determining + resource state (bnc#706755) +- Misc: Cib model: Strip stopped clone instances outside 0..clone_max +- Upstream version cs:d32e171be055 + +------------------------------------------------------------------- +Mon Aug 29 04:46:23 UTC 2011 - [email protected] + +- Build: Fix glib & libxml order for hawk_monitor build + +------------------------------------------------------------------- +Wed Jul 13 14:31:12 UTC 2011 - [email protected] + +- Build hawk_invoke and hawk_chkpwd as position independent executables ++++ 282 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:12.2:Update/.hawk.1634.new/hawk.changes New: ---- filter-requires.sh fix-rails-freeze-version_requirements.patch force-utf8-encoding.patch gem-source-index-deprecated.patch hawk-0.5.2.tar.bz2 hawk-rpmlintrc hawk.changes hawk.spec require-rack-1.1.patch ruby-1.9-hash.patch ruby-1.9-when.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hawk.spec ++++++ # # spec file for package hawk # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define www_base /srv/www %define vendor_ruby vendor_ruby %define init_style suse %define pkg_group Productivity/Clustering/HA %define gname haclient %define uname hacluster Name: hawk Summary: HA Web Konsole License: GPL-2.0 Group: Productivity/Clustering/HA Version: 0.5.2 Release: 0 Url: http://www.clusterlabs.org/wiki/Hawk Source: %{name}-%{version}.tar.bz2 Source1: filter-requires.sh Source100: hawk-rpmlintrc Patch2: require-rack-1.1.patch Patch3: gem-source-index-deprecated.patch Patch4: force-utf8-encoding.patch Patch5: fix-rails-freeze-version_requirements.patch Patch10: ruby-1.9-when.patch Patch11: ruby-1.9-hash.patch %define _use_internal_dependency_generator 0 %define __find_requires /bin/sh %{SOURCE1} BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: hawk-templates >= %{version}-%{release} %if 0%{?suse_version} Requires: pacemaker-ticket-support >= 2.0 %else Requires: pacemaker %endif Requires: graphviz Requires: graphviz-gd Requires: lighttpd >= 1.4.20 Requires: ruby %if 0%{?suse_version} < 1220 BuildRequires: ruby-fcgi %else Requires: rubygem-rack-1_1 Requires: rubygem-ruby-fcgi %endif Recommends: graphviz-gnome BuildRequires: glib2-devel BuildRequires: libxml2-devel BuildRequires: pam-devel BuildRequires: rubygem-gettext_rails BuildRequires: rubygem-rake BuildRequires: rubygems PreReq: permissions BuildRequires: fdupes BuildRequires: libpacemaker-devel BuildRequires: rubygem-rails-2_3 # Temporary, prevents confusion between rubygem-rack and rubygem-rack-1_3 BuildRequires: rubygem-rack < 1.3 # Require startproc respecting -p, bnc#559534#c44 %if 0%{?suse_version} > 1110 # 11.2 or newer; Requires: sysvinit > 2.86-215.2 %else # 11.1 or SLES11 Requires: sysvinit > 2.86-195.3.1 %endif %description A web-based GUI for managing and monitoring the Pacemaker High-Availability cluster resource manager. Authors: Tim Serong <[email protected]> %package templates Summary: Hawk Setup Wizard Templates Group: Productivity/Clustering/HA %description templates Template files for Hawk's cluster setup wizard. Authors: Tim Serong <[email protected]> %prep %setup %patch2 -p0 %patch3 -p1 %patch4 -p1 %patch5 -p0 %patch10 -p1 %patch11 -p1 %build CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}" export CFLAGS make WWW_BASE=%{www_base} INIT_STYLE=%{init_style} LIBDIR=%{_libdir} BINDIR=%{_bindir} SBINDIR=%{_sbindir} %install make WWW_BASE=%{www_base} INIT_STYLE=%{init_style} DESTDIR=%{buildroot} install # copy of GPL cp COPYING %{buildroot}%{www_base}/hawk/ %if 0%{?suse_version} < 1220 # note: only doing evil magic pre-openSUSE 12.2 # evil magic to get ruby-fcgi into the vendor directory for f in $(rpm -ql ruby-fcgi|grep %{vendor_ruby}); do # gives something simliar to: # /usr/lib64/ruby/vendor_ruby/1.8/fcgi.rb # /usr/lib64/ruby/vendor_ruby/1.8/x86_64-linux/fcgi.so r=$(echo $f | sed 's/.*%{vendor_ruby}\/[^\/]*\///') mkdir -p %{buildroot}%{www_base}/hawk/vendor/$(dirname $r) cp $f %{buildroot}%{www_base}/hawk/vendor/$r done # even more evil magic to get rubygems into the vendor directory for f in $(rpm -ql rubygems|grep %{vendor_ruby}); do # gives something simliar to: # /usr/lib64/ruby/vendor_ruby/1.8/rubygems.rb # /usr/lib64/ruby/vendor_ruby/1.8/rubygems/... [ -f $f ] || continue r=$(echo $f | sed 's/.*%{vendor_ruby}\/[^\/]*\///') mkdir -p %{buildroot}%{www_base}/hawk/vendor/$(dirname $r) cp $f %{buildroot}%{www_base}/hawk/vendor/$r done %endif # get rid of gem sample and test cruft rm -rf %{buildroot}%{www_base}/hawk/vendor/gems/*/sample rm -rf %{buildroot}%{www_base}/hawk/vendor/gems/*/samples rm -rf %{buildroot}%{www_base}/hawk/vendor/gems/*/test rm -rf %{buildroot}%{www_base}/hawk/vendor/gems/*/doc # mark .mo files as such (works on SUSE but not FC12, as the latter wants directory to # be "share/locale", not just "locale", and it also doesn't support appending to %%{name}.lang) %find_lang %{name} %{name}.lang %find_lang rgettext %{name}.lang %find_lang gettext_rails %{name}.lang # hard link duplicate files %fdupes %{buildroot} # more cruft to clean up (WTF?) rm -f %{buildroot}%{www_base}/hawk/log/* find %{buildroot}%{www_base}/hawk/vendor/rails -type f -name '*.css' -o -name '*.js' -o -name '*LICENSE' | xargs chmod a-x # get rid of packed gem specification files rm -f %{buildroot}%{www_base}/hawk/vendor/gems/*/.specification # likewise emtpy files (again, I say, WTF?) find %{buildroot}%{www_base}/hawk/vendor -type f -empty | xargs rm # init script %{__install} -d -m 0755 \ %{buildroot}%{_sbindir} %{__install} -D -m 0755 scripts/hawk.%{init_style} \ %{buildroot}%{_sysconfdir}/init.d/hawk %{__ln_s} -f %{_sysconfdir}/init.d/hawk %{buildroot}%{_sbindir}/rchawk %clean rm -rf %{buildroot} %verifyscript %verify_permissions -e %{_sbindir}/hawk_chkpwd %verify_permissions -e %{_sbindir}/hawk_invoke %post %set_permissions %{_sbindir}/hawk_chkpwd %set_permissions %{_sbindir}/hawk_invoke %fillup_and_insserv hawk %preun %stop_on_removal hawk %postun %restart_on_update hawk %{insserv_cleanup} %triggerin -- lighttpd %restart_on_update hawk %files -f %{name}.lang %defattr(-,root,root) %attr(4750, root, %{gname})%{_sbindir}/hawk_chkpwd %attr(4750, root, %{gname})%{_sbindir}/hawk_invoke %{_sbindir}/hawk_monitor %dir %{www_base}/hawk %{www_base}/hawk/app %{www_base}/hawk/config # Packaged in hawk-templates %exclude %{www_base}/hawk/config/wizard %{www_base}/hawk/db %{www_base}/hawk/doc %{www_base}/hawk/lib %attr(0750, %{uname},%{gname})%{www_base}/hawk/log %dir %attr(0750, %{uname},%{gname})%{www_base}/hawk/tmp %attr(0750, %{uname},%{gname})%{www_base}/hawk/tmp/cache %attr(0770, %{uname},%{gname})%{www_base}/hawk/tmp/home %attr(0750, %{uname},%{gname})%{www_base}/hawk/tmp/pids %attr(0750, %{uname},%{gname})%{www_base}/hawk/tmp/sessions %attr(0750, %{uname},%{gname})%{www_base}/hawk/tmp/sockets %{www_base}/hawk/po %{www_base}/hawk/public %{www_base}/hawk/Rakefile %{www_base}/hawk/COPYING %{www_base}/hawk/script %{www_base}/hawk/test # itemizing content in %%{www_base}/hawk/vendor and locale to avoid # duplicate files that would otherwise be the result of including hawk.lang %dir %{www_base}/hawk/locale %dir %{www_base}/hawk/locale/* %dir %{www_base}/hawk/locale/*/* %dir %{www_base}/hawk/vendor %if 0%{?suse_version} < 1220 %{www_base}/hawk/vendor/*rb # architecture-specific .so files %{www_base}/hawk/vendor/*-linux %endif # this is moderatly disgusting - the intent is to get everything except # the content of "data/locale" which is covered by files in hawk.lang %dir %{www_base}/hawk/vendor/gems %dir %{www_base}/hawk/vendor/gems/* %dir %{www_base}/hawk/vendor/gems/*/data %dir %{www_base}/hawk/vendor/gems/*/data/locale %dir %{www_base}/hawk/vendor/gems/*/data/locale/* %dir %{www_base}/hawk/vendor/gems/*/data/locale/*/* %{www_base}/hawk/vendor/gems/*/[!d]* %{www_base}/hawk/vendor/rails %if 0%{?suse_version} < 1220 %{www_base}/hawk/vendor/rbconfig %{www_base}/hawk/vendor/rubygems %endif %config(noreplace) %attr(-,root,root) %{_sysconfdir}/init.d/hawk %attr(-,root,root) %{_sbindir}/rchawk %files templates %defattr(-,root,root) %{www_base}/hawk/config/wizard %changelog ++++++ filter-requires.sh ++++++ #!/bin/sh # Courtesy of http://fedoraproject.org/wiki/PackagingDrafts/FilteringAutomaticDependencies if [ -x /usr/lib/rpm/redhat/find-requires ] ; then FINDREQ=/usr/lib/rpm/redhat/find-requires else FINDREQ=/usr/lib/rpm/find-requires fi $FINDREQ $* | sed -e '/libfcgi.so/d' ++++++ fix-rails-freeze-version_requirements.patch ++++++ Index: hawk/lib/tasks/freeze.rake =================================================================== --- hawk/lib/tasks/freeze.rake.orig +++ hawk/lib/tasks/freeze.rake @@ -36,6 +36,19 @@ def do_or_die(task) end end +if Gem::VERSION >= "1.5.0" + # This little bit of insanity re-instates version_requirements + # (deprecated), because rails:freeze:gems in rails 2.3.10 still + # relies on it, but it's gone in rubygems 1.5 + module Gem + class Dependency + def version_requirements + requirement + end + end + end +end + namespace :freeze do desc "Freeze Rails (but actually fail if there's an error)" task :rails do ++++++ force-utf8-encoding.patch ++++++ Index: hawk-0.5.2/hawk/config/environment.rb =================================================================== --- hawk-0.5.2.orig/hawk/config/environment.rb +++ hawk-0.5.2/hawk/config/environment.rb @@ -27,6 +27,9 @@ if defined?(Gem::Specification.add_spec) end end +Encoding.default_external = Encoding::UTF_8 +Encoding.default_internal = Encoding::UTF_8 + Rails::Initializer.run do |config| # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers ++++++ gem-source-index-deprecated.patch ++++++ Index: hawk-0.5.2/hawk/config/environment.rb =================================================================== --- hawk-0.5.2.orig/hawk/config/environment.rb +++ hawk-0.5.2/hawk/config/environment.rb @@ -19,6 +19,14 @@ rescue NoMethodError end end +# Hack to fix vendor gems not loading beacuse railties uses old +# Gem::SourceIndex#add_spec which doesn't work with rubygems 1.8 +if defined?(Gem::Specification.add_spec) + Gem.source_index.each do |name,spec| + Gem::Specification.add_spec spec + end +end + Rails::Initializer.run do |config| # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers ++++++ hawk-rpmlintrc ++++++ addFilter("non-executable-script .*/srv/www/hawk/vendor/*") addFilter("script-without-shebang .*/srv/www/hawk/vendor/*") addFilter("wrong-script-end-of-line-encoding .*/srv/www/hawk/vendor/*") ++++++ require-rack-1.1.patch ++++++ Index: hawk/config/environment.rb =================================================================== --- hawk/config/environment.rb.orig +++ hawk/config/environment.rb @@ -36,7 +36,13 @@ Rails::Initializer.run do |config| config.gem "locale_rails" config.gem "gettext" config.gem "gettext_rails" - config.gem "rack" + # Explicitly require any rack version in the 1.1 series. This is necessary because + # ActionPack 2.3.8 explicitly specifies this as well, so if we run on a system with + # rack 1.2, it all breaks horribly if we don't force it back to 1.1 here. Some further + # discussion is at: + # https://rails.lighthouseapp.com/projects/8994/tickets/3685-actionpack-235-gem-declares-incompatibility-with-rack-110 + # https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5146 + config.gem "rack", :version => '~> 1.1.0' # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named ++++++ ruby-1.9-hash.patch ++++++ commit 07843af8e5d811a4d9026febba472967562f053e Author: Tim Serong <[email protected]> Date: Tue Jun 19 18:54:55 2012 +1000 Misc: Primitve, Template models: Fix op hash construction (ruby 1.9 support) Signed-off-by: Tim Serong <[email protected]> diff --git a/hawk/app/models/primitive.rb b/hawk/app/models/primitive.rb index 6748e1b..49d86b9 100644 --- a/hawk/app/models/primitive.rb +++ b/hawk/app/models/primitive.rb @@ -217,7 +217,7 @@ class Primitive < CibObject xml.elements['operations'].elements.each do |e| name = e.attributes['name'] ops[name] = [] unless ops[name] - op = Hash[e.attributes.collect] + op = Hash[e.attributes.collect{|a| a.to_a}] op.delete 'name' op.delete 'id' ops[name].push op @@ -344,7 +344,7 @@ class Primitive < CibObject xml.elements.each('//action') do |e| name = e.attributes['name'] m[:ops][name] = [] unless m[:ops][name] - op = Hash[e.attributes.collect] + op = Hash[e.attributes.collect{|a| a.to_a}] op.delete 'name' op.delete 'depth' # There's at least one case (ocf:ocfs2:o2cb) where the diff --git a/hawk/app/models/template.rb b/hawk/app/models/template.rb index 09e074d..4957341 100644 --- a/hawk/app/models/template.rb +++ b/hawk/app/models/template.rb @@ -217,7 +217,7 @@ class Template < CibObject xml.elements['operations'].elements.each do |e| name = e.attributes['name'] ops[name] = [] unless ops[name] - op = Hash[e.attributes.collect] + op = Hash[e.attributes.collect{|a| a.to_a}] op.delete 'name' op.delete 'id' ops[name].push op ++++++ ruby-1.9-when.patch ++++++ diff --git a/hawk/app/controllers/main_controller.rb b/hawk/app/controllers/main_controller.rb index 25286b5..638fc64 100644 --- a/hawk/app/controllers/main_controller.rb +++ b/hawk/app/controllers/main_controller.rb @@ -154,7 +154,7 @@ class MainController < ApplicationController params[:injections].each do |i| parts = i.split(/\s+/) case parts[0] - when "node": + when "node" case parts[2] when "online" injections << "-u" << parts[1] @@ -163,7 +163,7 @@ class MainController < ApplicationController when "unclean" injections << "-f" << parts[1] end - when "op": + when "op" # TODO(should): map to be static somewhere (must match map in status.js) rc_map = { "success" => 0, @@ -181,7 +181,7 @@ class MainController < ApplicationController # "op monitor:0 stonith-sbd success node-0" parts[1].sub!(":", "_") injections << "-i" << "#{parts[2]}_#{parts[1]}@#{parts[4]}=#{rc_map[parts[3]]}" - when "ticket": + when "ticket" # TODO(could): Warn if feature doesn't exist (or don't show ticket button in UI at all) if Util.has_feature?(:sim_ticket) case parts[2] -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
