absolutely 5.1.0 → 6.0.0

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
  SHA256:
3
- metadata.gz: 7d71dd15ea98516035ebf50cf2c601e706fffe9ac519bb67b7eee3066c897305
4
- data.tar.gz: 18f99fef87e3cf2e9fa0f25e256768b5d3e653563a584cf8b2bcb5b7506d4327
3
+ metadata.gz: c1aa2a1da53e491e2cfa5cd9338f7d5d10eb817a936576b01ed34ba1da52af7c
4
+ data.tar.gz: 982e6b3a9855040e398119be1bdc8e3a31fac9289315647a046f8e21ce3d78bf
5
5
  SHA512:
6
- metadata.gz: abe899336ce0b333754e344618e7767003e0f543e9bd8fecb9ee67a5d0aacab83ff12a2d9126f84b48c7ae6d6e03a6436892e843c6ecddf61e1ee6a57114e491
7
- data.tar.gz: 307b708b9b6ef5ed4c1ae1ba5be470375634f7e884bb0cadca5762dd577e46374f6f84edeccabea82af450707ab831a1820b3211fdd75855450f43e1cdec5a38
6
+ metadata.gz: 2240df9bf4081b825e303f378a29ba8f1373c240ea1e611e5ffe25adbe9f2cdc11290afc4d756d5f64eb52e83acee79c5e59dd59729e373adb9a832f08ed20c6
7
+ data.tar.gz: b976465c3c4f2d1e58e43a853397be490a6b763f28ee52228bb72c65481d447aa9bc27877ea5c882dc3bc3d7ae8c6baec51ce745fbff6809c1730c68cca6acac
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.0.0 / 2022-05-02
4
+
5
+ - **Breaking change:** Rename `AbsolutelyError` to `Error` (efcd8fa)
6
+ - Remove Reek (0d73600)
7
+ - Update Addressable dependency constraint (5faefa9)
8
+ - **Breaking change:** Set minimum supported Ruby to 2.6 (b888d5e)
9
+ - Update development Ruby to 2.6.10 (b84d268)
10
+
3
11
  ## 5.1.0 / 2021-04-02
4
12
 
5
13
  - Expand supported Ruby versions to include 3.0 (c9741de)
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.5.8 and is additionally tested against Ruby 2.6, 2.7, and 3.0 using [CircleCI](https://app.circleci.com/pipelines/github/jgarber623/absolutely).
11
+ Absolutely is developed using Ruby 2.6.10 and is additionally tested against Ruby 2.7, 3.0, and 3.1 using [GitHub Actions](https://github.com/jgarber623/absolutely/actions).
12
12
 
13
- Before making changes to Absolutely, you'll want to install Ruby 2.5.8. 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.5.8 using your method of choice, install the project's gems by running:
13
+ Before making changes to Absolutely, you'll want to install Ruby 2.6.10. 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.6.10 using your method of choice, install the project's gems by running:
14
14
 
15
15
  ```sh
16
16
  bundle install
data/README.md CHANGED
@@ -4,20 +4,20 @@
4
4
 
5
5
  [![Gem](https://img.shields.io/gem/v/absolutely.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/absolutely)
6
6
  [![Downloads](https://img.shields.io/gem/dt/absolutely.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/absolutely)
7
- [![Build](https://img.shields.io/circleci/build/github/jgarber623/absolutely?logo=circleci&style=for-the-badge)](https://app.circleci.com/pipelines/github/jgarber623/absolutely)
7
+ [![Build](https://img.shields.io/github/workflow/status/jgarber623/absolutely/CI?logo=github&style=for-the-badge)](https://github.com/jgarber623/absolutely/actions/workflows/ci.yml)
8
8
  [![Maintainability](https://img.shields.io/codeclimate/maintainability/jgarber623/absolutely.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/jgarber623/absolutely)
9
9
  [![Coverage](https://img.shields.io/codeclimate/c/jgarber623/absolutely.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/jgarber623/absolutely/code)
10
10
 
11
11
  ## Key Features
12
12
 
13
13
  - Uses the [Addressable](https://github.com/sporkmonger/addressable) Ruby gem for improved URI parsing.
14
- - Supports Ruby 2.5 and newer.
14
+ - Supports Ruby 2.6 and newer.
15
15
 
16
16
  ## Getting Started
17
17
 
18
- Before installing and using Absolutely, you'll want to have [Ruby](https://www.ruby-lang.org) 2.5 (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).
18
+ Before installing and using Absolutely, you'll want to have [Ruby](https://www.ruby-lang.org) 2.6 (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).
19
19
 
20
- Absolutely is developed using Ruby 2.5.8 and is additionally tested against Ruby 2.6, 2.7, and 3.0 using [CircleCI](https://app.circleci.com/pipelines/github/jgarber623/absolutely).
20
+ Absolutely is developed using Ruby 2.6.10 and is additionally tested against Ruby 2.7, 3.0, and 3.1 using [CircleCI](https://app.circleci.com/pipelines/github/jgarber623/absolutely).
21
21
 
22
22
  ## Installation
23
23
 
data/absolutely.gemspec CHANGED
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'lib/absolutely/version'
2
4
 
3
5
  Gem::Specification.new do |spec|
4
- spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '< 4')
6
+ spec.required_ruby_version = '>= 2.6', '< 4'
5
7
 
6
8
  spec.name = 'absolutely'
7
9
  spec.version = Absolutely::VERSION
@@ -19,8 +21,11 @@ Gem::Specification.new do |spec|
19
21
 
20
22
  spec.require_paths = ['lib']
21
23
 
22
- spec.metadata['bug_tracker_uri'] = "#{spec.homepage}/issues"
23
- spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md"
24
+ spec.metadata = {
25
+ 'bug_tracker_uri' => "#{spec.homepage}/issues",
26
+ 'changelog_uri' => "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md",
27
+ 'rubygems_mfa_required' => 'true'
28
+ }
24
29
 
25
- spec.add_runtime_dependency 'addressable', '~> 2.7'
30
+ spec.add_runtime_dependency 'addressable', '~> 2.8'
26
31
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Absolutely
2
4
  class URI
3
5
  attr_reader :base, :relative
@@ -24,8 +26,8 @@ module Absolutely
24
26
  relative_uri
25
27
 
26
28
  raise ArgumentError, 'base must be an absolute URL (e.g. https://example.com)' unless base_uri.absolute?
27
- rescue Addressable::URI::InvalidURIError => exception
28
- raise InvalidURIError, exception
29
+ rescue Addressable::URI::InvalidURIError => e
30
+ raise InvalidURIError, e
29
31
  end
30
32
 
31
33
  # @return [Addressable::URI]
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Absolutely
2
- VERSION = '5.1.0'.freeze
4
+ VERSION = '6.0.0'
3
5
  end
data/lib/absolutely.rb CHANGED
@@ -1,37 +1,40 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'addressable/uri'
2
4
 
3
- require 'absolutely/version'
4
- require 'absolutely/exceptions'
5
+ require_relative 'absolutely/version'
5
6
 
6
- require 'absolutely/uri'
7
+ require_relative 'absolutely/uri'
7
8
 
8
9
  module Absolutely
9
- class << self
10
- # Convert a relative path to an absolute URI.
11
- #
12
- # @param base [String] an absolute URI used to resolve relative path
13
- # @param relative [String] a relative path
14
- # @return [String]
15
- #
16
- # @example
17
- # Absolutely.to_abs(base: 'https://example.com', relative: '/foo')
18
- # #=> "https://example.com/foo"
19
- def to_abs(base:, relative:)
20
- uri(base: base, relative: relative).to_abs
21
- end
10
+ class Error < StandardError; end
11
+ class ArgumentError < Error; end
12
+ class InvalidURIError < Error; end
13
+
14
+ # Convert a relative path to an absolute URI.
15
+ #
16
+ # @param base [String] an absolute URI used to resolve relative path
17
+ # @param relative [String] a relative path
18
+ # @return [String]
19
+ #
20
+ # @example
21
+ # Absolutely.to_abs(base: 'https://example.com', relative: '/foo')
22
+ # #=> "https://example.com/foo"
23
+ def self.to_abs(base:, relative:)
24
+ uri(base: base, relative: relative).to_abs
25
+ end
22
26
 
23
- # Create an Absolutely::URI from a base URI and a relative path.
24
- #
25
- # @param base [String] an absolute URI used to resolve relative path
26
- # @param relative [String] a relative path
27
- # @return [Absolutely::URI]
28
- #
29
- # @example
30
- # uri = Absolutely.uri(base: 'https://example.com', relative: '/foo')
31
- # puts uri.to_abs
32
- # #=> "https://example.com/foo"
33
- def uri(base:, relative:)
34
- URI.new(base: base, relative: relative)
35
- end
27
+ # Create an Absolutely::URI from a base URI and a relative path.
28
+ #
29
+ # @param base [String] an absolute URI used to resolve relative path
30
+ # @param relative [String] a relative path
31
+ # @return [Absolutely::URI]
32
+ #
33
+ # @example
34
+ # uri = Absolutely.uri(base: 'https://example.com', relative: '/foo')
35
+ # puts uri.to_abs
36
+ # #=> "https://example.com/foo"
37
+ def self.uri(base:, relative:)
38
+ URI.new(base: base, relative: relative)
36
39
  end
37
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: absolutely
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Garber
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-02 00:00:00.000000000 Z
11
+ date: 2022-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.7'
19
+ version: '2.8'
20
20
  type: :runtime
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: '2.7'
26
+ version: '2.8'
27
27
  description: Convert relative paths to absolute URIs.
28
28
  email:
29
29
  - jason@sixtwothree.org
@@ -37,7 +37,6 @@ files:
37
37
  - README.md
38
38
  - absolutely.gemspec
39
39
  - lib/absolutely.rb
40
- - lib/absolutely/exceptions.rb
41
40
  - lib/absolutely/uri.rb
42
41
  - lib/absolutely/version.rb
43
42
  homepage: https://github.com/jgarber623/absolutely
@@ -45,8 +44,9 @@ licenses:
45
44
  - MIT
46
45
  metadata:
47
46
  bug_tracker_uri: https://github.com/jgarber623/absolutely/issues
48
- changelog_uri: https://github.com/jgarber623/absolutely/blob/v5.1.0/CHANGELOG.md
49
- post_install_message:
47
+ changelog_uri: https://github.com/jgarber623/absolutely/blob/v6.0.0/CHANGELOG.md
48
+ rubygems_mfa_required: 'true'
49
+ post_install_message:
50
50
  rdoc_options: []
51
51
  require_paths:
52
52
  - lib
@@ -54,7 +54,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - ">="
56
56
  - !ruby/object:Gem::Version
57
- version: '2.5'
57
+ version: '2.6'
58
58
  - - "<"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '4'
@@ -64,8 +64,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  - !ruby/object:Gem::Version
65
65
  version: '0'
66
66
  requirements: []
67
- rubygems_version: 3.1.2
68
- signing_key:
67
+ rubygems_version: 3.3.12
68
+ signing_key:
69
69
  specification_version: 4
70
70
  summary: Convert relative paths to absolute URIs.
71
71
  test_files: []
@@ -1,7 +0,0 @@
1
- module Absolutely
2
- class AbsolutelyError < StandardError; end
3
-
4
- class ArgumentError < AbsolutelyError; end
5
-
6
- class InvalidURIError < AbsolutelyError; end
7
- end