File tree Expand file tree Collapse file tree 5 files changed +25
-3
lines changed Expand file tree Collapse file tree 5 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -41,3 +41,5 @@ Gemfile.lock
4141
4242# Version checker
4343* .remote
44+
45+ .cursor
Original file line number Diff line number Diff line change @@ -25,13 +25,15 @@ require_relative './ci/readme_paths_checker'
2525require_relative './ci/tests_checker'
2626require_relative './ci/version_checker'
2727require_relative './ci/duplicate_links_checker'
28+ require_relative './ci/stage_checker'
2829task :ci do
2930 [
3031 ::CI ::LinksChecker . new ,
3132 ::CI ::ReadmeDuplicatesChecker . new ,
3233 ::CI ::ReadmePathsChecker . new ,
3334 ::CI ::TestsChecker . new ,
3435 ::CI ::VersionChecker . new ,
35- ::CI ::DuplicateLinksChecker . new
36+ ::CI ::DuplicateLinksChecker . new ,
37+ ::CI ::StageChecker . new
3638 ] . each ( &:process )
3739end
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def run
2020 end
2121
2222 # Use this method in your realization when task completed with error.
23- # @param {String } details
23+ # @param {Proc } details
2424 # @return {Void}
2525 def end_with_error ( details )
2626 details . call
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ require_relative './ci_job'
4+
5+ module CI
6+ # CI job that checks all files are staged for commit.
7+ class StageChecker < ::CI ::CIJob
8+ # Process StageChecker.
9+ # @return {Void}
10+ def process
11+ git_status = `git status --porcelain`
12+
13+ return if git_status . empty?
14+
15+ end_with_error ( -> { puts ( "StageChecker found unstaged changes:\n #{ git_status } " ) } )
16+ end
17+ end
18+ end
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ require 'English'
55::Gem ::Specification . new do |s |
66 s . required_ruby_version = '>= 3.0'
77 s . name = 'leetcode-ruby'
8- s . version = '9.3.4'
8+ s . version = '9.3.4.1 '
99 s . license = 'MIT'
1010 s . files = ::Dir [ 'lib/**/*.rb' ] + %w[ README.md ]
1111 s . executable = 'leetcode-ruby'
You can’t perform that action at this time.
0 commit comments