karafka-sidekiq-backend 1.0.0 → 1.1.0.alpha1

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: ac35518405825e475629928acad62fb4c971148b
4
- data.tar.gz: 03db71a6d95e1f7eda063311c84b5f9383290f45
3
+ metadata.gz: f70c2627ad1cfc9207cb5505fea5048d61145cbd
4
+ data.tar.gz: 6e360b9d2328d413d11ab65c1d72ecb3946f92b3
5
5
  SHA512:
6
- metadata.gz: 4a55f875872e7988bff3b4d97ad5828bb8e1766d1329cdaaad2312e08005d7bc1f55065d5a37cc0fd8f0dbc46d19a6ac1743067f1e9ed1d11264624003e1a345
7
- data.tar.gz: a912aa6c87ef62998f444f23e2c4970400806c9ddb91f530ce8845e0bc6d3c781b03e9eaa4898e4e5e32c43a47ef5b3b812bff3dba3551a0057f36d88460d0d7
6
+ metadata.gz: 977ee7ddd3e498a5f57d1bdaaaf8430f67554eb12955c4f7320efc3b3b7d878f74517045534f10e2c64567dfa48d778c3e787ba28dc1e3534cdf8bfdc41fc423
7
+ data.tar.gz: 5600e31d518f97e8c1de7486c9f99f54fa8ec72150f6dd9baa03014087755188d19a84978708390afba3f40507b44385feac56bfbd07eab6a53091734e9ea821
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4.1
1
+ 2.4.2
data/.travis.yml CHANGED
@@ -8,7 +8,8 @@ rvm:
8
8
  - 2.3.4
9
9
  - 2.4.0
10
10
  - 2.4.1
11
- - jruby-9.1.12.0
11
+ - 2.4.2
12
+ - jruby-head
12
13
  script: bundle exec rspec spec/
13
14
  env:
14
15
  global:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Karafka Sidekiq Backend
2
2
 
3
+ ## Unreleased
4
+ - Ruby 2.4.2 support
5
+ - #235 - Rename perform to consume
6
+
3
7
  ## 1.0
4
8
 
5
9
  - Gem init
