mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-03-25 08:55:47 +00:00
* Add rubocop with a todo list * Run rubocop as part of the CI workflow * Autofix for RuboCop: Layout/ElseAlignment * Regen autogen, removing all claude-scratchpad/* * Autofix RuboCop Layout/EmptyLine * AutoFix RuboCop Style/ZeroLengthPredicate * AutoFix RuboCop Layout/EmptyLinesAroundAccessModifier * AutoFix RuboCop Layout/EmptyLinesAroundMethodBody * AutoFix RuboCop Layout/EmptyLinesAroundBlockBody * AutoFix RuboCop Layout/EmptyLinesAroundClassBody * AutoFix RuboCop Layout/EndAlignment * AutoFix RuboCop Layout/ExtraSpacing * AutoFix RuboCop Layout/FirstHashElementIndentation * AutoFix RuboCop Layout/HashAlignment * AutoFix RuboCop Layout/IndentationWidth * Regenerate todo * AutoFix RuboCop Layout/SpaceBeforeBlockBraces * AutoFix RuboCop Layout/SpaceBeforeComma * AutoFix RuboCop Layout/SpaceInsideBlockBraces * AutoFix RuboCop Layout/SpaceInsideHashLiteralBraces * AutoFix RuboCop Layout/TrailingEmptyLines * Update ci.yml Co-authored-by: Pieter Oliver <68863060+pieterocp@users.noreply.github.com> * WIP: Remove claude-scratchpad cruft from rubocop todo * Specify files explicity in rubocop rake task * Pin rubocop version to 1.77.0 * AutoFix RuboCop Style/TrailingCommaInHashLiteral * AutoFix RuboCop Style/StringLiteralsInInterpolation * AutoFix RuboCop Style/StringLiterals * AutoFix RuboCop Style/RescueStandardError * AutoFix RuboCop Style/RedundantPercentQ * AutoFix RuboCop Style/RedundantConstantBase * AutoFix RuboCop Style/QuotedSymbols * AutoFix RuboCop Style/PercentLiteralDelimiters * AutoFix RuboCop Style/ParallelAssignment * AutoFix RuboCop Style/MultilineIfModifier * AutoFix RuboCop Style/Lambda * AutoFix RuboCop Style/IfUnlessModifier * AutoFix RuboCop Style/HashSyntax * AutoFix RuboCop Style/GuardClause * AutoFix RuboCop Style/ExpandPathArguments * AutoFix RuboCop Style/BlockDelimiters * AutoFix RuboCop Style/BlockComments * AutoFix RuboCop Lint/UnusedMethodArgument * AutoFix RuboCop Lint/SymbolConversion * Fix auto-gen formatting + RuboCop AutoFix Style/ModuleFunction * Code style --------- Co-authored-by: Pieter Oliver <pieter.oliver@nourishcare.com> Co-authored-by: Pieter Oliver <68863060+pieterocp@users.noreply.github.com>
43 lines
1.4 KiB
Ruby
43 lines
1.4 KiB
Ruby
require 'bundler/gem_tasks'
|
|
require 'rspec/core/rake_task'
|
|
require 'rubocop/rake_task'
|
|
|
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
|
spec.rspec_opts = ['-fd -c']
|
|
spec.pattern = FileList['spec/**/*_spec.rb']
|
|
end
|
|
|
|
RuboCop::RakeTask.new(:rubocop) do |t|
|
|
t.patterns = ['lib/**/*.rb', 'spec/**/*.rb', 'Rakefile', 'Gemfile', 'grape_logging.gemspec']
|
|
end
|
|
|
|
task default: %i[spec rubocop]
|
|
|
|
desc 'Release gem and create GitHub release'
|
|
task github_release: :release do
|
|
require 'grape_logging/version'
|
|
|
|
version = "v#{GrapeLogging::VERSION}"
|
|
|
|
# Check if gh CLI is available
|
|
unless system('which gh > /dev/null 2>&1')
|
|
puts "\n⚠️ GitHub CLI (gh) not found"
|
|
puts 'To create a GitHub release with auto-generated changelog, install gh:'
|
|
puts ' brew install gh # macOS with Homebrew'
|
|
puts ' # or visit: https://github.com/cli/cli#installation'
|
|
puts "\nYou can manually create the release with:"
|
|
puts " gh release create v#{GrapeLogging::VERSION} --generate-notes"
|
|
next
|
|
end
|
|
|
|
# Create GitHub release
|
|
puts "\nCreating GitHub release #{version}..."
|
|
|
|
if system('gh', 'release', 'create', version, '--generate-notes', '--verify-tag')
|
|
puts "✅ GitHub release #{version} created successfully"
|
|
else
|
|
puts '❌ Failed to create GitHub release'
|
|
puts 'You can manually create it with:'
|
|
puts " gh release create '#{version}' --generate-notes --verify-tag"
|
|
end
|
|
end
|