dry-mutations 1.5.4 → 1.5.5

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: 878d18d3149ee1f179b2d46002c1d099ae9593e8
4
- data.tar.gz: b19346193f2a7a62b211c5d6b46e24b0ec9111c5
3
+ metadata.gz: 51a73bedd710f1fff6c80e40e6c00da799da51ca
4
+ data.tar.gz: 274159074870b8332a688f30c9f002e9868cb11a
5
5
  SHA512:
6
- metadata.gz: 429e152ff446bd4fca3be81871b6d6132de70a8be7b534ec51802c58456245c4dd2648927a0a71fd7e303f6547b514dd5faee645c55c837fa12785438e0c1e51
7
- data.tar.gz: d5b4108c52455e5010e5ea17e5bb3eab072ff49971b7508863e8dc788c9ab24e4ce0a6d243e9e98e57e5318645aa24c84bf910a3bb018d6076879ef223d9852d
6
+ metadata.gz: 1fcefe4832ba202ff4ef2eae3aa966715e22aff180b49bf1397d2483265218c4fd5ddb19a62060b114809b5fa93042e6464c2a2ce4500b3f3d12101bd506f7b7
7
+ data.tar.gz: 281b7811acf90c24d0d75e7b488e2a84062002e94120f59cfdb1efea45c40566033b87da1a14fcc24296385ac4353530d96ac032265d08a21df95fdf62a2ec7e
@@ -1,4 +1,4 @@
1
- inherit_from: .rubocop_todo.yml
1
+ # inherit_from: .rubocop_todo.yml
2
2
 
3
3
  # METRICS
4
4
  Metrics/ClassLength:
@@ -1,37 +1,151 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2016-07-13 12:03:55 +0200 using RuboCop version 0.40.0.
3
+ # on 2017-10-19 16:15:18 +0200 using RuboCop version 0.49.1.
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
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 1
9
+ # Offense count: 2
10
10
  # Cop supports --auto-correct.
11
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
12
- Lint/UnusedMethodArgument:
11
+ # Configuration parameters: EnforcedHashRocketStyle, SupportedHashRocketStyles, EnforcedColonStyle, SupportedColonStyles, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
12
+ # SupportedHashRocketStyles: key, separator, table
13
+ # SupportedColonStyles: key, separator, table
14
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
15
+ Layout/AlignHash:
13
16
  Exclude:
14
- - 'lib/dry/mutations/transactions/dsl.rb'
17
+ - 'spec/dry/mutations/command_spec.rb'
15
18
 
16
19
  # Offense count: 2
17
20
  # Cop supports --auto-correct.
18
- # Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
19
- # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
20
- Style/AlignHash:
21
+ Layout/EmptyLineAfterMagicComment:
21
22
  Exclude:
22
- - 'spec/dry/mutations/command_spec.rb'
23
+ - 'Rakefile'
24
+ - 'dry-mutations.gemspec'
25
+
26
+ # Offense count: 1
27
+ # Cop supports --auto-correct.
28
+ # Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
29
+ Layout/ExtraSpacing:
30
+ Exclude:
31
+ - 'dry-mutations.gemspec'
23
32
 
24
33
  # Offense count: 1
25
34
  # Cop supports --auto-correct.
26
35
  # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
27
36
  # SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
28
- Style/FirstParameterIndentation:
37
+ Layout/FirstParameterIndentation:
29
38
  Exclude:
30
39
  - 'spec/dry/mutations/command_spec.rb'
31
40
 
41
+ # Offense count: 8
42
+ # Cop supports --auto-correct.
43
+ # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces.
44
+ # SupportedStyles: space, no_space, compact
45
+ # SupportedStylesForEmptyBraces: space, no_space
46
+ Layout/SpaceInsideHashLiteralBraces:
47
+ Exclude:
48
+ - 'spec/dry/mutations_spec.rb'
49
+
50
+ # Offense count: 1
51
+ Lint/AmbiguousBlockAssociation:
52
+ Exclude:
53
+ - 'spec/dry/mutations_spec.rb'
54
+
55
+ # Offense count: 1
56
+ Lint/Debugger:
57
+ Exclude:
58
+ - 'spec/dry/mutations/mixed_spec.rb'
59
+
32
60
  # Offense count: 3
33
61
  # Cop supports --auto-correct.
