instant_login 0.0.2 → 0.0.3

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: d0b0bd5a5e6c35f8609cb75d3d880414c02e2c09
4
- data.tar.gz: 344495464463ae03920b01abdc1d86aacfeb939e
3
+ metadata.gz: 2f8dff1f8d02ca8b0f13d71b0fc327fe0f7acc63
4
+ data.tar.gz: bf3f91a45e5f459388c640481e7cd47a4b77dc2b
5
5
  SHA512:
6
- metadata.gz: deb667a0a8b1a95ee2f8e2ccc6fd0855e372aa61765904f34ebfc0c0187aaf1e830275d69c5d4509d13d9a2a92f3e231b27edc487d0a67e913e0a3378c5f86c5
7
- data.tar.gz: 655c04bcfb05a4f236e4bf62116b6fc12aa22c5df4b6522f365972bb0582601c57de12e8c2d7709dff54c56a47f919684b7f231ae120161d9ce1f5a700535c91
6
+ metadata.gz: c2b213566359d7f7d288728e3d27345c5192256b971bfbc3ed3635230be6a0378703e833f8a625f059be0edb5fc8491f4138541b0a2d71d45b20d0a16259a706
7
+ data.tar.gz: 215e2ce0aad3d1069e678a4f108c5a48d45e68ebf18f085fe9f40269c4aeb0af4e8adab0e4e04f4f941a227dfc8eaab7c3d443d19425091d50186c1307a3ff69
@@ -6,7 +6,14 @@ module InstantLogin
6
6
  user = InstantLogin.config.user_class.find_by(email: params[:email])
7
7
  if user
8
8
  user.generate_instant_login_token
9
- InstantLogin.config.mailer_class.token(user).deliver
9
+ mail = InstantLogin.config.mailer_class.token(user)
10
+
11
+ if mail.respond_to?(:deliver_now)
12
+ mail.deliver_now
13
+ else
14
+ mail.deliver
15
+ end
16
+
10
17
  redirect_to '/', notice: 'Login email sent'
11
18
  else
12
19
  redirect_to '/', alert: 'User not found'
@@ -1,3 +1,3 @@
1
1
  module InstantLogin
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instant_login
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephan Pavlovic
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-09 00:00:00.000000000 Z
12
+ date: 2015-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails