[DRE-commits] [ruby-mercenary] 01/03: Imported Upstream version 0.3.4

Youhei SASAKI uwabami-guest at moszumanska.debian.org
Wed Jul 23 11:40:56 UTC 2014


This is an automated email from the git hooks/post-receive script.

uwabami-guest pushed a commit to annotated tag debian/0.3.4-1
in repository ruby-mercenary.

commit 4f01a1ff9b81f55d8d29cd814c8edf166882cfe8
Author: Youhei SASAKI <uwabami at gfd-dennou.org>
Date:   Wed Jul 23 20:37:59 2014 +0900

    Imported Upstream version 0.3.4
---
 History.markdown         |   6 ++++++
 checksums.yaml.gz        | Bin 269 -> 268 bytes
 lib/mercenary/command.rb |   4 ++--
 lib/mercenary/option.rb  |   2 +-
 lib/mercenary/version.rb |   2 +-
 metadata.yml             |   4 ++--
 6 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/History.markdown b/History.markdown
index 8066ba8..1bc11f5 100644
--- a/History.markdown
+++ b/History.markdown
@@ -8,6 +8,12 @@
 
 ### Development Fixes
 
+## 0.3.4 / 2014-07-11
+
+### Bug Fixes
+
+* Use option object as key in the command's `@map` hash (#35)
+
 ## 0.3.3 / 2014-05-07
 
 ### Bug Fixes
diff --git a/checksums.yaml.gz b/checksums.yaml.gz
index 440d285..3b28feb 100644
Binary files a/checksums.yaml.gz and b/checksums.yaml.gz differ
diff --git a/lib/mercenary/command.rb b/lib/mercenary/command.rb
index 23b9dc4..0bcc4dd 100644
--- a/lib/mercenary/command.rb
+++ b/lib/mercenary/command.rb
@@ -92,7 +92,7 @@ module Mercenary
     def option(sym, *options)
       new_option = Option.new(sym, options)
       @options << new_option
-      @map[new_option.hash] = sym
+      @map[new_option] = sym
     end
 
     # Public: Adds a subcommand
@@ -178,7 +178,7 @@ module Mercenary
     def process_options(opts, config)
       options.each do |option|
         opts.on(*option.for_option_parser) do |x|
-          config[map[option.hash]] = x
+          config[map[option]] = x
         end
       end
     end
diff --git a/lib/mercenary/option.rb b/lib/mercenary/option.rb
index d59aa46..56a49b6 100644
--- a/lib/mercenary/option.rb
+++ b/lib/mercenary/option.rb
@@ -61,7 +61,7 @@ module Mercenary
     def hash
       instance_variables.map do |var|
         instance_variable_get(var).hash
-      end.reduce(:&)
+      end.reduce(:^)
     end
 
     # Public: Check equivalence of two Options based on equivalence of their
diff --git a/lib/mercenary/version.rb b/lib/mercenary/version.rb
index 194bdd0..f122a2e 100644
--- a/lib/mercenary/version.rb
+++ b/lib/mercenary/version.rb
@@ -1,3 +1,3 @@
 module Mercenary
-  VERSION = "0.3.3"
+  VERSION = "0.3.4"
 end
diff --git a/metadata.yml b/metadata.yml
index c7a9f6f..92a9b76 100644
--- a/metadata.yml
+++ b/metadata.yml
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: mercenary
 version: !ruby/object:Gem::Version
-  version: 0.3.3
+  version: 0.3.4
 platform: ruby
 authors:
 - Tom Preston-Werner
@@ -9,7 +9,7 @@ authors:
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2014-05-07 00:00:00.000000000 Z
+date: 2014-07-12 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: bundler

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-mercenary.git



More information about the Pkg-ruby-extras-commits mailing list