motion-firebase 3.1.8 → 3.2.0

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: 6503d5363ea7180e4da30068867a728b0102e2c0
4
- data.tar.gz: 623d65d158914138c6222fc314cdbf8bf5c8d729
3
+ metadata.gz: f7916878369e5e493e2874e725c8d5e89635ba78
4
+ data.tar.gz: fa02c1e1c8e4c11b3dfef0bb26de4984aa9254c0
5
5
  SHA512:
6
- metadata.gz: 51bea9bed0381ff25f5456545f233d28ebce0abcee1d8599013d806ea17d857e18fc495d141ea122193a824568a46eebb1580fd7613dfb36abe773649a73fecf
7
- data.tar.gz: 985283b3ad92a0693c89175946659b4215bdd272a2f1fb8b1ef141ae50e8d4d009ce58ea30f6e150990fb2a1aa721a05cd76485e42c83dbdba40bfc3e74831e5
6
+ metadata.gz: 60af8daccc616c662025cc7bb2ae4072db4e3ab1e7165e51ef01be3fb16b11c426eaadd594ce1ab3a752a091fff6f0fb48e89758ed016763d3df7769237ed7e1
7
+ data.tar.gz: 1de7b9df7bf2e79620a297c886162d6664824cb65adb8e2ecf5c91f09f94c9ffdab6912f32f97e9cc0cf88c69e01facc22c26f837c3c431c8ccf7242347af285
data/README.md CHANGED
@@ -351,6 +351,7 @@ Firebase.remove_user(email: 'hello@example.com', password: '12345') { |error, au
351
351
  Firebase.login(email: 'hello@example.com', password: '12345') { |error, auth_data| }
352
352
  Firebase.login_anonymously { |error, auth_data| }
353
353
  Firebase.update_user(email: 'hello@example.com', old_password: '12345', new_password: '54321') { |error, success| }
354
+ Firebase.update_user_email(email: 'hello@example.com', password: '12345', new_email: 'hellp2@example.com') { |error, success| }
354
355
 
355
356
  auth_data.uid # is a globally unique user identifier
356
357
  auth_data.token # can be stored (in a keychain!) to authenticate the same user again later
@@ -118,6 +118,19 @@ class Firebase
118
118
  changePasswordForUser(email, fromOld: old_password, toNew: new_password, withCompletionBlock: block)
119
119
  end
120
120
 
121
+ def self.update_user_email(credentials, &block)
122
+ Firebase.new.update_user_email(credentials, &block)
123
+ end
124
+ def update_user_email(credentials, &block)
125
+ raise ":email is required in #{__method__}" unless credentials.key?(:email)
126
+ raise ":password is required in #{__method__}" unless credentials.key?(:password)
127
+ raise ":new_email is required in #{__method__}" unless credentials.key?(:new_email)
128
+ email = credentials[:email]
129
+ password = credentials[:password]
130
+ new_email = credentials[:new_email]
131
+ changeEmailForUser(email, password: password, toNewEmail: new_email, withCompletionBlock: block)
132
+ end
133
+
121
134
  def self.send_password_reset(credentials, &block)
122
135
  Firebase.new.send_password_reset(credentials, &block)
123
136
  end
@@ -1,6 +1,6 @@
1
1
  module Motion
2
2
  module Firebase
3
- Version = '3.1.8' # motion-firebase gem version
3
+ Version = '3.2.0' # motion-firebase gem version
4
4
  SdkVersion = '2.4.1' # firebase framework version
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-firebase
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.8
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin T.A. Gray
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-08 00:00:00.000000000 Z
11
+ date: 2015-11-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Adds more rubyesque methods to the built-in classes.