firebase_dynamic_link 1.0.4 → 2.0.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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.env.template +2 -0
  3. data/.github/dependabot.yml +8 -0
  4. data/.github/release-drafter.yml +4 -0
  5. data/.github/workflows/audit.yml +22 -0
  6. data/.github/workflows/codeql-analysis.yml +70 -0
  7. data/.github/workflows/coverage.yml +34 -0
  8. data/.github/workflows/gem-push.yml +43 -0
  9. data/.github/workflows/release-drafter.yml +32 -0
  10. data/.github/workflows/test.yml +25 -0
  11. data/.gitignore +3 -0
  12. data/.rubocop.yml +1 -146
  13. data/Appraisals +32 -12
  14. data/Gemfile +1 -1
  15. data/Guardfile +7 -5
  16. data/README.md +67 -53
  17. data/Rakefile +2 -2
  18. data/bin/bundle-audit +29 -0
  19. data/bin/bundler-audit +29 -0
  20. data/bin/console +3 -3
  21. data/docker-compose.yml +9 -0
  22. data/firebase_dynamic_link.gemspec +28 -25
  23. data/gemfiles/{version_2020.gemfile → faraday_1.8.0_dry_0.11.gemfile} +1 -1
  24. data/gemfiles/faraday_1.8.0_dry_0.11.gemfile.lock +129 -0
  25. data/gemfiles/{version_2018.gemfile → faraday_1.8.0_dry_0.12.gemfile} +2 -2
  26. data/gemfiles/faraday_1.8.0_dry_0.12.gemfile.lock +127 -0
  27. data/gemfiles/{version_2017a.gemfile → faraday_1.8.0_dry_0.13.gemfile} +2 -2
  28. data/gemfiles/faraday_1.8.0_dry_0.13.gemfile.lock +127 -0
  29. data/gemfiles/{version_2017b.gemfile → faraday_1.8.0_dry_0.15.gemfile} +2 -2
  30. data/gemfiles/faraday_1.8.0_dry_0.15.gemfile.lock +127 -0
  31. data/gemfiles/faraday_2.3.0_dry_0.11.gemfile +8 -0
  32. data/gemfiles/faraday_2.3.0_dry_0.11.gemfile.lock +113 -0
  33. data/gemfiles/faraday_2.3.0_dry_0.12.gemfile +8 -0
  34. data/gemfiles/faraday_2.3.0_dry_0.12.gemfile.lock +111 -0
  35. data/gemfiles/faraday_2.3.0_dry_0.13.gemfile +8 -0
  36. data/gemfiles/faraday_2.3.0_dry_0.13.gemfile.lock +111 -0
  37. data/gemfiles/faraday_2.3.0_dry_0.15.gemfile +8 -0
  38. data/gemfiles/faraday_2.3.0_dry_0.15.gemfile.lock +111 -0
  39. data/lib/firebase_dynamic_link/client.rb +19 -16
  40. data/lib/firebase_dynamic_link/connection.rb +1 -1
  41. data/lib/firebase_dynamic_link/link_renderer.rb +12 -11
  42. data/lib/firebase_dynamic_link/version.rb +1 -1
  43. data/lib/firebase_dynamic_link.rb +54 -14
  44. metadata +119 -38
  45. data/.travis.yml +0 -24
  46. data/gemfiles/version_2017a.gemfile.lock +0 -75
  47. data/gemfiles/version_2017b.gemfile.lock +0 -75
  48. data/gemfiles/version_2018.gemfile.lock +0 -75
  49. data/gemfiles/version_2020.gemfile.lock +0 -78
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ab11d4a89e7db50a374e53454e1d065b7cfc6d066beceab4f8145ac51c93933
4
- data.tar.gz: e779c35872bfc268e79482b94c6f095f6bbd3fa6dd807e174fed29b3fcbd77db
3
+ metadata.gz: c21f7605af9ae8d163753faa5fe7a5275eecc4c49d65f1d9797275124e6b2a7e
4
+ data.tar.gz: 1d26d118868b19cccae576779105ceff32bca4603786add2bb237348e6a30330
5
5
  SHA512:
