cloudenvoy 0.4.1 → 0.4.2

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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/CHANGELOG.md +7 -0
  4. data/README.md +4 -4
  5. data/app/controllers/cloudenvoy/subscriber_controller.rb +5 -2
  6. data/examples/rails/Gemfile.lock +125 -106
  7. data/examples/sinatra/Gemfile +15 -0
  8. data/examples/sinatra/Gemfile.lock +127 -0
  9. data/examples/sinatra/Procfile +1 -0
  10. data/examples/sinatra/README.md +41 -0
  11. data/examples/sinatra/app/publishers/hello_publisher.rb +34 -0
  12. data/examples/sinatra/app/subscribers/hello_subscriber.rb +16 -0
  13. data/examples/sinatra/app.rb +40 -0
  14. data/examples/sinatra/bin/console +8 -0
  15. data/examples/sinatra/config/initializers/cloudenvoy.rb +30 -0
  16. data/gemfiles/rails_5.2.gemfile.lock +86 -73
  17. data/gemfiles/rails_6.0.gemfile.lock +87 -74
  18. data/gemfiles/semantic_logger_3.4.gemfile.lock +144 -130
  19. data/gemfiles/semantic_logger_4.6.gemfile.lock +144 -130
  20. data/gemfiles/semantic_logger_4.7.0.gemfile.lock +144 -130
  21. data/gemfiles/semantic_logger_4.7.2.gemfile.lock +144 -130
  22. data/lib/cloudenvoy/message.rb +2 -2
  23. data/lib/cloudenvoy/subscriber.rb +1 -1
  24. data/lib/cloudenvoy/version.rb +1 -1
  25. data/lib/generators/cloudenvoy/publisher_generator.rb +46 -0
  26. data/lib/generators/cloudenvoy/subscriber_generator.rb +46 -0
  27. data/lib/generators/cloudenvoy/templates/publisher.rb.erb +11 -0
  28. data/lib/generators/cloudenvoy/templates/publisher_spec.rb.erb +6 -0
  29. data/lib/generators/cloudenvoy/templates/subscriber.rb.erb +11 -0
  30. data/lib/generators/cloudenvoy/templates/subscriber_spec.rb.erb +6 -0
  31. metadata +20 -7
  32. data/Gemfile.lock +0 -267
  33. data/app/controllers/cloudenvoy/application_controller.rb +0 -8
@@ -10,200 +10,214 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (6.0.3.3)
14
- actionpack (= 6.0.3.3)
13
+ actioncable (6.1.3.1)
14
+ actionpack (= 6.1.3.1)
15
+ activesupport (= 6.1.3.1)
15
16
  nio4r (~> 2.0)
16
17
  websocket-driver (>= 0.6.1)
17
- actionmailbox (6.0.3.3)
18
- actionpack (= 6.0.3.3)
19
- activejob (= 6.0.3.3)
20
- activerecord (= 6.0.3.3)
21
- activestorage (= 6.0.3.3)
22
- activesupport (= 6.0.3.3)
18
+ actionmailbox (6.1.3.1)
19
+ actionpack (= 6.1.3.1)
20
+ activejob (= 6.1.3.1)
21
+ activerecord (= 6.1.3.1)
22
+ activestorage (= 6.1.3.1)
23
+ activesupport (= 6.1.3.1)
23
24
  mail (>= 2.7.1)
24
- actionmailer (6.0.3.3)
25
- actionpack (= 6.0.3.3)
26
- actionview (= 6.0.3.3)
27
- activejob (= 6.0.3.3)
25
+ actionmailer (6.1.3.1)
26
+ actionpack (= 6.1.3.1)
27
+ actionview (= 6.1.3.1)
28
+ activejob (= 6.1.3.1)
29
+ activesupport (= 6.1.3.1)
28
30
  mail (~> 2.5, >= 2.5.4)
29
31
  rails-dom-testing (~> 2.0)
