kungfuig 0.6.1 → 0.6.9

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: 1bc5b787ab92031c371117733c47452bea13267a
4
- data.tar.gz: e5726f3b9fcbb9cec43119881b55889054d71269
3
+ metadata.gz: 1498669f35105f45bafdc2e795f2450419c9bfe9
4
+ data.tar.gz: d77e9cfd6b7456c78104ddbdbb402da04943bb97
5
5
  SHA512:
6
- metadata.gz: f35f35a15ad71043f721b6e37e3ebb0c56e06bd9a8bf5810ecdf17ff7047f2749724d6072657199f50def0f58b4b2946b097743f5c99f440f37130a0f7339ab9
7
- data.tar.gz: f72df9d8e4c102b0b9855e1e097e4eb20caa225bfac21b651d04d184c026ac8346c332100bccebfb652cc9c4285156ba87cafb477e1cfe52ee2f6c5beec91421
6
+ metadata.gz: 25d241bfa80e99c8fa37d61a80ce455d6727957fbb9186179a35e60c42ec8f95f337f4dde55705fc2d8540d62c0afdf550810cc3d7ae8a2f23950aec26bcc6f1
7
+ data.tar.gz: 7e3ffdbcfb87ba9115adb1b4e4643edd40d012b851145196f91702cfa4216ac409182346618b5a691bace43fae79139666b2da5a80850af29d966f764ad401ff
@@ -28,3 +28,18 @@ Style/MultilineBlockChain:
28
28
  Exclude:
29
29
  - 'lib/**/*'
30
30
  - 'spec/**/*'
31
+
32
+ Metrics/ClassLength:
33
+ Max: 200
34
+
35
+ Metrics/CyclomaticComplexity:
36
+ Max: 20
37
+
38
+ Metrics/LineLength:
39
+ Max: 180
40
+
41
+ Metrics/MethodLength:
42
+ Max: 42
43
+
44
+ Metrics/PerceivedComplexity:
45
+ Max: 20
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2016-04-22 13:12:24 +0200 using RuboCop version 0.39.0.
3
+ # on 2016-04-23 07:23:10 +0200 using RuboCop version 0.39.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,30 +13,18 @@ Lint/UnusedBlockArgument:
13
13
  Exclude:
14
14
  - 'features/step_definitions/kungfuig_steps.rb'
15
15
 
16
- # Offense count: 10
16
+ # Offense count: 1
17
+ # Cop supports --auto-correct.
18
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
19
+ Lint/UnusedMethodArgument:
20
+ Exclude:
21
+ - 'lib/kungfuig.rb'
22
+
23
+ # Offense count: 11
17
24
  Metrics/AbcSize:
18
25
  Max: 41
19
26
 
20
27
  # Offense count: 4
21
- Metrics/CyclomaticComplexity:
22
- Max: 12
23
-
24
- # Offense count: 77
25
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
26
- # URISchemes: http, https
27
- Metrics/LineLength:
28
- Max: 174
29
-
30
- # Offense count: 6
31
- # Configuration parameters: CountComments.
32
- Metrics/MethodLength:
33
- Max: 24
34
-
35
- # Offense count: 2
36
- Metrics/PerceivedComplexity:
37
- Max: 8
38
-
39
- # Offense count: 3
40
28
  # Cop supports --auto-correct.
41
29
  # Configuration parameters: EnforcedStyle, SupportedStyles.
42
30
  # SupportedStyles: prefer_alias, prefer_alias_method
@@ -65,18 +53,21 @@ Style/BracesAroundHashParameters:
65
53
  Exclude:
66
54
  - 'features/step_definitions/kungfuig_steps.rb'
67
55
 
68
- # Offense count: 21
56
+ # Offense count: 1
57
+ # Cop supports --auto-correct.
58
+ # Configuration parameters: Keywords.
59
+ # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
60
+ Style/CommentAnnotation:
61
+ Exclude:
62
+ - 'lib/kungfuig/aspector.rb'
63
+
64
+ # Offense count: 20
69
65
  # Cop supports --auto-correct.
70
66
  # Configuration parameters: EnforcedStyle, SupportedStyles.
71
67
  # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
72
68
  Style/MethodDefParentheses:
73
69
  Enabled: false
74
70
 
75
- # Offense count: 1
76
- Style/MultilineBlockChain:
77
- Exclude:
78
- - 'lib/kungfuig.rb'
79
-
80
71
  # Offense count: 1
81
72
  # Cop supports --auto-correct.
82
73
  Style/MutableConstant:
@@ -104,21 +95,21 @@ Style/SpaceBeforeSemicolon:
104
95
  Exclude:
105
96
  - 'lib/kungfuig/prepender.rb'
106
97
 
107
- # Offense count: 20
98
+ # Offense count: 22
108
99
  # Cop supports --auto-correct.
109
100
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
110
101
  # SupportedStyles: space, no_space
111
102
  Style/SpaceInsideHashLiteralBraces:
112
103
  Enabled: false
113
104
 
114
- # Offense count: 12
105
+ # Offense count: 13
115
106
  # Cop supports --auto-correct.
116
107
  # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
117
108
  # SupportedStyles: single_quotes, double_quotes
118
109
  Style/StringLiterals:
119
110
  Enabled: false
120
111
 
121
- # Offense count: 2
112
+ # Offense count: 4
122
113
  # Configuration parameters: EnforcedStyle, SupportedStyles.
123
114
  # SupportedStyles: snake_case, camelCase
124
115
  Style/VariableName:
@@ -102,6 +102,9 @@ module Kungfuig
102
102
  }
103
103
  end
104
104
 
105
+ # rubocop:disable Style/NestedTernaryOperator
106
+ # rubocop:disable Metrics/MethodLength
107
+ # rubocop:disable Metrics/PerceivedComplexity
105
108
  def hook
106
109
  status = {}
107
110
  λ = (hash = to_hash).delete(:lambdas)
@@ -117,7 +120,7 @@ module Kungfuig
117
120
  LAMBDA.call λ, e, **hash
118
121
  end
119
122
 
120
- super(*args, **params, &cb).tap do |result|
123
+ (args.empty? ? (params.empty? ? super(&cb) : super(**params)) : super(*args, **params, &cb)).tap do |result|
121
124
  begin
122
125
  λ[:after].call(**before_params.merge(result: result)) if λ[:after]
123
126
  rescue => e
@@ -127,6 +130,9 @@ module Kungfuig
127
130
  end
128
131
  end
129
132
  end
133
+ # rubocop:enable Metrics/PerceivedComplexity
134
+ # rubocop:enable Metrics/MethodLength
135
+ # rubocop:enable Style/NestedTernaryOperator
130
136
  klazz.send(:include, Kungfuig) unless klazz.ancestors.include? Kungfuig
131
137
  klazz.send(:prepend, p)
132
138
  rescue => e
@@ -1,3 +1,3 @@
1
1
  module Kungfuig
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kungfuig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kantox LTD
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-22 00:00:00.000000000 Z
11
+ date: 2016-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  version: '0'
191
191
  requirements: []
192
192
  rubyforge_project:
193
- rubygems_version: 2.4.8
193
+ rubygems_version: 2.4.6
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: Simple but powerful config for any gem.