6
- metadata.gz: 1377a22e552150f5a0f25a98a3a55008331d98a485b47d13cb4ce506226d4fd3f003f686d0a475f128f174f96ff2471b82b88e0308c77c24e89e6159b4572a0b
7
- data.tar.gz: 643222e3a24ad3162c4e6ba6720bc54aa595e356e54b3a4116c109f80f7fbbc62290d6bf43001d47d815d0f19e3a54e9b4e09cea09b1c6877054eaadfcd9fec1
6
+ metadata.gz: e0aa5d910a43867421f4dd5ea52f00de534f199ef46f074d21b176355599950faf68b74891227bdc0235a76c26496886b9dae1597063c3d6d582bf9911ee331d
7
+ data.tar.gz: 1eca9269070f45f1af5d890b9621298ca3203e8ca775e3611f2fc0cdbcce6b174e15e091eb1d177cc670794d54b4b2eccfc4f478289eb6b4840d69fb627d6bb2
data/.env.template ADDED
@@ -0,0 +1,2 @@
1
+ API_KEY='firebasewebapikey'
2
+ DYNAMIC_LINK_DOMAIN='https://yourfirebaseshort.link'
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+
4
+ - package-ecosystem: "github-actions"
5
+ directory: "/"
6
+ schedule:
7
+ # Check for updates to GitHub Actions every weekday
8
+ interval: "daily"
@@ -0,0 +1,4 @@
1
+ template: |
2
+ ## What’s Changed
3
+
4
+ $CHANGES
@@ -0,0 +1,22 @@
1
+ name: Audit
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+ jobs:
9
+ audit:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout code
13
+ uses: actions/checkout@v3
14
+
15
+ - name: Setup Ruby and install gems
16
+ uses: ruby/setup-ruby@8029ebd6e5bd8f4e0d6f7623ea76a01ec5b1010d
17
+ with:
18
+ ruby-version: 2.7
19
+ bundler-cache: true
20
+ - name: Run security checks
21
+ run: |
22
+ bin/bundler-audit --update
@@ -0,0 +1,70 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ master ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ master ]
20
+ schedule:
21
+ - cron: '21 10 * * 4'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://git.io/codeql-language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v3
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v2
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
52
+
53
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
+ # If this step fails, then you should remove it and run the build manually (see below)
55
+ - name: Autobuild
56
+ uses: github/codeql-action/autobuild@v2
57
+
58
+ # ℹ️ Command-line programs to run using the OS shell.
59
+ # 📚 https://git.io/JvXDl
60
+
61
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62
+ # and modify them (or add more) to build your code if your project
63
+ # uses a compiled language
64
+
65
+ #- run: |
66
+ # make bootstrap
67
+ # make release
68
+
69
+ - name: Perform CodeQL Analysis
70
+ uses: github/codeql-action/analyze@v2
@@ -0,0 +1,34 @@
1
+ name: Test Coverage
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ coverage:
11
+ name: coverage
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - name: Set up Ruby
16
+ uses: ruby/setup-ruby@8029ebd6e5bd8f4e0d6f7623ea76a01ec5b1010d
17
+ with:
18
+ ruby-version: 3.0
19
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
20
+ - name: Install cc-test-reporter and prebuild notification
21
+ run: |
22
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
23
+ chmod +x ./cc-test-reporter
24
+ ./cc-test-reporter before-build
25
+ - name: Run tests
26
+ env:
27
+ COVERAGE: 1
28
+ API_KEY: "${{secrets.API_KEY}}"
29
+ DYNAMIC_LINK_DOMAIN: "${{ secrets.DYNAMIC_LINK_DOMAIN }}"
30
+ run: bundle exec rspec
31
+ - name: CodeClimate Post-build upload
32
+ env:
33
+ CC_TEST_REPORTER_ID: 22b531be7956bd878ec8ce211da98c483c9724eebc8eb72f99d064f00aa6e985
34
+ run: ./cc-test-reporter -d -t simplecov after-build
@@ -0,0 +1,43 @@
1
+ name: Push to Rubygems
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [master]
6
+
7
+ jobs:
8
+ build:
9
+ name: Build + Publish
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
13
+ packages: write
14
+
15
+ steps:
16
+ - uses: actions/checkout@v3
17
+ - name: Set up Ruby 2.7
18
+ uses: actions/setup-ruby@v1
19
+ with:
20
+ ruby-version: 2.7.x
21
+
22
+ - name: Publish to GPR
23
+ run: |
24
+ mkdir -p $HOME/.gem
25
+ touch $HOME/.gem/credentials
26
+ chmod 0600 $HOME/.gem/credentials
27
+ printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
28
+ gem build *.gemspec
29
+ gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
30
+ env:
31
+ GEM_HOST_API_KEY: "Bearer ${{secrets.GPR_TOKEN}}"
32
+ OWNER: ${{ github.repository_owner }}
33
+
34
+ - name: Publish to RubyGems
35
+ run: |
36
+ mkdir -p $HOME/.gem
37
+ touch $HOME/.gem/credentials
38
+ chmod 0600 $HOME/.gem/credentials
39
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
40
+ gem build *.gemspec
41
+ gem push *.gem
42
+ env:
43
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -0,0 +1,32 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ # branches to consider in the event; optional, defaults to all
6
+ branches:
7
+ - master
8
+ # pull_request event is required only for autolabeler
9
+ pull_request:
10
+ # Only following types are handled by the action, but one can default to all as well
11
+ types: [opened, reopened, synchronize]
12
+ # pull_request_target event is required for autolabeler to support PRs from forks
13
+ # pull_request_target:
14
+ # types: [opened, reopened, synchronize]
15
+
16
+ jobs:
17
+ update_release_draft:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ # (Optional) GitHub Enterprise requires GHE_HOST variable set
21
+ #- name: Set GHE_HOST
22
+ # run: |
23
+ # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
24
+
25
+ # Drafts your next Release notes as Pull Requests are merged into "master"
26
+ - uses: release-drafter/release-drafter@v5
27
+ # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
28
+ # with:
29
+ # config-name: my-config.yml
30
+ # disable-autolabeler: true
31
+ env:
32
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,25 @@
1
+ name: Test
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ ruby-version: ['2.7', '3.0', '3.1']
13
+
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@8029ebd6e5bd8f4e0d6f7623ea76a01ec5b1010d
18
+ with:
19
+ ruby-version: ${{ matrix.ruby-version }}
20
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
21
+ - name: Run tests
22
+ env:
23
+ API_KEY: "${{secrets.API_KEY}}"
24
+ DYNAMIC_LINK_DOMAIN: "${{ secrets.DYNAMIC_LINK_DOMAIN }}"
25
+ run: bundle exec appraisal bundle install && bundle exec appraisal rspec
data/.gitignore CHANGED
@@ -14,3 +14,6 @@ spec/fixtures/vcr_cassettes/
14
14
  coverage
15
15
  doc
16
16
  Gemfile.lock
17
+ .env
18
+ .secrets
19
+ .ruby-version
data/.rubocop.yml CHANGED
@@ -1,146 +1 @@
1
- Metrics/BlockLength:
2
- Exclude:
3
- - 'Rakefile'
4
- - '**/*.rake'
5
- - 'spec/**/*.rb'
6
-
7
- # Prefer &&/|| over and/or.
8
- Style/AndOr:
9
- Enabled: true
10
-
11
- # Do not use braces for hash literals when they are the last argument of a
12
- # method call.
13
- Style/BracesAroundHashParameters:
14
- Enabled: true
15
- EnforcedStyle: context_dependent
16
-
17
- # Align `when` with `case`.
18
- Layout/CaseIndentation:
19
- Enabled: true
20
-
21
- # Align comments with method definitions.
22
- Layout/CommentIndentation:
23
- Enabled: true
24
-
25
- Layout/ElseAlignment:
26
- Enabled: true
27
-
28
- # Align `end` with the matching keyword or starting expression except for
29
- # assignments, where it should be aligned with the LHS.
30
- Layout/EndAlignment:
31
- Enabled: true
32
- EnforcedStyleAlignWith: variable
33
- AutoCorrect: true
34
-
35
- Layout/EmptyLineAfterMagicComment:
36
- Enabled: true
37
-
38
- # In a regular class definition, no empty lines around the body.
39
- Layout/EmptyLinesAroundClassBody:
40
- Enabled: true
41
-
42
- # In a regular method definition, no empty lines around the body.
43
- Layout/EmptyLinesAroundMethodBody:
44
- Enabled: true
45
-
46
- # In a regular module definition, no empty lines around the body.
47
- Layout/EmptyLinesAroundModuleBody:
48
- Enabled: true
49
-
50
- Layout/FirstParameterIndentation:
51
- Enabled: true
52
-
53
- # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
54
- Style/HashSyntax:
55
- Enabled: true
56
-
57
- # Two spaces, no tabs (for indentation).
58
- Layout/IndentationWidth:
59
- Enabled: true
60
-
61
- Layout/LeadingCommentSpace:
62
- Enabled: true
63
-
64
- Layout/SpaceAfterColon:
65
- Enabled: true
66
-
67
- Layout/SpaceAfterComma:
68
- Enabled: true
69
-
70
- Layout/SpaceAroundEqualsInParameterDefault:
71
- Enabled: true
72
-
73
- Layout/SpaceAroundKeyword:
74
- Enabled: true
75
-
76
- Layout/SpaceAroundOperators:
77
- Enabled: true
78
-
79
- Layout/SpaceBeforeComma:
80
- Enabled: true
81
-
82
- Layout/SpaceBeforeFirstArg:
83
- Enabled: true
84
-
85
- Style/DefWithParentheses:
86
- Enabled: true
87
-
88
- # Defining a method with parameters needs parentheses.
89
- Style/MethodDefParentheses:
90
- Enabled: true
91
-
92
- Style/FrozenStringLiteralComment:
93
- Enabled: true
94
- EnforcedStyle: always
95
-
96
- # Use `foo {}` not `foo{}`.
97
- Layout/SpaceBeforeBlockBraces:
98
- Enabled: true
99
-
100
- # Use `foo { bar }` not `foo {bar}`.
101
- Layout/SpaceInsideBlockBraces:
102
- Enabled: true
103
-
104
- # Use `{ a: 1 }` not `{a:1}`.
105
- Layout/SpaceInsideHashLiteralBraces:
106
- Enabled: true
107
-
108
- Layout/SpaceInsideParens:
109
- Enabled: true
110
-
111
- # Check quotes usage according to lint rule below.
112
- Style/StringLiterals:
113
- Enabled: true
114
- EnforcedStyle: double_quotes
115
-
116
- # Detect hard tabs, no hard tabs.
117
- Layout/Tab:
118
- Enabled: true
119
-
120
- # Blank lines should not have any spaces.
121
- Layout/TrailingBlankLines:
122
- Enabled: true
123
-
124
- # No trailing whitespace.
125
- Layout/TrailingWhitespace:
126
- Enabled: true
127
-
128
- # Use quotes for string literals when they are enough.
129
- Style/UnneededPercentQ:
130
- Enabled: true
131
-
132
- # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
133
- Lint/RequireParentheses:
134
- Enabled: true
135
-
136
- Style/RedundantReturn:
137
- Enabled: true
138
- AllowMultipleReturnValues: true
139
-
140
- Style/Semicolon:
141
- Enabled: true
142
- AllowAsExpressionSeparator: true
143
-
144
- # Prefer Foo.method over Foo::method
145
- Style/ColonMethodCall:
146
- Enabled: true
1
+ require: rubocop-rspec
data/Appraisals CHANGED
@@ -1,21 +1,41 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise "version-2018" do
4
- gem "dry-configurable", "0.7.0"
5
- gem "faraday", "0.14.0"
3
+ appraise 'faraday-1.8.0-dry-0.11' do
4
+ gem 'dry-configurable', '0.11.6'
5
+ gem 'faraday', '1.8.0'
6
6
  end
