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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7c97a6f83461fbf9ae3f14ae28af40dc6385b4237224b57fa5450eabdc60a97
4
- data.tar.gz: dcd8fc9c3ec0b2c59786ed36fdbc16b3dea55613138725e4e5607a411a366a62
3
+ metadata.gz: 9f16f86035665614b32d4fa91b9f87095c567bf62c4905bf08281f9dc06f9b00
4
+ data.tar.gz: affcb6d3a59693727e4354cea0d52ff7813332ddd006d1370ab15c8253cfebca
5
5
  SHA512:
6
- metadata.gz: 7eb3f3a83b2c3ea000bc12794c621e147303b27d453d226e974472ecffce60c3de979baade6073d199ca046aba09c8b649820e65033ef9b0d716a7ea4b8bd3a9
7
- data.tar.gz: debf9c03a3c36d34ccd3d364bc4401c10a7b90ec77104d09aa574e75cfb45fc70bf48a4ee50c9f8ae54ce7974e4568cf22f4c0250977e8969d07f6baab1c8c42
6
+ metadata.gz: 43f2451ce53d29070180c5889fdfce3f31c542db7508c0a50d7f4e195deab3a58b14f6bb9b08fca8e6b7e739ff453849561deaded3b543b6b78ae83692a0f397
7
+ data.tar.gz: 14411e64c9ca529968c2333b90db9f306a119af0049e3e96ec3c7aee45a25633e57b37c1fd0a4bc3673dbf643f0655bfd62b81025518e010e997150adecb9a2d
data/.editorconfig CHANGED
@@ -1,4 +1,4 @@
1
- # EditorConfig is awesome: http://EditorConfig.org
1
+ # EditorConfig is awesome: https://EditorConfig.org
2
2
  root = true
3
3
 
4
4
  [*]
data/.reek.yml ADDED
@@ -0,0 +1,6 @@
1
+ detectors:
2
+ IrresponsibleModule:
3
+ enabled: false
4
+
5
+ exclude_paths:
6
+ - vendor/
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.5
1
+ 2.4.6
data/.travis.yml CHANGED
@@ -1,19 +1,17 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.4.5
4
- - 2.5.3
5
- - 2.6.0
3
+ - 2.4.6
4
+ - 2.5.5
5
+ - 2.6.2
6
6
  cache:
7
7
  - bundler
8
8
  before_install:
9
- - gem install bundler -v '~> 1.17'
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.5 and is additionally tested against Ruby 2.5.3 and 2.6.0 using [Travis CI](https://travis-ci.com/jgarber623/absolutely).
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.5. 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.5 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.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
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2018 Jason Garber
3
+ Copyright (c) 2018–present Jason Garber
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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.5 and is additionally tested against Ruby 2.5.3 and 2.6.0 using [Travis CI](https://travis-ci.com/jgarber623/absolutely).
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.62.0'
27
- spec.add_development_dependency 'rubocop-rspec', '~> 1.31'
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.5'
32
+ spec.add_runtime_dependency 'addressable', '~> 2.6'
32
33
  end
data/lib/absolutely.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  require 'addressable/uri'
2
2
 
3
3
  require 'absolutely/version'
4
- require 'absolutely/error'
4
+ require 'absolutely/exceptions'
5
+
5
6
  require 'absolutely/uri'
6
7
 
7
8
  module Absolutely
File without changes
@@ -1,6 +1,6 @@
1
1
  module Absolutely
2
2
  class URI
3
- attr_accessor :base, :relative
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
- raise ArgumentError, 'base must be an absolute URI (e.g. https://example.com)' unless base_uri.absolute?
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
@@ -1,3 +1,3 @@
1
1
  module Absolutely
2
- VERSION = '1.1.2'.freeze
2
+ VERSION = '2.0.0'.freeze
3
3
  end
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: 1.1.2
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-01-03 00:00:00.000000000 Z
11
+ date: 2019-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.17'
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: '1.17'
26
+ version: '12.3'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: reek
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '12.3'
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: '12.3'
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.62.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: 0.62.0
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.31'
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.31'
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.5'
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.5'
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/error.rb
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.2
188
+ rubygems_version: 3.0.3
174
189
  signing_key:
175
190
  specification_version: 4
176
191
  summary: Convert relative paths to absolute URIs.