deeplink 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0da7b3438885e4ae8c3552aa497f7d4ba221c0b
4
- data.tar.gz: d88981c34d87b91101f1a0b92d50241120262942
3
+ metadata.gz: d5c2bc7642dd2703b02b69c25dc305dc702f502d
4
+ data.tar.gz: a615434ca52b13d083f9c145497f874d8d3420df
5
5
  SHA512:
6
- metadata.gz: a3dbf808b3ebc5437546fa79718e88cd5cea7c88cbcfae2e62c847e49a080083f5900b2fdb8cae0f71b5034f691b7d2aaf09e1a2909d27c656b2272d9c5baf81
7
- data.tar.gz: 247d2e99c40cee86d165bd167f9f2e56b1ee738e79fe8f7cdc6cdda6083e4b11886854651d7d803ac84ba0b5c913e3a71d6b4c1da6ae361b48478a44c95f6662
6
+ metadata.gz: 63d7bd8a17b537ffb4550a4adb9661bacbd32aa71523d10152edb4c3acacbac71df5f2e24c2eeebb995c4967f5475409af64e95c30063fa3b98e73d7de3ae91e
7
+ data.tar.gz: 9bfbda44372af65fe70a816992d6188bba9fa15418b809670e5c22e4cb83341aea7bac21ca753c1a616beabf92f412575da19a45704582e9000f35237ac7536f
data/.rubocop.yml CHANGED
@@ -4,11 +4,25 @@ require: rubocop-rspec
4
4
  Metrics/LineLength:
5
5
  Max: 100
6
6
 
7
- # Offense count: 6
8
- # Configuration parameters: Exclude.
9
7
  Style/Documentation:
10
8
  Enabled: false
11
9
 
12
- # Assignment Branch Condition size
10
+ # Assignment Branch Condition size.
13
11
  Metrics/AbcSize:
14
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/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in deeplink.gemspec
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
 
data/bin/console CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #!/usr/bin/env ruby
2
4
 
3
5
  require 'bundler/setup'
data/deeplink.gemspec CHANGED
@@ -1,4 +1,5 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
 
@@ -21,9 +22,9 @@ Gem::Specification.new do |spec|
21
22
  spec.require_paths = ['lib']
22
23
 
23
24
  spec.add_development_dependency 'bundler', '~> 1.10'
25
+ spec.add_development_dependency 'pry-byebug', '~> 3.4.2'
24
26
  spec.add_development_dependency 'rake', '~> 10.0'
25
27
  spec.add_development_dependency 'rspec', '~> 3.4.0', '>= 3.4.0'
26
- spec.add_development_dependency 'pry', '~> 0.10.3'
27
- spec.add_development_dependency 'rubocop', '~> 0.35'
28
- spec.add_development_dependency 'rubocop-rspec', '~> 1.3'
28
+ spec.add_development_dependency 'rubocop', '~> 0.50'
29
+ spec.add_development_dependency 'rubocop-rspec', '~> 1.20'
29
30
  end
data/lib/deeplink.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'uri'
2
4
  require 'deeplink/link'
3
5
  require 'deeplink/version'
data/lib/deeplink/link.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'uri'
2
4
  require 'cgi'
3
5
 
@@ -72,7 +74,7 @@ module Deeplink
72
74
  !query.empty?
73
75
  end
74
76
 
75
- alias_method :has_query?, :query?
77
+ alias has_query? query?
76
78
 
77
79
  # Returns the link as a String
78
80
  def to_s
@@ -82,7 +84,8 @@ module Deeplink
82
84
 
83
85
  if query?
84
86
  query_string = query.map { |key, value| "#{key}=#{value}" }.join('&')
85
- uri << "?#{query_string}"
87
+
88
+ uri += "?#{query_string}"
86
89
  end
87
90
 
88
91
  uri
@@ -113,14 +116,12 @@ module Deeplink
113
116
  def parse_query(query_str)
114
117
  return unless query_str
115
118
 
116
- param_name_value_pairs = query_str.scan(/([^&=]+)=([^&#{}]*)/)
119
+ param_name_value_pairs = query_str.scan(/([^&=]+)=([^&{}#]*)/)
117
120
 
118
- # We can't use just .to_h in param_name_value_pairs because if ruby < 2.1
119
- array_to_h(param_name_value_pairs)
121
+ # We can't use just .to_h in param_name_value_pairs because if ruby < 2.1
122
+ array_to_h(param_name_value_pairs)
120
123
  end
121
124
 
122
- private
123
-
124
125
  def array_to_h(array)
125
126
  array.respond_to?(:to_h) ? array.to_h : Hash[*array.flatten]
126
127
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Deeplink
2
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
3
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deeplink
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Otero
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-06 00:00:00.000000000 Z
11
+ date: 2018-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.10'
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
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,48 +72,34 @@ dependencies:
58
72
  - - ">="
59
73
  - !ruby/object:Gem::Version
60
74
  version: 3.4.0
61
- - !ruby/object:Gem::Dependency
62
- name: pry
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: 0.10.3
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: 0.10.3
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rubocop
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.35'
81
+ version: '0.50'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '0.35'
88
+ version: '0.50'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rubocop-rspec
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '1.3'
95
+ version: '1.20'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '1.3'
102
+ version: '1.20'
103
103
  description: It mitigates the lack of support for mobile deep links on the URI module.
104
104
  email:
105
105
  - oterosantos@gmail.com