firebase-ruby 0.3.0 → 0.3.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
  SHA256:
3
- metadata.gz: c81422955349a239c73df7add0f495be525dee6df19fb99c07fcc7a97ad5ea9b
4
- data.tar.gz: c28b48f45899cc15a405baf006addb187eb80379d144522f9412ec5c3244daac
3
+ metadata.gz: 4d8bdd33ef9631e94e965401224f4db530ec602a7cc937a59b8ad9b7b5c49d44
4
+ data.tar.gz: 80dc1825a35382944ecab8c19e8b61be66fbda26f2dcf4662696247aba45989a
5
5
  SHA512:
6
- metadata.gz: 1c81dbcaef8b12f675a85d07488c6979161d2a2bd3bdada1e5e3fd69a6b38745a396f44c80bda7e88a00b310ee7febde6f300025378c8614d4f3764b284bcf3f
7
- data.tar.gz: 267c6bdbef1be804ddcccd6c20d534fa6f0a874751fa0479c240079933da0d9ea4cc0a22931fae3ebfb12551f6ff075f8849a0e2627ef56e150afca770372663
6
+ metadata.gz: e3fb302a31039871d75dd1890718a6570fca57bd079f563f7e8197b4f4f1a55ef70532a1490c98ef2e30ad227787491fc3cb947a889adc85e0a677325115e42c
7
+ data.tar.gz: '0538e446b43ec656d5ddef7e1461f1848d7f3a2c8eb2ac540ce3a5a71644e49f505153a0598f5f8254023bde9fe68cc29fe6badf2d256dcb6aff6079368c12d5'
data/README.md CHANGED
@@ -2,9 +2,19 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/firebase-ruby.svg)](http://badge.fury.io/rb/firebase-ruby) [![Code Climate](https://codeclimate.com/github/kenjij/firebase-ruby/badges/gpa.svg)](https://codeclimate.com/github/kenjij/firebase-ruby) [![security](https://hakiri.io/github/kenjij/firebase-ruby/master.svg)](https://hakiri.io/github/kenjij/firebase-ruby/master)
4
4
 
5
- A pure Ruby library for [Firebase Realtime Database](https://firebase.google.com/products/database/) [REST API](https://firebase.google.com/docs/reference/rest/database/) which has only one external dependancy: [jwt](http://jwt.github.io/ruby-jwt/). `firebase-ruby` uses Ruby's built-in Net::HTTP for all HTTP access.
5
+ A pure Ruby library for [Firebase Realtime Database](https://firebase.google.com/products/database/) [REST API](https://firebase.google.com/docs/reference/rest/database/) which has only one external dependency: [jwt](http://jwt.github.io/ruby-jwt/). `firebase-ruby` uses Ruby's built-in Net::HTTP for all HTTP access.
6
6
 
7
- ## CLI: fbrb
7
+ ## Getting Started
8
+
9
+ ## Firebase Realtime Database
10
+
11
+ Firebase SDK makes it easy to work with Realtime Database. However, on the server-side you you'll likely have to work with the REST API directly, and on top of this you will need to deal with OAuth, which can get complicated in a server environment.
12
+
13
+ To use firebase-ruby, you'll need a [Service Account and its Private Key](https://firebase.google.com/docs/database/rest/auth#generate_an_access_token). This needs to be in JSON format. Now, you have two ways to use it.
14
+
15
+ _See [Access Token](#oauth-20-access-token) for more details on that._
16
+
17
+ ## Usage 1) CLI: fbrb
8
18
 
9
19
  This gem has a built-in command `fbrb` as an example use and for quick testing.
10
20
 
@@ -14,7 +24,7 @@ fbrb -k privatekey.json /
14
24
 
15
25
  This will download the entire database in JSON format. By using the private key JSON file provided via Firebase console when creating a service account, necessary information such as project ID, URL, credentials are automatically applied.
16
26
 
17
- ## Using In An App
27
+ ## Usage 2) In Your App
18
28
 
19
29
  ```ruby
20
30
  require 'firebase-ruby'
@@ -53,6 +63,10 @@ db.patch('/users/jack/name', {last: "Jones"})
53
63
  db.delete('/users/jack/name/last')
54
64
  ```
55
65
 
66
+ ## AWS Lambda Layers
67
+
68
+ Trying to use it in a Lambda function but lost figuring out how to install gems? See [firebase-lambda-layer](https://github.com/kenjij/firebase-lambda-layer).
69
+
56
70
  ## OAuth 2.0 Access Token
57
71
 
58
72
  Using the given credentials, `firebase-ruby` will automatically retrieve the [access token](https://firebase.google.com/docs/reference/rest/database/user-auth) from Google's server. The token is valid for 1 hour but a new token will be fetched right before it expires.
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.authors = ['Ken J.']
9
9
  s.email = ['kenjij@gmail.com']
10
10
  s.summary = %q{Pure simple Ruby based Firebase REST library}
11
- s.description = %q{Firebase REST library written in pure Ruby without external dependancy.}
11
+ s.description = %q{A pure Ruby server-side library for Firebase Realtime Database with only one external dependency: jwt.}
12
12
  s.homepage = 'https://github.com/kenjij/firebase-ruby'
13
13
  s.license = 'MIT'
14
14
 
@@ -16,6 +16,6 @@ Gem::Specification.new do |s|
16
16
  s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
17
  s.require_paths = ['lib']
18
18
 
19
- s.required_ruby_version = '>= 2.0'
19
+ s.required_ruby_version = '>= 2.1'
20
20
  s.add_runtime_dependency 'jwt', '~> 2.2'
21
21
  end
@@ -1,5 +1,5 @@
1
1
  module Firebase
2
2
 
3
- Version = '0.3.0'
3
+ Version = '0.3.1'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firebase-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken J.
@@ -24,7 +24,8 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.2'
27
- description: Firebase REST library written in pure Ruby without external dependancy.
27
+ description: 'A pure Ruby server-side library for Firebase Realtime Database with
28
+ only one external dependency: jwt.'
28
29
  email:
29
30
  - kenjij@gmail.com
30
31
  executables:
@@ -56,7 +57,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
56
57
  requirements:
57
58
  - - ">="
58
59
  - !ruby/object:Gem::Version
59
- version: '2.0'
60
+ version: '2.1'
60
61
  required_rubygems_version: !ruby/object:Gem::Requirement
61
62
  requirements:
62
63
  - - ">="