diff options
author | Rafael H. Schloming <rhs@apache.org> | 2007-07-26 19:15:44 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2007-07-26 19:15:44 +0000 |
commit | 276278c82d48ed89424fc2913c7aeac6ca43d894 (patch) | |
tree | 42fe62016b892429001936d7d0d56a07c2f4b5f7 | |
parent | f0ca5a648f4547515e0c5153cdbc2099d15c4649 (diff) | |
download | qpid-python-276278c82d48ed89424fc2913c7aeac6ca43d894.tar.gz |
removed old script
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@559944 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | ruby/diff.rb | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/ruby/diff.rb b/ruby/diff.rb deleted file mode 100644 index 86d2593048..0000000000 --- a/ruby/diff.rb +++ /dev/null @@ -1,60 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -require "qpid/spec" - -spec = Spec.load(File.new($*[0])) - -class Symbol - def <=>(sym) - to_s <=> sym.to_s - end -end - -def diff(classes) - sets = classes.map {|c| yield(c).to_set} - common = sets[0] - sets[1..-1].each {|s| - common = common & s - } - - sep = "\n " - - puts "Common:\n #{common.to_a.sort.join(sep)}" - classes.zip(sets).each {|c, s| - specific = (s - common).to_a.sort - puts "\n#{c.name}:\n #{specific.join(sep)}" - } -end - -classes = $*[1..-1].map {|c| - spec.classes[c] -} - -diff(classes) {|c| - result = [] - c.methods.each {|m| m.fields.each {|f| result << :"#{m.name}.#{f.name}"}} - result -} - -puts - -diff(classes) {|c| - c.fields.map {|f| f.name} -} |