rest-firebase 1.0.2 → 1.0.3

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: 30528ff1a743d8b926b614a07e37aef0e2593de2
4
- data.tar.gz: 051280a19b7709bf1b4abb8186df4047f66e2198
3
+ metadata.gz: 8b3abd41266838b60199410b6ac1bc94cba83482
4
+ data.tar.gz: 2b94610d3db1ca7149613ce7f0c475ffc1595270
5
5
  SHA512:
6
- metadata.gz: 42d3cbf67e88bb66b91025a5f5ec8696987c6de0b62a2221c795ef45f7907e144b428d406b2c9b43b0c9b7d775cfceed5d86eb47ae7293d43b830e71cd0febd2
7
- data.tar.gz: a52a804319972e6a5896cb95b38a263c8dde1370366588756c603431b7f9a94765e7451e1a04ccd0f02ab3501961d99b576b6f6449e5acddc55e63c77fc2ddb3
6
+ metadata.gz: 80d3b15e2c4a5540d421643df0c98837b89cc79d523aed558f7edfeb4723d7c449c98e5085943818a0aa84f1e825dc4bbb8d0793c159a603d2d87e07685c9d4e
7
+ data.tar.gz: fab331037d2b0a0e7470ecb4e3bfb10c7c1f97895ed0522740874516076e82a0564b1c34ac0f5d1cf5f2cc7a78614fb58f0a6ece49ff902af50b7eb32cc790a4
data/CHANGES.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # CHANGES
2
2
 
3
+ ## rest-firebase 1.0.3 -- 2015-11-16
4
+
5
+ ### Bugs fixed
6
+
7
+ * Raise the default `max_redirects` from 1 to 5 because Firebase introduced
8
+ an extra redirect for EventSource. 2 is enough in theory but to make it
9
+ more future compatible, we set the default to 5 for now. If Firebase
10
+ really needs more than 5 redirects, you could also workaround this by
11
+ setting `max_redirects` to another number while setting up the client.
12
+ For example:
13
+
14
+ ``` ruby
15
+ client = RestFirebase.new(:max_redirects => 10)
16
+ # or
17
+ client = RestFirebase.new
18
+ client.max_redirects = 10
19
+ ```
20
+
21
+ This works for any version of rest-firebase. Thanks @chanibarin
22
+ See: <https://github.com/CodementorIO/rest-firebase/pull/7>
23
+
3
24
  ## rest-firebase 1.0.2 -- 2015-06-12
4
25
 
5
26
  * Fixed a bug where it would try to encode JSON twice upon retrying.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # rest-firebase [![Build Status](https://secure.travis-ci.org/CodementorIO/rest-firebase.png?branch=master)](http://travis-ci.org/CodementorIO/rest-firebase) [![Coverage Status](https://coveralls.io/repos/CodementorIO/rest-firebase/badge.png)](https://coveralls.io/r/CodementorIO/rest-firebase)
1
+ # rest-firebase [![Build Status](https://secure.travis-ci.org/CodementorIO/rest-firebase.png?branch=master)](http://travis-ci.org/CodementorIO/rest-firebase) [![Coverage Status](https://coveralls.io/repos/CodementorIO/rest-firebase/badge.png)](https://coveralls.io/r/CodementorIO/rest-firebase) [![Join the chat at https://gitter.im/CodementorIO/rest-firebase](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CodementorIO/rest-firebase)
2
2
 
3
3
  by [Codementor][]
4
4
 
@@ -211,6 +211,7 @@ If you're using unicorn, you probably want to put that in the config.
211
211
  ## CONTRIBUTORS:
212
212
 
213
213
  * Lin Jen-Shin (@godfat)
214
+ * Yoshihiro Ibayashi (@chanibarin)
214
215
 
215
216
  ## LICENSE:
216
217
 
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 = '1.0.2'
13
+ s.version = '1.0.3'
14
14
  s.homepage = 'https://github.com/CodementorIO/rest-firebase'
15
15
 
16
16
  s.authors = ['Codementor', 'Lin Jen-Shin (godfat)']
@@ -13,7 +13,7 @@ RestFirebase = RC::Builder.client(:d, :secret, :auth, :auth_ttl, :iat) do
13
13
 
14
14
  use RC::Retry , 0, RC::Retry::DefaultRetryExceptions
15
15
  use RC::Timeout , 10
16
- use RC::FollowRedirect, 1
16
+ use RC::FollowRedirect, 5
17
17
  use RC::ErrorHandler , lambda{ |env| RestFirebase::Error.call(env) }
18
18
  use RC::ErrorDetectorHttp
19
19
  use RC::JsonResponse , true
@@ -1,16 +1,16 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: rest-firebase 1.0.2 ruby lib
2
+ # stub: rest-firebase 1.0.3 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "rest-firebase"
6
- s.version = "1.0.2"
6
+ s.version = "1.0.3"
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 = "2015-06-12"
13
+ s.date = "2015-11-16"
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 = [
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
  "test/test_api.rb"]
33
33
  s.homepage = "https://github.com/CodementorIO/rest-firebase"
34
34
  s.licenses = ["Apache License 2.0"]
35
- s.rubygems_version = "2.4.8"
35
+ s.rubygems_version = "2.5.0"
36
36
  s.summary = "Ruby Firebase REST API client built on top of [rest-core][]."
37
37
  s.test_files = ["test/test_api.rb"]
38
38
 
@@ -79,6 +79,11 @@ module Gemgem
79
79
  end
80
80
 
81
81
  def gem_check
82
+ unless git('status', '--porcelain').empty?
83
+ puts("\e[35mWorking copy is not clean.\e[0m")
84
+ exit(3)
85
+ end
86
+
82
87
  ver = spec.version.to_s
83
88
 
84
89
  if ENV['VERSION'].nil?
@@ -26,6 +26,13 @@ Pork::API.describe RestFirebase do
26
26
  firebase.get('https://a').should.eq true
27
27
  end
28
28
 
29
+ would 'get true with callback' do
30
+ stub_request(:get, path).to_return(:body => 'true')
31
+ firebase.get('https://a') do |r|
32
+ r.should.eq true
33
+ end.wait
34
+ end
35
+
29
36
  would 'get with query' do
30
37
  stub_request(:get, "#{path}&orderBy=%22date%22&limitToFirst=1").
31
38
  to_return(:body => json)
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: 1.0.2
4
+ version: 1.0.3
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: 2015-06-12 00:00:00.000000000 Z
12
+ date: 2015-11-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-core
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  version: '0'
72
72
  requirements: []
73
73
  rubyforge_project:
74
- rubygems_version: 2.4.8
74
+ rubygems_version: 2.5.0
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: Ruby Firebase REST API client built on top of [rest-core][].