62
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
63
+ Lint/UnusedMethodArgument:
64
+ Exclude:
65
+ - 'lib/dry/mutations/transactions.rb'
66
+ - 'lib/dry/mutations/transactions/dsl.rb'
67
+
68
+ # Offense count: 4
69
+ # Cop supports --auto-correct.
70
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
71
+ # SupportedStyles: braces, no_braces, context_dependent
72
+ Style/BracesAroundHashParameters:
73
+ Exclude:
74
+ - 'spec/dry/mutations_spec.rb'
75
+
76
+ # Offense count: 1
77
+ Style/ClassVars:
78
+ Exclude:
79
+ - 'lib/dry/mutations/schema.rb'
80
+
81
+ # Offense count: 3
82
+ Style/Documentation:
83
+ Exclude:
84
+ - 'spec/**/*'
85
+ - 'test/**/*'
86
+ - 'lib/dry/mutations/extensions/error_hash.rb'
87
+ - 'lib/dry/mutations/schema.rb'
88
+ - 'lib/dry/mutations/transactions/wrapper.rb'
89
+
90
+ # Offense count: 2
91
+ # Cop supports --auto-correct.
92
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
93
+ # SupportedStyles: compact, expanded
94
+ Style/EmptyMethod:
95
+ Exclude:
96
+ - 'lib/dry/mutations/transactions/wrapper.rb'
97
+
98
+ # Offense count: 1
99
+ Style/MethodMissing:
100
+ Exclude:
101
+ - 'lib/dry/mutations/dsl/weirdo.rb'
102
+
103
+ # Offense count: 2
104
+ # Cop supports --auto-correct.
105
+ Style/MultilineIfModifier:
106
+ Exclude:
107
+ - 'lib/dry/mutations/dsl/weirdo.rb'
108
+ - 'lib/dry/mutations/predicates.rb'
109
+
110
+ # Offense count: 6
111
+ # Cop supports --auto-correct.
112
+ # Configuration parameters: AllowAsExpressionSeparator.
113
+ Style/Semicolon:
114
+ Exclude:
115
+ - 'spec/dry/mutations/either_spec.rb'
116
+
117
+ # Offense count: 1
118
+ # Cop supports --auto-correct.
119
+ # Configuration parameters: AllowIfMethodIsEmpty.
120
+ Style/SingleLineMethods:
121
+ Exclude:
122
+ - 'spec/dry/mutations_spec.rb'
123
+
124
+ # Offense count: 37
125
+ # Cop supports --auto-correct.
34
126
  # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
35
127
  # SupportedStyles: single_quotes, double_quotes
36
128
  Style/StringLiterals:
37
- Enabled: false
129
+ Exclude:
130
+ - 'lib/dry/mutations/transactions/wrapper.rb'
131
+ - 'lib/dry/mutations/utils/procs.rb'
132
+ - 'spec/dry/mutations/array_spec.rb'
133
+ - 'spec/dry/mutations/command_spec.rb'
134
+ - 'spec/dry/mutations/either_spec.rb'
135
+ - 'spec/dry/mutations/nested_spec.rb'
136
+ - 'spec/dry/mutations/transaction_spec.rb'
137
+ - 'spec/dry/mutations/ulises_spec.rb'
138
+
139
+ # Offense count: 1
140
+ # Cop supports --auto-correct.
141
+ # Configuration parameters: EnforcedStyle, MinSize, SupportedStyles.
142
+ # SupportedStyles: percent, brackets
143
+ Style/SymbolArray:
144
+ Exclude:
145
+ - 'spec/dry/mutations/utils_spec.rb'
146
+
147
+ # Offense count: 3
148
+ # Configuration parameters: SupportedStyles.
149
+ # SupportedStyles: snake_case, normalcase, non_integer
150
+ Style/VariableNumber:
151
+ EnforcedStyle: normalcase
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dry-mutations (1.5.4)
4
+ dry-mutations (1.5.5)
5
5
  activesupport (>= 3.2, < 5)
6
6
  dry-transaction (~> 0.9, < 0.10)
7
7
  dry-validation (~> 0.10)
@@ -44,5 +44,6 @@ module Dry
44
44
 
45
45
  DSL::Types::Nested.extend DSL::Module
46
46
  ::Mutations::Command.prepend Extensions::Command if Utils.Truthy?(ENV['GLOBAL_DRY_MUTATIONS'])
47
+ ::Mutations::ErrorHash.prepend Extensions::ErrorHash
47
48
  end
48
49
  end
@@ -1,3 +1,4 @@
1
1
  require 'dry/mutations/extensions/command'
2
2
  require 'dry/mutations/extensions/dummy'
3
3
  require 'dry/mutations/extensions/outcome'
4
+ require 'dry/mutations/extensions/error_hash'
@@ -0,0 +1,11 @@
1
+ module Dry
2
+ module Mutations
3
+ module Extensions
4
+ module ErrorHash
5
+ def message
6
+ super.map.with_index(1) { |kv, i| "#{i}. " << kv.join(': ') }.join("\n")
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  module Mutations
3
- VERSION = '1.5.4'.freeze
3
+ VERSION = '1.5.5'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-mutations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksei Matiushkin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-29 00:00:00.000000000 Z
11
+ date: 2017-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -196,7 +196,8 @@ dependencies:
196
196
  - - "<"
197
197
  - !ruby/object:Gem::Version
198
198
  version: '0.10'
199
- description: " Mutations gem interface implemented with `dry-rb`’s validation schemas.\n"
199
+ description: |2
200
+ Mutations gem interface implemented with `dry-rb`’s validation schemas.
200
201
  email:
201
202
  - aleksei.matiushkin@kantox.com
202
203
  executables:
@@ -234,6 +235,7 @@ files:
234
235
  - lib/dry/mutations/extensions.rb
235
236
  - lib/dry/mutations/extensions/command.rb
236
237
  - lib/dry/mutations/extensions/dummy.rb
238
+ - lib/dry/mutations/extensions/error_hash.rb
237
239
  - lib/dry/mutations/extensions/outcome.rb
238
240
  - lib/dry/mutations/form.rb
239
241
  - lib/dry/mutations/globals.rb