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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7bf096b7cac074f0438a1e9de58ef33a1e177e88
4
- data.tar.gz: 91000c7a3a18145736e00e6f3ff18c329db00c78
3
+ metadata.gz: d302858e2c849cfee6cf7e817b4e9bdd68709552
4
+ data.tar.gz: ba940f789719aeef4128c7fd166274a540222046
5
5
  SHA512:
6
- metadata.gz: ba38696727528d887afc776fc31406d40bc5fcd08e274faaccb517da900c5fbdd336f19234855d82ba9c67b47eb54b93996cb17c57ddb1cc562e130c5eafff35
7
- data.tar.gz: 3127485fd806d0ab197478b117e293490fd9a73b8048d18c0ae19dad907dd93c9d15d3e37bf2d96f92c379ee11cbdf92a4e36b5f5f2154c4fea562029b89e2ba
6
+ metadata.gz: 85a5143a2c766619d1d4268bb2a5e70e70af0c5219ddd672f75df602d9c5ec53f95577ac7428b11225be6d6df5583e7d35c34aca8025bb252fa90c825debbd9f
7
+ data.tar.gz: 3192b570a4bba9159c9b82597e508e00eccdde32e53be989c28705b9ba84589c2f96f23543bb352837daa388f47671fd6963d9cfda6a69f227b2fcd9bcfec2e9
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ *.gem
1
2
  /.bundle/
2
3
  /.yardoc
3
4
  /Gemfile.lock
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Firebase
2
2
  module Auth
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -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.0
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