firebase_dynamic_link 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +35 -0
- data/.gitignore +13 -0
- data/.rspec +3 -0
- data/.rubocop.yml +5 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +56 -0
- data/LICENSE.txt +21 -0
- data/README.md +112 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/firebase_dynamic_link.gemspec +34 -0
- data/lib/firebase_dynamic_link.rb +33 -0
- data/lib/firebase_dynamic_link/client.rb +57 -0
- data/lib/firebase_dynamic_link/version.rb +3 -0
- metadata +199 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7fedc0cce7ab9b161ea448867475ce543cc6bf46
|
4
|
+
data.tar.gz: a92bc557fda0e53c4c2baddc74e219101ba480bd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e61bfdf677aa3255f30a1a2c3bf3c78eec327790083d1e840a0733174c5f10334e89be4d2df4215342b8d912d0e03b2d9f9e3f754a0e7f5c183e1107810d47ec
|
7
|
+
data.tar.gz: f2e64d8006928d6d2b1b6a6d558e4ba8207fdeb4086a98c481b856281d0d034457fd5a52a90131a32fbbd5eeb741a5c4a73d549a2febe74585c9e48a1de8f135
|
data/.editorconfig
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
root = true
|
2
|
+
|
3
|
+
[*]
|
4
|
+
charset=utf-8
|
5
|
+
end_of_line=lf
|
6
|
+
insert_final_newline=false
|
7
|
+
indent_style=space
|
8
|
+
indent_size=4
|
9
|
+
|
10
|
+
[{rake,rails,rcov,spec,spork,cucumber,capfile,gemfile,rakefile,guardfile,isolate,vagrantfile,*.gemspec,*.jbuilder,*.prawn,*.rbw,*.thor,*.ru,*.rb,*.rake}]
|
11
|
+
indent_style=space
|
12
|
+
indent_size=2
|
13
|
+
|
14
|
+
[{*.feature,*.cucumber}]
|
15
|
+
indent_style=space
|
16
|
+
indent_size=2
|
17
|
+
|
18
|
+
[{*.yml,*.yaml}]
|
19
|
+
indent_style=space
|
20
|
+
indent_size=2
|
21
|
+
|
22
|
+
[*.{feature,rb}]
|
23
|
+
indent_style = space
|
24
|
+
indent_size = 2
|
25
|
+
end_of_line = lf
|
26
|
+
charset = utf-8
|
27
|
+
trim_trailing_whitespace = true
|
28
|
+
insert_final_newline = true
|
29
|
+
|
30
|
+
[*.{sh,markdown}]
|
31
|
+
indent_size = 4
|
32
|
+
|
33
|
+
[*.{md,markdown}]
|
34
|
+
trim_trailing_whitespace = false
|
35
|
+
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at saiqulhaq@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
firebase_dynamic_link (0.1.0)
|
5
|
+
dry-configurable (~> 0.7.0)
|
6
|
+
dry-core (~> 0.4.5)
|
7
|
+
faraday (~> 0.14.0)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
coderay (1.1.2)
|
13
|
+
concurrent-ruby (1.0.5)
|
14
|
+
diff-lcs (1.3)
|
15
|
+
dotenv (2.2.2)
|
16
|
+
dry-configurable (0.7.0)
|
17
|
+
concurrent-ruby (~> 1.0)
|
18
|
+
dry-core (0.4.5)
|
19
|
+
concurrent-ruby (~> 1.0)
|
20
|
+
faraday (0.14.0)
|
21
|
+
multipart-post (>= 1.2, < 3)
|
22
|
+
method_source (0.9.0)
|
23
|
+
multipart-post (2.0.0)
|
24
|
+
pry (0.11.3)
|
25
|
+
coderay (~> 1.1.0)
|
26
|
+
method_source (~> 0.9.0)
|
27
|
+
rake (10.5.0)
|
28
|
+
rspec (3.7.0)
|
29
|
+
rspec-core (~> 3.7.0)
|
30
|
+
rspec-expectations (~> 3.7.0)
|
31
|
+
rspec-mocks (~> 3.7.0)
|
32
|
+
rspec-core (3.7.1)
|
33
|
+
rspec-support (~> 3.7.0)
|
34
|
+
rspec-expectations (3.7.0)
|
35
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
36
|
+
rspec-support (~> 3.7.0)
|
37
|
+
rspec-mocks (3.7.0)
|
38
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
39
|
+
rspec-support (~> 3.7.0)
|
40
|
+
rspec-support (3.7.1)
|
41
|
+
vcr (4.0.0)
|
42
|
+
|
43
|
+
PLATFORMS
|
44
|
+
ruby
|
45
|
+
|
46
|
+
DEPENDENCIES
|
47
|
+
bundler (~> 1.16)
|
48
|
+
dotenv (~> 2.2, >= 2.2.2)
|
49
|
+
firebase_dynamic_link!
|
50
|
+
pry (~> 0.11.3)
|
51
|
+
rake (~> 10.0)
|
52
|
+
rspec (~> 3.0)
|
53
|
+
vcr (~> 4.0, >= 4.0.0)
|
54
|
+
|
55
|
+
BUNDLED WITH
|
56
|
+
1.16.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 M Saiqul Haq
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
# FirebaseDynamicLink
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/saiqulhaq/firebase_dynamic_link.svg?branch=master)](https://travis-ci.org/saiqulhaq/firebase_dynamic_link)
|
4
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/0e2629515335c72ef80d/maintainability)](https://codeclimate.com/github/saiqulhaq/firebase_dynamic_link/maintainability)
|
5
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/0e2629515335c72ef80d/test_coverage)](https://codeclimate.com/github/saiqulhaq/firebase_dynamic_link/test_coverage)
|
6
|
+
|
7
|
+
Opiniated Ruby Firebase Dynamic Links Short Links client
|
8
|
+
|
9
|
+
based on reference https://firebase.google.com/docs/reference/dynamic-links/link-shortener
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Add this line to your application's Gemfile:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
gem 'firebase_dynamic_link'
|
17
|
+
```
|
18
|
+
|
19
|
+
And then execute:
|
20
|
+
|
21
|
+
$ bundle
|
22
|
+
|
23
|
+
Or install it yourself as:
|
24
|
+
|
25
|
+
$ gem install firebase_dynamic_link
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
### Configure the HTTP client
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
FirebaseDynamicLink.configure do |config|
|
33
|
+
# the adapter should be supported by Faraday
|
34
|
+
# more info look at https://github.com/lostisland/faraday/tree/master/test/adapters
|
35
|
+
config.adapter = :httpclient
|
36
|
+
|
37
|
+
config.api_key = 'API_KEY'
|
38
|
+
|
39
|
+
config.default.suffix.option = 'SHORTEN' or 'UNGUESSABLE'
|
40
|
+
|
41
|
+
config.default.dynamic_link_domain = 'http://xyz.app.goo.gl'
|
42
|
+
end
|
43
|
+
|
44
|
+
client = FirebaseDynamicLink::Client.new
|
45
|
+
options = {
|
46
|
+
suffix_option: '' # to override default suffix default config
|
47
|
+
dynamic_link_domain: '' # to override default dynamic_link_domain default config
|
48
|
+
}
|
49
|
+
result = client.shorten_link(link, options)
|
50
|
+
# options argument is optional
|
51
|
+
|
52
|
+
```
|
53
|
+
|
54
|
+
if request successful, then the result should be like following hash object
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
{
|
58
|
+
:success=>true,
|
59
|
+
:link=>"https://--.app.goo.gl/ukph",
|
60
|
+
:preview_link=>"https://--.app.goo.gl/ukph?d=1",
|
61
|
+
:warning=>[
|
62
|
+
{
|
63
|
+
"warningCode"=>"UNRECOGNIZED_PARAM",
|
64
|
+
"warningMessage"=>"..."},
|
65
|
+
{
|
66
|
+
"warningCode"=>"..."
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"warningCode"=>"..."
|
70
|
+
}
|
71
|
+
],
|
72
|
+
:error_message=>nil,
|
73
|
+
:error_status=>nil,
|
74
|
+
:error_code=>nil
|
75
|
+
}
|
76
|
+
```
|
77
|
+
|
78
|
+
otherwise
|
79
|
+
|
80
|
+
```ruby
|
81
|
+
{ :success=>false,
|
82
|
+
:link=>nil,
|
83
|
+
:preview_link=>nil,
|
84
|
+
:warning=>nil,
|
85
|
+
:error_message=>"Long link is not parsable: ...",
|
86
|
+
:error_status=>"INVALID_ARGUMENT",
|
87
|
+
:error_code=>400
|
88
|
+
}
|
89
|
+
```
|
90
|
+
|
91
|
+
# NOTE
|
92
|
+
|
93
|
+
this gem only implemented to shorten long dynamic link til now, next version is supposed to
|
94
|
+
be able shorten a JSON object
|
95
|
+
|
96
|
+
## Development
|
97
|
+
|
98
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
99
|
+
|
100
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
101
|
+
|
102
|
+
## Contributing
|
103
|
+
|
104
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/saiqulhaq/firebase_dynamic_link. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
105
|
+
|
106
|
+
## License
|
107
|
+
|
108
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
109
|
+
|
110
|
+
## Code of Conduct
|
111
|
+
|
112
|
+
Everyone interacting in the FirebaseDynamicLink project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/saiqulhaq/firebase_dynamic_link/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "firebase_dynamic_link"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'firebase_dynamic_link/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'firebase_dynamic_link'
|
8
|
+
spec.version = FirebaseDynamicLink::VERSION
|
9
|
+
spec.authors = ['M Saiqul Haq']
|
10
|
+
spec.email = ['saiqulhaq@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = 'Ruby client for Firebase Dynamic Link service'
|
13
|
+
spec.description = 'Ruby client API for Firebase Dynamic Link'
|
14
|
+
spec.homepage = 'https://github.com/saiqulhaq/firebase_dynamic_link'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = 'exe'
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ['lib']
|
23
|
+
|
24
|
+
spec.add_runtime_dependency 'dry-core', '~> 0.4.5'
|
25
|
+
spec.add_runtime_dependency 'dry-configurable', '~> 0.7.0'
|
26
|
+
spec.add_runtime_dependency 'faraday', '~> 0.14.0'
|
27
|
+
|
28
|
+
spec.add_development_dependency 'vcr', '~> 4.0', '>= 4.0.0'
|
29
|
+
spec.add_development_dependency 'dotenv', '~> 2.2', '>= 2.2.2'
|
30
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
31
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
32
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
33
|
+
spec.add_development_dependency 'pry', '~> 0.11.3'
|
34
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'dry-configurable'
|
2
|
+
require 'faraday'
|
3
|
+
require 'firebase_dynamic_link/client'
|
4
|
+
require 'firebase_dynamic_link/version'
|
5
|
+
|
6
|
+
module FirebaseDynamicLink
|
7
|
+
extend Dry::Configurable
|
8
|
+
|
9
|
+
class InvalidConfig < StandardError; end
|
10
|
+
|
11
|
+
# You can change it to
|
12
|
+
# FirebaseDynamicLink.adapter = :patron
|
13
|
+
# FirebaseDynamicLink.adapter = :httpclient
|
14
|
+
# FirebaseDynamicLink.adapter = :net_http_persistent
|
15
|
+
#
|
16
|
+
# And get the value by
|
17
|
+
# FirebaseDynamicLink.adapter
|
18
|
+
setting :adapter, Faraday.default_adapter
|
19
|
+
|
20
|
+
setting :api_key
|
21
|
+
|
22
|
+
# This domain will be used if dynamic_link_domain setting is nil
|
23
|
+
# it raises error if both of settings are nil
|
24
|
+
setting :default do
|
25
|
+
# Firebase dynamic link domain
|
26
|
+
setting(:dynamic_link_domain)
|
27
|
+
setting :suffix do
|
28
|
+
setting(:option, 'UNGUESSABLE') { |value|
|
29
|
+
%w(SHORT UNGUESSABLE).include?(value) ? value : raise(FirebaseDynamicLink::InvalidConfig, 'default suffix option config is not valie')
|
30
|
+
}
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'dry-core'
|
2
|
+
|
3
|
+
module FirebaseDynamicLink
|
4
|
+
class Client
|
5
|
+
attr_accessor :dynamic_link_domain
|
6
|
+
|
7
|
+
# on succeed
|
8
|
+
#
|
9
|
+
# on failure
|
10
|
+
# status >= 400
|
11
|
+
# body {"error"=>{"code"=>400, "message"=>"Long link is not parsable: https://k4mu4.app.goo.gl?link=abcde [https://firebase.google.com/docs/dynamic-links/rest#create_a_short_link_from_parameters]", "status"=>"INVALID_ARGUMENT"}}
|
12
|
+
def shorten_link(link, options = {})
|
13
|
+
suffix_option = options.delete(:suffix_option)
|
14
|
+
suffix_option ||= config.default.suffix.option
|
15
|
+
dynamic_link_domain = options.delete(:dynamic_link_domain)
|
16
|
+
dynamic_link_domain ||= config.default.dynamic_link_domain || raise(FirebaseDynamicLink::InvalidConfig, 'Dynamic link domain is empty')
|
17
|
+
link = "#{dynamic_link_domain}?link=#{link}"
|
18
|
+
response = connection.post(nil, {
|
19
|
+
longDynamicLink: link,
|
20
|
+
suffix: {
|
21
|
+
option: suffix_option
|
22
|
+
}
|
23
|
+
}.to_json)
|
24
|
+
body = JSON.parse(response.body)
|
25
|
+
has_error = body.key?('error')
|
26
|
+
{
|
27
|
+
success: !has_error,
|
28
|
+
link: has_error ? nil : body['shortLink'],
|
29
|
+
preview_link: has_error ? nil : body['previewLink'],
|
30
|
+
warning: has_error ? nil : body['warning'],
|
31
|
+
error_message: has_error ? body['error']['message'] : nil,
|
32
|
+
error_status: has_error ? body['error']['status'] : nil,
|
33
|
+
error_code: has_error ? body['error']['code'] : nil
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
def shorten_object(_json_object)
|
38
|
+
raise NotImplementedError
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def connection
|
44
|
+
con = Faraday::Connection.new(url: end_point,
|
45
|
+
headers: { 'Content-Type' => 'application/json' })
|
46
|
+
con
|
47
|
+
end
|
48
|
+
|
49
|
+
def config
|
50
|
+
::FirebaseDynamicLink.config
|
51
|
+
end
|
52
|
+
|
53
|
+
def end_point
|
54
|
+
"https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=#{config.api_key}"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
metadata
ADDED
@@ -0,0 +1,199 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: firebase_dynamic_link
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- M Saiqul Haq
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-04-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: dry-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.4.5
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.4.5
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: dry-configurable
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.7.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.7.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.14.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.14.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: vcr
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '4.0'
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 4.0.0
|
65
|
+
type: :development
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - "~>"
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '4.0'
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 4.0.0
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: dotenv
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '2.2'
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 2.2.2
|
85
|
+
type: :development
|
86
|
+
prerelease: false
|
87
|
+
version_requirements: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '2.2'
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 2.2.2
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: bundler
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - "~>"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '1.16'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '1.16'
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: rake
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '10.0'
|
116
|
+
type: :development
|
117
|
+
prerelease: false
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '10.0'
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: rspec
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - "~>"
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '3.0'
|
130
|
+
type: :development
|
131
|
+
prerelease: false
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - "~>"
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '3.0'
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: pry
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "~>"
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: 0.11.3
|
144
|
+
type: :development
|
145
|
+
prerelease: false
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - "~>"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: 0.11.3
|
151
|
+
description: Ruby client API for Firebase Dynamic Link
|
152
|
+
email:
|
153
|
+
- saiqulhaq@gmail.com
|
154
|
+
executables: []
|
155
|
+
extensions: []
|
156
|
+
extra_rdoc_files: []
|
157
|
+
files:
|
158
|
+
- ".editorconfig"
|
159
|
+
- ".gitignore"
|
160
|
+
- ".rspec"
|
161
|
+
- ".rubocop.yml"
|
162
|
+
- ".travis.yml"
|
163
|
+
- CODE_OF_CONDUCT.md
|
164
|
+
- Gemfile
|
165
|
+
- Gemfile.lock
|
166
|
+
- LICENSE.txt
|
167
|
+
- README.md
|
168
|
+
- Rakefile
|
169
|
+
- bin/console
|
170
|
+
- bin/setup
|
171
|
+
- firebase_dynamic_link.gemspec
|
172
|
+
- lib/firebase_dynamic_link.rb
|
173
|
+
- lib/firebase_dynamic_link/client.rb
|
174
|
+
- lib/firebase_dynamic_link/version.rb
|
175
|
+
homepage: https://github.com/saiqulhaq/firebase_dynamic_link
|
176
|
+
licenses:
|
177
|
+
- MIT
|
178
|
+
metadata: {}
|
179
|
+
post_install_message:
|
180
|
+
rdoc_options: []
|
181
|
+
require_paths:
|
182
|
+
- lib
|
183
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
189
|
+
requirements:
|
190
|
+
- - ">="
|
191
|
+
- !ruby/object:Gem::Version
|
192
|
+
version: '0'
|
193
|
+
requirements: []
|
194
|
+
rubyforge_project:
|
195
|
+
rubygems_version: 2.5.2
|
196
|
+
signing_key:
|
197
|
+
specification_version: 4
|
198
|
+
summary: Ruby client for Firebase Dynamic Link service
|
199
|
+
test_files: []
|