7
7
 
8
- appraise "version-2017b" do
9
- gem "dry-configurable", "0.6.0"
10
- gem "faraday", "0.11.0"
8
+ appraise 'faraday-2.3.0-dry-0.11' do
9
+ gem 'dry-configurable', '0.11.6'
10
+ gem 'faraday', '2.3.0'
11
11
  end
12
12
 
13
- appraise "version-2017a" do
14
- gem "dry-configurable", "0.6.0"
15
- gem "faraday", "0.10.1"
13
+ appraise 'faraday-1.8.0-dry-0.12' do
14
+ gem 'dry-configurable', '0.12.1'
15
+ gem 'faraday', '1.8.0'
16
16
  end
17
17
 
18
- appraise "version-2020" do
19
- gem "dry-configurable", "0.11.6"
20
- gem "faraday", "1.0.1"
18
+ appraise 'faraday-2.3.0-dry-0.12' do
19
+ gem 'dry-configurable', '0.12.1'
20
+ gem 'faraday', '2.3.0'
21
+ end
22
+
23
+ appraise 'faraday-1.8.0-dry-0.13' do
24
+ gem 'dry-configurable', '0.13.0'
25
+ gem 'faraday', '1.8.0'
26
+ end
27
+
28
+ appraise 'faraday-2.3.0-dry-0.13' do
29
+ gem 'dry-configurable', '0.13.0'
30
+ gem 'faraday', '2.3.0'
31
+ end
32
+
33
+ appraise 'faraday-1.8.0-dry-0.15' do
34
+ gem 'dry-configurable', '0.15.0'
35
+ gem 'faraday', '1.8.0'
36
+ end
37
+
38
+ appraise 'faraday-2.3.0-dry-0.15' do
39
+ gem 'dry-configurable', '0.15.0'
40
+ gem 'faraday', '2.3.0'
21
41
  end
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source "https://rubygems.org"
3
+ source 'https://rubygems.org'
4
4
 
