indieweb-endpoints 5.0.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: f89e56b8a2f2bac61305a9d0012bdd54f4f2623b539ea19f58e0d81b6af1a966
4
- data.tar.gz: 3f0e860760e5bed119e2be2cbc40dc235a179b53a880f9a2f0a4efada8e6b739
3
+ metadata.gz: d751a18dc854951b0c3b71429959f2fdd0690ee9ba51a1b5cf6b6cc5dcec5143
4
+ data.tar.gz: 5b3dd9ab89de1bf668471c58d4bf8097633125e37b9ccf80d0c94554ae3dbe38
5
5
  SHA512:
6
- metadata.gz: 47f6d68cb1894fee56ee0f23d3caf90c5bd143980a52085dff2a35b37467c0e6a222e2eea926b6cb904437f4b196f75bf5051cf5a47e09bfb262da4b2bc04fdb
7
- data.tar.gz: '0891cbfb3831d7a2b85e9b7b3068c3679a1e9a86938e4237e1ab3f10c6760b6a5f8ff0c92456bb52314802a4c42551c936973e8956fa85a39cdc8543ef7e0420'
6
+ metadata.gz: 8b2dc2195a547c955545ff89d540e40dde34de784490271c6726afd49249f4ebd66bafcdd43bcc3dff30ca9444f306aa4264da7849b19f9401575dbe3dcd49f4
7
+ data.tar.gz: 356ab5dbb4ea2b233ab490323bd80da4e61568654a0c1c209fd6e7932fe7af5ba15792ee209f79ab650f54478e18a9d67357b8204c7dc40a4d2cddf2d04dba8f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.0.0 / 2021-05-25
4
+
5
+ - Refactor parsers (e22e0af)
6
+ - Simplify exception handling (65361ee)
7
+ - Update http dependency to 5.0 (44f2d23)
8
+ - **Breaking change:** Favor Addressable::URI.join over Absolutely (0bc5049)
9
+ - Update development Ruby version to 2.5.9 (3439cce)
10
+
3
11
  ## 5.0.0 / 2020-11-11
4
12
 
5
13
  - Update absolutely and link-header-parser dependencies (064696e)
data/CONTRIBUTING.md CHANGED
@@ -8,9 +8,9 @@ There are a couple ways you can help improve indieweb-endpoints-ruby:
8
8
 
9
9
  ## Getting Started
10
10
 
11
- indieweb-endpoints-ruby is developed using Ruby 2.5.8 and is additionally tested against Ruby 2.6 and 2.7 using [Travis CI](https://travis-ci.com/indieweb/indieweb-endpoints-ruby).
11
+ indieweb-endpoints-ruby is developed using Ruby 2.5.9 and is additionally tested against Ruby 2.6 and 2.7 using [Travis CI](https://travis-ci.com/indieweb/indieweb-endpoints-ruby).
12
12
 
13
- Before making changes to indieweb-endpoints-ruby, 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 indieweb-endpoints-ruby, you'll want to install Ruby 2.5.9. 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.9 using your method of choice, install the project's gems by running:
14
14
 
15
15
  ```sh
16
16
  bundle install
@@ -22,7 +22,7 @@ bundle install
22
22
  1. Install development dependencies as outlined above.
23
23
  1. Create a feature branch for the code changes you're looking to make: `git checkout -b my-new-feature`.
24
24
  1. _Write some code!_
25
- 1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `bundle exec rspec`.
25
+ 1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `bin/ci`.
26
26
  1. Commit your changes: `git commit -am 'Add some new feature or fix some issue'`. _(See [this excellent article](https://chris.beams.io/posts/git-commit/) for tips on writing useful Git commit messages.)_
27
27
  1. Push the branch to your fork: `git push -u origin my-new-feature`.
28
28
  1. Create a new [pull request][pulls] and we'll review your changes.
data/README.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  **A Ruby gem for discovering a URL's [IndieAuth](https://indieweb.org/IndieAuth), [Micropub](https://indieweb.org/Micropub), [Microsub](https://indieweb.org/Microsub), and [Webmention](https://indieweb.org/Webmention) endpoints.**
4
4
 
5
- [![Gem](https://img.shields.io/gem/v/indieweb-endpoints.svg?style=for-the-badge)](https://rubygems.org/gems/indieweb-endpoints)
6
- [![Downloads](https://img.shields.io/gem/dt/indieweb-endpoints.svg?style=for-the-badge)](https://rubygems.org/gems/indieweb-endpoints)
7
- [![Build](https://img.shields.io/travis/com/indieweb/indieweb-endpoints-ruby/main.svg?style=for-the-badge)](https://travis-ci.com/indieweb/indieweb-endpoints-ruby)
8
- [![Maintainability](https://img.shields.io/codeclimate/maintainability/indieweb/indieweb-endpoints-ruby.svg?style=for-the-badge)](https://codeclimate.com/github/indieweb/indieweb-endpoints-ruby)
9
- [![Coverage](https://img.shields.io/codeclimate/c/indieweb/indieweb-endpoints-ruby.svg?style=for-the-badge)](https://codeclimate.com/github/indieweb/indieweb-endpoints-ruby/code)
5
+ [![Gem](https://img.shields.io/gem/v/indieweb-endpoints.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/indieweb-endpoints)
6
+ [![Downloads](https://img.shields.io/gem/dt/indieweb-endpoints.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/indieweb-endpoints)
7
+ [![Build](https://img.shields.io/travis/com/indieweb/indieweb-endpoints-ruby/main.svg?logo=travis&style=for-the-badge)](https://travis-ci.com/indieweb/indieweb-endpoints-ruby)
8
+ [![Maintainability](https://img.shields.io/codeclimate/maintainability/indieweb/indieweb-endpoints-ruby.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/indieweb/indieweb-endpoints-ruby)
9
+ [![Coverage](https://img.shields.io/codeclimate/c/indieweb/indieweb-endpoints-ruby.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/indieweb/indieweb-endpoints-ruby/code)
10
10
 
11
11
  ## Key Features
12
12
 
@@ -18,7 +18,7 @@
18
18
 
19
19
  Before installing and using indieweb-endpoints-ruby, 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).
20
20
 
21
- indieweb-endpoints-ruby is developed using Ruby 2.5.8 and is additionally tested against Ruby 2.6 and 2.7 using [Travis CI](https://travis-ci.com/indieweb/indieweb-endpoints-ruby).
21
+ indieweb-endpoints-ruby is developed using Ruby 2.5.9 and is additionally tested against Ruby 2.6, 2.7, and 3.0 using [Travis CI](https://travis-ci.com/indieweb/indieweb-endpoints-ruby).
22
22
 
23
23
  ## Installation
24
24
 
@@ -70,17 +70,15 @@ client.endpoints
70
70
 
71
71
  ### Exception Handling
72
72
 
73
- There are several exceptions that may be raised by indieweb-endpoints-ruby's underlying dependencies. These errors are raised as subclasses of `IndieWebEndpointsError` (which itself is a subclass of `StandardError`).
73
+ There are several exceptions that may be raised by indieweb-endpoints-ruby's underlying dependencies. These errors are raised as subclasses of `IndieWeb::Endpoints::Error` (which itself is a subclass of `StandardError`).
74
74
 
75
- From [jgarber623/absolutely](https://github.com/jgarber623/absolutely) and [sporkmonger/addressable](https://github.com/sporkmonger/addressable):
75
+ From [sporkmonger/addressable](https://github.com/sporkmonger/addressable):
76
76
 
77
77
  - `IndieWeb::Endpoints::InvalidURIError`
78
78
 
79
79
  From [httprb/http](https://github.com/httprb/http):
80
80
 
81
- - `IndieWeb::Endpoints::ConnectionError`
82
- - `IndieWeb::Endpoints::TimeoutError`
83
- - `IndieWeb::Endpoints::TooManyRedirectsError`
81
+ - `IndieWeb::Endpoints::HttpError`
84
82
 
85
83
  ## Contributing
86
84
 
@@ -13,18 +13,17 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = 'https://github.com/indieweb/indieweb-endpoints-ruby'
14
14
  spec.license = 'MIT'
15
15
 
16
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
17
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin|spec)/}) }
18
- end
16
+ spec.files = Dir['lib/**/*'].reject { |f| File.directory?(f) }
17
+ spec.files += %w[LICENSE CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md README.md]
18
+ spec.files += %w[indieweb-endpoints.gemspec]
19
19
 
20
20
  spec.require_paths = ['lib']
21
21
 
22
22
  spec.metadata['bug_tracker_uri'] = "#{spec.homepage}/issues"
23
23
  spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md"
24
24
 
25
- spec.add_runtime_dependency 'absolutely', '~> 5.0'
26
25
  spec.add_runtime_dependency 'addressable', '~> 2.7'
27
- spec.add_runtime_dependency 'http', '~> 4.4'
28
- spec.add_runtime_dependency 'link-header-parser', '~> 2.1'
29
- spec.add_runtime_dependency 'nokogiri', '~> 1.10'
26
+ spec.add_runtime_dependency 'http', '~> 5.0'
27
+ spec.add_runtime_dependency 'link-header-parser', '~> 3.0'
28
+ spec.add_runtime_dependency 'nokogiri', '~> 1.11'
30
29
  end
@@ -1,4 +1,3 @@
1
- require 'absolutely'
2
1
  require 'addressable/uri'
3
2
  require 'http'
4
3
  require 'link-header-parser'
@@ -12,11 +12,7 @@ module IndieWeb
12
12
  #
13
13
  # @param url [String] an absolute URL
14
14
  def initialize(url)
15
- raise ArgumentError, "url must be a String (given #{url.class})" unless url.is_a?(String)
16
-
17
- @url = url
18
-
19
- raise ArgumentError, "url (#{url}) must be an absolute URL (e.g. https://example.com)" unless uri.absolute? && uri.scheme.match?(/^https?$/)
15
+ @url = url.to_str
20
16
  end
21
17
 
22
18
  # @return [String]
@@ -34,10 +30,8 @@ module IndieWeb
34
30
  # @return [HTTP::Response]
35
31
  def response
36
32
  @response ||= HTTP.follow(max_hops: 20).headers(HTTP_HEADERS_OPTS).timeout(connect: 5, read: 5).get(uri)
37
- rescue HTTP::ConnectionError,
38
- HTTP::TimeoutError,
39
- HTTP::Redirector::TooManyRedirectsError => exception
40
- raise IndieWeb::Endpoints.const_get(exception.class.name.split('::').last), exception
33
+ rescue HTTP::Error => exception
34
+ raise HttpError, exception
41
35
  end
42
36
 
43
37
  private
@@ -1,15 +1,11 @@
1
1
  module IndieWeb
2
2
  module Endpoints
3
- class IndieWebEndpointsError < StandardError; end
3
+ class Error < StandardError; end
4
4
 
5
- class ArgumentError < IndieWebEndpointsError; end
5
+ class ArgumentError < Error; end
6
6
 
7
- class ConnectionError < IndieWebEndpointsError; end
7
+ class HttpError < Error; end
8
8
 
9
- class InvalidURIError < IndieWebEndpointsError; end
10
-
11
- class TimeoutError < IndieWebEndpointsError; end
12
-
13
- class TooManyRedirectsError < IndieWebEndpointsError; end
9
+ class InvalidURIError < Error; end
14
10
  end
15
11
  end
@@ -23,17 +23,29 @@ module IndieWeb
23
23
  attr_reader :response
24
24
 
25
25
  def mapped_results
26
- @mapped_results ||= results_from_http_request.map { |endpoint| Absolutely.to_abs(base: response.uri.to_s, relative: endpoint) }.uniq.sort
27
- rescue Absolutely::InvalidURIError => exception
26
+ @mapped_results ||= results_from_http_request.map { |endpoint| Addressable::URI.join(response.uri, endpoint).to_s }.uniq.sort
27
+ rescue Addressable::URI::InvalidURIError => exception
28
28
  raise InvalidURIError, exception
29
29
  end
30
30
 
31
+ def parsed_response_body
32
+ @parsed_response_body ||= Nokogiri::HTML(response.body.to_s)
33
+ end
34
+
35
+ def parsed_response_headers
36
+ @parsed_response_headers ||= LinkHeaderParser.parse(response.headers.get('link'), base: response.uri)
37
+ end
38
+
31
39
  def results_from_body
32
- @results_from_body ||= Services::ResponseParserService.parse_body(response, self.class.identifier)
40
+ return if response.mime_type != 'text/html'
41
+
42
+ Services::ResponseParserService.parse_body(parsed_response_body, self.class.identifier)
33
43
  end
34
44
 
35
45
  def results_from_headers
36
- @results_from_headers ||= Services::ResponseParserService.parse_headers(response, self.class.identifier)
46
+ return if parsed_response_headers.none?
47
+
48
+ Services::ResponseParserService.parse_headers(parsed_response_headers.group_by_relation_type, self.class.identifier)
37
49
  end
38
50
 
39
51
  def results_from_http_request
@@ -8,7 +8,7 @@ module IndieWeb
8
8
 
9
9
  # @return [Array<String>, nil]
10
10
  def results
11
- return unless mapped_results.any?
11
+ return if mapped_results.none?
12
12
 
13
13
  mapped_results
14
14
  end
@@ -9,7 +9,7 @@ module IndieWeb
9
9
  private
10
10
 
11
11
  def results_for_node(node)
12
- Services::ResponseParserService.parse_body(response, self.class.identifier, node)
12
+ Services::ResponseParserService.parse_body(parsed_response_body, self.class.identifier, node)
13
13
  end
14
14
 
15
15
  # https://www.w3.org/TR/webmention/#sender-discovers-receiver-webmention-endpoint
@@ -2,26 +2,22 @@ module IndieWeb
2
2
  module Endpoints
3
3
  module Services
4
4
  class ResponseParserService
5
- # @param response [HTTP::Response]
5
+ # @param body [Nokogiri::HTML::Document]
6
6
  # @param identifier [Symbol]
7
7
  # @return [Array<String>]
8
- def self.parse_body(response, identifier, node = 'link')
9
- return unless response.mime_type == 'text/html'
10
-
8
+ def self.parse_body(body, identifier, node = 'link')
11
9
  # Reject endpoints that contain a fragment identifier
12
- Nokogiri::HTML(response.body.to_s).css(%(#{node}[rel~="#{identifier}"][href]:not([href*="#"]))).map { |element| element['href'] }
10
+ body.css(%(#{node}[rel~="#{identifier}"][href]:not([href*="#"]))).map { |element| element['href'] }
13
11
  end
14
12
 
15
- # @param response [HTTP::Response]
13
+ # @param headers [Hash{Symbol => Array<LinkHeaderParser::LinkHeader}]
16
14
  # @param identifier [Symbol]
17
15
  # @return [Array<String>, nil]
18
- def self.parse_headers(response, identifier)
19
- headers = LinkHeaderParser.parse(response.headers.get('link'), base: response.uri.to_s).group_by_relation_type[identifier]
20
-
21
- return unless headers
16
+ def self.parse_headers(headers, identifier)
17
+ return unless headers.key?(identifier)
22
18
 
23
19
  # Reject endpoints that contain a fragment identifier
24
- headers.reject { |header| Addressable::URI.parse(header.target_uri).fragment }.map(&:target_uri)
20
+ headers[identifier].reject { |header| Addressable::URI.parse(header.target_uri).fragment }.map(&:target_uri)
25
21
  end
26
22
  end
27
23
  end
@@ -1,5 +1,5 @@
1
1
  module IndieWeb
2
2
  module Endpoints
3
- VERSION = '5.0.0'.freeze
3
+ VERSION = '6.0.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indieweb-endpoints
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 6.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: 2020-11-11 00:00:00.000000000 Z
11
+ date: 2021-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: absolutely
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '5.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '5.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: addressable
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -44,42 +30,42 @@ dependencies:
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: '4.4'
33
+ version: '5.0'
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: '4.4'
40
+ version: '5.0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: link-header-parser
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '2.1'
47
+ version: '3.0'
62
48
  type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: '2.1'
54
+ version: '3.0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: nokogiri
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
59
  - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: '1.10'
61
+ version: '1.11'
76
62
  type: :runtime
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: '1.10'
68
+ version: '1.11'
83
69
  description: Discover a URL’s IndieAuth, Micropub, Microsub, and Webmention endpoints.
84
70
  email:
85
71
  - jason@sixtwothree.org
@@ -87,23 +73,11 @@ executables: []
87
73
  extensions: []
88
74
  extra_rdoc_files: []
89
75
  files:
90
- - ".editorconfig"
91
- - ".github/CODEOWNERS"
92
- - ".gitignore"
93
- - ".reek.yml"
94
- - ".rspec"
95
- - ".rubocop"
96
- - ".rubocop.yml"
97
- - ".ruby-version"
98
- - ".simplecov"
99
- - ".travis.yml"
100
76
  - CHANGELOG.md
101
77
  - CODE_OF_CONDUCT.md
102
78
  - CONTRIBUTING.md
103
- - Gemfile
104
79
  - LICENSE
105
80
  - README.md
106
- - Rakefile
107
81
  - indieweb-endpoints.gemspec
108
82
  - lib/indieweb/endpoints.rb
109
83
  - lib/indieweb/endpoints/client.rb
@@ -123,7 +97,7 @@ licenses:
123
97
  - MIT
124
98
  metadata:
125
99
  bug_tracker_uri: https://github.com/indieweb/indieweb-endpoints-ruby/issues
126
- changelog_uri: https://github.com/indieweb/indieweb-endpoints-ruby/blob/v5.0.0/CHANGELOG.md
100
+ changelog_uri: https://github.com/indieweb/indieweb-endpoints-ruby/blob/v6.0.0/CHANGELOG.md
127
101
  post_install_message:
128
102
  rdoc_options: []
129
103
  require_paths:
@@ -142,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
116
  - !ruby/object:Gem::Version
143
117
  version: '0'
144
118
  requirements: []
145
- rubygems_version: 3.1.2
119
+ rubygems_version: 3.2.16
146
120
  signing_key:
147
121
  specification_version: 4
148
122
  summary: Discover a URL’s IndieAuth, Micropub, Microsub, and Webmention endpoints.
data/.editorconfig DELETED
@@ -1,14 +0,0 @@
1
- # EditorConfig is awesome: https://EditorConfig.org
2
- root = true
3
-
4
- [*]
5
- charset = utf-8
6
- end_of_line = lf
7
- insert_final_newline = true
8
- indent_size = 2
9
- indent_style = space
10
- trim_trailing_whitespace = true
11
-
12
- [*.md]
13
- indent_size = 4
14
- indent_style = tab
data/.github/CODEOWNERS DELETED
@@ -1 +0,0 @@
1
- * jgarber623
data/.gitignore DELETED
@@ -1,34 +0,0 @@
1
- *.gem
2
- *.rbc
3
- /.config
4
- /coverage/
5
- /InstalledFiles
6
- /pkg/
7
- /spec/reports/
8
- /spec/examples.txt
9
- /test/tmp/
10
- /test/version_tmp/
11
- /tmp/
12
-
13
- # Used by dotenv library to load environment variables.
14
- # .env
15
-
16
- # Documentation cache and generated files:
17
- /.yardoc/
18
- /_yardoc/
19
- /doc/
20
- /rdoc/
21
-
22
- # Environment normalization:
23
- /.bundle/
24
- /vendor/bundle
25
- /lib/bundler/man/
26
-
27
- # for a library or gem, you might want to ignore these files since the code is
28
- # intended to run in multiple environments; otherwise, check them in:
29
- Gemfile.lock
30
- # .ruby-version
31
- # .ruby-gemset
32
-
33
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
- .rvmrc
data/.reek.yml DELETED
@@ -1,6 +0,0 @@
1
- detectors:
2
- IrresponsibleModule:
3
- enabled: false
4
-
5
- exclude_paths:
6
- - vendor/
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --order random
2
- --require spec_helper
data/.rubocop DELETED
@@ -1,3 +0,0 @@
1
- --display-style-guide
2
- --extra-details
3
- --parallel
data/.rubocop.yml DELETED
@@ -1,29 +0,0 @@
1
- require:
2
- - rubocop-performance
3
- - rubocop-rspec
4
-
5
- AllCops:
6
- NewCops: enable
7
-
8
- Layout/LineLength:
9
- Enabled: false
10
-
11
- Metrics/BlockLength:
12
- Exclude:
13
- - spec/**/*.rb
14
-
15
- Naming/RescuedExceptionsVariableName:
16
- PreferredName: exception
17
-
18
- RSpec/FilePath:
19
- Exclude:
20
- - spec/lib/indieweb/**/*_spec.rb
21
-
22
- Style/Documentation:
23
- Enabled: false
24
-
25
- Style/FrozenStringLiteralComment:
26
- Enabled: false
27
-
28
- Style/SymbolArray:
29
- Enabled: false
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.5.8
data/.simplecov DELETED
@@ -1,13 +0,0 @@
1
- require 'simplecov-console'
2
-
3
- formatters = [SimpleCov::Formatter::HTMLFormatter]
4
-
5
- # rubocop:disable Style/IfUnlessModifier
6
- if RSpec.configuration.files_to_run.length > 1
7
- formatters << SimpleCov::Formatter::Console
8
- end
9
- # rubocop:enable Style/IfUnlessModifier
10
-
11
- SimpleCov.start do
12
- formatter SimpleCov::Formatter::MultiFormatter.new(formatters)
13
- end
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- dist: bionic
2
- language: ruby
3
- rvm:
4
- - 2.5
5
- - 2.6
6
- - 2.7
7
- cache: bundler
8
- before_script:
9
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
10
- - chmod +x ./cc-test-reporter
11
- - ./cc-test-reporter before-build
12
- after_script:
13
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
14
- notifications:
15
- email: false
data/Gemfile DELETED
@@ -1,15 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in indieweb-endpoints.gemspec
4
- gemspec
5
-
6
- gem 'pry-byebug', '~> 3.9'
7
- gem 'rake', '~> 13.0'
8
- gem 'reek', '~> 6.0'
9
- gem 'rspec', '~> 3.10'
10
- gem 'rubocop', '~> 1.2'
11
- gem 'rubocop-performance', '~> 1.8'
12
- gem 'rubocop-rspec', '~> 2.0'
13
- gem 'simplecov', '~> 0.19.1'
14
- gem 'simplecov-console', '~> 0.8.0'
15
- gem 'webmock', '~> 3.9'
data/Rakefile DELETED
@@ -1,17 +0,0 @@
1
- require 'bundler/gem_tasks'
2
-
3
- require 'reek/rake/task'
4
- require 'rspec/core/rake_task'
5
- require 'rubocop/rake_task'
6
-
7
- Reek::Rake::Task.new do |task|
8
- task.fail_on_error = false
9
- end
10
-
11
- RSpec::Core::RakeTask.new
12
-
13
- RuboCop::RakeTask.new do |task|
14
- task.fail_on_error = false
15
- end
16
-
17
- task default: [:rubocop, :reek, :spec]