deeplink 1.1.0 → 3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +64 -0
- data/README.md +71 -43
- data/lib/deeplink/link.rb +39 -32
- data/lib/deeplink/version.rb +1 -1
- metadata +12 -110
- data/.gitignore +0 -10
- data/.rspec +0 -4
- data/.rubocop.yml +0 -28
- data/.ruby-version +0 -1
- data/.travis.yml +0 -8
- data/Gemfile +0 -6
- data/Rakefile +0 -8
- data/bin/console +0 -9
- data/bin/setup +0 -7
- data/deeplink.gemspec +0 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5258494e8891ca8dcd0e05f5d19002c981d0d7ec213e96a2a9f446d08e9622e7
|
|
4
|
+
data.tar.gz: 6d80c29a397aa832ca8618d37b9c67dec410cf977072a1b50928aae9c5766bd1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 897d7c31b35d1614539545155dd0403ce703ea34574868ea1ff55a8882c4fa6f203683f77c045b9a013e002cb98278ef138899a27341875416c57b4c3cdc7ef2
|
|
7
|
+
data.tar.gz: 58a3790de63fd53b4535c4ef3bdecdf9e70d13cbf2d9fb8477ccb7f51bbf4fb4b23c09a7fd987279601ba09b763963a578a45de57885904f4762eedd15018dc8
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 3.0.0 (2026-10-20)
|
|
4
|
+
|
|
5
|
+
### Breaking changes
|
|
6
|
+
|
|
7
|
+
- `query` returns decoded values (`a b` instead of `a+b`). Values are encoded only by `to_s`, and
|
|
8
|
+
query keys are now encoded too.
|
|
9
|
+
- `add_query` with a `nil` value adds a parameter without a value (`?flag`) instead of `flag=`.
|
|
10
|
+
|
|
11
|
+
### Fixes
|
|
12
|
+
|
|
13
|
+
- Keep URL fragments (`deep://page#section`), available through `fragment`.
|
|
14
|
+
- Keep query parameters without a value (`?flag`), stored with a `nil` value.
|
|
15
|
+
- Encode query values that are not strings, such as symbols.
|
|
16
|
+
- Parse links without a double slash (`deep:foo`, `deep:/foo`) instead of returning `''`.
|
|
17
|
+
- Parse query values containing `{` or `}` in full.
|
|
18
|
+
|
|
19
|
+
### Development
|
|
20
|
+
|
|
21
|
+
- Add `changelog_uri` to the gem metadata and ship `CHANGELOG.md` with the gem.
|
|
22
|
+
|
|
23
|
+
## 2.0.0 (2026-10-20)
|
|
24
|
+
|
|
25
|
+
### Breaking changes
|
|
26
|
+
|
|
27
|
+
- Require Ruby >= 3.2 (was >= 2.5).
|
|
28
|
+
|
|
29
|
+
### Fixes
|
|
30
|
+
|
|
31
|
+
- Support Ruby 4.0, which removed the CGI library. Query values are encoded exactly as before.
|
|
32
|
+
- Already encoded query values are no longer double encoded (`?q=hello%20world` used to become
|
|
33
|
+
`q=hello%2520world`).
|
|
34
|
+
- `remove_query` without keys returns `nil` instead of raising `NoMethodError`.
|
|
35
|
+
|
|
36
|
+
### Development
|
|
37
|
+
|
|
38
|
+
- CI tests Ruby 3.2, 3.3, 3.4 and 4.0, and runs RuboCop in a separate job.
|
|
39
|
+
- Add Dependabot for GitHub Actions and Bundler.
|
|
40
|
+
- Update development dependencies (RuboCop 1.92, RSpec 3.13, `debug` and `irb` instead of
|
|
41
|
+
`pry-byebug`).
|
|
42
|
+
- `rake` runs the specs and RuboCop.
|
|
43
|
+
|
|
44
|
+
## 1.1.0 (2020-05-01)
|
|
45
|
+
|
|
46
|
+
- Drop support for Ruby 2.1.
|
|
47
|
+
|
|
48
|
+
## 1.0.1 (2018-02-13)
|
|
49
|
+
|
|
50
|
+
- Code style fixes.
|
|
51
|
+
|
|
52
|
+
## 1.0.0 (2016-05-06)
|
|
53
|
+
|
|
54
|
+
- First stable release.
|
|
55
|
+
|
|
56
|
+
## 0.1.4 (2016-04-06)
|
|
57
|
+
|
|
58
|
+
- Fix `NoMethodError` when parsing query parameters on Ruby < 2.1.
|
|
59
|
+
|
|
60
|
+
## 0.1.3 (2015-12-11)
|
|
61
|
+
|
|
62
|
+
- Fix parsing `nil` links.
|
|
63
|
+
- Parse query parameters with unusual characters.
|
|
64
|
+
- Allow removing a list of query parameters.
|
data/README.md
CHANGED
|
@@ -1,97 +1,125 @@
|
|
|
1
|
-
[](https://badge.fury.io/rb/deeplink)
|
|
1
|
+
[](https://badge.fury.io/rb/deeplink)
|
|
2
|
+
[](https://github.com/rikas/deeplink/actions/workflows/ci.yml)
|
|
2
3
|
|
|
3
4
|
# Deeplink
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Parse, inspect and build mobile deep links (`myapp://products/42?ref=email`) in an easy way.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Ruby's `URI` treats the first part after `://` as a host, so deep links like `myapp://products/42`
|
|
9
|
+
end up with `products` as the host. This gem reads them the way apps do: a scheme, a path, a query
|
|
10
|
+
and a fragment.
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
This gem needs Ruby >= 3.2.
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
## Installation
|
|
12
15
|
|
|
13
|
-
```
|
|
14
|
-
|
|
16
|
+
```sh
|
|
17
|
+
bundle add deeplink
|
|
15
18
|
```
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
$ bundle
|
|
20
|
-
|
|
21
|
-
Or install it yourself as:
|
|
20
|
+
Or install it yourself:
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
```sh
|
|
23
|
+
gem install deeplink
|
|
24
|
+
```
|
|
24
25
|
|
|
25
26
|
## Usage
|
|
26
27
|
|
|
27
28
|
### Parsing a deep link
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
Call `Deeplink.parse` with a deep link string to read its scheme and path.
|
|
31
|
+
|
|
32
|
+
```ruby
|
|
33
|
+
deeplink = Deeplink.parse('myshop://products/42')
|
|
34
|
+
|
|
35
|
+
deeplink.scheme # => "myshop"
|
|
36
|
+
deeplink.path # => "/products/42"
|
|
37
|
+
deeplink.to_s # => "myshop://products/42"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Links without a double slash are supported too:
|
|
30
41
|
|
|
31
42
|
```ruby
|
|
32
|
-
deeplink = Deeplink.parse('
|
|
43
|
+
deeplink = Deeplink.parse('sms:+351910000000?body=hello')
|
|
33
44
|
|
|
34
|
-
deeplink.scheme # => "
|
|
35
|
-
deeplink.path # => "
|
|
36
|
-
deeplink.to_s # => "
|
|
45
|
+
deeplink.scheme # => "sms"
|
|
46
|
+
deeplink.path # => "+351910000000"
|
|
47
|
+
deeplink.to_s # => "sms:+351910000000?body=hello"
|
|
37
48
|
```
|
|
38
49
|
|
|
39
50
|
### Query string
|
|
40
51
|
|
|
41
|
-
|
|
52
|
+
Use `query` to read the query parameters, and `query?` to check whether there are any.
|
|
42
53
|
|
|
43
54
|
```ruby
|
|
44
|
-
deeplink = Deeplink.parse('
|
|
55
|
+
deeplink = Deeplink.parse('myshop://products/42?ref=email')
|
|
45
56
|
|
|
46
|
-
deeplink.query
|
|
57
|
+
deeplink.query # => { ref: "email" }
|
|
58
|
+
deeplink.query? # => true
|
|
47
59
|
```
|
|
48
60
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
You can add one or more query parameters sending a Hash to `add_query`.
|
|
61
|
+
Values are stored decoded and only encoded again by `to_s`. Parameters without a value get a `nil`
|
|
62
|
+
value.
|
|
52
63
|
|
|
53
64
|
```ruby
|
|
54
|
-
deeplink = Deeplink.parse('
|
|
65
|
+
deeplink = Deeplink.parse('myshop://search?q=running%20shoes&in_stock')
|
|
66
|
+
|
|
67
|
+
deeplink.query # => { q: "running shoes", in_stock: nil }
|
|
68
|
+
deeplink.to_s # => "myshop://search?q=running+shoes&in_stock"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### Adding query parameters
|
|
55
72
|
|
|
56
|
-
|
|
57
|
-
deeplink.to_s # => "foursquare://checkins/20982?foo=bar"
|
|
73
|
+
Send a Hash with one or more parameters to `add_query`. Values are converted to strings.
|
|
58
74
|
|
|
59
|
-
|
|
75
|
+
```ruby
|
|
76
|
+
deeplink = Deeplink.parse('myshop://cart')
|
|
60
77
|
|
|
61
|
-
deeplink.add_query(
|
|
62
|
-
deeplink.to_s
|
|
78
|
+
deeplink.add_query(coupon: 'SUMMER 10', items: 3) # => { coupon: "SUMMER 10", items: "3" }
|
|
79
|
+
deeplink.to_s # => "myshop://cart?coupon=SUMMER+10&items=3"
|
|
63
80
|
```
|
|
64
81
|
|
|
65
|
-
#### Removing
|
|
82
|
+
#### Removing query parameters
|
|
66
83
|
|
|
67
|
-
|
|
68
|
-
|
|
84
|
+
Call `remove_query` with the key (or list of keys) to remove. It returns the value of the deleted
|
|
85
|
+
key(s).
|
|
69
86
|
|
|
70
87
|
```ruby
|
|
71
|
-
deeplink = Deeplink.parse('
|
|
88
|
+
deeplink = Deeplink.parse('myshop://products/42?ref=email&utm_source=newsletter')
|
|
89
|
+
|
|
90
|
+
deeplink.remove_query(:utm_source) # => "newsletter"
|
|
91
|
+
deeplink.to_s # => "myshop://products/42?ref=email"
|
|
72
92
|
|
|
73
|
-
deeplink.remove_query(:
|
|
74
|
-
deeplink.to_s
|
|
93
|
+
deeplink.remove_query(:ref, :missing) # => ["email", nil]
|
|
94
|
+
deeplink.to_s # => "myshop://products/42"
|
|
75
95
|
```
|
|
76
96
|
|
|
97
|
+
### Fragment
|
|
98
|
+
|
|
99
|
+
The fragment is available through `fragment`, and is kept as given (percent-encoded).
|
|
100
|
+
|
|
77
101
|
```ruby
|
|
78
|
-
deeplink = Deeplink.parse('
|
|
102
|
+
deeplink = Deeplink.parse('myshop://products/42#reviews')
|
|
79
103
|
|
|
80
|
-
deeplink.
|
|
81
|
-
deeplink.to_s
|
|
104
|
+
deeplink.fragment # => "reviews"
|
|
105
|
+
deeplink.to_s # => "myshop://products/42#reviews"
|
|
82
106
|
```
|
|
83
107
|
|
|
84
108
|
## Development
|
|
85
109
|
|
|
86
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `
|
|
110
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake`
|
|
111
|
+
to run the tests and RuboCop. You can also run `bin/console` for an interactive prompt that will
|
|
112
|
+
allow you to experiment.
|
|
87
113
|
|
|
88
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new
|
|
114
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new
|
|
115
|
+
version, update the version number in `version.rb` and `CHANGELOG.md`, and then run
|
|
116
|
+
`bundle exec rake release`, which will create a git tag for the version, push git commits and tags,
|
|
117
|
+
and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
89
118
|
|
|
90
119
|
## Contributing
|
|
91
120
|
|
|
92
121
|
Bug reports and pull requests are welcome on GitHub at https://github.com/rikas/deeplink.
|
|
93
122
|
|
|
94
|
-
|
|
95
123
|
## License
|
|
96
124
|
|
|
97
|
-
The gem is available as open source under the terms of the [MIT License](
|
|
125
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/lib/deeplink/link.rb
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'uri'
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
# Ruby 4.0 removed the CGI library; CGI.escape and CGI.unescape now live in cgi/escape.
|
|
6
|
+
if RUBY_VERSION >= '4'
|
|
7
|
+
require 'cgi/escape'
|
|
8
|
+
else
|
|
9
|
+
require 'cgi/util'
|
|
10
|
+
end
|
|
5
11
|
|
|
6
12
|
module Deeplink
|
|
7
13
|
class Link
|
|
8
|
-
|
|
14
|
+
# The fragment is kept as given, so it should already be percent-encoded.
|
|
15
|
+
attr_accessor :scheme, :path, :fragment
|
|
9
16
|
|
|
10
|
-
# To add and remove items to the
|
|
17
|
+
# Query values are stored decoded and only encoded by #to_s. To add and remove items to the
|
|
18
|
+
# query string use #add_query and #remove_query.
|
|
11
19
|
attr_reader :query
|
|
12
20
|
|
|
13
21
|
def initialize(uri)
|
|
@@ -16,9 +24,12 @@ module Deeplink
|
|
|
16
24
|
uri = parse(uri)
|
|
17
25
|
|
|
18
26
|
self.scheme = uri.scheme
|
|
19
|
-
self.
|
|
27
|
+
self.fragment = uri.fragment
|
|
20
28
|
|
|
21
|
-
|
|
29
|
+
# Links without "//" (e.g. "deep:foo?a=1") are opaque, and URI leaves the query in there.
|
|
30
|
+
self.path, query_string = uri.opaque ? uri.opaque.split('?', 2) : [uri.path, uri.query]
|
|
31
|
+
|
|
32
|
+
@query = parse_query(query_string) if query_string
|
|
22
33
|
end
|
|
23
34
|
|
|
24
35
|
# Add query parameters to the link. You can add one or more parameters since this method
|
|
@@ -31,6 +42,8 @@ module Deeplink
|
|
|
31
42
|
# deeplink.add_query(lat: 38.7179233, lon: -9.150129)
|
|
32
43
|
#
|
|
33
44
|
# deeplink.to_s # => "link://directions?lat=38.7179233&lon=-9.150129"
|
|
45
|
+
#
|
|
46
|
+
# Values are converted to strings. A nil value adds a parameter without a value ("?flag").
|
|
34
47
|
def add_query(hash)
|
|
35
48
|
@query ||= {}
|
|
36
49
|
|
|
@@ -50,11 +63,9 @@ module Deeplink
|
|
|
50
63
|
def remove_query(*keys)
|
|
51
64
|
return unless query
|
|
52
65
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
query.delete(keys.first.to_sym)
|
|
57
|
-
end
|
|
66
|
+
values = keys.map { |key| query.delete(key.to_sym) }
|
|
67
|
+
|
|
68
|
+
keys.size > 1 ? values : values.first
|
|
58
69
|
end
|
|
59
70
|
|
|
60
71
|
# Returns true if the link has a query string or false otherwise
|
|
@@ -80,13 +91,9 @@ module Deeplink
|
|
|
80
91
|
def to_s
|
|
81
92
|
return '' unless scheme && path
|
|
82
93
|
|
|
83
|
-
uri = "#{scheme}:/#{path}"
|
|
84
|
-
|
|
85
|
-
if
|
|
86
|
-
query_string = query.map { |key, value| "#{key}=#{value}" }.join('&')
|
|
87
|
-
|
|
88
|
-
uri += "?#{query_string}"
|
|
89
|
-
end
|
|
94
|
+
uri = @double_slash ? "#{scheme}:/#{path}" : "#{scheme}:#{path}"
|
|
95
|
+
uri += "?#{query_string}" if query?
|
|
96
|
+
uri += "##{fragment}" if fragment
|
|
90
97
|
|
|
91
98
|
uri
|
|
92
99
|
end
|
|
@@ -94,34 +101,34 @@ module Deeplink
|
|
|
94
101
|
private
|
|
95
102
|
|
|
96
103
|
def parse(original_uri)
|
|
104
|
+
@double_slash = original_uri.match?(%r{\A[^:/?#]+://})
|
|
105
|
+
|
|
97
106
|
# Because URI is dumb and thinks that every uri needs to have a host. Adding an extra slash
|
|
98
107
|
# we are basically tricking URI to think that host is nil (and avoid errors).
|
|
99
|
-
uri = original_uri.sub(
|
|
108
|
+
uri = @double_slash ? original_uri.sub('://', ':///') : original_uri
|
|
100
109
|
|
|
101
110
|
URI.parse(uri)
|
|
102
111
|
end
|
|
103
112
|
|
|
104
113
|
def sanitize(hash)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
hash.each_key do |key|
|
|
108
|
-
value = hash[key].is_a?(String) ? CGI.escape(hash[key]) : hash[key].to_s
|
|
109
|
-
|
|
110
|
-
sanitized[key.to_sym] = value
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
sanitized
|
|
114
|
+
hash.to_h { |key, value| [key.to_sym, value&.to_s] }
|
|
114
115
|
end
|
|
115
116
|
|
|
116
117
|
def parse_query(query_str)
|
|
117
|
-
|
|
118
|
+
query_str.split('&').each_with_object({}) do |pair, params|
|
|
119
|
+
key, value = pair.split('=', 2)
|
|
120
|
+
next if key.nil? || key.empty?
|
|
118
121
|
|
|
119
|
-
|
|
120
|
-
|
|
122
|
+
params[CGI.unescape(key).to_sym] = value && CGI.unescape(value)
|
|
123
|
+
end
|
|
121
124
|
end
|
|
122
125
|
|
|
123
|
-
def
|
|
124
|
-
|
|
126
|
+
def query_string
|
|
127
|
+
query.map do |key, value|
|
|
128
|
+
key = CGI.escape(key.to_s)
|
|
129
|
+
|
|
130
|
+
value.nil? ? key : "#{key}=#{CGI.escape(value)}"
|
|
131
|
+
end.join('&')
|
|
125
132
|
end
|
|
126
133
|
end
|
|
127
134
|
end
|
data/lib/deeplink/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,105 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: deeplink
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ricardo Otero
|
|
8
|
-
|
|
9
|
-
bindir: exe
|
|
8
|
+
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
-
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: bundler
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '2.1'
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - "~>"
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '2.1'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: pry-byebug
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - "~>"
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: 3.4.2
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - "~>"
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: 3.4.2
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: rake
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - ">="
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: 12.3.3
|
|
48
|
-
type: :development
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - ">="
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: 12.3.3
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: rspec
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - ">="
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: 3.4.0
|
|
62
|
-
- - "~>"
|
|
63
|
-
- !ruby/object:Gem::Version
|
|
64
|
-
version: 3.4.0
|
|
65
|
-
type: :development
|
|
66
|
-
prerelease: false
|
|
67
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
68
|
-
requirements:
|
|
69
|
-
- - ">="
|
|
70
|
-
- !ruby/object:Gem::Version
|
|
71
|
-
version: 3.4.0
|
|
72
|
-
- - "~>"
|
|
73
|
-
- !ruby/object:Gem::Version
|
|
74
|
-
version: 3.4.0
|
|
75
|
-
- !ruby/object:Gem::Dependency
|
|
76
|
-
name: rubocop
|
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
|
78
|
-
requirements:
|
|
79
|
-
- - "~>"
|
|
80
|
-
- !ruby/object:Gem::Version
|
|
81
|
-
version: '0.50'
|
|
82
|
-
type: :development
|
|
83
|
-
prerelease: false
|
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
85
|
-
requirements:
|
|
86
|
-
- - "~>"
|
|
87
|
-
- !ruby/object:Gem::Version
|
|
88
|
-
version: '0.50'
|
|
89
|
-
- !ruby/object:Gem::Dependency
|
|
90
|
-
name: rubocop-rspec
|
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
|
92
|
-
requirements:
|
|
93
|
-
- - "~>"
|
|
94
|
-
- !ruby/object:Gem::Version
|
|
95
|
-
version: '1.20'
|
|
96
|
-
type: :development
|
|
97
|
-
prerelease: false
|
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
99
|
-
requirements:
|
|
100
|
-
- - "~>"
|
|
101
|
-
- !ruby/object:Gem::Version
|
|
102
|
-
version: '1.20'
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
103
12
|
description: It mitigates the lack of support for mobile deep links on the URI module.
|
|
104
13
|
email:
|
|
105
14
|
- oterosantos@gmail.com
|
|
@@ -107,26 +16,20 @@ executables: []
|
|
|
107
16
|
extensions: []
|
|
108
17
|
extra_rdoc_files: []
|
|
109
18
|
files:
|
|
110
|
-
-
|
|
111
|
-
- ".rspec"
|
|
112
|
-
- ".rubocop.yml"
|
|
113
|
-
- ".ruby-version"
|
|
114
|
-
- ".travis.yml"
|
|
115
|
-
- Gemfile
|
|
19
|
+
- CHANGELOG.md
|
|
116
20
|
- LICENSE.txt
|
|
117
21
|
- README.md
|
|
118
|
-
- Rakefile
|
|
119
|
-
- bin/console
|
|
120
|
-
- bin/setup
|
|
121
|
-
- deeplink.gemspec
|
|
122
22
|
- lib/deeplink.rb
|
|
123
23
|
- lib/deeplink/link.rb
|
|
124
24
|
- lib/deeplink/version.rb
|
|
125
25
|
homepage: https://github.com/rikas/deeplink
|
|
126
26
|
licenses:
|
|
127
27
|
- MIT
|
|
128
|
-
metadata:
|
|
129
|
-
|
|
28
|
+
metadata:
|
|
29
|
+
source_code_uri: https://github.com/rikas/deeplink
|
|
30
|
+
bug_tracker_uri: https://github.com/rikas/deeplink/issues
|
|
31
|
+
changelog_uri: https://github.com/rikas/deeplink/blob/main/CHANGELOG.md
|
|
32
|
+
rubygems_mfa_required: 'true'
|
|
130
33
|
rdoc_options: []
|
|
131
34
|
require_paths:
|
|
132
35
|
- lib
|
|
@@ -134,15 +37,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
134
37
|
requirements:
|
|
135
38
|
- - ">="
|
|
136
39
|
- !ruby/object:Gem::Version
|
|
137
|
-
version: '
|
|
40
|
+
version: '3.2'
|
|
138
41
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
42
|
requirements:
|
|
140
43
|
- - ">="
|
|
141
44
|
- !ruby/object:Gem::Version
|
|
142
45
|
version: '0'
|
|
143
46
|
requirements: []
|
|
144
|
-
rubygems_version:
|
|
145
|
-
signing_key:
|
|
47
|
+
rubygems_version: 4.0.10
|
|
146
48
|
specification_version: 4
|
|
147
49
|
summary: Gem to manage deep links parsing.
|
|
148
50
|
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
require: rubocop-rspec
|
|
2
|
-
|
|
3
|
-
# Configuration parameters: AllowURI, URISchemes.
|
|
4
|
-
Metrics/LineLength:
|
|
5
|
-
Max: 100
|
|
6
|
-
|
|
7
|
-
Style/Documentation:
|
|
8
|
-
Enabled: false
|
|
9
|
-
|
|
10
|
-
# Assignment Branch Condition size.
|
|
11
|
-
Metrics/AbcSize:
|
|
12
|
-
Max: 25
|
|
13
|
-
|
|
14
|
-
# Don't force me to write unreadable tests, please.
|
|
15
|
-
RSpec/PredicateMatcher:
|
|
16
|
-
Enabled: false
|
|
17
|
-
|
|
18
|
-
# I like to write multiple expectations.
|
|
19
|
-
RSpec/MultipleExpectations:
|
|
20
|
-
Enabled: false
|
|
21
|
-
|
|
22
|
-
# Don't care about example length.
|
|
23
|
-
RSpec/ExampleLength:
|
|
24
|
-
Enabled: false
|
|
25
|
-
|
|
26
|
-
Metrics/BlockLength:
|
|
27
|
-
Exclude:
|
|
28
|
-
- 'spec/**'
|
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.6.5
|
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
data/bin/console
DELETED
data/bin/setup
DELETED
data/deeplink.gemspec
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
lib = File.expand_path('../lib', __FILE__)
|
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
-
|
|
6
|
-
require 'deeplink/version'
|
|
7
|
-
|
|
8
|
-
Gem::Specification.new do |spec|
|
|
9
|
-
spec.name = 'deeplink'
|
|
10
|
-
spec.version = Deeplink::VERSION
|
|
11
|
-
spec.authors = ['Ricardo Otero']
|
|
12
|
-
spec.email = ['oterosantos@gmail.com']
|
|
13
|
-
|
|
14
|
-
spec.summary = 'Gem to manage deep links parsing.'
|
|
15
|
-
spec.description = 'It mitigates the lack of support for mobile deep links on the URI module.'
|
|
16
|
-
spec.homepage = 'https://github.com/rikas/deeplink'
|
|
17
|
-
spec.license = 'MIT'
|
|
18
|
-
|
|
19
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
|
|
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_development_dependency 'bundler', '~> 2.1'
|
|
25
|
-
spec.add_development_dependency 'pry-byebug', '~> 3.4.2'
|
|
26
|
-
spec.add_development_dependency 'rake', '>= 12.3.3'
|
|
27
|
-
spec.add_development_dependency 'rspec', '~> 3.4.0', '>= 3.4.0'
|
|
28
|
-
spec.add_development_dependency 'rubocop', '~> 0.50'
|
|
29
|
-
spec.add_development_dependency 'rubocop-rspec', '~> 1.20'
|
|
30
|
-
end
|