rest-firebase 0.9.3 → 0.9.4

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: 958b43ae367f1f450bc52b507ef98a72216a0a07
4
- data.tar.gz: 6c37c91216017e9b2c35d8f97607d055a9336c4a
3
+ metadata.gz: 1f2db17b6fa83221766213702a434d81bb5edbcd
4
+ data.tar.gz: 5a744aaf2246b0bf036e98caf70bd8a2ed7fdb8c
5
5
  SHA512:
6
- metadata.gz: 336e0c017f944ea20b2b006229694d61efe40abf157312efdbaee219291cbfb18bbc95513182b15c6a9ea85e46d290835564b03e5733c4d3bf0e9998c89004d5
7
- data.tar.gz: ee75ad502085b86c6fc675cf8c8ce8e72b9a068511970fd59289ae6e3712229e427f7028259c98ce0aabea99d65ff962f877ec407999465f33d74832d69ee7cb
6
+ metadata.gz: 5766c28549a550d4f36c7ad1fc377c085eeea3d91b823bd4f7b9dd7980f050fd62b8fe5d102b232df9cffa69342e92f4c48a55bff6496dabaeeb6029e6febdd6
7
+ data.tar.gz: 5d64c2d8904495049ec0a25b8b49841c1152587e309f77d45a94ea2270acccb6052bc38945b8bf2571d4d197c26fb421592af24ea2e747fff54236402c879c68
data/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGES
2
2
 
3
+ ## rest-firebase 0.9.4 -- 2014-09-01
4
+
5
+ * Should really properly refresh the auth (query)
6
+ * From now on you're not allowed to change the value of query.
7
+
3
8
  ## rest-firebase 0.9.3 -- 2014-08-25
4
9
 
5
10
  * Adopted rest-core 3.3.0
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.3'
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
@@ -1,16 +1,16 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: rest-firebase 0.9.3 ruby lib
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.3"
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-08-25"
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.3
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-08-25 00:00:00.000000000 Z
12
+ date: 2014-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-core