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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a21bbaf6852dc00c19f67b03189a2a93a177d59770d34f9043c938c5c3f0290e
4
- data.tar.gz: c84abb94d362c3c570b5f2a1c34f0f46c2baa7b5321fe8778b0abbd9cdb875d3
3
+ metadata.gz: 5258494e8891ca8dcd0e05f5d19002c981d0d7ec213e96a2a9f446d08e9622e7
4
+ data.tar.gz: 6d80c29a397aa832ca8618d37b9c67dec410cf977072a1b50928aae9c5766bd1
5
5
  SHA512:
6
- metadata.gz: '08ddc30e29c89d2060d8094e4f08fb41b49aec4844c8642409fe57bd39c401d953fcdae46577893b4181eaaa580caba32a4f83cbcefe120ee158a239ca72baa7'
7
- data.tar.gz: 1365b6073a48203e9da29451758f8c26cca7d09c2c8a8ebd95bcb01047c798db43192a1240ac4a906f8d45637fa15b8ce024f0fc0bbad267b1c66cbeea759493
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
- [![Gem Version](https://badge.fury.io/rb/deeplink.svg)](https://badge.fury.io/rb/deeplink) [![Build Status](https://travis-ci.org/rikas/deeplink.svg?branch=master)](https://travis-ci.org/rikas/deeplink)
1
+ [![Gem Version](https://badge.fury.io/rb/deeplink.svg)](https://badge.fury.io/rb/deeplink)
2
+ [![CI](https://github.com/rikas/deeplink/actions/workflows/ci.yml/badge.svg)](https://github.com/rikas/deeplink/actions/workflows/ci.yml)
2
3
 
3
4
  # Deeplink
4
5
 
5
- Handle deep links in an easy way.
6
+ Parse, inspect and build mobile deep links (`myapp://products/42?ref=email`) in an easy way.
6
7
 
7
- This gem needs ruby version >= 2.1
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
- ## Installation
12
+ This gem needs Ruby >= 3.2.
10
13
 
11
- Add this line to your application's Gemfile:
14
+ ## Installation
12
15
 
13
- ```ruby
14
- gem 'deeplink'
16
+ ```sh
17
+ bundle add deeplink
15
18
  ```
16
19
 
17
- And then execute:
18
-
19
- $ bundle
20
-
21
- Or install it yourself as:
20
+ Or install it yourself:
22
21
 
23
- $ gem install deeplink
22
+ ```sh
23
+ gem install deeplink
24
+ ```
24
25
 
25
26
  ## Usage
26
27
 
27
28
  ### Parsing a deep link
28
29
 
29
- Just call `Deeplink.parse` with a deep link String and then you can read the scheme and path.
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('foursquare://checkins/12932')
43
+ deeplink = Deeplink.parse('sms:+351910000000?body=hello')
33
44
 
34
- deeplink.scheme # => "foursquare"
35
- deeplink.path # => "/checkins/12932"
36
- deeplink.to_s # => "foursquare://checkins/12932"
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
- To get the query parameters of a link use `query` method.
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('foursquare://checkins/209823?test=true')
55
+ deeplink = Deeplink.parse('myshop://products/42?ref=email')
45
56
 
46
- deeplink.query # => { :test => "true" }
57
+ deeplink.query # => { ref: "email" }
58
+ deeplink.query? # => true
47
59
  ```
48
60
 
49
- #### Adding a query parameter
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('foursquare://checkins/20982')
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
- deeplink.add_query(foo: 'bar') # => { :foo => "bar" }
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
- deeplink = Deeplink.parse('foursquare://checkins/20982')
75
+ ```ruby
76
+ deeplink = Deeplink.parse('myshop://cart')
60
77
 
61
- deeplink.add_query(foo: 'bar', biz: 'baz') # => { :foo => "bar", :biz => "baz" }
62
- deeplink.to_s # => "foursquare://checkins/20982?foo=bar&biz=baz"
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 a query parameter
82
+ #### Removing query parameters
66
83
 
67
- To remove query parameters call `remove_query` with the key (or list of keys) that you want to
68
- remove. The method will return the value of the deleted key(s).
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('foursquare://checkins/20982?foo=bar')
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(:foo) # => "bar"
74
- deeplink.to_s # => "foursquare://checkins/20982"
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('foursquare://checkins/20982?foo=bar&fu=baz')
102
+ deeplink = Deeplink.parse('myshop://products/42#reviews')
79
103
 
80
- deeplink.remove_query(:foo, :fu) # => ["bar", "baz"]
81
- deeplink.to_s # => "foursquare://checkins/20982"
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 `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
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 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).
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](http://opensource.org/licenses/MIT).
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
- require 'cgi'
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
- attr_accessor :scheme, :path
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 query string use #add_query and #remove_query
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.path = uri.path
27
+ self.fragment = uri.fragment
20
28
 
21
- @query = sanitize(parse_query(uri.query)) if uri.query
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
- if keys.size > 1
54
- keys.map { |key| query.delete(key.to_sym) }
55
- else
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 query?
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(%r{://}, ':///')
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
- sanitized = {}
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
- return unless query_str
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
- param_name_value_pairs = query_str.scan(/([^&=]+)=([^&{}#]*)/)
120
- param_name_value_pairs.to_h
122
+ params[CGI.unescape(key).to_sym] = value && CGI.unescape(value)
123
+ end
121
124
  end
122
125
 
123
- def array_to_h(array)
124
- array.respond_to?(:to_h) ? array.to_h : Hash[*array.flatten]
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Deeplink
4
- VERSION = '1.1.0'
4
+ VERSION = '3.0.0'
5
5
  end
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: 1.1.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Otero
8
- autorequire:
9
- bindir: exe
8
+ bindir: bin
10
9
  cert_chain: []
11
- date: 2020-05-01 00:00:00.000000000 Z
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
- - ".gitignore"
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
- post_install_message:
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: '0'
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: 3.0.3
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
@@ -1,10 +0,0 @@
1
- *.gem
2
- /.bundle/
3
- /.yardoc
4
- /Gemfile.lock
5
- /_yardoc/
6
- /coverage/
7
- /doc/
8
- /pkg/
9
- /spec/reports/
10
- /tmp/
data/.rspec DELETED
@@ -1,4 +0,0 @@
1
- --format documentation
2
- --order rand
3
- --color
4
- --require spec_helper
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
@@ -1,8 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.2
4
- - 2.3.0
5
- - 2.4.3
6
- - 2.5.8
7
- - 2.6.5
8
- before_install: gem install bundler -v 1.13.6
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- # Specify your gem's dependencies in deeplink.gemspec
6
- gemspec
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task default: :spec
data/bin/console DELETED
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- #!/usr/bin/env ruby
4
-
5
- require 'bundler/setup'
6
- require 'deeplink'
7
-
8
- require 'pry'
9
- Pry.start
data/bin/setup DELETED
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
-
5
- bundle install
6
-
7
- # Do any other automated setup that you need to do here
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