absolutely 1.1.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +1 -1
- data/.reek.yml +6 -0
- data/.rubocop.yml +7 -0
- data/.ruby-version +1 -1
- data/.travis.yml +5 -7
- data/CHANGELOG.md +5 -0
- data/CONTRIBUTING.md +2 -2
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/Rakefile +6 -1
- data/absolutely.gemspec +5 -4
- data/lib/absolutely.rb +2 -1
- data/lib/absolutely/{error.rb → exceptions.rb} +0 -0
- data/lib/absolutely/uri.rb +6 -7
- data/lib/absolutely/version.rb +1 -1
- metadata +31 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f16f86035665614b32d4fa91b9f87095c567bf62c4905bf08281f9dc06f9b00
|
4
|
+
data.tar.gz: affcb6d3a59693727e4354cea0d52ff7813332ddd006d1370ab15c8253cfebca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43f2451ce53d29070180c5889fdfce3f31c542db7508c0a50d7f4e195deab3a58b14f6bb9b08fca8e6b7e739ff453849561deaded3b543b6b78ae83692a0f397
|
7
|
+
data.tar.gz: 14411e64c9ca529968c2333b90db9f306a119af0049e3e96ec3c7aee45a25633e57b37c1fd0a4bc3673dbf643f0655bfd62b81025518e010e997150adecb9a2d
|
data/.editorconfig
CHANGED
data/.reek.yml
ADDED
data/.rubocop.yml
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require:
|
2
|
+
- rubocop-performance
|
2
3
|
- rubocop-rspec
|
3
4
|
|
4
5
|
Metrics/BlockLength:
|
@@ -8,8 +9,14 @@ Metrics/BlockLength:
|
|
8
9
|
Metrics/LineLength:
|
9
10
|
Enabled: false
|
10
11
|
|
12
|
+
Naming/RescuedExceptionsVariableName:
|
13
|
+
PreferredName: exception
|
14
|
+
|
11
15
|
Style/Documentation:
|
12
16
|
Enabled: false
|
13
17
|
|
14
18
|
Style/FrozenStringLiteralComment:
|
15
19
|
Enabled: false
|
20
|
+
|
21
|
+
Style/SymbolArray:
|
22
|
+
Enabled: false
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.4.
|
1
|
+
2.4.6
|
data/.travis.yml
CHANGED
@@ -1,19 +1,17 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.4.
|
4
|
-
- 2.5.
|
5
|
-
- 2.6.
|
3
|
+
- 2.4.6
|
4
|
+
- 2.5.5
|
5
|
+
- 2.6.2
|
6
6
|
cache:
|
7
7
|
- bundler
|
8
8
|
before_install:
|
9
|
-
- gem
|
9
|
+
- gem update --system
|
10
|
+
- gem install bundler
|
10
11
|
before_script:
|
11
12
|
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
12
13
|
- chmod +x ./cc-test-reporter
|
13
14
|
- ./cc-test-reporter before-build
|
14
|
-
script:
|
15
|
-
- bundle exec rubocop
|
16
|
-
- bundle exec rake
|
17
15
|
after_script:
|
18
16
|
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
19
17
|
notifications:
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.0.0 / 2019-04-25
|
4
|
+
|
5
|
+
- The `URI` class' `base` and `relative` methods are now read-only ([7879f78](https://github.com/jgarber623/absolutely/commit/7879f78)).
|
6
|
+
- Add Reek and configuration ([fb60f9c](https://github.com/jgarber623/absolutely/commit/fb60f9c)).
|
7
|
+
|
3
8
|
## 1.1.2 / 2019-01-03
|
4
9
|
|
5
10
|
- Expand supported Ruby versions to include 2.6 ([866d58a](https://github.com/jgarber623/absolutely/commit/866d58a)).
|
data/CONTRIBUTING.md
CHANGED
@@ -8,9 +8,9 @@ There are a couple ways you can help improve Absolutely:
|
|
8
8
|
|
9
9
|
## Getting Started
|
10
10
|
|
11
|
-
Absolutely is developed using Ruby 2.4.
|
11
|
+
Absolutely is developed using Ruby 2.4.6 and is additionally tested against Ruby 2.5.5 and 2.6.2 using [Travis CI](https://travis-ci.com/jgarber623/absolutely).
|
12
12
|
|
13
|
-
Before making changes to Absolutely, you'll want to install Ruby 2.4.
|
13
|
+
Before making changes to Absolutely, you'll want to install Ruby 2.4.6. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm). Once you've installed Ruby 2.4.6 using your method of choice, install the project's gems by running:
|
14
14
|
|
15
15
|
```sh
|
16
16
|
bundle install
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
Before installing and using Absolutely, you'll want to have [Ruby](https://www.ruby-lang.org) 2.4 (or newer) installed. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm).
|
20
20
|
|
21
|
-
Absolutely is developed using Ruby 2.4.
|
21
|
+
Absolutely is developed using Ruby 2.4.6 and is additionally tested against Ruby 2.5.5 and 2.6.2 using [Travis CI](https://travis-ci.com/jgarber623/absolutely).
|
22
22
|
|
23
23
|
## Installation
|
24
24
|
|
data/Rakefile
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
|
+
|
3
|
+
require 'reek/rake/task'
|
2
4
|
require 'rspec/core/rake_task'
|
5
|
+
require 'rubocop/rake_task'
|
3
6
|
|
7
|
+
Reek::Rake::Task.new
|
4
8
|
RSpec::Core::RakeTask.new
|
9
|
+
RuboCop::RakeTask.new
|
5
10
|
|
6
|
-
task default: :spec
|
11
|
+
task default: [:rubocop, :reek, :spec]
|
data/absolutely.gemspec
CHANGED
@@ -20,13 +20,14 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
|
-
spec.add_development_dependency 'bundler', '~> 1.17'
|
24
23
|
spec.add_development_dependency 'rake', '~> 12.3'
|
24
|
+
spec.add_development_dependency 'reek', '~> 5.4'
|
25
25
|
spec.add_development_dependency 'rspec', '~> 3.8'
|
26
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
27
|
-
spec.add_development_dependency 'rubocop-
|
26
|
+
spec.add_development_dependency 'rubocop', '~> 0.67.2'
|
27
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.1'
|
28
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 1.32'
|
28
29
|
spec.add_development_dependency 'simplecov', '~> 0.16.1'
|
29
30
|
spec.add_development_dependency 'simplecov-console', '~> 0.4.2'
|
30
31
|
|
31
|
-
spec.add_runtime_dependency 'addressable', '~> 2.
|
32
|
+
spec.add_runtime_dependency 'addressable', '~> 2.6'
|
32
33
|
end
|
data/lib/absolutely.rb
CHANGED
File without changes
|
data/lib/absolutely/uri.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Absolutely
|
2
2
|
class URI
|
3
|
-
|
3
|
+
attr_reader :base, :relative
|
4
4
|
|
5
5
|
def initialize(base:, relative:)
|
6
6
|
raise ArgumentError, "base must be a String (given #{base.class.name})" unless base.is_a?(String)
|
@@ -9,21 +9,20 @@ module Absolutely
|
|
9
9
|
@base = base
|
10
10
|
@relative = relative
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
base_uri
|
14
13
|
relative_uri
|
14
|
+
|
15
|
+
raise ArgumentError, 'base must be an absolute URI (e.g. https://example.com)' unless base_uri.absolute?
|
16
|
+
rescue Addressable::URI::InvalidURIError => exception
|
17
|
+
raise InvalidURIError, exception
|
15
18
|
end
|
16
19
|
|
17
20
|
def base_uri
|
18
21
|
@base_uri ||= Addressable::URI.parse(base)
|
19
|
-
rescue Addressable::URI::InvalidURIError => error
|
20
|
-
raise InvalidURIError, error
|
21
22
|
end
|
22
23
|
|
23
24
|
def relative_uri
|
24
25
|
@relative_uri ||= Addressable::URI.parse(relative)
|
25
|
-
rescue Addressable::URI::InvalidURIError => error
|
26
|
-
raise InvalidURIError, error
|
27
26
|
end
|
28
27
|
|
29
28
|
def to_absolute_uri
|
data/lib/absolutely/version.rb
CHANGED
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: absolutely
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Garber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '12.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '12.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: reek
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '5.4'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '5.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,28 +58,42 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.67.2
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.67.2
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-performance
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.1'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
82
|
+
version: '1.1'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rubocop-rspec
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '1.
|
89
|
+
version: '1.32'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '1.
|
96
|
+
version: '1.32'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: simplecov
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,14 +128,14 @@ dependencies:
|
|
114
128
|
requirements:
|
115
129
|
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: '2.
|
131
|
+
version: '2.6'
|
118
132
|
type: :runtime
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: '2.
|
138
|
+
version: '2.6'
|
125
139
|
description: Convert relative paths to absolute URIs.
|
126
140
|
email:
|
127
141
|
- jason@sixtwothree.org
|
@@ -131,6 +145,7 @@ extra_rdoc_files: []
|
|
131
145
|
files:
|
132
146
|
- ".editorconfig"
|
133
147
|
- ".gitignore"
|
148
|
+
- ".reek.yml"
|
134
149
|
- ".rspec"
|
135
150
|
- ".rubocop"
|
136
151
|
- ".rubocop.yml"
|
@@ -145,7 +160,7 @@ files:
|
|
145
160
|
- Rakefile
|
146
161
|
- absolutely.gemspec
|
147
162
|
- lib/absolutely.rb
|
148
|
-
- lib/absolutely/
|
163
|
+
- lib/absolutely/exceptions.rb
|
149
164
|
- lib/absolutely/uri.rb
|
150
165
|
- lib/absolutely/version.rb
|
151
166
|
homepage: https://github.com/jgarber623/absolutely
|
@@ -170,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
185
|
- !ruby/object:Gem::Version
|
171
186
|
version: '0'
|
172
187
|
requirements: []
|
173
|
-
rubygems_version: 3.0.
|
188
|
+
rubygems_version: 3.0.3
|
174
189
|
signing_key:
|
175
190
|
specification_version: 4
|
176
191
|
summary: Convert relative paths to absolute URIs.
|