uri_config 0.0.11 → 0.0.13
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 +5 -5
- data/.rubocop.yml +8 -3
- data/.rubocop_todo.yml +88 -0
- data/lib/uri_config/config.rb +8 -1
- data/lib/uri_config/version.rb +1 -1
- data/spec/config_spec.rb +3 -2
- data/uri_config.gemspec +4 -4
- metadata +12 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 6ee64d5be4c4f10b4b080d18884acdc41354e4ef358e03951053796fb36701de
|
|
4
|
+
data.tar.gz: 548f2382a96e1b680198920da71e086b53aaf48e711bd3a3f04576764ca94e0c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 84daa76359f77b5baa6107b616bee135852392af0bd205ca3a83aa45dfcb26873b6536faecbb5ab71d8962cd441970dcd8a28f50770646d6baced4a5ef724e01
|
|
7
|
+
data.tar.gz: c7a99e12f962ebb06a4dc29fa7007569c5ebd2e3295a66d305efdc2891253de17957f1f1015f28e280701f06cc93782c741fd669ad894f86b30d03d2b4c9e3aa
|
data/.rubocop.yml
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
|
2
|
+
|
|
3
|
+
Layout/LineLength:
|
|
2
4
|
Max: 160
|
|
3
5
|
|
|
4
6
|
Metrics/ModuleLength:
|
|
@@ -16,7 +18,10 @@ Style/StringLiterals:
|
|
|
16
18
|
Style/SymbolProc:
|
|
17
19
|
Enabled: false
|
|
18
20
|
|
|
19
|
-
Style/
|
|
21
|
+
Style/TrailingCommaInArrayLiteral:
|
|
22
|
+
EnforcedStyleForMultiline: comma
|
|
23
|
+
|
|
24
|
+
Style/TrailingCommaInHashLiteral:
|
|
20
25
|
EnforcedStyleForMultiline: comma
|
|
21
26
|
|
|
22
27
|
# 1.8 compatible :(
|
|
@@ -24,7 +29,7 @@ Style/HashSyntax:
|
|
|
24
29
|
EnforcedStyle: hash_rockets
|
|
25
30
|
Style/TrailingCommaInArguments:
|
|
26
31
|
EnforcedStyleForMultiline: no_comma
|
|
27
|
-
|
|
32
|
+
Layout/DotPosition:
|
|
28
33
|
EnforcedStyle: trailing
|
|
29
34
|
Style/EachWithObject:
|
|
30
35
|
Enabled: false
|
data/.rubocop_todo.yml
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# This configuration was generated by
|
|
2
|
+
# `rubocop --auto-gen-config`
|
|
3
|
+
# on 2026-03-31 06:01:14 UTC using RuboCop version 1.86.0.
|
|
4
|
+
# The point is for the user to remove these configuration records
|
|
5
|
+
# one by one as the offenses are removed from the code base.
|
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
+
|
|
9
|
+
# Offense count: 1
|
|
10
|
+
Gemspec/RequiredRubyVersion:
|
|
11
|
+
Exclude:
|
|
12
|
+
- 'uri_config.gemspec'
|
|
13
|
+
|
|
14
|
+
# Offense count: 1
|
|
15
|
+
Gemspec/RubyVersionGlobalsUsage:
|
|
16
|
+
Exclude:
|
|
17
|
+
- 'uri_config.gemspec'
|
|
18
|
+
|
|
19
|
+
# Offense count: 1
|
|
20
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
21
|
+
# Configuration parameters: EnforcedStyle.
|
|
22
|
+
# SupportedStyles: leading, trailing
|
|
23
|
+
Layout/DotPosition:
|
|
24
|
+
Exclude:
|
|
25
|
+
- 'lib/uri_config/config.rb'
|
|
26
|
+
|
|
27
|
+
# Offense count: 1
|
|
28
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
29
|
+
Layout/EmptyLineAfterMagicComment:
|
|
30
|
+
Exclude:
|
|
31
|
+
- 'uri_config.gemspec'
|
|
32
|
+
|
|
33
|
+
# Offense count: 1
|
|
34
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
35
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
36
|
+
# SupportedStyles: aligned, indented, indented_relative_to_receiver
|
|
37
|
+
Layout/MultilineMethodCallIndentation:
|
|
38
|
+
Exclude:
|
|
39
|
+
- 'lib/uri_config/config.rb'
|
|
40
|
+
|
|
41
|
+
# Offense count: 4
|
|
42
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
43
|
+
# AllowedMethods: refine
|
|
44
|
+
Metrics/BlockLength:
|
|
45
|
+
Max: 124
|
|
46
|
+
|
|
47
|
+
# Offense count: 1
|
|
48
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
49
|
+
Style/Encoding:
|
|
50
|
+
Exclude:
|
|
51
|
+
- 'uri_config.gemspec'
|
|
52
|
+
|
|
53
|
+
# Offense count: 1
|
|
54
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
55
|
+
Style/ExpandPathArguments:
|
|
56
|
+
Exclude:
|
|
57
|
+
- 'uri_config.gemspec'
|
|
58
|
+
|
|
59
|
+
# Offense count: 10
|
|
60
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
61
|
+
# Configuration parameters: EnforcedStyle.
|
|
62
|
+
# SupportedStyles: always, always_true, never
|
|
63
|
+
Style/FrozenStringLiteralComment:
|
|
64
|
+
Exclude:
|
|
65
|
+
- '**/*.arb'
|
|
66
|
+
- 'Gemfile'
|
|
67
|
+
- 'Rakefile'
|
|
68
|
+
- 'lib/uri_config.rb'
|
|
69
|
+
- 'lib/uri_config/action_mailer_config.rb'
|
|
70
|
+
- 'lib/uri_config/config.rb'
|
|
71
|
+
- 'lib/uri_config/version.rb'
|
|
72
|
+
- 'spec/action_mailer_config_spec.rb'
|
|
73
|
+
- 'spec/config_spec.rb'
|
|
74
|
+
- 'spec/s3_config_spec.rb'
|
|
75
|
+
- 'uri_config.gemspec'
|
|
76
|
+
|
|
77
|
+
# Offense count: 1
|
|
78
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
79
|
+
# Configuration parameters: PreferredDelimiters.
|
|
80
|
+
Style/PercentLiteralDelimiters:
|
|
81
|
+
Exclude:
|
|
82
|
+
- 'spec/config_spec.rb'
|
|
83
|
+
|
|
84
|
+
# Offense count: 1
|
|
85
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
86
|
+
Style/SlicingWithRange:
|
|
87
|
+
Exclude:
|
|
88
|
+
- 'spec/s3_config_spec.rb'
|
data/lib/uri_config/config.rb
CHANGED
|
@@ -67,6 +67,10 @@ module URIConfig
|
|
|
67
67
|
uri.path
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
+
def scheme
|
|
71
|
+
uri.scheme
|
|
72
|
+
end
|
|
73
|
+
|
|
70
74
|
def base_uri
|
|
71
75
|
uri.dup.tap do |uri|
|
|
72
76
|
uri.user = nil
|
|
@@ -92,7 +96,10 @@ module URIConfig
|
|
|
92
96
|
private
|
|
93
97
|
|
|
94
98
|
def query
|
|
95
|
-
|
|
99
|
+
URI.decode_www_form(uri.query || '')
|
|
100
|
+
.each_with_object(Hash.new { |hash, key| hash[key] = [] }) do |(key, value), hash|
|
|
101
|
+
hash[key] << value
|
|
102
|
+
end
|
|
96
103
|
end
|
|
97
104
|
|
|
98
105
|
def uri
|
data/lib/uri_config/version.rb
CHANGED
data/spec/config_spec.rb
CHANGED
|
@@ -5,10 +5,10 @@ module URIConfig
|
|
|
5
5
|
subject { described_class.new(url) }
|
|
6
6
|
|
|
7
7
|
{
|
|
8
|
-
"https://TESTMERCHANT1:abcd1234abcd@secure.ap.tnspayments.com" => {
|
|
8
|
+
"https://TESTMERCHANT1:abcd1234abcd@secure.ap.tnspayments.com/gateway" => {
|
|
9
9
|
:username => 'TESTMERCHANT1',
|
|
10
10
|
:password => 'abcd1234abcd',
|
|
11
|
-
:base_uri => 'https://secure.ap.tnspayments.com',
|
|
11
|
+
:base_uri => 'https://secure.ap.tnspayments.com/gateway',
|
|
12
12
|
},
|
|
13
13
|
"https://foo:bar@us-west-2.amazonaws.com/namespace" => {
|
|
14
14
|
:username => "foo",
|
|
@@ -23,6 +23,7 @@ module URIConfig
|
|
|
23
23
|
"https://example.com:8080" => {
|
|
24
24
|
:host => "example.com",
|
|
25
25
|
:port => 8080,
|
|
26
|
+
:scheme => "https",
|
|
26
27
|
},
|
|
27
28
|
}.each do |url, components|
|
|
28
29
|
context "with a URL of #{url}" do
|
data/uri_config.gemspec
CHANGED
|
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
19
|
spec.require_paths = ["lib"]
|
|
20
20
|
|
|
21
|
-
spec.add_development_dependency "bundler", "~>
|
|
22
|
-
spec.add_development_dependency "rake", "~>
|
|
23
|
-
spec.add_development_dependency "rspec", "~> 3.
|
|
24
|
-
spec.add_development_dependency "rubocop", "~>
|
|
21
|
+
spec.add_development_dependency "bundler", "~> 4.0"
|
|
22
|
+
spec.add_development_dependency "rake", "~> 13.2"
|
|
23
|
+
spec.add_development_dependency "rspec", "~> 3.13.2"
|
|
24
|
+
spec.add_development_dependency "rubocop", "~> 1.86.0" if RUBY_VERSION >= "1.9"
|
|
25
25
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: uri_config
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathon M. Abbott
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bundler
|
|
@@ -16,56 +15,56 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
18
|
+
version: '4.0'
|
|
20
19
|
type: :development
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - "~>"
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
25
|
+
version: '4.0'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: rake
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
30
|
- - "~>"
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
32
|
+
version: '13.2'
|
|
34
33
|
type: :development
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - "~>"
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
39
|
+
version: '13.2'
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
41
|
name: rspec
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
44
43
|
requirements:
|
|
45
44
|
- - "~>"
|
|
46
45
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 3.
|
|
46
|
+
version: 3.13.2
|
|
48
47
|
type: :development
|
|
49
48
|
prerelease: false
|
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
50
|
requirements:
|
|
52
51
|
- - "~>"
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 3.
|
|
53
|
+
version: 3.13.2
|
|
55
54
|
- !ruby/object:Gem::Dependency
|
|
56
55
|
name: rubocop
|
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
|
58
57
|
requirements:
|
|
59
58
|
- - "~>"
|
|
60
59
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
60
|
+
version: 1.86.0
|
|
62
61
|
type: :development
|
|
63
62
|
prerelease: false
|
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
64
|
requirements:
|
|
66
65
|
- - "~>"
|
|
67
66
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
67
|
+
version: 1.86.0
|
|
69
68
|
description: extract configuration from URIs
|
|
70
69
|
email:
|
|
71
70
|
- jonathona@everydayhero.com.au
|
|
@@ -76,6 +75,7 @@ files:
|
|
|
76
75
|
- ".gitignore"
|
|
77
76
|
- ".rspec"
|
|
78
77
|
- ".rubocop.yml"
|
|
78
|
+
- ".rubocop_todo.yml"
|
|
79
79
|
- ".travis.yml"
|
|
80
80
|
- Gemfile
|
|
81
81
|
- LICENSE.txt
|
|
@@ -93,7 +93,6 @@ homepage: https://github.com/JonathonMA/uri_config
|
|
|
93
93
|
licenses:
|
|
94
94
|
- MIT
|
|
95
95
|
metadata: {}
|
|
96
|
-
post_install_message:
|
|
97
96
|
rdoc_options: []
|
|
98
97
|
require_paths:
|
|
99
98
|
- lib
|
|
@@ -108,9 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
108
107
|
- !ruby/object:Gem::Version
|
|
109
108
|
version: '0'
|
|
110
109
|
requirements: []
|
|
111
|
-
|
|
112
|
-
rubygems_version: 2.5.1
|
|
113
|
-
signing_key:
|
|
110
|
+
rubygems_version: 4.0.6
|
|
114
111
|
specification_version: 4
|
|
115
112
|
summary: extract configuration from URIs
|
|
116
113
|
test_files:
|