firebase-auth 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/firebase/auth.rb +2 -1
- data/lib/firebase/auth/version.rb +1 -1
- data/lib/firebase/configuration.rb +19 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d302858e2c849cfee6cf7e817b4e9bdd68709552
|
4
|
+
data.tar.gz: ba940f789719aeef4128c7fd166274a540222046
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85a5143a2c766619d1d4268bb2a5e70e70af0c5219ddd672f75df602d9c5ec53f95577ac7428b11225be6d6df5583e7d35c34aca8025bb252fa90c825debbd9f
|
7
|
+
data.tar.gz: 3192b570a4bba9159c9b82597e508e00eccdde32e53be989c28705b9ba84589c2f96f23543bb352837daa388f47671fd6963d9cfda6a69f227b2fcd9bcfec2e9
|
data/.gitignore
CHANGED
data/lib/firebase/auth.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'firebase/auth/version'
|
2
2
|
require 'firebase/auth/config'
|
3
|
+
require 'firebase/configuration'
|
3
4
|
require 'rest-client'
|
4
5
|
require 'json'
|
5
6
|
|
@@ -8,7 +9,7 @@ module Firebase
|
|
8
9
|
class Client
|
9
10
|
attr_reader :api_key
|
10
11
|
|
11
|
-
def initialize(api_key)
|
12
|
+
def initialize(api_key=Firebase.configuration.api_key)
|
12
13
|
raise ArgumentError.new('Missing api_key') if (api_key.nil? || api_key.empty?)
|
13
14
|
|
14
15
|
@api_key = api_key
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Firebase
|
2
|
+
class << self
|
3
|
+
attr_accessor :configuration
|
4
|
+
end
|
5
|
+
|
6
|
+
def self.configure
|
7
|
+
self.configuration ||= Configuration.new
|
8
|
+
yield(configuration)
|
9
|
+
end
|
10
|
+
|
11
|
+
class Configuration
|
12
|
+
# The API key for your project.
|
13
|
+
attr_accessor :api_key
|
14
|
+
|
15
|
+
def initialize
|
16
|
+
@api_key = nil
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firebase-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Huy Hùng
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- lib/firebase/auth.rb
|
88
88
|
- lib/firebase/auth/config.rb
|
89
89
|
- lib/firebase/auth/version.rb
|
90
|
+
- lib/firebase/configuration.rb
|
90
91
|
homepage: https://github.com/hungdh0x5e/firebase-auth
|
91
92
|
licenses:
|
92
93
|
- MIT
|