30
- actionpack (6.0.3.3)
31
- actionview (= 6.0.3.3)
32
- activesupport (= 6.0.3.3)
33
- rack (~> 2.0, >= 2.0.8)
32
+ actionpack (6.1.3.1)
33
+ actionview (= 6.1.3.1)
34
+ activesupport (= 6.1.3.1)
35
+ rack (~> 2.0, >= 2.0.9)
34
36
  rack-test (>= 0.6.3)
35
37
  rails-dom-testing (~> 2.0)
36
38
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.0.3.3)
38
- actionpack (= 6.0.3.3)
39
- activerecord (= 6.0.3.3)
40
- activestorage (= 6.0.3.3)
41
- activesupport (= 6.0.3.3)
39
+ actiontext (6.1.3.1)
40
+ actionpack (= 6.1.3.1)
41
+ activerecord (= 6.1.3.1)
42
+ activestorage (= 6.1.3.1)
43
+ activesupport (= 6.1.3.1)
42
44
  nokogiri (>= 1.8.5)
43
- actionview (6.0.3.3)
44
- activesupport (= 6.0.3.3)
45
+ actionview (6.1.3.1)
46
+ activesupport (= 6.1.3.1)
45
47
  builder (~> 3.1)
46
48
  erubi (~> 1.4)
47
49
  rails-dom-testing (~> 2.0)
48
50
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.0.3.3)
50
- activesupport (= 6.0.3.3)
51
+ activejob (6.1.3.1)
52
+ activesupport (= 6.1.3.1)
51
53
  globalid (>= 0.3.6)
52
- activemodel (6.0.3.3)
53
- activesupport (= 6.0.3.3)
54
- activerecord (6.0.3.3)
55
- activemodel (= 6.0.3.3)
56
- activesupport (= 6.0.3.3)
57
- activestorage (6.0.3.3)
58
- actionpack (= 6.0.3.3)
59
- activejob (= 6.0.3.3)
60
- activerecord (= 6.0.3.3)
61
- marcel (~> 0.3.1)
62
- activesupport (6.0.3.3)
54
+ activemodel (6.1.3.1)
55
+ activesupport (= 6.1.3.1)
56
+ activerecord (6.1.3.1)
57
+ activemodel (= 6.1.3.1)
58
+ activesupport (= 6.1.3.1)
59
+ activestorage (6.1.3.1)
60
+ actionpack (= 6.1.3.1)
61
+ activejob (= 6.1.3.1)
62
+ activerecord (= 6.1.3.1)
63
+ activesupport (= 6.1.3.1)
64
+ marcel (~> 1.0.0)
65
+ mini_mime (~> 1.0.2)
66
+ activesupport (6.1.3.1)
63
67
  concurrent-ruby (~> 1.0, >= 1.0.2)
64
- i18n (>= 0.7, < 2)
65
- minitest (~> 5.1)
66
- tzinfo (~> 1.1)
67
- zeitwerk (~> 2.2, >= 2.2.2)
68
+ i18n (>= 1.6, < 2)
69
+ minitest (>= 5.1)
70
+ tzinfo (~> 2.0)
71
+ zeitwerk (~> 2.3)
68
72
  addressable (2.7.0)
69
73
  public_suffix (>= 2.0.2, < 5.0)
70
- appraisal (2.3.0)
74
+ appraisal (2.4.0)
71
75
  bundler
72
76
  rake
73
77
  thor (>= 0.14.0)
74
- ast (2.4.1)
78
+ ast (2.4.2)
75
79
  builder (3.2.4)
76
- concurrent-ruby (1.1.7)
77
- crack (0.4.4)
80
+ concurrent-ruby (1.1.8)
81
+ crack (0.4.5)
82
+ rexml
78
83
  crass (1.0.6)
79
84
  diff-lcs (1.4.4)
80
- erubi (1.9.0)
81
- faraday (1.0.1)
85
+ erubi (1.10.0)
86
+ faraday (1.4.1)
87
+ faraday-excon (~> 1.1)
88
+ faraday-net_http (~> 1.0)
89
+ faraday-net_http_persistent (~> 1.1)
82
90
  multipart-post (>= 1.2, < 3)
