mercenary 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e8ace0bee08c6aff506aab3ad8659bcab218a2a
4
- data.tar.gz: 9aa228efcb73b18a05f224f72b0d453675c4a06b
3
+ metadata.gz: 8fb90c2919ac0f15c0eeb8abe22cdd13eee58c81
4
+ data.tar.gz: 737fed7cc73e411561b1393d69e0774e93af84a7
5
5
  SHA512:
6
- metadata.gz: de2cd102e00fd2071c09cdc3c83d2c900bccdeecde98dbf66c730d0890251a532519542295fff824c71529834b36f996abe6663d5ba6645ad788a37d6638d848
7
- data.tar.gz: c0036d18eb7112070ae547dc5b01c57a0e71ca84ad0969988f2c27cc2b741e43cc89c0bc80aa619f6d4afa8cc9bb2fed176e79bf687092033c68ac4fade2fc62
6
+ metadata.gz: eb6aa3eeb814791f20449a7e728b1f497c94359011787e3919eb402b753fafe4fe7852481ada652a9fe25926a5fc9d56faef21549359dd604211cc36e8776b61
7
+ data.tar.gz: e46388cb5e91489ca638e7b3ce44d3c5dd1090c5d9c149400b79fdd3ccddca27ba57616fb4f46dc7d9a94b596da490c50a7c1851146da966968e9d4e5fdf602e
@@ -8,6 +8,12 @@
8
8
 
9
9
  ### Development Fixes
10
10
 
11
+ ## 0.3.4 / 2014-07-11
12
+
13
+ ### Bug Fixes
14
+
15
+ * Use option object as key in the command's `@map` hash (#35)
16
+
11
17
  ## 0.3.3 / 2014-05-07
12
18
 
13
19
  ### Bug Fixes
@@ -92,7 +92,7 @@ module Mercenary
92
92
  def option(sym, *options)
93
93
  new_option = Option.new(sym, options)
94
94
  @options << new_option
95
- @map[new_option.hash] = sym
95
+ @map[new_option] = sym
96
96
  end
97
97
 
98
98
  # Public: Adds a subcommand
@@ -178,7 +178,7 @@ module Mercenary
178
178
  def process_options(opts, config)
179
179
  options.each do |option|
180
180
  opts.on(*option.for_option_parser) do |x|
181
- config[map[option.hash]] = x
181
+ config[map[option]] = x
182
182
  end
183
183
  end
184
184
  end
@@ -61,7 +61,7 @@ module Mercenary
61
61
  def hash
62
62
  instance_variables.map do |var|
63
63
  instance_variable_get(var).hash
64
- end.reduce(:&)
64
+ end.reduce(:^)
65
65
  end
66
66
 
67
67
  # Public: Check equivalence of two Options based on equivalence of their
@@ -1,3 +1,3 @@
1
1
  module Mercenary
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercenary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-07 00:00:00.000000000 Z
12
+ date: 2014-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler