ffs 0.1.0
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 +7 -0
- data/.gitignore +9 -0
- data/.rubocop.yml +6 -0
- data/Gemfile +4 -0
- data/README.md +169 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/ffs.gemspec +27 -0
- data/lib/ffs.rb +15 -0
- data/lib/ffs/configuration.rb +10 -0
- data/lib/ffs/share.rb +115 -0
- data/lib/ffs/version.rb +3 -0
- data/lib/generators/ffs/install_generator.rb +18 -0
- data/lib/generators/templates/README +16 -0
- data/lib/generators/templates/initializer.rb +68 -0
- metadata +106 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: c6b2cff7f5daf06156fabe219da66264de966d77
|
|
4
|
+
data.tar.gz: c480256002500ddad9688520dde5517853ccd9c2
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: f930cdcb0188056c4b6f6ad81734c01af2f4ce4adec064c6f8aa3b2664e2e6bbbed58e4424bb61dd576f7bfda34db982ad1bf67907098786ba7f33c367894179
|
|
7
|
+
data.tar.gz: 17841838a3ed677bda01b7bfcaaa65b3487db823beb95aca415958a7110bfa0c19848d382b66b457638cd08182a5e2042a0e980b2ac74a709b15c12eb4fefa8b
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# FFS
|
|
2
|
+
|
|
3
|
+
FFS provides a quick and flexible way to get up and running with
|
|
4
|
+
[Firebase Dynamic Links](https://firebase.google.com/docs/dynamic-links/)
|
|
5
|
+
through a minimal API.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
FFS works with Rails 4.1 onwards. Add it to your Gemfile with:
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
gem 'ffs'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Then run `bundle install`.
|
|
16
|
+
|
|
17
|
+
Next, run the generator to create the initializer:
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
$ rails generate f_f_s:install
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Once the generator completes, you will be presented with instructions to
|
|
24
|
+
complete the setup of FFS. You will need to set up your application's settings
|
|
25
|
+
in `config/initializers/ffs.rb`. A minimal configuration utilizing Firebase's
|
|
26
|
+
link shortening and accommodating Android and iOS can be seen here:
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
FFS.configure do |config|
|
|
30
|
+
# ==> General configuration
|
|
31
|
+
config.firebase_api_key = 'my_firebase_api_key'
|
|
32
|
+
config.dynamic_link_domain = 'mydomain.app.goo.gl'
|
|
33
|
+
config.suffix = 'SHORT'
|
|
34
|
+
|
|
35
|
+
# ==> Android configuration
|
|
36
|
+
config.android_package_name = 'my_package_name'
|
|
37
|
+
|
|
38
|
+
# ==> iOS configuration
|
|
39
|
+
config.ios_bundle_id = 'my_bundle_id'
|
|
40
|
+
config.ios_app_store_id = 'my_app_store_id'
|
|
41
|
+
end
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
You should utilize environment variables for any API keys and other sensitive
|
|
45
|
+
information you don't want made public.
|
|
46
|
+
For a full explanation of each configuration option, check the
|
|
47
|
+
[Firebase dynamic links documentation](https://firebase.google.com/docs/reference/dynamic-links/link-shortener).
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
FFS provides a single public method to generate your dynamic link. After customizing the initializer to your needs, create a new instance of `FFS::Share`:
|
|
52
|
+
|
|
53
|
+
```ruby
|
|
54
|
+
ffs = FFS::Share.new
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Next, call `#generate_dynamic_link`, which takes two arguments: A hash containing basic information to be displayed when your link is shared to a social network, and an optional hash to turn features off and on, depending on your needs. Here's an example utilizing `#generate_dynamic_link`'s default options:
|
|
58
|
+
|
|
59
|
+
```ruby
|
|
60
|
+
link_info = {
|
|
61
|
+
link: 'www.example.com/user/1',
|
|
62
|
+
socialMetaTagInfo: {
|
|
63
|
+
socialTitle: 'My Social Media Title',
|
|
64
|
+
socialDescription: 'Description of the thing being shared.',
|
|
65
|
+
socialImageLink: 'http://i.imgur.com/d5ByxBl.png'
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
ffs.generate_dynamic_link(link_info)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This returns a hash containing the short link and a link to view a flowchart of
|
|
73
|
+
where the link will take you in a variety of situations.
|
|
74
|
+
|
|
75
|
+
```ruby
|
|
76
|
+
{
|
|
77
|
+
"shortLink": "https://yourdomain.app.goo.gl/randomString",
|
|
78
|
+
"previewLink": "https://yourdomain.app.goo.gl/?link=http://www.example.com&apn=com.example.hello"
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+

|
|
83
|
+
|
|
84
|
+
### Advanced Usage
|
|
85
|
+
|
|
86
|
+
Imagine we have this model:
|
|
87
|
+
|
|
88
|
+
```ruby
|
|
89
|
+
class Author < ApplicationRecord
|
|
90
|
+
validates :name, :bio, :picture
|
|
91
|
+
end
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
We want to pass this object to FFS to create a shareable link to post to Twitter.
|
|
95
|
+
Since `#generate_dynamic_link` takes a hash as its first argument, it allows
|
|
96
|
+
us to do this:
|
|
97
|
+
|
|
98
|
+
```ruby
|
|
99
|
+
walt = Author.new(
|
|
100
|
+
name: 'Walt Whitman',
|
|
101
|
+
bio: 'American poet, essayist, and journalist.',
|
|
102
|
+
picture: 'walt.jpg'
|
|
103
|
+
)
|
|
104
|
+
ffs = FFS::Share.new
|
|
105
|
+
|
|
106
|
+
def author_info(author)
|
|
107
|
+
{
|
|
108
|
+
link: "www.example.com/author/#{author.id}",
|
|
109
|
+
socialMetaTagInfo: {
|
|
110
|
+
socialTitle: author.name,
|
|
111
|
+
socialDescription: author.bio,
|
|
112
|
+
socialImageLink: author.picture
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
link_info = author_info(walt)
|
|
118
|
+
|
|
119
|
+
ffs.generate_dynamic_link(link_info)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Options
|
|
123
|
+
|
|
124
|
+
Below is a table of options you can pass to `#generate_dynamic_link`, along with their default value:
|
|
125
|
+
|
|
126
|
+
| Option | Default Value | Description |
|
|
127
|
+
| ------------- | ------------- | ------------- |
|
|
128
|
+
| android | true | Include metadata for Android. |
|
|
129
|
+
| ios | true | Include metadata for iOS. |
|
|
130
|
+
| min_package | false | Restrict the dynamic link to certain app versions. (Android) |
|
|
131
|
+
| ipad | false | Include separate metadata for iPad |
|
|
132
|
+
| custom_scheme | false | Define a custom URL scheme for your app. (iOS) |
|
|
133
|
+
| fallback | false | Provide a link to open when the app isn't installed. |
|
|
134
|
+
| analytics | false | Collect analytics using Google Play and/or iTunes. |
|
|
135
|
+
| bitly | false | Use Bitly for link shortening instead of Firebase. |
|
|
136
|
+
|
|
137
|
+
Utilize options like this:
|
|
138
|
+
|
|
139
|
+
```ruby
|
|
140
|
+
ffs = FFS::Share.new
|
|
141
|
+
|
|
142
|
+
# We don't need metadata for iOS, want Google Play analytics, and want to use Bitly.
|
|
143
|
+
ffs.generate_dynamic_link(link_info, ios: false, analytics: true, bitly: true)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Detailed explanations can be found in the
|
|
147
|
+
[Firebase documentation](https://firebase.google.com/docs/reference/dynamic-links/link-shortener#parameters)
|
|
148
|
+
|
|
149
|
+
## Development
|
|
150
|
+
|
|
151
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
152
|
+
|
|
153
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
154
|
+
|
|
155
|
+
## Contributing
|
|
156
|
+
|
|
157
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/goronfreeman/ffs.
|
|
158
|
+
|
|
159
|
+
## License
|
|
160
|
+
|
|
161
|
+
MIT
|
|
162
|
+
|
|
163
|
+
Copyright (c) 2017 Hunter Braun
|
|
164
|
+
|
|
165
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
166
|
+
|
|
167
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
168
|
+
|
|
169
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require 'bundler/setup'
|
|
4
|
+
require 'ffs'
|
|
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
data/ffs.gemspec
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'ffs/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = 'ffs'
|
|
8
|
+
spec.version = FFS::VERSION
|
|
9
|
+
spec.authors = ['Hunter Braun']
|
|
10
|
+
spec.email = ['hunter.braun@gmail.com']
|
|
11
|
+
|
|
12
|
+
spec.summary = 'Fast Firebase sharing for Ruby.'
|
|
13
|
+
spec.description = 'Easily generate Firebase dynamic links for your Ruby application.'
|
|
14
|
+
spec.homepage = 'https://github.com/goronfreeman/ffs'
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
17
|
+
f.match(%r{^(test|spec|features)/})
|
|
18
|
+
end
|
|
19
|
+
spec.bindir = 'exe'
|
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
21
|
+
spec.require_paths = ['lib']
|
|
22
|
+
|
|
23
|
+
spec.add_dependency 'rails', '>= 4.1.0', '< 5.1'
|
|
24
|
+
|
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.14'
|
|
26
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
|
27
|
+
end
|
data/lib/ffs.rb
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'ffs/configuration'
|
|
2
|
+
require 'ffs/version'
|
|
3
|
+
require 'ffs/share'
|
|
4
|
+
require 'generators/ffs/install_generator'
|
|
5
|
+
|
|
6
|
+
module FFS
|
|
7
|
+
class << self
|
|
8
|
+
attr_accessor :configuration
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def self.configure
|
|
12
|
+
self.configuration ||= Configuration.new
|
|
13
|
+
yield(configuration)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module FFS
|
|
2
|
+
class Configuration
|
|
3
|
+
attr_accessor :firebase_api_key, :bitly_api_key, :dynamic_link_domain, :suffix,
|
|
4
|
+
:android_package_name, :android_fallback_link, :android_min_version,
|
|
5
|
+
:ios_bundle_id, :ios_fallback_link, :ios_app_store_id,
|
|
6
|
+
:ipad_fallback_link, :ipad_bundle_id, :custom_scheme,
|
|
7
|
+
:utm_source, :utm_medium, :utm_campaign, :utm_term, :utm_content, :gclid,
|
|
8
|
+
:at, :ct, :mt, :pt
|
|
9
|
+
end
|
|
10
|
+
end
|
data/lib/ffs/share.rb
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
require 'net/http'
|
|
3
|
+
require 'uri'
|
|
4
|
+
|
|
5
|
+
module FFS
|
|
6
|
+
class Share
|
|
7
|
+
DEFAULT = {
|
|
8
|
+
android: true,
|
|
9
|
+
ios: true,
|
|
10
|
+
min_package: false,
|
|
11
|
+
ipad: false,
|
|
12
|
+
custom_scheme: false,
|
|
13
|
+
fallback: false,
|
|
14
|
+
analytics: false,
|
|
15
|
+
bitly: false
|
|
16
|
+
}.freeze
|
|
17
|
+
|
|
18
|
+
def generate_dynamic_link(hash, **options)
|
|
19
|
+
opts = DEFAULT.merge(options)
|
|
20
|
+
uri = URI.parse("https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=#{FFS.configuration.firebase_api_key}")
|
|
21
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
|
22
|
+
http.use_ssl = true
|
|
23
|
+
headers = { 'Content-Type' => 'application/json' }
|
|
24
|
+
body = build_json_body(hash, opts)
|
|
25
|
+
res = http.post(uri, body, headers).body
|
|
26
|
+
|
|
27
|
+
return res unless opts[:bitly]
|
|
28
|
+
shorten_with_bitly(res)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
private
|
|
32
|
+
|
|
33
|
+
def build_json_body(hash, opts)
|
|
34
|
+
body = base_info
|
|
35
|
+
body[:dynamicLinkInfo].merge!(hash)
|
|
36
|
+
body[:dynamicLinkInfo][:androidInfo] = build_android_info(opts) if opts[:android]
|
|
37
|
+
body[:dynamicLinkInfo][:iosInfo] = build_ios_info(opts) if opts[:ios]
|
|
38
|
+
body[:dynamicLinkInfo][:analyticsInfo] = build_analytics_info(opts) if opts[:analytics]
|
|
39
|
+
body.to_json
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def base_info
|
|
43
|
+
{
|
|
44
|
+
dynamicLinkInfo: {
|
|
45
|
+
dynamicLinkDomain: FFS.configuration.dynamic_link_domain
|
|
46
|
+
},
|
|
47
|
+
suffix: {
|
|
48
|
+
option: FFS.configuration.suffix
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def build_android_info(opts)
|
|
54
|
+
android_info = {
|
|
55
|
+
androidPackageName: FFS.configuration.android_package_name
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
android_info[:androidFallbackLink] = FFS.configuration.android_fallback_link if opts[:fallback]
|
|
59
|
+
android_info[:androidMinPackageVersionCode] = FFS.configuration.android_min_version if opts[:min_package]
|
|
60
|
+
android_info
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def build_ios_info(opts)
|
|
64
|
+
ios_info = {
|
|
65
|
+
iosBundleId: FFS.configuration.ios_bundle_id,
|
|
66
|
+
iosAppStoreId: FFS.configuration.ios_app_store_id
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
ios_info[:iosFallbackLink] = FFS.configuration.ios_fallback_link if opts[:fallback]
|
|
70
|
+
ios_info[:iosCustomScheme] = FFS.configuration.custom_scheme if opts[:custom_scheme]
|
|
71
|
+
build_ipad_info(ios_info, opts) if opts[:ipad]
|
|
72
|
+
ios_info
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def build_ipad_info(ios_info, opts)
|
|
76
|
+
ios_info[:iosIpadBundleId] = FFS.configuration.ipad_bundle_id
|
|
77
|
+
ios_info[:iosIpadFallbackLink] = FFS.configuration.ipad_fallback_link if opts[:fallback]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def build_analytics_info(opts)
|
|
81
|
+
analytics = {}
|
|
82
|
+
analytics[:googlePlayAnalytics] = build_google_play_analytics(body) if opts[:android]
|
|
83
|
+
analytics[:itunesConnectAnalytics] = build_itunes_connect_analytics(body) if opts[:ios]
|
|
84
|
+
analytics
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def build_google_play_analytics
|
|
88
|
+
{
|
|
89
|
+
utmSource: FFS.configuration.utm_source,
|
|
90
|
+
utmMedium: FFS.configuration.utm_medium,
|
|
91
|
+
utmCampaign: FFS.configuration.utm_campaign,
|
|
92
|
+
utmTerm: FFS.configuration.utm_term,
|
|
93
|
+
utmContent: FFS.configuration.utm_content,
|
|
94
|
+
gclid: FFS.configuration.gclid
|
|
95
|
+
}
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def build_itunes_connect_analytics
|
|
99
|
+
{
|
|
100
|
+
at: FFS.configuration.at,
|
|
101
|
+
ct: FFS.configuration.ct,
|
|
102
|
+
mt: FFS.configuration.mt,
|
|
103
|
+
pt: FFS.configuration.pt
|
|
104
|
+
}
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def shorten_with_bitly(res)
|
|
108
|
+
long_link = JSON.parse(res)['previewLink'].gsub(/&d=1/, '').gsub(/&/, '%26')
|
|
109
|
+
uri = URI.parse("https://api-ssl.bitly.com/v3/shorten?access_token=#{FFS.configuration.bitly_api_key}&longUrl=#{long_link}")
|
|
110
|
+
res = JSON.parse(Net::HTTP.get(uri))
|
|
111
|
+
|
|
112
|
+
res['data']['url']
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
data/lib/ffs/version.rb
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
require 'rails/generators'
|
|
2
|
+
|
|
3
|
+
module FFS
|
|
4
|
+
module Generators
|
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
|
6
|
+
source_root File.expand_path('../../templates', __FILE__)
|
|
7
|
+
desc 'Creates FFS initializer for your application'
|
|
8
|
+
|
|
9
|
+
def copy_initializer
|
|
10
|
+
template 'initializer.rb', 'config/initializers/ffs.rb'
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def show_readme
|
|
14
|
+
readme 'README'
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
===============================================================================
|
|
2
|
+
|
|
3
|
+
Some setup you must do manually if you haven't yet:
|
|
4
|
+
|
|
5
|
+
Modify config/initializers/ffs.rb to suit your application's needs.
|
|
6
|
+
Full documentation for each configuration option can be found here:
|
|
7
|
+
https://firebase.google.com/docs/reference/dynamic-links/link-shortener
|
|
8
|
+
|
|
9
|
+
You should store any sensitive information in environment variables that you
|
|
10
|
+
do not check into version control:
|
|
11
|
+
|
|
12
|
+
FFS.configure do |config|
|
|
13
|
+
config.firebase_api_key = Rails.application.secrets.firebase[:api_key]
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
===============================================================================
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Use this hook to configure API keys, Android package info, iOS bundle info,
|
|
2
|
+
# and analytics info. Many of these configuration options are not required,
|
|
3
|
+
# and depend on how you you initialize FFS. Please check the README for more info.
|
|
4
|
+
# Full documentation for each configuration option can be found here:
|
|
5
|
+
# https://firebase.google.com/docs/reference/dynamic-links/link-shortener
|
|
6
|
+
FFS.configure do |config|
|
|
7
|
+
# ==> General configuration
|
|
8
|
+
# Configure the project ID associated with your Firebase project.
|
|
9
|
+
# You can find your project ID in your project's Firebase console.
|
|
10
|
+
config.firebase_api_key = 'api_key'
|
|
11
|
+
|
|
12
|
+
# Optionally configure your Bitly API key to use Bitly link shortening,
|
|
13
|
+
# instead of the default Firebase link shortening.
|
|
14
|
+
# config.bitly_api_key = 'api_key'
|
|
15
|
+
|
|
16
|
+
# Configure your Firebase project's Dynamic Links domain.
|
|
17
|
+
# You can find this value in the Dynamic Links section of the Firebase console.
|
|
18
|
+
config.dynamic_link_domain = 'dynamic_link_domain'
|
|
19
|
+
|
|
20
|
+
# Configure the length of the generated short link.
|
|
21
|
+
# Only needed when using the Firebase link shortener.
|
|
22
|
+
# Allowed options are 'SHORT' and 'UNGUESSABLE'.
|
|
23
|
+
config.suffix = 'SHORT'
|
|
24
|
+
|
|
25
|
+
# ==> Android configuration
|
|
26
|
+
# Configure the package name of the Android app to use to open the link.
|
|
27
|
+
config.android_package_name = 'android_package_name'
|
|
28
|
+
|
|
29
|
+
# Configure the link to open when the app isn't installed.
|
|
30
|
+
# config.android_fallback_link = 'android_fallback_link'
|
|
31
|
+
|
|
32
|
+
# Configure the versionCode of the minimum version of your app that can open the link.
|
|
33
|
+
# config.android_min_version = 'android_min_version'
|
|
34
|
+
|
|
35
|
+
# ==> iOS configuration
|
|
36
|
+
# Configure the bundle ID of the iOS app to use to open the link.
|
|
37
|
+
config.ios_bundle_id = 'ios_bundle_id'
|
|
38
|
+
|
|
39
|
+
# Configure your app's App Store ID.
|
|
40
|
+
config.ios_app_store_id = 'ios_app_store_id'
|
|
41
|
+
|
|
42
|
+
# Configure the link to open when the app isn't installed.
|
|
43
|
+
# config.ios_fallback_link = 'ios_fallback_link'
|
|
44
|
+
|
|
45
|
+
# Configure the link to open on iPads when the app isn't installed.
|
|
46
|
+
# config.ipad_fallback_link = 'ipad_fallback_link'
|
|
47
|
+
|
|
48
|
+
# Configure the bundle ID of the iOS app to use on iPads to open the link.
|
|
49
|
+
# config.ipad_bundle_id = 'ipad_bundle_id'
|
|
50
|
+
|
|
51
|
+
# Configure your app's custom URL scheme, if defined to be something other than your app's bundle ID
|
|
52
|
+
# config.custom_scheme = 'custom_scheme'
|
|
53
|
+
|
|
54
|
+
# ==> Analytics configuration
|
|
55
|
+
# Configure your Google Play analytics parameters.
|
|
56
|
+
# config.utm_source = 'utm_source'
|
|
57
|
+
# config.utm_medium = 'utm_medium'
|
|
58
|
+
# config.utm_campaign = 'utm_campaign'
|
|
59
|
+
# config.utm_term = 'utm_term'
|
|
60
|
+
# config.utm_content = 'utm_content'
|
|
61
|
+
# config.gclid = 'gclid'
|
|
62
|
+
|
|
63
|
+
# Configure your iTunes Connect analytics parameters.
|
|
64
|
+
# config.at = 'at'
|
|
65
|
+
# config.ct = 'ct'
|
|
66
|
+
# config.mt = 'mt'
|
|
67
|
+
# config.pt = 'pt'
|
|
68
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: ffs
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Hunter Braun
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: rails
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 4.1.0
|
|
20
|
+
- - "<"
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: '5.1'
|
|
23
|
+
type: :runtime
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
requirements:
|
|
27
|
+
- - ">="
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: 4.1.0
|
|
30
|
+
- - "<"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '5.1'
|
|
33
|
+
- !ruby/object:Gem::Dependency
|
|
34
|
+
name: bundler
|
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '1.14'
|
|
40
|
+
type: :development
|
|
41
|
+
prerelease: false
|
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '1.14'
|
|
47
|
+
- !ruby/object:Gem::Dependency
|
|
48
|
+
name: rake
|
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '10.0'
|
|
54
|
+
type: :development
|
|
55
|
+
prerelease: false
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - "~>"
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '10.0'
|
|
61
|
+
description: Easily generate Firebase dynamic links for your Ruby application.
|
|
62
|
+
email:
|
|
63
|
+
- hunter.braun@gmail.com
|
|
64
|
+
executables: []
|
|
65
|
+
extensions: []
|
|
66
|
+
extra_rdoc_files: []
|
|
67
|
+
files:
|
|
68
|
+
- ".gitignore"
|
|
69
|
+
- ".rubocop.yml"
|
|
70
|
+
- Gemfile
|
|
71
|
+
- README.md
|
|
72
|
+
- Rakefile
|
|
73
|
+
- bin/console
|
|
74
|
+
- bin/setup
|
|
75
|
+
- ffs.gemspec
|
|
76
|
+
- lib/ffs.rb
|
|
77
|
+
- lib/ffs/configuration.rb
|
|
78
|
+
- lib/ffs/share.rb
|
|
79
|
+
- lib/ffs/version.rb
|
|
80
|
+
- lib/generators/ffs/install_generator.rb
|
|
81
|
+
- lib/generators/templates/README
|
|
82
|
+
- lib/generators/templates/initializer.rb
|
|
83
|
+
homepage: https://github.com/goronfreeman/ffs
|
|
84
|
+
licenses: []
|
|
85
|
+
metadata: {}
|
|
86
|
+
post_install_message:
|
|
87
|
+
rdoc_options: []
|
|
88
|
+
require_paths:
|
|
89
|
+
- lib
|
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
- - ">="
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: '0'
|
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
|
+
requirements:
|
|
97
|
+
- - ">="
|
|
98
|
+
- !ruby/object:Gem::Version
|
|
99
|
+
version: '0'
|
|
100
|
+
requirements: []
|
|
101
|
+
rubyforge_project:
|
|
102
|
+
rubygems_version: 2.5.2
|
|
103
|
+
signing_key:
|
|
104
|
+
specification_version: 4
|
|
105
|
+
summary: Fast Firebase sharing for Ruby.
|
|
106
|
+
test_files: []
|