83
- gapic-common (0.3.4)
84
- google-protobuf (~> 3.12, >= 3.12.2)
85
- googleapis-common-protos (>= 1.3.9, < 2.0)
86
- googleapis-common-protos-types (>= 1.0.4, < 2.0)
87
- googleauth (~> 0.9)
88
- grpc (~> 1.25)
91
+ ruby2_keywords (>= 0.0.4)
92
+ faraday-excon (1.1.0)
93
+ faraday-net_http (1.0.1)
94
+ faraday-net_http_persistent (1.1.0)
95
+ gapic-common (0.4.1)
96
+ faraday (~> 1.3)
97
+ google-protobuf (~> 3.15, >= 3.15.2)
98
+ googleapis-common-protos (>= 1.3.11, < 2.0)
99
+ googleapis-common-protos-types (>= 1.0.6, < 2.0)
100
+ googleauth (~> 0.15, >= 0.15.1)
101
+ grpc (~> 1.36)
89
102
  globalid (0.4.2)
90
103
  activesupport (>= 4.2.0)
91
- google-cloud-core (1.5.0)
104
+ google-cloud-core (1.6.0)
92
105
  google-cloud-env (~> 1.0)
93
106
  google-cloud-errors (~> 1.0)
94
- google-cloud-env (1.3.3)
107
+ google-cloud-env (1.5.0)
95
108
  faraday (>= 0.17.3, < 2.0)
96
- google-cloud-errors (1.0.1)
97
- google-cloud-pubsub (2.1.0)
109
+ google-cloud-errors (1.1.0)
110
+ google-cloud-pubsub (2.5.0)
98
111
  concurrent-ruby (~> 1.1)
99
112
  google-cloud-core (~> 1.5)
100
113
  google-cloud-pubsub-v1 (~> 0.0)
101
- google-cloud-pubsub-v1 (0.1.2)
114
+ google-cloud-pubsub-v1 (0.4.0)
102
115
  gapic-common (~> 0.3)
103
116
  google-cloud-errors (~> 1.0)
104
117
  grpc-google-iam-v1 (>= 0.6.10, < 2.0)
105
- google-protobuf (3.13.0-universal-darwin)
106
- googleapis-common-protos (1.3.10)
107
- google-protobuf (~> 3.11)
108
- googleapis-common-protos-types (>= 1.0.5, < 2.0)
118
+ google-protobuf (3.15.8)
119
+ googleapis-common-protos (1.3.11)
120
+ google-protobuf (~> 3.14)
121
+ googleapis-common-protos-types (>= 1.0.6, < 2.0)
109
122
  grpc (~> 1.27)
110
- googleapis-common-protos-types (1.0.5)
111
- google-protobuf (~> 3.11)
112
- googleauth (0.13.1)
123
+ googleapis-common-protos-types (1.0.6)
124
+ google-protobuf (~> 3.14)
125
+ googleauth (0.16.1)
113
126
  faraday (>= 0.17.3, < 2.0)
114
127
  jwt (>= 1.4, < 3.0)
115
128
  memoist (~> 0.16)
116
129
  multi_json (~> 1.11)
117
130
  os (>= 0.9, < 2.0)
118
131
  signet (~> 0.14)
119
- grpc (1.32.0-universal-darwin)
120
- google-protobuf (~> 3.13)
132
+ grpc (1.37.0)
133
+ google-protobuf (~> 3.15)
121
134
  googleapis-common-protos-types (~> 1.0)
122
- grpc-google-iam-v1 (0.6.10)
123
- google-protobuf (~> 3.11)
124
- googleapis-common-protos (>= 1.3.10, < 2.0)
135
+ grpc-google-iam-v1 (0.6.11)
136
+ google-protobuf (~> 3.14)
137
+ googleapis-common-protos (>= 1.3.11, < 2.0)
125
138
  grpc (~> 1.27)
126
139
  hashdiff (1.0.1)
127
- i18n (1.8.5)
140
+ i18n (1.8.10)
128
141
  concurrent-ruby (~> 1.0)
129
142
  jaro_winkler (1.5.4)
