docopt 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/docopt.gemspec +2 -2
  3. data/lib/docopt.rb +9 -9
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4547ac54342e6534a9fa8abb147aa8499c4f6fa3
4
- data.tar.gz: 0cf00312ed6b06b89ee8d98b8f35da4da7468b27
3
+ metadata.gz: c8589d04bd97d7ca70e1b367da7403234561b2d7
4
+ data.tar.gz: e5d3886b8e7efa11211bc97b7e28c317a7420124
5
5
  SHA512:
6
- metadata.gz: f4531743745caedcbe2acbb46122f9282bf6eb8fe3eabafd44a206df8b63e4167e4a4ca21d41d8794d05ced6edb9a94a70286b0e4c8871b112d233e0530c255b
7
- data.tar.gz: 6b77409ae7e165a37ec30d909fd105b171d1461084fc9acc4e15d29bccf12be7999d2f8d1895729f7ae7c2acf8e1ecd570e650b2607932d0da1e5596b2e57f8a
6
+ metadata.gz: b2558e4c8c89e521c2906ef18f1822b6aedad416d4379d4b879ad229f4d54d7f33b3d01c332f62e4f47a7817905988e8d127d1aa79ac8cbb030d0744fe1336ab
7
+ data.tar.gz: 8cc6419bfa468d6ea078d0a55f821713313dd23f82369d78a63ba6e100929974531239de64c836937e1575151edde2ec8c08c4494485dd6493aeb8abf393e43a
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'docopt'
16
- s.version = '0.6.0'
17
- s.date = '2016-10-03'
16
+ s.version = '0.6.1'
17
+ s.date = '2018-01-21'
18
18
  # s.rubyforge_project = 'docopt'
19
19
 
20
20
  ## Make sure your summary is short. The description may be as long
@@ -86,31 +86,31 @@ module Docopt
86
86
  groups = [[self]]
87
87
  while groups.count > 0
88
88
  children = groups.shift
89
- types = children.map { |c| c.class }
89
+ types = children.map { |child| child.class }
90
90
 
91
91
  if types.include?(Either)
92
- either = children.select { |c| c.class == Either }[0]
92
+ either = children.select { |child| child.class == Either }[0]
93
93
  children.slice!(children.index(either))
94
94
  for c in either.children
95
95
  groups << [c] + children
96
96
  end
97
97
  elsif types.include?(Required)
98
- required = children.select { |c| c.class == Required }[0]
98
+ required = children.select { |child| child.class == Required }[0]
99
99
  children.slice!(children.index(required))
100
100
  groups << required.children + children
101
101
 
102
102
  elsif types.include?(Optional)
103
- optional = children.select { |c| c.class == Optional }[0]
103
+ optional = children.select { |child| child.class == Optional }[0]
104
104
  children.slice!(children.index(optional))
105
105
  groups << optional.children + children
106
106
 
107
107
  elsif types.include?(AnyOptions)
108
- anyoptions = children.select { |c| c.class == AnyOptions }[0]
108
+ anyoptions = children.select { |child| child.class == AnyOptions }[0]
109
109
  children.slice!(children.index(anyoptions))
110
110
  groups << anyoptions.children + children
111
111
 
112
112
  elsif types.include?(OneOrMore)
113
- oneormore = children.select { |c| c.class == OneOrMore }[0]
113
+ oneormore = children.select { |child| child.class == OneOrMore }[0]
114
114
  children.slice!(children.index(oneormore))
115
115
  groups << (oneormore.children * 2) + children
116
116
 
@@ -314,7 +314,7 @@ module Docopt
314
314
  def match(left, collected=nil)
315
315
  collected ||= []
316
316
  for p in self.children
317
- m, left, collected = p.match(left, collected)
317
+ _, left, collected = p.match(left, collected)
318
318
  end
319
319
  return [true, left, collected]
320
320
  end
@@ -356,9 +356,9 @@ module Docopt
356
356
  collected ||= []
357
357
  outcomes = []
358
358
  for p in self.children
359
- matched, _, _ = outcome = p.match(left, collected)
359
+ matched, _, _ = found = p.match(left, collected)
360
360
  if matched
361
- outcomes << outcome
361
+ outcomes << found
362
362
  end
363
363
  end
364
364
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docopt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Williams
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-10-03 00:00:00.000000000 Z
14
+ date: 2018-01-21 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json