Skip to content

Commit

Permalink
Modernize gemspec and Gemfile files
Browse files Browse the repository at this point in the history
Include them under rubocop checks. Require MFA.
  • Loading branch information
waiting-for-dev committed Oct 26, 2023
1 parent 7a15d30 commit 357a6ab
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 32 deletions.
2 changes: 0 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ AllCops:
NewCops: enable
SuggestExtensions: false
Exclude:
- "*.gemspec"
- vendor/**/*
- Gemfile

Metrics/BlockLength:
Exclude:
Expand Down
11 changes: 11 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
gemspec

group :development do
gem 'dry-schema', '~> 1.0'
gem 'dry-transformer', '~> 0.1'
gem 'pry-byebug'
gem 'rack-flash3', '~> 1.0'
gem 'rack-test', '~> 1.1'
gem 'rake', '~> 12.3', '>= 12.3.3'
gem 'redcarpet', '~> 3.4'
gem 'rspec', '~> 3.0'
gem 'rubocop', '~> 1.8'
gem 'rubocop-rspec', '~> 2.1'
gem 'yard', '~> 0.9', '>= 0.9.20'
# TODO: Move to gemspec when hanami-view 2.0 is available
gem 'hanami-view', github: 'hanami/view', tag: 'v2.1.0.beta2'
end
Expand Down
41 changes: 11 additions & 30 deletions web_pipe.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,29 @@ Gem::Specification.new do |spec|
spec.version = WebPipe::VERSION
spec.authors = ['Marc Busqué']
spec.email = ['[email protected]']

spec.summary = 'Rack application builder through a pipe of operations on an immutable struct.'
spec.homepage = 'https://github.com/waiting-for-dev/web_pipe'
spec.summary = 'Rack application builder through a pipe of operations on an immutable struct.'
spec.licenses = ['MIT']

# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
# to allow pushing to a single host or delete this section to allow pushing to any host.
if spec.respond_to?(:metadata)
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
spec.metadata = {
'bug_tracker_uri' => 'https://github.com/waiting-for-dev/web_pipe/issues',
'changelog_uri' => 'https://github.com/waiting-for-dev/web_pipe/blob/main/CHANGELOG.md',
'documentation_uri' => 'https://github.com/waiting-for-dev/web_pipe/blob/main/README.md',
'funding_uri' => 'https://github.com/sponsors/waiting-for-dev',
'label' => 'web_pipe',
'source_code_uri' => 'https://github.com/waiting-for-dev/web_pipe',
'rubygems_mfa_required' => 'true'
}

spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = spec.homepage
spec.metadata['changelog_uri'] = spec.homepage + '/CHANGELOG.md'
else
raise 'RubyGems 2.0 or newer is required to protect against ' \
'public gem pushes.'
end
spec.required_ruby_version = '>= 3.0'

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_runtime_dependency 'dry-monads', '~> 1.3'
spec.add_runtime_dependency 'dry-struct', '~> 1.0'
spec.add_runtime_dependency 'dry-types', '~> 1.1'
spec.add_runtime_dependency 'rack', '~> 2.0'

spec.add_development_dependency 'bundler'
spec.add_development_dependency 'dry-schema', '~> 1.0'
spec.add_development_dependency 'dry-transformer', '~> 0.1'
spec.add_development_dependency 'pry-byebug'
spec.add_development_dependency 'rack-flash3', '~> 1.0'
spec.add_development_dependency 'rack-test', '~> 1.1'
spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
spec.add_development_dependency 'redcarpet', '~> 3.4'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'yard', '~> 0.9', '>= 0.9.20'
spec.add_development_dependency 'rubocop', '~> 1.8'
spec.add_development_dependency 'rubocop-rspec', '~> 2.1'
end

0 comments on commit 357a6ab

Please sign in to comment.