130
143
  jwt (2.2.2)
131
- loofah (2.7.0)
144
+ loofah (2.9.1)
132
145
  crass (~> 1.0.2)
133
146
  nokogiri (>= 1.5.9)
134
147
  mail (2.7.1)
135
148
  mini_mime (>= 0.1.1)
136
- marcel (0.3.3)
137
- mimemagic (~> 0.3.2)
149
+ marcel (1.0.1)
138
150
  memoist (0.16.2)
139
151
  method_source (1.0.0)
140
- mimemagic (0.3.5)
141
- mini_mime (1.0.2)
142
- mini_portile2 (2.4.0)
143
- minitest (5.14.2)
152
+ mini_mime (1.0.3)
153
+ mini_portile2 (2.5.0)
154
+ minitest (5.14.4)
144
155
  multi_json (1.15.0)
145
156
  multipart-post (2.1.1)
146
- nio4r (2.5.4)
147
- nokogiri (1.10.10)
148
- mini_portile2 (~> 2.4.0)
157
+ nio4r (2.5.7)
158
+ nokogiri (1.11.3)
159
+ mini_portile2 (~> 2.5.0)
160
+ racc (~> 1.4)
149
161
  os (1.1.1)
150
- parallel (1.19.2)
151
- parser (2.7.1.5)
162
+ parallel (1.20.1)
163
+ parser (3.0.1.0)
152
164
  ast (~> 2.4.1)
153
165
  public_suffix (4.0.6)
166
+ racc (1.5.2)
154
167
  rack (2.2.3)
155
168
  rack-test (1.1.0)
156
169
  rack (>= 1.0, < 3)
157
- rails (6.0.3.3)
158
- actioncable (= 6.0.3.3)
159
- actionmailbox (= 6.0.3.3)
160
- actionmailer (= 6.0.3.3)
161
- actionpack (= 6.0.3.3)
162
- actiontext (= 6.0.3.3)
163
- actionview (= 6.0.3.3)
164
- activejob (= 6.0.3.3)
165
- activemodel (= 6.0.3.3)
166
- activerecord (= 6.0.3.3)
167
- activestorage (= 6.0.3.3)
168
- activesupport (= 6.0.3.3)
169
- bundler (>= 1.3.0)
170
- railties (= 6.0.3.3)
170
+ rails (6.1.3.1)
171
+ actioncable (= 6.1.3.1)
172
+ actionmailbox (= 6.1.3.1)
173
+ actionmailer (= 6.1.3.1)
174
+ actionpack (= 6.1.3.1)
175
+ actiontext (= 6.1.3.1)
176
+ actionview (= 6.1.3.1)
177
+ activejob (= 6.1.3.1)
178
+ activemodel (= 6.1.3.1)
179
+ activerecord (= 6.1.3.1)
180
+ activestorage (= 6.1.3.1)
181
+ activesupport (= 6.1.3.1)
182
+ bundler (>= 1.15.0)
183
+ railties (= 6.1.3.1)
171
184
  sprockets-rails (>= 2.0.0)
172
185
  rails-dom-testing (2.0.3)
173
186
  activesupport (>= 4.2.0)
174
187
  nokogiri (>= 1.6)
175
188
  rails-html-sanitizer (1.3.0)
176
189
  loofah (~> 2.3)
177
- railties (6.0.3.3)
178
- actionpack (= 6.0.3.3)
179
- activesupport (= 6.0.3.3)
190
+ railties (6.1.3.1)
191
+ actionpack (= 6.1.3.1)
192
+ activesupport (= 6.1.3.1)
180
193
  method_source
181
194
  rake (>= 0.8.7)
182
- thor (>= 0.20.3, < 2.0)
195
+ thor (~> 1.0)
183
196
  rainbow (3.0.0)
184
- rake (13.0.1)
197
+ rake (13.0.3)
185
198
  retriable (3.1.2)
