rest-firebase 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/Rakefile +1 -1
- data/lib/rest-firebase.rb +5 -1
- data/rest-firebase.gemspec +3 -3
- data/test/test_api.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f2db17b6fa83221766213702a434d81bb5edbcd
|
4
|
+
data.tar.gz: 5a744aaf2246b0bf036e98caf70bd8a2ed7fdb8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5766c28549a550d4f36c7ad1fc377c085eeea3d91b823bd4f7b9dd7980f050fd62b8fe5d102b232df9cffa69342e92f4c48a55bff6496dabaeeb6029e6febdd6
|
7
|
+
data.tar.gz: 5d64c2d8904495049ec0a25b8b49841c1152587e309f77d45a94ea2270acccb6052bc38945b8bf2571d4d197c26fb421592af24ea2e747fff54236402c879c68
|
data/CHANGES.md
CHANGED
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ $LOAD_PATH.unshift(File.expand_path("#{dir}/rest-core/lib"))
|
|
10
10
|
|
11
11
|
Gemgem.init(dir) do |s|
|
12
12
|
s.name = 'rest-firebase'
|
13
|
-
s.version = '0.9.
|
13
|
+
s.version = '0.9.4'
|
14
14
|
s.homepage = 'https://github.com/CodementorIO/rest-firebase'
|
15
15
|
|
16
16
|
s.authors = ['Codementor', 'Lin Jen-Shin (godfat)']
|
data/lib/rest-firebase.rb
CHANGED
@@ -99,9 +99,12 @@ module RestFirebase::Client
|
|
99
99
|
"#{input}.#{base64url(Hmac.sha256(secret, input))}"
|
100
100
|
end
|
101
101
|
|
102
|
+
def query
|
103
|
+
{:auth => auth}
|
104
|
+
end
|
105
|
+
|
102
106
|
private
|
103
107
|
def base64url str; [str].pack('m').tr('+/', '-_'); end
|
104
|
-
def default_query ; {:auth => auth}; end
|
105
108
|
def default_auth ; generate_auth ; end
|
106
109
|
def default_auth_ttl; 82800 ; end
|
107
110
|
def default_iat ; Time.now.to_i ; end
|
@@ -114,4 +117,5 @@ end
|
|
114
117
|
class RestFirebase
|
115
118
|
include RestFirebase::Client
|
116
119
|
self.event_source_class = EventSource
|
120
|
+
const_get(:Struct).send(:remove_method, :query=)
|
117
121
|
end
|
data/rest-firebase.gemspec
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: rest-firebase 0.9.
|
2
|
+
# stub: rest-firebase 0.9.4 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "rest-firebase"
|
6
|
-
s.version = "0.9.
|
6
|
+
s.version = "0.9.4"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib"]
|
10
10
|
s.authors = [
|
11
11
|
"Codementor",
|
12
12
|
"Lin Jen-Shin (godfat)"]
|
13
|
-
s.date = "2014-
|
13
|
+
s.date = "2014-09-01"
|
14
14
|
s.description = "Ruby Firebase REST API client built on top of [rest-core][].\n\n[rest-core]: https://github.com/godfat/rest-core"
|
15
15
|
s.email = ["help@codementor.io"]
|
16
16
|
s.files = [
|
data/test/test_api.rb
CHANGED
@@ -61,13 +61,15 @@ SSE
|
|
61
61
|
|
62
62
|
would 'refresh token' do
|
63
63
|
mock(Time).now{ Time.at(0) }
|
64
|
-
auth = firebase.auth
|
64
|
+
auth, query = firebase.auth, firebase.query
|
65
|
+
query[:auth].should.eq auth
|
65
66
|
Muack.verify(Time)
|
66
67
|
stub(Time).now{ Time.at(86400) }
|
67
68
|
|
68
69
|
stub_request(:get, path).to_return(:body => 'true')
|
69
70
|
firebase.get('https://a').should.eq true
|
70
|
-
firebase.auth.should.not.eq auth
|
71
|
+
firebase.auth .should.not.eq auth
|
72
|
+
firebase.query.should.not.eq query
|
71
73
|
end
|
72
74
|
|
73
75
|
define_method :check do |status, klass|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest-firebase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Codementor
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-09-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-core
|