diff --git a/.rubocop.yml b/.rubocop.yml index 4d3a542..468b629 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -3,6 +3,7 @@ require: AllCops: NewCops: enable + TargetRubyVersion: 2.6 ThreadSafety: Enabled: true diff --git a/Rakefile b/Rakefile index d7f0019..b6c4735 100644 --- a/Rakefile +++ b/Rakefile @@ -22,28 +22,11 @@ require File.join(File.dirname(__FILE__), 'config', 'environment.rb') require 'rake/clean' require 'rake/testtask' -require 'rubygems' -require 'rubygems/package_task' require 'bundler' +require "bundler/gem_tasks" task :default => ['test:all'] -gemspec = Gem::Specification.new do |s| - s.author = "Thomas Fuchs" - s.email = "thomas@slash7.com" - s.extra_rdoc_files = ["README.md"] - s.files = FileList["Rakefile", "{config,lib,test}/**/*"] - s.name = 'urlcrypt' - s.require_paths << 'lib' - s.requirements << 'none' - s.summary = "Securely encode and decode short pieces of arbitrary binary data in URLs." - s.version = "0.2.0" -end - -Gem::PackageTask.new(gemspec) do |pkg| - pkg.need_tar = true -end - namespace :test do Rake::TestTask.new :all do |t| t.libs << 'test' diff --git a/urlcrypt.gemspec b/urlcrypt.gemspec new file mode 100644 index 0000000..8a9cb58 --- /dev/null +++ b/urlcrypt.gemspec @@ -0,0 +1,26 @@ +Gem::Specification.new do |spec| + spec.name = 'urlcrypt' + spec.version = "0.2.0" + spec.authors = ["Thomas Fuchs"] + spec.email = ["thomas@slash7.com"] + spec.extra_rdoc_files = ["README.md"] + + spec.summary = "Securely encode and decode short pieces of arbitrary binary data in URLs." + spec.description = "Securely encode and decode short pieces of arbitrary binary data in URLs." + spec.homepage = "https://github.com/cheerful/URLcrypt" + spec.license = "MIT" + spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0") + + spec.metadata["homepage_uri"] = spec.homepage + spec.metadata["source_code_uri"] = "https://github.com/cheerful/URLcrypt" + + # 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 = FileList["Rakefile", "{config,lib,test}/**/*"] + spec.bindir = "exe" + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ["lib"] + spec.requirements << 'none' + + spec.metadata['rubygems_mfa_required'] = 'true' +end