186
- rspec (3.9.0)
187
- rspec-core (~> 3.9.0)
188
- rspec-expectations (~> 3.9.0)
189
- rspec-mocks (~> 3.9.0)
190
- rspec-core (3.9.3)
191
- rspec-support (~> 3.9.3)
192
- rspec-expectations (3.9.2)
199
+ rexml (3.2.5)
200
+ rspec (3.10.0)
201
+ rspec-core (~> 3.10.0)
202
+ rspec-expectations (~> 3.10.0)
203
+ rspec-mocks (~> 3.10.0)
204
+ rspec-core (3.10.1)
205
+ rspec-support (~> 3.10.0)
206
+ rspec-expectations (3.10.1)
193
207
  diff-lcs (>= 1.2.0, < 2.0)
194
- rspec-support (~> 3.9.0)
195
- rspec-mocks (3.9.1)
208
+ rspec-support (~> 3.10.0)
209
+ rspec-mocks (3.10.2)
196
210
  diff-lcs (>= 1.2.0, < 2.0)
197
- rspec-support (~> 3.9.0)
198
- rspec-rails (4.0.1)
199
- actionpack (>= 4.2)
200
- activesupport (>= 4.2)
201
- railties (>= 4.2)
202
- rspec-core (~> 3.9)
203
- rspec-expectations (~> 3.9)
204
- rspec-mocks (~> 3.9)
205
- rspec-support (~> 3.9)
206
- rspec-support (3.9.3)
211
+ rspec-support (~> 3.10.0)
212
+ rspec-rails (5.0.1)
213
+ actionpack (>= 5.2)
214
+ activesupport (>= 5.2)
215
+ railties (>= 5.2)
216
+ rspec-core (~> 3.10)
217
+ rspec-expectations (~> 3.10)
218
+ rspec-mocks (~> 3.10)
219
+ rspec-support (~> 3.10)
220
+ rspec-support (3.10.2)
207
221
  rubocop (0.76.0)
208
222
  jaro_winkler (~> 1.5.1)
209
223
  parallel (~> 1.10)
@@ -213,10 +227,11 @@ GEM
213
227
  unicode-display_width (>= 1.4.0, < 1.7)
214
228
  rubocop-rspec (1.37.0)
215
229
  rubocop (>= 0.68.1)
216
- ruby-progressbar (1.10.1)
230
+ ruby-progressbar (1.11.0)
231
+ ruby2_keywords (0.0.4)
217
232
  semantic_logger (4.7.2)
218
233
  concurrent-ruby (~> 1.0)
219
- signet (0.14.0)
234
+ signet (0.15.0)
220
235
  addressable (~> 2.3)
221
236
  faraday (>= 0.17.3, < 2.0)
222
237
  jwt (>= 1.5, < 3.0)
@@ -229,20 +244,19 @@ GEM
229
244
  activesupport (>= 4.0)
230
245
  sprockets (>= 3.0.0)
231
246
  sqlite3 (1.4.2)
232
- thor (1.0.1)
233
- thread_safe (0.3.6)
234
- timecop (0.9.1)
235
- tzinfo (1.2.7)
236
- thread_safe (~> 0.1)
247
+ thor (1.1.0)
248
+ timecop (0.9.4)
249
+ tzinfo (2.0.4)
250
+ concurrent-ruby (~> 1.0)
237
251
  unicode-display_width (1.6.1)
238
- webmock (3.9.1)
252
+ webmock (3.12.2)
239
253
  addressable (>= 2.3.6)
240
254
  crack (>= 0.3.2)
241
255
  hashdiff (>= 0.4.0, < 2.0.0)
242
256
  websocket-driver (0.7.3)
243
257
  websocket-extensions (>= 0.1.0)
244
258
  websocket-extensions (0.1.5)
245
- zeitwerk (2.4.0)
259
+ zeitwerk (2.4.2)
246
260
 
247
261
  PLATFORMS
248
262
  ruby
@@ -262,4 +276,4 @@ DEPENDENCIES
262
276
  webmock
263
277
 
264
278
  BUNDLED WITH
265
- 2.1.4
279
+ 2.2.9
@@ -75,8 +75,8 @@ module Cloudenvoy
75
75
  def to_h
