devise-async 0.10.2 → 1.0.0beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +5 -13
  2. data/.gitignore +3 -4
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -5
  5. data/CHANGELOG.md +4 -1
  6. data/README.md +4 -0
  7. data/devise-async.gemspec +17 -24
  8. data/lib/devise/async.rb +5 -34
  9. data/lib/devise/async/model.rb +8 -30
  10. data/lib/devise/async/version.rb +1 -1
  11. data/spec/devise/async/model_spec.rb +95 -0
  12. data/spec/devise/async_spec.rb +13 -0
  13. data/spec/rails_helper.rb +23 -0
  14. data/spec/spec_helper.rb +22 -0
  15. data/{test → spec}/support/rails_app.rb +3 -2
  16. data/{test → spec}/support/rails_app/app/models/admin.rb +0 -0
  17. data/{test → spec}/support/rails_app/config/database.yml +0 -0
  18. data/{test → spec}/support/rails_app/config/initializers/devise.rb +0 -1
  19. data/{test → spec}/support/rails_app/config/routes.rb +1 -1
  20. data/spec/support/rails_app/db/schema.rb +30 -0
  21. data/spec/support/test_helpers.rb +19 -0
  22. metadata +76 -206
  23. data/lib/devise/async/backend.rb +0 -13
  24. data/lib/devise/async/backend/backburner.rb +0 -25
  25. data/lib/devise/async/backend/base.rb +0 -49
  26. data/lib/devise/async/backend/delayed_job.rb +0 -15
  27. data/lib/devise/async/backend/que.rb +0 -19
  28. data/lib/devise/async/backend/queue_classic.rb +0 -20
  29. data/lib/devise/async/backend/resque.rb +0 -18
  30. data/lib/devise/async/backend/sidekiq.rb +0 -15
  31. data/lib/devise/async/backend/sucker_punch.rb +0 -23
  32. data/lib/devise/async/backend/torquebox.rb +0 -14
  33. data/lib/devise/async/worker.rb +0 -35
  34. data/test/devise/async/backend/backburner_test.rb +0 -33
  35. data/test/devise/async/backend/base_test.rb +0 -70
  36. data/test/devise/async/backend/delayed_job_test.rb +0 -36
  37. data/test/devise/async/backend/que_test.rb +0 -21
  38. data/test/devise/async/backend/queue_classic_test.rb +0 -29
  39. data/test/devise/async/backend/resque_test.rb +0 -27
  40. data/test/devise/async/backend/sidekiq_test.rb +0 -27
  41. data/test/devise/async/backend/sucker_punch_test.rb +0 -21
  42. data/test/devise/async/backend/torquebox_test.rb +0 -21
  43. data/test/devise/async/backend_test.rb +0 -37
  44. data/test/devise/async/model_test.rb +0 -100
  45. data/test/devise/async/worker_test.rb +0 -56
  46. data/test/devise/async_test.rb +0 -31
  47. data/test/support/my_mailer.rb +0 -2
  48. data/test/support/rails_app/app/models/user.rb +0 -5
  49. data/test/support/rails_app/app/models/user_with_mailer.rb +0 -6
  50. data/test/support/rails_app/config/initializers/devise_async.rb +0 -3
  51. data/test/support/rails_app/db/schema.rb +0 -68
  52. data/test/support/test_helpers.rb +0 -38
  53. data/test/test_helper.rb +0 -31