data/Gemfile.lock CHANGED
@@ -1,37 +1,23 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka-sidekiq-backend (1.0.0)
5
- karafka (>= 1.0.0)
4
+ karafka-sidekiq-backend (1.1.0.alpha1)
5
+ karafka (>= 1.1.0.alpha1)
6
6
  sidekiq (>= 4.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (5.1.3)
11
+ activesupport (5.1.4)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
13
  i18n (~> 0.7)
14
14
  minitest (~> 5.1)
15
15
  tzinfo (~> 1.1)
16
- celluloid (0.17.3)
17
- celluloid-essentials
18
- celluloid-extras
19
- celluloid-fsm
20
- celluloid-pool
21
- celluloid-supervision
22
- timers (>= 4.1.1)
23
- celluloid-essentials (0.20.5)
24
- timers (>= 4.1.1)
25
- celluloid-extras (0.20.5)
26
- timers (>= 4.1.1)
27
- celluloid-fsm (0.20.5)
28
- timers (>= 4.1.1)
29
- celluloid-pool (0.20.5)
30
- timers (>= 4.1.1)
31
- celluloid-supervision (0.20.6)
32
- timers (>= 4.1.1)
33
16
  concurrent-ruby (1.0.5)
34
17
  connection_pool (2.2.1)
18
+ delivery_boy (0.2.2)
19
+ king_konf (~> 0.1.8)
20
+ ruby-kafka (~> 0.4)
35
21
  diff-lcs (1.3)
36
22
  docile (1.1.5)
37
23
  dry-configurable (0.7.0)
@@ -39,75 +25,75 @@ GEM
39
25
  dry-container (0.6.0)
40
26
  concurrent-ruby (~> 1.0)
41
27
  dry-configurable (~> 0.1, >= 0.1.3)
42
- dry-core (0.3.3)
28
+ dry-core (0.3.4)
43
29
  concurrent-ruby (~> 1.0)
44
30
  dry-equalizer (0.2.0)
45
- dry-logic (0.4.1)
31
+ dry-logic (0.4.2)
46
32
  dry-container (~> 0.2, >= 0.2.6)
47
33
  dry-core (~> 0.2)
48
34
  dry-equalizer (~> 0.2)
49
- dry-types (0.11.1)
35
+ dry-types (0.12.1)
50
36
  concurrent-ruby (~> 1.0)
51
37
  dry-configurable (~> 0.1)
52
38
  dry-container (~> 0.3)
53
39
  dry-core (~> 0.2, >= 0.2.1)
54
40
  dry-equalizer (~> 0.2)
55
- dry-logic (~> 0.4, >= 0.4.0)
41
+ dry-logic (~> 0.4, >= 0.4.2)
56
42
  inflecto (~> 0.0.0, >= 0.0.2)
57
- dry-validation (0.11.0)
43
+ dry-validation (0.11.1)
58
44
  concurrent-ruby (~> 1.0)
59
45
  dry-configurable (~> 0.1, >= 0.1.3)
60
46
  dry-core (~> 0.2, >= 0.2.1)
61
47
  dry-equalizer (~> 0.2)
62
48
  dry-logic (~> 0.4, >= 0.4.0)
63
- dry-types (~> 0.11.0)
49
+ dry-types (~> 0.12.0)
64
50
  envlogic (1.0.4)
65
51
  activesupport
66
- hitimes (1.2.6)
67
- i18n (0.8.6)
52
+ i18n (0.9.0)
53
+ concurrent-ruby (~> 1.0)
68
54
  inflecto (0.0.2)
69
55
  json (2.1.0)
70
- karafka (1.0.0)
56
+ karafka (1.1.0.alpha1)
71
57
  activesupport (>= 5.0)
72
- celluloid
73
58
  dry-configurable (~> 0.7)
74
59
  dry-validation (~> 0.11)
75
60
  envlogic (~> 1.0)
76
61
  multi_json (>= 1.12)
77
62
  rake (>= 11.3)
78
63
  require_all (>= 1.4)
79
- ruby-kafka (>= 0.4)
64
+ ruby-kafka (>= 0.5)
80
65
  thor (~> 0.19)
81
- waterdrop (>= 0.4)
66
+ waterdrop (>= 1.0.alpha2)
67
+ king_konf (0.1.8)
82
68
  minitest (5.10.3)
83
69
  multi_json (1.12.2)
84
70
  null-logger (0.1.4)
85
71
  rack (2.0.3)
86
72
  rack-protection (2.0.0)
87
73
  rack
88
- rake (12.0.0)
89
- redis (3.3.3)
74
+ rake (12.2.1)
75
+ redis (4.0.1)
90
76
  require_all (1.4.0)
91
- rspec (3.6.0)
92
- rspec-core (~> 3.6.0)
93
- rspec-expectations (~> 3.6.0)
94
- rspec-mocks (~> 3.6.0)
95
- rspec-core (3.6.0)
96
- rspec-support (~> 3.6.0)
97
- rspec-expectations (3.6.0)
77
+ rspec (3.7.0)
78
+ rspec-core (~> 3.7.0)
79
+ rspec-expectations (~> 3.7.0)
80
+ rspec-mocks (~> 3.7.0)
81
+ rspec-core (3.7.0)
82
+ rspec-support (~> 3.7.0)
83
+ rspec-expectations (3.7.0)
98
84
  diff-lcs (>= 1.2.0, < 2.0)
99
- rspec-support (~> 3.6.0)
100
- rspec-mocks (3.6.0)
85
+ rspec-support (~> 3.7.0)
86
+ rspec-mocks (3.7.0)
101
87
  diff-lcs (>= 1.2.0, < 2.0)
102
- rspec-support (~> 3.6.0)
103
- rspec-support (3.6.0)
104
- ruby-kafka (0.4.1)
105
- sidekiq (5.0.4)
88
+ rspec-support (~> 3.7.0)
89
+ rspec-support (3.7.0)
90
+ ruby-kafka (0.5.0)
91
+ sidekiq (5.0.5)
106
92
  concurrent-ruby (~> 1.0)
107
93
  connection_pool (~> 2.2, >= 2.2.0)
108
94
  rack-protection (>= 1.5.0)
109
- redis (~> 3.3, >= 3.3.3)
110
- simplecov (0.15.0)
95
+ redis (>= 3.3.4, < 5)
96
+ simplecov (0.15.1)
111
97
  docile (~> 1.1.0)
112
98
  json (>= 1.8, < 3)
113
99
  simplecov-html (~> 0.10.0)
@@ -115,17 +101,14 @@ GEM
115
101
  thor (0.20.0)
116
102
  thread_safe (0.3.6)
117
103
  timecop (0.9.1)
118
- timers (4.1.2)
119
- hitimes
120
- tzinfo (1.2.3)
104
+ tzinfo (1.2.4)
121
105
  thread_safe (~> 0.1)
122
- waterdrop (0.4.0)
123
- bundler
124
- connection_pool
125
- dry-configurable (~> 0.6)
106
+ waterdrop (1.0.0.alpha2)
107
+ delivery_boy (>= 0.2.2)
108
+ dry-configurable (~> 0.7)
109
+ dry-validation (~> 0.11)
126
110
  null-logger
127
- rake
128
- ruby-kafka (~> 0.4)
111
+ ruby-kafka (>= 0.5)
129
112
 
130
113
  PLATFORMS
131
114
  ruby
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Build Status](https://travis-ci.org/karafka/karafka-sidekiq-backend.png)](https://travis-ci.org/karafka/karafka-sidekiq-backend)
4
4
  [![Join the chat at https://gitter.im/karafka/karafka](https://badges.gitter.im/karafka/karafka.svg)](https://gitter.im/karafka/karafka?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5
5
 
6
- [Karafka Sidekiq Backend](https://github.com/karafka/karafka-sidekiq-backend) provides support for processing received Kafka messages inside of Sidekiq workers.
6
+ [Karafka Sidekiq Backend](https://github.com/karafka/karafka-sidekiq-backend) provides support for consuming (processing) received Kafka messages inside of Sidekiq workers.
7
7
 
8
8
  ## Installations
9
9
 
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.description = 'Karafka Sidekiq backend for background messages processing'
16
16
  spec.license = 'MIT'
17
17
 
18
- spec.add_dependency 'karafka', '>= 1.0.0'
18
+ spec.add_dependency 'karafka', '>= 1.1.0.alpha1'
19
19
  spec.add_dependency 'sidekiq', '>= 4.2'
20
20
  spec.required_ruby_version = '>= 2.3.0'
21
21
 
@@ -5,7 +5,7 @@ module Karafka
5
5
  # Sidekiq backend that schedules stuff to Sidekiq worker for delayed execution
6
6
  module Sidekiq
7
7
  # Karafka Sidekiq backend version
8
- VERSION = '1.0.0'
8
+ VERSION = '1.1.0.alpha1'
9
9
 
10
10
  private
11
11
 
@@ -10,7 +10,9 @@ module Karafka
10
10
  # @param params_batch [Array] Array with messages batch
11
11
  def perform(topic_id, params_batch)
12
12
  Karafka.monitor.notice(self.class, params_batch)
13
- controller(topic_id, params_batch).perform
13
+ instance = controller(topic_id, params_batch)
14
+ # This allows to support both Karafka 1.0 and 1.1
15
+ instance.respond_to?(:consume) ? instance.consume : instance.perform
14
16
  end
15
17
 
16
18
  private
@@ -17,12 +17,8 @@ module Karafka
17
17
  # Prepends class methods into attributes map
18
18
  # @param base [Class] class that we prepend to
19
19
  def self.prepended(base)
20
- class << base
21
- prepend ClassMethods
22
- end
20
+ base.singleton_class.prepend ClassMethods
23
21
  end
24
22
  end
25
23
  end
26
24
  end
27
-
28
- Karafka::AttributesMap.prepend Karafka::Extensions::SidekiqAttributesMap
@@ -1,8 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # @note Active Support is already included since Karafka is using it directly so no need
4
+ # to require it again in the gemspec, etc
3
5
  %w[
4
6
  karafka
5
7
  sidekiq
8
+ active_support/core_ext/class/subclasses
6
9
  ].each(&method(:require))
7
10
 
8
11
  # Karafka framework namespace
@@ -23,3 +26,4 @@ end
23
26
 
24
27
  # Uses Karafka loader to load all the sources that this backend needs
25
28
  Karafka::Loader.load!(Karafka::Backends::Sidekiq.core_root)
29
+ Karafka::AttributesMap.prepend(Karafka::Extensions::SidekiqAttributesMap)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka-sidekiq-backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-06 00:00:00.000000000 Z
11
+ date: 2017-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: karafka
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0
19
+ version: 1.1.0.alpha1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0
26
+ version: 1.1.0.alpha1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sidekiq
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -81,9 +81,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
81
81
  version: 2.3.0
82
82
  required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - ">="
84
+ - - ">"
85
85
  - !ruby/object:Gem::Version
86
- version: '0'
86
+ version: 1.3.1
87
87
  requirements: []
88
88
  rubyforge_project:
89
89
  rubygems_version: 2.6.13