pheme 4.0.1 → 4.0.2

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
  SHA256:
3
- metadata.gz: 0657fbd0490ab265656d91778ee29ee63f48af6544bb15766602afa3c3ff178e
4
- data.tar.gz: 0dc1b438ca602e23c522856e93af5563b7186d24f8d638ff20ffddd7d9866a51
3
+ metadata.gz: 38d24eb669b4e507e93aca15a084c375d9dd5d9d6a734d6e7c0ca3336d216f2e
4
+ data.tar.gz: f3e87e1c473b1f8ec4b7adfc4c94891026f29ad4fc4d192d982d207233993601
5
5
  SHA512:
6
- metadata.gz: f77b6d79b12c32e1648510bfe44fb8455c06132d759c77b83d69e57e023bd531e99c858a03fbb0680e9e4923b274a07eef44914b5d99619911546df7fe09c95b
7
- data.tar.gz: 75c1691f0b7b0d98e5024db118f663731edf9a08a7ba9528aaa9df3ce1626fdce7abfb0f111c1ecea599b2a1bda94a3553376711e5b1605a2d9a0a73e76e4b49
6
+ metadata.gz: ccdd560c4cb055cd877804f57b73bbab6a2d95d7a8e4140d3b38e4d6e6c9d5cee6dbd8d632a9c8d4e6651d295317d55ffdb3e4cbbd689f65344f6dcf21d2fbd4
7
+ data.tar.gz: 4069eea7b5d377d3e245d4e4596abd18d7fe9534112967eadb1597eb225f048f97d9324b1de1a20683c9f1991ef508ae06786d63893cbdf78796d8091f01468b
@@ -2,17 +2,17 @@ version: 2
2
2
 
3
3
  references:
4
4
  defaults:
5
- 2_4_5: &defaults_2_4_5
5
+ 2_4_10: &defaults_2_4_10
6
6
  working_directory: ~/wealthsimple
7
7
  docker:
8
- - image: circleci/ruby:2.4.5
8
+ - image: circleci/ruby:2.4.10
9
9
  environment:
10
10
  RAILS_ENV: test
11
11
 
12
- 2_5_3: &defaults
12
+ 2_5_8: &defaults
13
13
  working_directory: ~/wealthsimple
14
14
  docker:
15
- - image: circleci/ruby:2.5.3
15
+ - image: circleci/ruby:2.5.8
16
16
  environment:
17
17
  RAILS_ENV: test
18
18
 
@@ -46,8 +46,8 @@ references:
46
46
  --format documentation
47
47
 
48
48
  jobs:
49
- checkout_and_bundle_2_4_5:
50
- <<: *defaults_2_4_5
49
+ checkout_and_bundle_2_4_10:
50
+ <<: *defaults_2_4_10
51
51
  environment:
52
52
  COVERALLS_REPO_TOKEN: ''
53
53
  steps:
@@ -109,17 +109,20 @@ workflows:
109
109
  version: 2
110
110
  build:
111
111
  jobs:
112
- - checkout_and_bundle_2_4_5:
112
+ - checkout_and_bundle_2_4_10:
113
113
  context: wealthsimple
114
114
  - checkout_and_bundle:
115
115
  context: wealthsimple
116
116
  - rspec:
117
+ context: wealthsimple
117
118
  requires:
118
119
  - checkout_and_bundle
119
120
  - lint_check:
121
+ context: wealthsimple
120
122
  requires:
121
123
  - checkout_and_bundle
122
124
  - vulnerability_check:
125
+ context: wealthsimple
123
126
  requires:
124
127
  - checkout_and_bundle
125
128
  - release:
@@ -128,10 +131,10 @@ workflows:
128
131
  branches:
129
132
  only: master
130
133
  requires:
131
- - checkout_and_bundle_2_4_5
132
- - rspec
133
- - lint_check
134
- - vulnerability_check
134
+ - checkout_and_bundle_2_4_10
135
+ - rspec
136
+ - lint_check
137
+ - vulnerability_check
135
138
 
136
139
  security-audit:
137
140
  triggers:
@@ -145,5 +148,6 @@ workflows:
145
148
  - checkout_and_bundle:
146
149
  context: wealthsimple
147
150
  - vulnerability_check:
151
+ context: wealthsimple
148
152
  requires:
149
153
  - checkout_and_bundle
@@ -6,4 +6,4 @@ inherit_gem:
6
6
 
7
7
  AllCops:
8
8
  # Specify your target Ruby version here (only major/minor versions):
9
- TargetRubyVersion: 2.4
9
+ TargetRubyVersion: 2.4
@@ -1,42 +1,42 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-07-09 13:48:32 -0400 using RuboCop version 0.72.0.
3
+ # on 2021-01-07 16:23:09 UTC using RuboCop version 1.6.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: 19
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
12
+ # URISchemes: http, https
13
+ Layout/LineLength:
14
+ Max: 147
15
+
9
16
  # Offense count: 2
17
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
10
18
  Metrics/AbcSize:
11
19
  Max: 22
12
20
 
13
21
  # Offense count: 1