@@ -0,0 +1,30 @@
1
+ ActiveRecord::Schema.define(version: 1) do
2
+ begin
3
+ drop_table :admins
4
+ rescue
5
+ end
6
+
7
+ create_table "admins", force: true do |t|
8
+ t.string "username"
9
+ t.string "facebook_token"
10
+ t.string "email", default: "", null: false
11
+ t.string "unconfirmed_email", default: ""
12
+ t.string "encrypted_password", limit: 128, default: "", null: false
13
+ t.string "confirmation_token"
14
+ t.datetime "confirmed_at"
15
+ t.datetime "confirmation_sent_at"
16
+ t.string "reset_password_token"
17
+ t.datetime "remember_created_at"
18
+ t.integer "sign_in_count", default: 0
19
+ t.datetime "current_sign_in_at"
20
+ t.datetime "last_sign_in_at"
21
+ t.string "current_sign_in_ip"
22
+ t.string "last_sign_in_ip"
23
+ t.integer "failed_attempts", default: 0
24
+ t.string "unlock_token"
25
+ t.datetime "locked_at"
26
+ t.string "authentication_token"
27
+ t.datetime "created_at"
28
+ t.datetime "updated_at"
29
+ end
30
+ end
@@ -0,0 +1,19 @@
1
+ module TestHelpers
2
+ def valid_attributes(attributes={})
3
+ { username: "usertest",
4
+ email: generate_unique_email,
5
+ password: '12345678',
6
+ password_confirmation: '12345678'
7
+ }.update(attributes)
8
+ end
9
+
10
+ email_count = 0
11
+ define_method :generate_unique_email do
12
+ email_count += 1
13
+ "test#{email_count}@example.com"
14
+ end
15
+
16
+ def create_admin(attributes={})
17
+ Admin.create!(valid_attributes(attributes))
18
+ end
19
+ end
metadata CHANGED
@@ -1,241 +1,154 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-async
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 1.0.0beta
5
5
  platform: ruby
6
6
  authors:
7
+ - Sebastian Oelke
7
8
  - Marcelo Silveira
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2016-05-27 00:00:00.000000000 Z
12
+ date: 2017-05-25 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: devise
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - ! '>='
18
- - !ruby/object:Gem::Version
19
- version: '3.2'
20
- - - <
18
+ - - ">="
21
19
  - !ruby/object:Gem::Version
22
20
  version: '4.0'
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
24
  requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '3.2'
30
- - - <
25
+ - - ">="
31
26
  - !ruby/object:Gem::Version
32
27
  version: '4.0'
33
28
  - !ruby/object:Gem::Dependency
34
- name: minitest
29
+ name: activejob
35
30
  requirement: !ruby/object:Gem::Requirement
36
31
  requirements:
37
- - - ! '>='
32
+ - - ">="
38
33
  - !ruby/object:Gem::Version
39
- version: '0'
40
- type: :development
34
+ version: '5.0'
35
+ type: :runtime
41
36
  prerelease: false
42
37
  version_requirements: !ruby/object:Gem::Requirement
43
38
  requirements:
44
- - - ! '>='
39
+ - - ">="
45
40
  - !ruby/object:Gem::Version
46
- version: '0'
41
+ version: '5.0'
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: activerecord
49
44
  requirement: !ruby/object:Gem::Requirement
50
45
  requirements:
51
- - - ! '>='
46
+ - - ">="
52
47
  - !ruby/object:Gem::Version
53
- version: '3.2'
48
+ version: '5.0'
54
49
  type: :development
55
50
  prerelease: false
56
51
  version_requirements: !ruby/object:Gem::Requirement
57
52
  requirements:
58
- - - ! '>='
53
+ - - ">="
59
54
  - !ruby/object:Gem::Version
60
- version: '3.2'
55
+ version: '5.0'
61
56
  - !ruby/object:Gem::Dependency
62
57
  name: actionpack
63
58
  requirement: !ruby/object:Gem::Requirement
64
59
  requirements:
65
- - - ! '>='
60
+ - - ">="
66
61
  - !ruby/object:Gem::Version
67
- version: '3.2'
62
+ version: '5.0'
68
63
  type: :development
69
64
  prerelease: false
70
65
  version_requirements: !ruby/object:Gem::Requirement
71
66
  requirements:
72
- - - ! '>='
67
+ - - ">="
73
68
  - !ruby/object:Gem::Version
74
- version: '3.2'
69
+ version: '5.0'
75
70
  - !ruby/object:Gem::Dependency
76
71
  name: actionmailer
77
72
  requirement: !ruby/object:Gem::Requirement
78
73
  requirements:
