edem_oauth_user 0.1.2 → 0.1.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: bf59d96f6f1a1a9320cbf45c0d0ef2512548dd23
4
- data.tar.gz: dcc669d7d0dbc76f103892396ac76d90e9635e25
3
+ metadata.gz: 9aecbb0a0df7d501593b87011244ed199e5a6a71
4
+ data.tar.gz: a926f1a610adaf5ecbfd9ae3737f0c93652e85b9
5
5
  SHA512:
6
- metadata.gz: c2f90b1044664e1fc49ac312e692c52422e7adf13e9286b86578402be21a6895f45a955f82d6ac943bc50e6b01d42ac1dac6856dd46441f8422940de52674888
7
- data.tar.gz: d3ad3c5299748a5248ef5e1e7790f65f072c8b2d252581e1a779402e476801687cd8519e55606ca4d2c2319bc198d995f01a7ca4d55f513494a525ca33b89628
6
+ metadata.gz: 99790b2c02d61f0399f4b0b5202d4653a0a2a2141372df87ed1856a15d2f343a3b41a2ab74eb15970a7548bab83de8180ea7220201cddce87167887f7ce48713
7
+ data.tar.gz: 88798902f57d9281811f6d79af147f2d7485605a31cd6f7f0931575e64321fd0c5dd0bf526b9fd52d2e2f5ee7b8c2971dc490b81a9b193be44c132bc44bb418c
data/README.md CHANGED
@@ -22,7 +22,9 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ Add migration
26
+ $ rails generate migration add_access_token_to_users access_token refresh_token
27
+ $ rake db:migrate
26
28
 
27
29
  ## Development
28
30
 
@@ -3,6 +3,7 @@ module EdemOauthUser
3
3
  def find_or_create_by_oauth(auth)
4
4
  res = find_or_create_by(uid: auth['uid'], provider: auth['provider']) do |user|
5
5
  user.email = auth.dig('info', 'email')
6
+ yield(user) if block_given?
6
7
  user.password = SecureRandom.hex
7
8
  end
8
9
  res.access_token = auth.credentials.token
@@ -1,3 +1,3 @@
1
1
  module EdemOauthUser
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edem_oauth_user
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandr
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-11 00:00:00.000000000 Z
11
+ date: 2018-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -79,8 +79,6 @@ files:
79
79
  - Rakefile
80
80
  - bin/console
81
81
  - bin/setup
82
- - edem_oauth_user-0.1.0.gem
83
- - edem_oauth_user-0.1.1.gem
84
82
  - edem_oauth_user.gemspec
85
83
  - lib/edem_oauth_user.rb
86
84
  - lib/edem_oauth_user/find_or_create.rb
Binary file
Binary file