76
76
  {
77
77
  id: id,
78
- payload: payload,
79
- metadata: metadata,
78
+ payload: payload&.dup,
79
+ metadata: metadata&.dup,
80
80
  topic: topic,
81
81
  sub_uri: sub_uri
82
82
  }.compact
@@ -53,7 +53,7 @@ module Cloudenvoy
53
53
  # @return [Array<String,String>] A tuple [subscriber_name, topic ]
54
54
  #
55
55
  def self.parse_sub_uri(sub_uri)
56
- sub_uri.split('/').last.split('.').last(2)
56
+ sub_uri.split('/').last.split('.', 2).last.split('.', 2)
57
57
  end
58
58
 
59
59
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cloudenvoy
4
- VERSION = '0.4.1'
4
+ VERSION = '0.4.2'
5
5
  end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/generators/named_base'
4
+
5
+ module Cloudenvoy
6
+ module Generators # :nodoc:
7
+ class PublisherGenerator < ::Rails::Generators::NamedBase # :nodoc:
8
+ desc 'This generator creates a CloudEnvoy in app/publishers and a corresponding test'
9
+
10
+ check_class_collision suffix: 'Publisher'
11
+
12
+ def self.default_generator_root
13
+ File.dirname(__FILE__)
14
+ end
15
+
16
+ def create_publisher_file
17
+ template 'publisher.rb.erb', File.join('app/publishers', class_path, "#{file_name}_publisher.rb")
18
+ end
19
+
20
+ def create_test_file
21
+ return unless test_framework
22
+
23
+ create_publisher_spec if test_framework == :rspec
24
+ end
25
+
26
+ private
27
+
28
+ def create_publisher_spec
29
+ template_file = File.join(
30
+ 'spec/publishers',
31
+ class_path,
32
+ "#{file_name}_publisher_spec.rb"
33
+ )
34
+ template 'publisher_spec.rb.erb', template_file
35
+ end
36
+
37
+ def file_name
38
+ @file_name ||= super.sub(/_?publisher\z/i, '')
39
+ end
40
+
41
+ def test_framework
42
+ ::Rails.application.config.generators.options[:rails][:test_framework]
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/generators/named_base'
4
+
5
+ module Cloudenvoy
6
+ module Generators # :nodoc:
7
+ class SubscriberGenerator < ::Rails::Generators::NamedBase # :nodoc:
8
+ desc 'This generator creates a CloudEnvoy in app/subscribers and a corresponding test'
9
+
10
+ check_class_collision suffix: 'Subscriber'
11
+
12
+ def self.default_generator_root
13
+ File.dirname(__FILE__)
14
+ end
15
+
16
+ def create_subscriber_file
17
+ template 'subscriber.rb.erb', File.join('app/subscribers', class_path, "#{file_name}_subscriber.rb")
18
+ end
19
+
20
+ def create_test_file
21
+ return unless test_framework
22
+
23
+ create_subscriber_spec if test_framework == :rspec
24
+ end
25
+
26
+ private
27
+
28
+ def create_subscriber_spec
29
+ template_file = File.join(
30
+ 'spec/subscribers',
31
+ class_path,
32
+ "#{file_name}_subscriber_spec.rb"
33
+ )
34
+ template 'subscriber_spec.rb.erb', template_file
35
+ end
36
+
37
+ def file_name
38
+ @file_name ||= super.sub(/_?subscriber\z/i, '')
39
+ end
40
+
41
+ def test_framework
42
+ ::Rails.application.config.generators.options[:rails][:test_framework]
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,11 @@
1
+ <% module_namespacing do -%>
2
+ class <%= class_name %>Publisher
3
+ include Cloudenvoy::Publisher
4
+
5
+ cloudenvoy_options topic: 'test-msgs'
6
+
7
+ def payload(msg)
8
+ # Format the message payload. The payload can be a hash or a string.
9
+ end
10
+ end
11
+ <% end -%>
@@ -0,0 +1,6 @@
1
+ require 'rails_helper'
2
+ <% module_namespacing do -%>
3
+ RSpec.describe <%= class_name %>Publisher, type: :publisher do
4
+ pending "add some examples to (or delete) #{__FILE__}"
5
+ end
6
+ <% end -%>
@@ -0,0 +1,11 @@
1
+ <% module_namespacing do -%>
2
+ class <%= class_name %>Subscriber
3
+ include Cloudenvoy::Subscriber
4
+
5
+ cloudenvoy_options topic: 'test-msgs'
6
+
7
+ def process(msg)
8
+ # Do something
9
+ end
10
+ end
11
+ <% end -%>
@@ -0,0 +1,6 @@
1
+ require 'rails_helper'
2
+ <% module_namespacing do -%>
3
+ RSpec.describe <%= class_name %>Subscriber, type: :subscriber do
4
+ pending "add some examples to (or delete) #{__FILE__}"
5
+ end
6
+ <% end -%>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudenvoy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud Lachaume
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-06 00:00:00.000000000 Z
11
+ date: 2021-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -235,11 +235,9 @@ files:
235
235
  - CHANGELOG.md
236
236
  - CODE_OF_CONDUCT.md
237
237
  - Gemfile
238
- - Gemfile.lock
239
238
  - LICENSE.txt
240
239
  - README.md
241
240
  - Rakefile
242
- - app/controllers/cloudenvoy/application_controller.rb
243
241
  - app/controllers/cloudenvoy/subscriber_controller.rb
244
242
  - bin/console
245
243
  - bin/setup
@@ -311,6 +309,15 @@ files:
311
309
  - examples/rails/storage/.keep
312
310
  - examples/rails/tmp/.keep
313
311
  - examples/rails/tmp/development_secret.txt
312
+ - examples/sinatra/Gemfile
313
+ - examples/sinatra/Gemfile.lock
314
+ - examples/sinatra/Procfile
315
+ - examples/sinatra/README.md
316
+ - examples/sinatra/app.rb
317
+ - examples/sinatra/app/publishers/hello_publisher.rb
318
+ - examples/sinatra/app/subscribers/hello_subscriber.rb
319
+ - examples/sinatra/bin/console
320
+ - examples/sinatra/config/initializers/cloudenvoy.rb
314
321
  - gemfiles/rails_5.2.gemfile
315
322
  - gemfiles/rails_5.2.gemfile.lock
316
323
  - gemfiles/rails_6.0.gemfile
@@ -343,6 +350,12 @@ files:
343
350
  - lib/cloudenvoy/testing.rb
344
351
  - lib/cloudenvoy/topic.rb
345
352
  - lib/cloudenvoy/version.rb
353
+ - lib/generators/cloudenvoy/publisher_generator.rb
354
+ - lib/generators/cloudenvoy/subscriber_generator.rb
355
+ - lib/generators/cloudenvoy/templates/publisher.rb.erb
356
+ - lib/generators/cloudenvoy/templates/publisher_spec.rb.erb
357
+ - lib/generators/cloudenvoy/templates/subscriber.rb.erb
358
+ - lib/generators/cloudenvoy/templates/subscriber_spec.rb.erb
346
359
  - lib/tasks/cloudenvoy.rake
347
360
  homepage: https://github.com/keypup-io/cloudenvoy
348
361
  licenses:
@@ -351,7 +364,7 @@ metadata:
351
364
  homepage_uri: https://github.com/keypup-io/cloudenvoy
352
365
  source_code_uri: https://github.com/keypup-io/cloudenvoy
353
366
  changelog_uri: https://github.com/keypup-io/cloudenvoy/master/tree/CHANGELOG.md
354
- post_install_message:
367
+ post_install_message:
355
368
  rdoc_options: []
356
369
  require_paths:
357
370
  - lib
@@ -367,7 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
367
380
  version: '0'
368
381
  requirements: []
369
382
  rubygems_version: 3.0.0
370
- signing_key:
383
+ signing_key:
371
384
  specification_version: 4
372
385
  summary: Cross-application messaging using GCP Pub/Sub (alpha)
373
386
  test_files: []