79
- - - ! '>='
80
- - !ruby/object:Gem::Version
81
- version: '3.2'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - ! '>='
87
- - !ruby/object:Gem::Version
88
- version: '3.2'
89
- - !ruby/object:Gem::Dependency
90
- name: sqlite3
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - ~>
74
+ - - ">="
94
75
  - !ruby/object:Gem::Version
95
- version: '1.3'
76
+ version: '5.0'
96
77
  type: :development
97
78
  prerelease: false
98
79
  version_requirements: !ruby/object:Gem::Requirement
99
80
  requirements:
100
- - - ~>
81
+ - - ">="
101
82
  - !ruby/object:Gem::Version
102
- version: '1.3'
83
+ version: '5.0'
103
84
  - !ruby/object:Gem::Dependency
104
- name: resque
85
+ name: rspec
105
86
  requirement: !ruby/object:Gem::Requirement
106
87
  requirements:
107
- - - ~>
88
+ - - "~>"
108
89
  - !ruby/object:Gem::Version
109
- version: '1.20'
90
+ version: '3.6'
110
91
  type: :development
111
92
  prerelease: false
112
93
  version_requirements: !ruby/object:Gem::Requirement
113
94
  requirements:
114
- - - ~>
95
+ - - "~>"
115
96
  - !ruby/object:Gem::Version
116
- version: '1.20'
97
+ version: '3.6'
117
98
  - !ruby/object:Gem::Dependency
118
- name: sidekiq
99
+ name: rspec-rails
119
100
  requirement: !ruby/object:Gem::Requirement
120
101
  requirements:
121
- - - ~>
102
+ - - "~>"
122
103
  - !ruby/object:Gem::Version
123
- version: '2.17'
104
+ version: '3.6'
124
105
  type: :development
125
106
  prerelease: false
126
107
  version_requirements: !ruby/object:Gem::Requirement
127
108
  requirements:
128
- - - ~>
109
+ - - "~>"
129
110
  - !ruby/object:Gem::Version
130
- version: '2.17'
111
+ version: '3.6'
131
112
  - !ruby/object:Gem::Dependency
132
- name: delayed_job_active_record
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - ~>
136
- - !ruby/object:Gem::Version
137
- version: '0.3'
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - ~>
143
- - !ruby/object:Gem::Version
144
- version: '0.3'
145
- - !ruby/object:Gem::Dependency
146
- name: queue_classic
147
- requirement: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - ~>
150
- - !ruby/object:Gem::Version
151
- version: '2.0'
152
- type: :development
153
- prerelease: false
154
- version_requirements: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - ~>
157
- - !ruby/object:Gem::Version
158
- version: '2.0'
159
- - !ruby/object:Gem::Dependency
160
- name: backburner
161
- requirement: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - ~>
164
- - !ruby/object:Gem::Version
165
- version: '0.4'
166
- type: :development
167
- prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- requirements:
170
- - - ~>
171
- - !ruby/object:Gem::Version
172
- version: '0.4'
173
- - !ruby/object:Gem::Dependency
174
- name: mocha
175
- requirement: !ruby/object:Gem::Requirement
176
- requirements:
177
- - - ~>
178
- - !ruby/object:Gem::Version
179
- version: '0.11'
180
- type: :development
181
- prerelease: false
182
- version_requirements: !ruby/object:Gem::Requirement
183
- requirements:
184
- - - ~>
185
- - !ruby/object:Gem::Version
186
- version: '0.11'
187
- - !ruby/object:Gem::Dependency
188
- name: torquebox-no-op
189
- requirement: !ruby/object:Gem::Requirement
190
- requirements:
191
- - - ~>
192
- - !ruby/object:Gem::Version
193
- version: '2.3'
194
- type: :development
195
- prerelease: false
196
- version_requirements: !ruby/object:Gem::Requirement
197
- requirements:
198
- - - ~>
199
- - !ruby/object:Gem::Version
200
- version: '2.3'
201
- - !ruby/object:Gem::Dependency
202
- name: sucker_punch
113
+ name: sqlite3
203
114
  requirement: !ruby/object:Gem::Requirement
