File tree 5 files changed +25
-3
lines changed
5 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -41,3 +41,5 @@ Gemfile.lock
41
41
42
42
# Version checker
43
43
* .remote
44
+
45
+ .cursor
Original file line number Diff line number Diff line change @@ -25,13 +25,15 @@ require_relative './ci/readme_paths_checker'
25
25
require_relative './ci/tests_checker'
26
26
require_relative './ci/version_checker'
27
27
require_relative './ci/duplicate_links_checker'
28
+ require_relative './ci/stage_checker'
28
29
task :ci do
29
30
[
30
31
::CI ::LinksChecker . new ,
31
32
::CI ::ReadmeDuplicatesChecker . new ,
32
33
::CI ::ReadmePathsChecker . new ,
33
34
::CI ::TestsChecker . new ,
34
35
::CI ::VersionChecker . new ,
35
- ::CI ::DuplicateLinksChecker . new
36
+ ::CI ::DuplicateLinksChecker . new ,
37
+ ::CI ::StageChecker . new
36
38
] . each ( &:process )
37
39
end
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def run
20
20
end
21
21
22
22
# Use this method in your realization when task completed with error.
23
- # @param {String } details
23
+ # @param {Proc } details
24
24
# @return {Void}
25
25
def end_with_error ( details )
26
26
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'
5
5
::Gem ::Specification . new do |s |
6
6
s . required_ruby_version = '>= 3.0'
7
7
s . name = 'leetcode-ruby'
8
- s . version = '9.3.4'
8
+ s . version = '9.3.4.1 '
9
9
s . license = 'MIT'
10
10
s . files = ::Dir [ 'lib/**/*.rb' ] + %w[ README.md ]
11
11
s . executable = 'leetcode-ruby'
You can’t perform that action at this time.
0 commit comments