Skip to content

Commit

Permalink
Update ruby gems and bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gangelo committed Sep 8, 2024
1 parent 10b7070 commit 5a96404
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 270 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file.

## [3.0.4] - 2024-09-08

### Changes
[x] Update ruby gems.

### Bug Fixes
[x] Fix bug that fails to install dsu for first time users.

## [3.0.3] - 2024-08-03

### Changes
Expand Down
43 changes: 20 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
dsu (3.0.3)
dsu (3.0.4)
activemodel (>= 7.0.8, < 8.0)
activesupport (>= 7.0.8, < 8.0)
colorize (>= 1.1, < 2.0)
Expand All @@ -13,9 +13,9 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activemodel (7.1.3.4)
activesupport (= 7.1.3.4)
activesupport (7.1.3.4)
activemodel (7.1.4)
activesupport (= 7.1.4)
activesupport (7.1.4)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
Expand All @@ -31,7 +31,7 @@ GEM
byebug (11.1.3)
coderay (1.1.3)
colorize (1.1.0)
concurrent-ruby (1.3.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
diff-lcs (1.5.1)
docile (1.4.1)
Expand Down Expand Up @@ -64,19 +64,19 @@ GEM
dry-inflector (~> 1.0)
dry-logic (~> 1.4)
zeitwerk (~> 2.6)
factory_bot (6.4.6)
factory_bot (6.5.0)
activesupport (>= 5.0.0)
ffaker (2.23.0)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
method_source (1.1.0)
minitest (5.24.1)
minitest (5.25.1)
mutex_m (0.2.0)
os (1.1.4)
parallel (1.25.1)
parser (3.3.4.0)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pry (0.14.2)
Expand All @@ -94,33 +94,31 @@ GEM
rainbow (>= 2.0, < 4.0)
rexml (~> 3.1)
regexp_parser (2.9.2)
rexml (3.3.4)
strscan
rexml (3.3.7)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.65.1)
rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
Expand All @@ -129,24 +127,23 @@ GEM
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (3.0.3)
rubocop-rspec (3.0.5)
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-html (0.13.0)
simplecov_json_formatter (0.1.4)
strscan (3.1.0)
thor (1.3.1)
thor (1.3.2)
thor_nested_subcommand (1.0.9)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2024.1)
tzinfo-data (1.2024.2)
tzinfo (>= 1.0.0)
unicode-display_width (2.5.0)
zeitwerk (2.6.17)
zeitwerk (2.6.18)

PLATFORMS
arm64-darwin-22
Expand Down
13 changes: 11 additions & 2 deletions lib/dsu/migration/base_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,17 @@ def create_backup

return puts "\tSkipping: backup already exists." if backup_exist?

FileUtils.cp_r(dsu_folder, backup_folder)
FileUtils.cp(config_path, backup_folder)
if Dir.exist?(dsu_folder)
FileUtils.cp_r(dsu_folder, backup_folder)
else
puts "\tSkipping: dsu folder \"#{dsu_folder}\" does not exists."
end

if File.exist?(config_path)
FileUtils.cp(config_path, backup_folder)
else
puts "\tSkipping: config path \"#{config_path}\" does not exists."
end
end

def backup_exist?
Expand Down
7 changes: 6 additions & 1 deletion lib/dsu/migration/v20240210161248/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ def update_entry_groups
puts "\tCopying entries to default project \"#{default_project_name}\"..."

entries_folder_to = File.join(dsu_folder, 'projects', default_project_name, 'entries')
FileUtils.cp_r(File.join(entries_folder_from, '.'), entries_folder_to)
if Dir.exist?(entries_folder_from)
FileUtils.cp_r(File.join(entries_folder_from, '.'), entries_folder_to)
else
puts "\tSkipping: entries folder \"#{entries_folder_from}\" does not exists."
FileUtils.mkdir_p(entries_folder_to)
end

puts "\tUpdating entry group version..."

Expand Down
2 changes: 1 addition & 1 deletion lib/dsu/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

module Dsu
VERSION_REGEX = /\A\d+\.\d+\.\d+(\.(alpha|beta|rc)\.\d+)?\z/
VERSION = '3.0.3'
VERSION = '3.0.4'
end
Loading

0 comments on commit 5a96404

Please sign in to comment.