204
115
  requirements:
205
- - - ~>
116
+ - - "~>"
206
117
  - !ruby/object:Gem::Version
207
- version: 1.0.5
118
+ version: '1.3'
208
119
  type: :development
209
120
  prerelease: false
210
121
  version_requirements: !ruby/object:Gem::Requirement
211
122
  requirements:
212
- - - ~>
123
+ - - "~>"
213
124
  - !ruby/object:Gem::Version
214
- version: 1.0.5
125
+ version: '1.3'
215
126
  - !ruby/object:Gem::Dependency
216
- name: que
127
+ name: pry
217
128
  requirement: !ruby/object:Gem::Requirement
218
129
  requirements:
219
- - - ~>
130
+ - - ">="
220
131
  - !ruby/object:Gem::Version
221
- version: '0.8'
132
+ version: '0'
222
133
  type: :development
223
134
  prerelease: false
224
135
  version_requirements: !ruby/object:Gem::Requirement
225
136
  requirements:
226
- - - ~>
137
+ - - ">="
227
138
  - !ruby/object:Gem::Version
228
- version: '0.8'
229
- description: Send Devise's emails in background. Supports Backburner, Resque, Sidekiq,
230
- Delayed::Job, QueueClassic, Que, Sucker Punch and Torquebox.
139
+ version: '0'
140
+ description: Devise Async provides an easy way to configure Devise to send its emails
141
+ asynchronously using ActiveJob.
231
142
  email:
143
+ - dev@soelke.de
232
144
  - marcelo@mhfs.com.br
233
145
  executables: []
234
146
  extensions: []
235
147
  extra_rdoc_files: []
236
148
  files:
237
- - .gitignore
238
- - .travis.yml
149
+ - ".gitignore"
150
+ - ".rspec"
151
+ - ".travis.yml"
239
152
  - CHANGELOG.md
240
153
  - Gemfile
241
154
  - LICENSE
@@ -244,45 +157,19 @@ files:
244
157
  - devise-async.gemspec
245
158
  - lib/devise-async.rb
246
159
  - lib/devise/async.rb
247
- - lib/devise/async/backend.rb
248
- - lib/devise/async/backend/backburner.rb
249
- - lib/devise/async/backend/base.rb
250
- - lib/devise/async/backend/delayed_job.rb
251
- - lib/devise/async/backend/que.rb
252
- - lib/devise/async/backend/queue_classic.rb
253
- - lib/devise/async/backend/resque.rb
254
- - lib/devise/async/backend/sidekiq.rb
255
- - lib/devise/async/backend/sucker_punch.rb
256
- - lib/devise/async/backend/torquebox.rb
257
160
  - lib/devise/async/model.rb
258
161
  - lib/devise/async/version.rb
259
- - lib/devise/async/worker.rb
260
- - test/devise/async/backend/backburner_test.rb
261
- - test/devise/async/backend/base_test.rb
262
- - test/devise/async/backend/delayed_job_test.rb
263
- - test/devise/async/backend/que_test.rb
264
- - test/devise/async/backend/queue_classic_test.rb
265
- - test/devise/async/backend/resque_test.rb
266
- - test/devise/async/backend/sidekiq_test.rb
267
- - test/devise/async/backend/sucker_punch_test.rb
268
- - test/devise/async/backend/torquebox_test.rb
269
- - test/devise/async/backend_test.rb
270
- - test/devise/async/model_test.rb
271
- - test/devise/async/worker_test.rb
272
- - test/devise/async_test.rb
273
- - test/support/my_mailer.rb
274
- - test/support/rails_app.rb
275
- - test/support/rails_app/app/models/admin.rb
276
- - test/support/rails_app/app/models/user.rb
277
- - test/support/rails_app/app/models/user_with_mailer.rb
278
- - test/support/rails_app/config/database.yml
279
- - test/support/rails_app/config/initializers/devise.rb
280
- - test/support/rails_app/config/initializers/devise_async.rb
281
- - test/support/rails_app/config/routes.rb
282
- - test/support/rails_app/db/schema.rb
283
- - test/support/rails_app/log/development.log
284
- - test/support/test_helpers.rb
285
- - test/test_helper.rb
162
+ - spec/devise/async/model_spec.rb
163
+ - spec/devise/async_spec.rb
164
+ - spec/rails_helper.rb
165
+ - spec/spec_helper.rb
166
+ - spec/support/rails_app.rb
167
+ - spec/support/rails_app/app/models/admin.rb
168
+ - spec/support/rails_app/config/database.yml
169
+ - spec/support/rails_app/config/initializers/devise.rb
170
+ - spec/support/rails_app/config/routes.rb
171
+ - spec/support/rails_app/db/schema.rb
172
+ - spec/support/test_helpers.rb
286
173
  homepage: https://github.com/mhfs/devise-async/