5
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
data/Guardfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # A sample Guardfile
2
4
  # More info at https://github.com/guard/guard#readme
3
5
 
@@ -15,7 +17,7 @@
15
17
  #
16
18
  # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
19
 
18
- # Note: The cmd option is now required due to the increasing number of ways
20
+ # NOTE: The cmd option is now required due to the increasing number of ways
19
21
  # rspec may be run, below are examples of the most common uses.
20
22
  # * bundler: 'bundle exec rspec'
21
23
  # * bundler binstubs: 'bin/rspec'
@@ -24,8 +26,8 @@
24
26
  # * zeus: 'zeus rspec' (requires the server to be started separately)
25
27
  # * 'just' rspec: 'rspec'
26
28
 
27
- guard :rspec, cmd: "bundle exec rspec" do
28
- require "guard/rspec/dsl"
29
+ guard :rspec, cmd: 'bundle exec rspec' do
30
+ require 'guard/rspec/dsl'
29
31
  dsl = Guard::RSpec::Dsl.new(self)
30
32
 
31
33
  # Feel free to open issues for suggestions and improvements
@@ -41,7 +43,7 @@ guard :rspec, cmd: "bundle exec rspec" do
41
43
  dsl.watch_spec_files_for(ruby.lib_files)
42
44
 
43
45
  # Rails files
44
- rails = dsl.rails(view_extensions: %w(erb haml slim))
46
+ rails = dsl.rails(view_extensions: %w[erb haml slim])
45
47
  dsl.watch_spec_files_for(rails.app_files)
46
48
  dsl.watch_spec_files_for(rails.views)
47
49
 
@@ -65,6 +67,6 @@ guard :rspec, cmd: "bundle exec rspec" do
65
67
  # Turnip features and steps
66
68
  watch(%r{^spec/acceptance/(.+)\.feature$})
67
69
  watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
68
- Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
70
+ Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance'
69
71
  end
70
72
  end