mutations-validate-outcome 0.7.222 → 0.7.239

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb002b201268d653613174cb4e1c384de620b432
4
- data.tar.gz: b288bfe64861913b3d7104c31799428ecb7d0e14
3
+ metadata.gz: d7d8257a67bfc38df8f5aaf355a8975b17a903bb
4
+ data.tar.gz: a2abe9e5362e8f87fdf381cf3fc9edf3dff0e1b1
5
5
  SHA512:
6
- metadata.gz: 143e119a213a66631ddf3c50e9cd510ad603cb58497508240806678aa464b647419265a7ca4c3ef10f4c6bd2d398d478ffb354e534c7df3affc72189f724a90d
7
- data.tar.gz: f0e87ba7aa0e7a6ff455bb99454e0506e0cdce6fb6276575122002ec4e90a33b64eaeabc10973d0c38a8beffab60c242a3d4b5138253a28492017e746c430d39
6
+ metadata.gz: 32828820c8fc426af872a73c94a2657f8965e6b734d2bb22a96790af12f5f72996e0a01e4afbec258ea0e3fdcc60ebf14069b630c44237f22080b1cf3ccea91a
7
+ data.tar.gz: bbe6b5b35cf8f1da98db4cb4c15c72701a85c4d0c09c4c12560035cd5e6115a1550c757867abf4cca0186c4b0f8a8b720d4279109fbc0ac8e15ed4974ae9b62b
data/.rubocop.yml CHANGED
@@ -12,6 +12,9 @@ Style/MultilineBlockChain:
12
12
  Style/ParallelAssignment:
13
13
  Enabled: false
14
14
 
15
+ Style/Alias:
16
+ EnforcedStyle: prefer_alias_method
17
+
15
18
  Metrics/AbcSize:
16
19
  Max: 100
17
20
 
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2016-05-26 14:17:34 +0200 using RuboCop version 0.40.0.
3
+ # on 2016-06-17 13:41:21 +0200 using RuboCop version 0.40.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -13,7 +13,7 @@
13
13
  Style/AccessModifierIndentation:
14
14
  EnforcedStyle: outdent
15
15
 
16
- # Offense count: 5
16
+ # Offense count: 8
17
17
  Style/Documentation:
18
18
  Exclude:
19
19
  - 'spec/**/*'
@@ -30,7 +30,7 @@ Style/EmptyCaseCondition:
30
30
  Exclude:
31
31
  - 'lib/mutations/outcome_hash_filter.rb'
32
32
 
33
- # Offense count: 2
33
+ # Offense count: 3
34
34
  # Cop supports --auto-correct.
35
35
  # Configuration parameters: EnforcedStyle, SupportedStyles.
36
36
  # SupportedStyles: empty_lines, no_empty_lines
@@ -39,7 +39,7 @@ Style/EmptyLinesAroundBlockBody:
39
39
  - 'spec/command_returning_array_spec.rb'
40
40
  - 'spec/command_returning_hash_spec.rb'
41
41
 
42
- # Offense count: 4
42
+ # Offense count: 5
43
43
  # Cop supports --auto-correct.
44
44
  # Configuration parameters: EnforcedStyle, SupportedStyles.
45
45
  # SupportedStyles: empty_lines, no_empty_lines
@@ -48,14 +48,20 @@ Style/EmptyLinesAroundClassBody:
48
48
  - 'spec/command_returning_array_spec.rb'
49
49
  - 'spec/command_returning_hash_spec.rb'
50
50
 
51
- # Offense count: 2
51
+ # Offense count: 1
52
52
  # Cop supports --auto-correct.
53
53
  # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
54
54
  Style/ExtraSpacing:
55
55
  Exclude:
56
- - 'spec/command_returning_array_spec.rb'
57
56
  - 'spec/command_returning_hash_spec.rb'
58
57
 
58
+ # Offense count: 2
59
+ # Cop supports --auto-correct.
60
+ # Configuration parameters: AllowSafeAssignment.
61
+ Style/ParenthesesAroundCondition:
62
+ Exclude:
63
+ - 'spec/yo_spec.rb'
64
+
59
65
  # Offense count: 1
60
66
  # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
61
67
  # NamePrefix: is_, has_, have_
@@ -66,21 +72,21 @@ Style/PredicateName:
66
72
  - 'spec/**/*'
67
73
  - 'lib/mutations/command_returning_hash.rb'
68
74
 
69
- # Offense count: 1
75
+ # Offense count: 2
70
76
  # Cop supports --auto-correct.
71
77
  # Configuration parameters: SupportedStyles.
72
78
  # SupportedStyles: compact, exploded
73
79
  Style/RaiseArgs:
74
80
  EnforcedStyle: compact
75
81
 
76
- # Offense count: 2
82
+ # Offense count: 3
77
83
  # Cop supports --auto-correct.
78
84
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
79
85
  # SupportedStyles: space, no_space
80
86
  Style/SpaceInsideHashLiteralBraces:
81
87
  Enabled: false
82
88
 
83
- # Offense count: 60
89
+ # Offense count: 73
84
90
  # Cop supports --auto-correct.
85
91
  # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
86
92
  # SupportedStyles: single_quotes, double_quotes
@@ -3,6 +3,33 @@ require 'mutations/outcome_hash_filter'
3
3
  require 'mutations/array_filter'
4
4
 
5
5
  module Mutations
6
+ class HashFilter < InputFilter
7
+ attr_accessor :input_descriptions, :input_description
8
+
9
+ def desc input_description
10
+ @input_description = input_description
11
+ end
12
+
13
+ def current_input_description
14
+ (@input_description && @input_description.dup).tap do
15
+ @input_description = nil
16
+ end
17
+ end
18
+
19
+ def self.register_additional_filter(type_class, type_name)
20
+ define_method(type_name) do |*args, &block|
21
+ name = args[0]
22
+ options = args[1] || {}
23
+ # rubocop:disable Lint/AssignmentInCondition
24
+ if described = current_input_description
25
+ (@input_descriptions ||= {})[name.to_sym] = described
26
+ end
27
+ # rubocop:enable Lint/AssignmentInCondition
28
+ @current_inputs[name.to_sym] = type_class.new(options, &block)
29
+ end
30
+ end
31
+ end
32
+
6
33
  class AdditionalFilter < InputFilter
7
34
  def self.inherited(subclass)
8
35
  type_name = subclass.name[/^Mutations::([a-zA-Z]*)Filter$/, 1].underscore
@@ -35,6 +35,7 @@ module Mutations
35
35
  def outcome_descriptions
36
36
  outcome_filters.outcome_descriptions if outcome_filters.respond_to?(:outcome_descriptions)
37
37
  end
38
+ alias_method :output_descriptions, :outcome_descriptions
38
39
  end
39
40
 
40
41
  def initialize(*args)
@@ -1,5 +1,5 @@
1
1
  module Mutations
2
2
  module ValidateOutcome
3
- VERSION = '0.7.222'.freeze
3
+ VERSION = '0.7.239'.freeze
4
4
  end
5
5
  end
@@ -75,6 +75,10 @@ module Mutations
75
75
 
76
76
  class Command
77
77
  class << self
78
+ def input_descriptions
79
+ input_filters.input_descriptions if input_filters.respond_to?(:input_descriptions)
80
+ end
81
+
78
82
  def yo! *args
79
83
  result = run!(*args)
80
84
  case name # name of the class
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutations-validate-outcome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.222
4
+ version: 0.7.239
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksei Matiushkin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-10 00:00:00.000000000 Z
11
+ date: 2016-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler