kafka_rest_client 0.4.0 → 0.5.0

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: 0369a154f21c09aa1d3946e42c6ef83835ab3f72
4
- data.tar.gz: 3b8bdd2fafd712f45754739eb4914f33c5ed9642
3
+ metadata.gz: 62df5d8416e97eb08ca539dad811d71f281af61e
4
+ data.tar.gz: d3aeb484fe364c05076f0d57666227b3fe98a533
5
5
  SHA512:
6
- metadata.gz: d7fe499236fab1d5fd616dcb467282b7a0aa41fa9098d9eab317351a54df283b468d525f37abcd011fd78ca236b0b38e636352770bd2c71327281780c5398274
7
- data.tar.gz: 743eb70e8f1bac3bc53a7ef0beda1590e7434677b25bebfc34b67081a65d42c7e464576515ddacb5515f81300a5371f64c4c9c1b78c6297dc928e7439fad3fe5
6
+ metadata.gz: 764ce327642ac8061a012114e52c681398bfe9e89c3d5e503c1be86b55a4a02c38aff2c8b140fb19bb922082f0f0ebebdfec3f1edc4a1aef1a52fab0144130b7
7
+ data.tar.gz: e35436f3d16ed59af976513f94705f22efcc62c975c6fead4499aa255457fdbedd577063b2442b05bb0202eef0593525a3a6986f1f54753b47d63d519ed8fcbe
data/.gitignore CHANGED
@@ -5,5 +5,6 @@
5
5
  /coverage/
6
6
  /doc/
7
7
  /pkg/
8
+ /spec/examples.txt
8
9
  /spec/reports/
9
10
  /tmp/
data/.rubocop.yml CHANGED
@@ -1,4 +1,8 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
1
3
  Style/Documentation:
2
4
  Enabled: false
5
+ Style/TrailingCommaInLiteral:
6
+ EnforcedStyleForMultiline: consistent_comma
3
7
  Metrics/LineLength:
4
8
  Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,146 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2016-03-02 11:37:36 +0000 using RuboCop version 0.37.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ Lint/ShadowingOuterLocalVariable:
11
+ Exclude:
12
+ - 'lib/kafka_rest_client/utils.rb'
13
+
14
+ # Offense count: 2
15
+ Metrics/AbcSize:
16
+ Max: 32
17
+
18
+ # Offense count: 1
19
+ # Configuration parameters: CountComments.
20
+ Metrics/ClassLength:
21
+ Max: 134
22
+
23
+ # Offense count: 2
24
+ # Configuration parameters: CountComments.
25
+ Metrics/MethodLength:
26
+ Max: 23
27
+
28
+ # Offense count: 1
29
+ # Cop supports --auto-correct.
30
+ Performance/RedundantBlockCall:
31
+ Exclude:
32
+ - 'lib/kafka_rest_client/utils.rb'
33
+
34
+ # Offense count: 3
35
+ # Cop supports --auto-correct.
36
+ # Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
37
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining
38
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
39
+ # FunctionalMethods: let, let!, subject, watch
40
+ # IgnoredMethods: lambda, proc, it
41
+ Style/BlockDelimiters:
42
+ Exclude:
43
+ - 'lib/kafka_rest_client/avro_producer.rb'
44
+ - 'lib/kafka_rest_client/utils.rb'
45
+
46
+ # Offense count: 1
47
+ # Cop supports --auto-correct.
48
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
49
+ # SupportedStyles: braces, no_braces, context_dependent
50
+ Style/BracesAroundHashParameters:
51
+ Exclude:
52
+ - 'spec/kafka_rest_client/avro_producer_spec.rb'
53
+
54
+ # Offense count: 1
55
+ Style/CaseEquality:
56
+ Exclude:
57
+ - 'lib/kafka_rest_client/utils.rb'
58
+
59
+ # Offense count: 3
60
+ # Cop supports --auto-correct.
61
+ Style/ColonMethodCall:
62
+ Exclude:
63
+ - 'lib/kafka_rest_client/avro_producer.rb'
64
+ - 'spec/kafka_rest_client/avro_producer_spec.rb'
65
+
66
+ # Offense count: 2
67
+ Style/EachWithObject:
68
+ Exclude:
69
+ - 'lib/kafka_rest_client/avro_producer.rb'
70
+ - 'lib/kafka_rest_client/utils.rb'
71
+
72
+ # Offense count: 1
73
+ # Configuration parameters: MinBodyLength.
74
+ Style/GuardClause:
75
+ Exclude:
76
+ - 'lib/kafka_rest_client/avro_producer.rb'
77
+
78
+ # Offense count: 1
79
+ # Cop supports --auto-correct.
80
+ # Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
81
+ # SupportedStyles: ruby19, ruby19_no_mixed_keys, hash_rockets
82
+ Style/HashSyntax:
83
+ Enabled: false
84
+
85
+ # Offense count: 1
86
+ # Cop supports --auto-correct.
87
+ # Configuration parameters: Width.
88
+ Style/IndentationWidth:
89
+ Exclude:
90
+ - 'spec/kafka_rest_client/avro_producer_spec.rb'
91
+
92
+ # Offense count: 1
93
+ # Cop supports --auto-correct.
94
+ Style/NegatedIf:
95
+ Exclude:
96
+ - 'lib/kafka_rest_client/avro_producer.rb'
97
+
98
+ # Offense count: 1
99
+ # Cop supports --auto-correct.
100
+ # Configuration parameters: AllowSafeAssignment.
101
+ Style/ParenthesesAroundCondition:
102
+ Exclude:
103
+ - 'lib/kafka_rest_client/utils.rb'
104
+
105
+ # Offense count: 10
106
+ # Cop supports --auto-correct.
107
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
108
+ # SupportedStyles: only_raise, only_fail, semantic
109
+ Style/SignalException:
110
+ Exclude:
111
+ - 'lib/kafka_rest_client/avro_producer.rb'
112
+
113
+ # Offense count: 3
114
+ # Cop supports --auto-correct.
115
+ Style/SpaceAfterComma:
116
+ Exclude:
117
+ - 'lib/kafka_rest_client/utils.rb'
118
+
119
+ # Offense count: 1
120
+ # Cop supports --auto-correct.
121
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
122
+ # SupportedStyles: space, no_space
123
+ Style/SpaceAroundEqualsInParameterDefault:
124
+ Enabled: false
125
+
126
+ # Offense count: 1
127
+ # Cop supports --auto-correct.
128
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
129
+ # SupportedStyles: space, no_space
130
+ Style/SpaceInsideHashLiteralBraces:
131
+ Enabled: false
132
+
133
+ # Offense count: 7
134
+ # Cop supports --auto-correct.
135
+ # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
136
+ # SupportedStyles: single_quotes, double_quotes
137
+ Style/StringLiterals:
138
+ Enabled: false
139
+
140
+ # Offense count: 33
141
+ # Cop supports --auto-correct.
142
+ # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
143
+ # SupportedStyles: comma, consistent_comma, no_comma
144
+ Style/TrailingCommaInLiteral:
145
+ Exclude:
146
+ - 'spec/kafka_rest_client/avro_producer_spec.rb'
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.0.0-p645
1
+ 2.2.2
data/Gemfile CHANGED
@@ -1,4 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ group :test do
4
+ gem 'codeclimate-test-reporter', require: false
5
+ gem 'rspec_junit_formatter', '0.2.2'
6
+ end
7
+
3
8
  # Specify your gem's dependencies in kafka_rest_client.gemspec