14
- # Configuration parameters: CountComments.
15
- Metrics/ClassLength:
16
- Max: 164
17
-
18
- # Offense count: 1
22
+ # Configuration parameters: IgnoredMethods.
19
23
  Metrics/CyclomaticComplexity:
20
24
  Max: 10
21
25
 
22
- # Offense count: 17
23
- # Cop supports --auto-correct.
24
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
25
- # URISchemes: http, https
26
- Metrics/LineLength:
27
- Max: 147
28
-
29
26
  # Offense count: 3
30
- # Configuration parameters: CountComments, ExcludedMethods.
27
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
28
+ # IgnoredMethods: extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended, extended
31
29
  Metrics/MethodLength:
32
30
  Max: 28
33
31
 
34
32
  # Offense count: 1
33
+ # Configuration parameters: IgnoredMethods.
35
34
  Metrics/PerceivedComplexity:
36
35
  Max: 11
37
36
 
38
- # Offense count: 5
39
- # Configuration parameters: CustomTransform, IgnoreMethods.
37
+ # Offense count: 9
38
+ # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
39
+ # Include: **/*_spec*rb*, **/spec/**/*
40
40
  RSpec/FilePath:
41
41
  Exclude:
42
42
  - 'spec/configuration_spec.rb'
@@ -45,8 +45,8 @@ RSpec/FilePath:
45
45
  - 'spec/message_type/aws_event_spec.rb'
46
46
  - 'spec/message_type/sns_message_spec.rb'
47
47
  - 'spec/queue_poller_spec.rb'
48
- - 'spec/topic_publisher_spec.rb'
49
48
  - 'spec/rollbar_spec.rb'
49
+ - 'spec/topic_publisher_spec.rb'
50
50
  - 'spec/version_spec.rb'
51
51
 
52
52
  # Offense count: 14
@@ -70,3 +70,10 @@ RSpec/VerifiedDoubles:
70
70
  Style/GuardClause:
71
71
  Exclude:
72
72
  - 'lib/pheme/queue_poller.rb'
73
+
74
+ # Offense count: 2
75
+ # Cop supports --auto-correct.
76
+ Style/IfUnlessModifier:
77
+ Exclude:
78
+ - 'lib/pheme/queue_poller.rb'
79
+ - 'pheme.gemspec'
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 4.0.2 - 2020-12-17
8
+ - Bump local dev version, rubocop fixes, add backstage catalog file + sonarqube project settings
9
+
7
10
  ## 4.0.1 - 2020-03-23
8
11
  ### Fixes
9
12
  - Fixes 4.0.0. Instead of expecting message attributes in the message from `poll`, retrieves them from the right place.
@@ -0,0 +1,12 @@
1
+ ---
2
+ apiVersion: backstage.io/v1alpha1
3
+ kind: Component
4
+ metadata:
5
+ name: pheme
6
+ description: Ruby SNS publisher + SQS message handler
7
+ tags:
8
+ - ruby
9
+ - open-source
10
+ spec:
11
+ type: library
12
+ lifecycle: production
@@ -19,8 +19,7 @@ module Pheme
19
19
  ATTRIBUTES = %i[sns_client sqs_client logger].freeze
20
20
  OPTIONAL_ATTRIBUTES = %i[rollbar].freeze
21
21
 
22
- attr_accessor(*ATTRIBUTES)
23
- attr_accessor(*OPTIONAL_ATTRIBUTES)
22
+ attr_accessor(*ATTRIBUTES, *OPTIONAL_ATTRIBUTES)
24
23
 
25
24
  def initialize
26
25
  @logger ||= Logger.new(STDOUT) # rubocop:disable Lint/DisjunctiveAssignmentInConstructor
@@ -165,9 +165,9 @@ module Pheme
165
165
  end
166
166
  end
167
167
 
168
- def with_optional_connection_pool_block
168
+ def with_optional_connection_pool_block(&block)
169
169
  if connection_pool_block
170
- ActiveRecord::Base.connection_pool.with_connection { yield }
170
+ ActiveRecord::Base.connection_pool.with_connection(&block)
171
171
  else
172
172
  yield
173
173
  end
@@ -1,3 +1,3 @@
1
1
  module Pheme
2
- VERSION = '4.0.1'.freeze
2
+ VERSION = '4.0.2'.freeze
3
3
  end
@@ -0,0 +1,4 @@
1
+ sonar.projectKey=pheme
2
+ sonar.ruby.coverage.reportPaths=coverage/.resultset.json
3
+ sonar.sources=lib
4
+ sonar.tests=spec
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pheme
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Graham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-23 00:00:00.000000000 Z
11
+ date: 2021-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -240,6 +240,7 @@ files:
240
240
  - LICENSE
241
241
  - README.md
242
242
  - Rakefile
243
+ - catalog-info.yaml
243
244
  - lib/pheme.rb
244
245
  - lib/pheme/compression.rb
245
246
  - lib/pheme/configuration.rb
@@ -252,6 +253,7 @@ files:
252
253
  - lib/pheme/topic_publisher.rb
253
254
  - lib/pheme/version.rb
254
255
  - pheme.gemspec
256
+ - sonar-project.properties
255
257
  - spec/configuration_spec.rb
256
258
  - spec/logger_spec.rb
257
259
  - spec/message_handler_spec.rb