Skip to content

Commit c74df9e

Browse files
author
ZhgChgLiBot
committed
chore: upgrade ruby version & fix exists to exist
1 parent 04418d1 commit c74df9e

File tree

12 files changed

+26
-21
lines changed

12 files changed

+26
-21
lines changed

.github/workflows/reviewbot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v3
1313
- uses: ruby/setup-ruby@v1
1414
with:
15-
ruby-version: 2.6.5
15+
ruby-version: 3.4.2
1616
- run: bundle install
1717
shell: bash
1818
- run: bundle exec bin/ZReviewTender -r

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.4.2

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.8
1+
1.4.0

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
FROM ruby:2.7.5
2+
FROM ruby:3.4.2
33
ARG CRON_SETTING="*/30 * * * *"
44
ARG ZREVIEWTENDER_COMMAND="-r"
55
ENV ZREVIEWTENDER_COMMAND ${ZREVIEWTENDER_COMMAND}

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
source 'https://rubygems.org'
22
gem 'net-http', '~> 0.1.0'
3-
gem 'jwt', '~> 2.4.1'
3+
gem 'jwt', '~> 2.10.0'
4+
gem "uri", ">= 0.12.4"

Gemfile.lock

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
jwt (2.4.1)
4+
base64 (0.2.0)
5+
jwt (2.10.1)
6+
base64
57
net-http (0.1.1)
68
net-protocol
79
uri
810
net-protocol (0.1.3)
911
timeout
1012
timeout (0.3.0)
11-
uri (0.12.2)
13+
uri (1.0.3)
1214

1315
PLATFORMS
1416
ruby
1517
x86_64-darwin-21
1618
x86_64-linux
1719

1820
DEPENDENCIES
19-
jwt (~> 2.4.1)
21+
jwt (~> 2.10.0)
2022
net-http (~> 0.1.0)
23+
uri (>= 0.12.4)
2124

2225
BUNDLED WITH
2326
2.3.13

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ ZReviewTender will take approximately 30 seconds per run; with a default schedul
8686

8787
## Using Gem
8888
### If you are familiar with Ruby:
89-
1. Ensure Ruby is installed in your environment (I use `2.6.5p114`).
89+
1. Ensure Ruby is installed in your environment (I use `3.4.2`).
9090
2. Ensure Bundler is installed in your environment (I use `2.3.13`).
9191
3. Type `gem install ZReviewTender` in the terminal.
9292

ZReviewTender.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
versionFilePath = ".version"
22
version = '1.1.2'
3-
if File.exists?(versionFilePath)
3+
if File.exist?(versionFilePath)
44
version = File.read(versionFilePath)
55
end
66

@@ -22,5 +22,5 @@ Gem::Specification.new do |gem|
2222
gem.license = "MIT"
2323

2424
gem.add_dependency 'net-http', '~> 0.1.0'
25-
gem.add_dependency 'jwt', '~> 2.4.1'
25+
gem.add_dependency 'jwt', '~> 2.10.0'
2626
end

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ runs:
1515
- uses: actions/checkout@v3
1616
- uses: ruby/setup-ruby@v1
1717
with:
18-
ruby-version: 2.6.5
18+
ruby-version: 3.4.2
1919
- run: gem install ZReviewTender
2020
shell: bash
2121
- run: ZReviewTender ${{ inputs.command }}

bin/ZReviewTender

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,21 @@ class Main
9191
appleDestExampleYML = "#{basePath}/#{defaultConfigDirName}/#{defaultAppleConfigFileName}"
9292
androidDestExampleYML = "#{basePath}/#{defaultConfigDirName}/#{defaultAndroidConfigFileName}"
9393

94-
if !File.exists?("#{basePath}/latestCheckTimestamp/.keep")
94+
if !File.exist?("#{basePath}/latestCheckTimestamp/.keep")
9595
File.open("#{basePath}/latestCheckTimestamp/.keep", 'w') { |file| file.write("") }
9696
end
9797
#
98-
if File.exists?(appleSourceExampleYML)
99-
if File.exists?(appleDestExampleYML)
98+
if File.exist?(appleSourceExampleYML)
99+
if File.exist?(appleDestExampleYML)
100100
puts "Failed! Config YML File Exists: #{appleDestExampleYML}"
101101
else
102102
FileUtils.cp(appleSourceExampleYML, appleDestExampleYML)
103103
puts "Init Apple Config YML File at:#{appleDestExampleYML} Success!"
104104
end
105105
end
106106
#
107-
if File.exists?(androidSourceExampleYML)
108-
if File.exists?(androidDestExampleYML)
107+
if File.exist?(androidSourceExampleYML)
108+
if File.exist?(androidDestExampleYML)
109109
puts "Failed! Config YML File Exists: #{androidDestExampleYML}"
110110
else
111111
FileUtils.cp(androidSourceExampleYML, androidDestExampleYML)
@@ -129,7 +129,7 @@ class Main
129129
opts.on('-d', '--delete', 'delete latest check timestamp log file.(factory reset)') do
130130
FileUtils.rm_rf("#{basePath}/latestCheckTimestamp/")
131131
Helper.createDirIfNotExist("#{basePath}/latestCheckTimestamp/")
132-
if !File.exists?("#{basePath}/latestCheckTimestamp/.keep")
132+
if !File.exist?("#{basePath}/latestCheckTimestamp/.keep")
133133
File.open("#{basePath}/latestCheckTimestamp/.keep", 'w') { |file| file.write("") }
134134
end
135135

@@ -160,7 +160,7 @@ class Main
160160

161161
private
162162
def configFileCheck(path, command)
163-
if !File.exists? path
163+
if !File.exist? path
164164
puts "Make sure you have vaild config file at #{path}"
165165
puts "Or use ZReviewTender #{command} specify config.yml file path"
166166
raise "Config file not found: #{path}"

0 commit comments

Comments
 (0)