287
174
  licenses:
288
175
  - MIT
@@ -293,46 +180,29 @@ require_paths:
293
180
  - lib
294
181
  required_ruby_version: !ruby/object:Gem::Requirement
295
182
  requirements:
296
- - - ! '>='
183
+ - - ">="
297
184
  - !ruby/object:Gem::Version
298
185
  version: '0'
299
186
  required_rubygems_version: !ruby/object:Gem::Requirement
300
187
  requirements:
301
- - - ! '>='
188
+ - - ">"
302
189
  - !ruby/object:Gem::Version
303
- version: '0'
190
+ version: 1.3.1
304
191
  requirements: []
305
192
  rubyforge_project:
306
- rubygems_version: 2.6.4
193
+ rubygems_version: 2.4.5.1
307
194
  signing_key:
308
195
  specification_version: 4
309
- summary: Devise Async provides an easy way to configure Devise to send its emails
310
- asynchronously using your preferred queuing backend. It supports Backburner, Resque,
311
- Sidekiq, Delayed::Job, QueueClassic, Que, Sucker Punch and Torquebox.
196
+ summary: Deliver Devise's emails in the background using ActiveJob.
312
197
  test_files:
313
- - test/devise/async/backend/backburner_test.rb
314
- - test/devise/async/backend/base_test.rb
315
- - test/devise/async/backend/delayed_job_test.rb
316
- - test/devise/async/backend/que_test.rb
317
- - test/devise/async/backend/queue_classic_test.rb
318
- - test/devise/async/backend/resque_test.rb
319
- - test/devise/async/backend/sidekiq_test.rb
320
- - test/devise/async/backend/sucker_punch_test.rb
321
- - test/devise/async/backend/torquebox_test.rb
322
- - test/devise/async/backend_test.rb
323
- - test/devise/async/model_test.rb
324
- - test/devise/async/worker_test.rb
325
- - test/devise/async_test.rb
326
- - test/support/my_mailer.rb
327
- - test/support/rails_app.rb
328
- - test/support/rails_app/app/models/admin.rb
329
- - test/support/rails_app/app/models/user.rb
330
- - test/support/rails_app/app/models/user_with_mailer.rb
331
- - test/support/rails_app/config/database.yml
332
- - test/support/rails_app/config/initializers/devise.rb
333
- - test/support/rails_app/config/initializers/devise_async.rb
334
- - test/support/rails_app/config/routes.rb
335
- - test/support/rails_app/db/schema.rb
336
- - test/support/rails_app/log/development.log
337
- - test/support/test_helpers.rb
338
- - test/test_helper.rb
198
+ - spec/devise/async/model_spec.rb
199
+ - spec/devise/async_spec.rb
200
+ - spec/rails_helper.rb
201
+ - spec/spec_helper.rb
202
+ - spec/support/rails_app.rb
203
+ - spec/support/rails_app/app/models/admin.rb
204
+ - spec/support/rails_app/config/database.yml
205
+ - spec/support/rails_app/config/initializers/devise.rb
206
+ - spec/support/rails_app/config/routes.rb
207
+ - spec/support/rails_app/db/schema.rb
208
+ - spec/support/test_helpers.rb