From 3c228703a9a4c810aeb49470826a87502a2c9305 Mon Sep 17 00:00:00 2001 From: Wilson Silva Date: Fri, 6 Jan 2023 10:48:59 +0700 Subject: [PATCH] Fix RuboCop violations --- Gemfile | 2 +- Rakefile | 6 +++--- bin/console | 6 +++--- lib/nostr.rb | 2 +- lib/nostr/version.rb | 2 +- nostr.gemspec | 38 +++++++++++++++++++------------------- spec/spec_helper.rb | 4 ++-- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Gemfile b/Gemfile index 2f5359d..9f60737 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ # frozen_string_literal: true -source "https://rubygems.org" +source 'https://rubygems.org' # Specify your gem's dependencies in nostr.gemspec gemspec diff --git a/Rakefile b/Rakefile index cca7175..4964751 100644 --- a/Rakefile +++ b/Rakefile @@ -1,11 +1,11 @@ # frozen_string_literal: true -require "bundler/gem_tasks" -require "rspec/core/rake_task" +require 'bundler/gem_tasks' +require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) -require "rubocop/rake_task" +require 'rubocop/rake_task' RuboCop::RakeTask.new diff --git a/bin/console b/bin/console index d2479d3..21b3f7e 100755 --- a/bin/console +++ b/bin/console @@ -1,8 +1,8 @@ #!/usr/bin/env ruby # frozen_string_literal: true -require "bundler/setup" -require "nostr" +require 'bundler/setup' +require 'nostr' # You can add fixtures and/or initialization code here to make experimenting # with your gem easier. You can also use a different console, if you like. @@ -11,5 +11,5 @@ require "nostr" # require "pry" # Pry.start -require "irb" +require 'irb' IRB.start(__FILE__) diff --git a/lib/nostr.rb b/lib/nostr.rb index 6726d49..d286c20 100644 --- a/lib/nostr.rb +++ b/lib/nostr.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "nostr/version" +require_relative 'nostr/version' # Encapsulates all the gem's logic module Nostr diff --git a/lib/nostr/version.rb b/lib/nostr/version.rb index ef912f1..32cfe8d 100644 --- a/lib/nostr/version.rb +++ b/lib/nostr/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Nostr - VERSION = "0.1.0" + VERSION = '0.1.0' end diff --git a/nostr.gemspec b/nostr.gemspec index 78d9573..1546e5e 100644 --- a/nostr.gemspec +++ b/nostr.gemspec @@ -1,23 +1,23 @@ # frozen_string_literal: true -require_relative "lib/nostr/version" +require_relative 'lib/nostr/version' Gem::Specification.new do |spec| - spec.name = "nostr" + spec.name = 'nostr' spec.version = Nostr::VERSION - spec.authors = ["Wilson Silva"] - spec.email = ["wilson.dsigns@gmail.com"] + spec.authors = ['Wilson Silva'] + spec.email = ['wilson.dsigns@gmail.com'] - spec.summary = "Client and relay implementation of the Nostr protocol." - spec.description = "Client and relay implementation of the Nostr protocol." - spec.homepage = "https://github.com/wilsonsilva/nostr" - spec.license = "MIT" - spec.required_ruby_version = ">= 3.2.0" - spec.metadata["rubygems_mfa_required"] = "true" + spec.summary = 'Client and relay implementation of the Nostr protocol.' + spec.description = 'Client and relay implementation of the Nostr protocol.' + spec.homepage = 'https://github.com/wilsonsilva/nostr' + spec.license = 'MIT' + spec.required_ruby_version = '>= 3.2.0' + spec.metadata['rubygems_mfa_required'] = 'true' - spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = "https://github.com/wilsonsilva/nostr" - spec.metadata["changelog_uri"] = "https://github.com/wilsonsilva/nostr/blob/master/CHANGELOG.md" + spec.metadata['homepage_uri'] = spec.homepage + spec.metadata['source_code_uri'] = 'https://github.com/wilsonsilva/nostr' + spec.metadata['changelog_uri'] = 'https://github.com/wilsonsilva/nostr/blob/master/CHANGELOG.md' # 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. @@ -27,12 +27,12 @@ Gem::Specification.new do |spec| end end - spec.bindir = "exe" + spec.bindir = 'exe' spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } - spec.require_paths = ["lib"] + spec.require_paths = ['lib'] - spec.add_development_dependency "rake", "~> 13.0" - spec.add_development_dependency "rspec", "~> 3.12" - spec.add_development_dependency "rubocop", "~> 1.42" - spec.add_development_dependency "rubocop-rspec", "2.16" + spec.add_development_dependency 'rake', '~> 13.0' + spec.add_development_dependency 'rspec', '~> 3.12' + spec.add_development_dependency 'rubocop', '~> 1.42' + spec.add_development_dependency 'rubocop-rspec', '2.16' end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7e0ded7..07d292f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true -require "nostr" +require 'nostr' RSpec.configure do |config| # Enable flags like --only-failures and --next-failure - config.example_status_persistence_file_path = ".rspec_status" + config.example_status_persistence_file_path = '.rspec_status' # Disable RSpec exposing methods globally on `Module` and `main` config.disable_monkey_patching!