4
9
  gemspec
data/Rakefile CHANGED
@@ -2,7 +2,15 @@ require 'bundler/gem_tasks'
2
2
  require 'rspec/core/rake_task'
3
3
  require 'rubocop/rake_task'
4
4
 
5
- RSpec::Core::RakeTask.new(:spec)
6
- RuboCop::RakeTask.new
5
+ RSpec::Core::RakeTask.new(:spec) do |t|
6
+ t.rspec_opts = [
7
+ '--format progress',
8
+ '--format RspecJunitFormatter',
9
+ %(--out #{File.join(ENV.fetch('CIRCLE_TEST_REPORTS', 'tmp'), 'rspec', 'junit.xml')}),
10
+ '--require rspec_junit_formatter',
11
+ ].join(' ')
12
+ end
13
+
14
+ RuboCop::RakeTask.new(:rubocop)
7
15
 
8
16
  task default: [:spec, :rubocop]
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'kafka_rest_client'
7
- spec.version = '0.4.0'
7
+ spec.version = '0.5.0'
8
8
  spec.authors = ['Funding Circle Engineering']
9
9
  spec.email = ['engineering+kafka_rest_client@fundingcircle.com']
10
10
  spec.licenses = ['BSD-3-Clause']
@@ -70,7 +70,7 @@ module KafkaRestClient
70
70
  # To {"temperature"=>{"type"=>"double"}}
71
71
  def schema_optional_fields(raw_schema)
72
72
  JSON.parse(raw_schema).fetch('fields').inject({}) do |hash, attribute|
73
- if attribute['type'].include? 'null'
73
+ if attribute['type'].is_a?(Array) && attribute['type'].include?('null')
74
74
  hash[attribute['name']] = { 'type' => (attribute['type'] - ['null']).first }
75
75
  end
76
76
  hash
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kafka_rest_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Funding Circle Engineering
@@ -132,6 +132,7 @@ files:
132
132
  - ".gitignore"
133
133
  - ".rspec"
134
134
  - ".rubocop.yml"
135
+ - ".rubocop_todo.yml"
135
136
  - ".ruby-version"
136
137
  - Gemfile
137
138
  - Guardfile
@@ -165,8 +166,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
166
  version: '0'
166
167
  requirements: []
167
168
  rubyforge_project:
168
- rubygems_version: 2.0.14
169
+ rubygems_version: 2.4.5
169
170
  signing_key:
170
171
  specification_version: 4
171
172
  summary: Ruby client for interacting with Kafka REST Proxy
172
173
  test_files: []
174
+ has_rdoc: