|
1 |
| -lib = File.expand_path("../lib", __FILE__) |
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +lib = File.expand_path('lib', __dir__) |
2 | 4 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3 |
| -require "jsonapi_errors_handler/version" |
| 5 | +require 'jsonapi_errors_handler/version' |
4 | 6 |
|
5 | 7 | Gem::Specification.new do |spec|
|
6 |
| - spec.name = "jsonapi_errors_handler" |
| 8 | + spec.name = 'jsonapi_errors_handler' |
7 | 9 | spec.version = JsonapiErrorsHandler::VERSION
|
8 |
| - spec.authors = ["Sebastian Wilgosz"] |
9 |
| - spec.email = ["[email protected]"] |
| 10 | + spec.authors = ['Sebastian Wilgosz'] |
| 11 | + spec.email = ['[email protected]'] |
10 | 12 |
|
11 |
| - spec.summary = %q{A JSON API error handler for ruby applications.} |
12 |
| - spec.description = %q{This gem is a convienient wrapper for your application errors. It allows you to map any error to a nicely formatted standard HTTP error response. } |
13 |
| - spec.homepage = "https://github.com/driggl/jsonapi_errors_handler" |
14 |
| - spec.license = "MIT" |
| 13 | + spec.summary = 'A JSON API error handler for ruby applications.' |
| 14 | + spec.description = <<~STRING |
| 15 | + This gem is a convienient wrapper for your application errors. |
| 16 | + It allows you to map any error to a nicely formatted standard HTTP error response. |
| 17 | + STRING |
| 18 | + spec.homepage = 'https://github.com/driggl/jsonapi_errors_handler' |
| 19 | + spec.license = 'MIT' |
15 | 20 |
|
16 | 21 | # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17 | 22 | # to allow pushing to a single host or delete this section to allow pushing to any host.
|
18 | 23 | if spec.respond_to?(:metadata)
|
19 | 24 | # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
20 | 25 |
|
21 |
| - spec.metadata["homepage_uri"] = spec.homepage |
22 |
| - spec.metadata["source_code_uri"] = "https://github.com/driggl/jsonapi_errors_handler" |
| 26 | + spec.metadata['homepage_uri'] = spec.homepage |
| 27 | + spec.metadata['source_code_uri'] = 'https://github.com/driggl/jsonapi_errors_handler' |
23 | 28 | # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
24 | 29 | else
|
25 |
| - raise "RubyGems 2.0 or newer is required to protect against " \ |
26 |
| - "public gem pushes." |
| 30 | + raise 'RubyGems 2.0 or newer is required to protect against ' \ |
| 31 | + 'public gem pushes.' |
27 | 32 | end
|
28 | 33 |
|
29 | 34 | # Specify which files should be added to the gem when it is released.
|
30 | 35 | # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
31 |
| - spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do |
| 36 | + spec.files = Dir.chdir(File.expand_path(__dir__)) do |
32 | 37 | `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
33 | 38 | end
|
34 |
| - spec.bindir = "exe" |
| 39 | + spec.bindir = 'exe' |
35 | 40 | spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
36 |
| - spec.require_paths = ["lib"] |
| 41 | + spec.require_paths = ['lib'] |
37 | 42 |
|
38 |
| - spec.add_development_dependency "bundler", "~> 1.16" |
39 |
| - spec.add_development_dependency "rake", "~> 10.0" |
40 |
| - spec.add_development_dependency "rspec", "~> 3.0" |
| 43 | + spec.add_development_dependency 'bundler', '~> 1.16' |
| 44 | + spec.add_development_dependency 'rake', '~> 10.0' |
| 45 | + spec.add_development_dependency 'rspec', '~> 3.0' |
41 | 46 | end
|
0 commit comments