pbmenv 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/CHANGELOG.md +4 -1
- data/Dockerfile +1 -1
- data/Gemfile.lock +1 -1
- data/lib/pbmenv/services/create_version_service.rb +6 -6
- data/lib/pbmenv/services/destroy_version_service.rb +1 -1
- data/lib/pbmenv/services/download_src_service.rb +1 -1
- data/lib/pbmenv/services/use_version_service.rb +1 -1
- data/lib/pbmenv/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07327b53425fcdc6569f0cc2de6725f6486c155fc7dad8620651815981036289
|
4
|
+
data.tar.gz: 03c119a0cd846d2a5014ff9888b506c2e2a96d698dd2dd7b2f60d003547443b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 250a607a5dfe95f4268b08aa82a9ae22476b8c46491ab512a2bed6a05701b59b110797ca12b1769dd9bbd42e91408ec5323731bf3a11eb281b6c834545259f60
|
7
|
+
data.tar.gz: 18b2dddb83005547baeadf03a3ff736aca95b675ac5dbff6c7945f72f5224cc54ea8cafaa698dc2f874373c6ce996af45e8446d0e5ea31f1640164fb1f705076
|
data/.github/workflows/ruby.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Dockerfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -15,7 +15,7 @@ module Pbmenv
|
|
15
15
|
|
16
16
|
def execute!
|
17
17
|
pathname = VersionPathname.new(version)
|
18
|
-
if File.
|
18
|
+
if File.exist?(pathname.version_path)
|
19
19
|
raise AlreadyCreatedError
|
20
20
|
end
|
21
21
|
|
@@ -33,7 +33,7 @@ module Pbmenv
|
|
33
33
|
Helper.system_and_puts "rm -rf #{pathname.version_path}"
|
34
34
|
raise
|
35
35
|
ensure
|
36
|
-
if Dir.
|
36
|
+
if Dir.exist?(pathname.src_pbm_path)
|
37
37
|
Helper.system_and_puts "rm -rf #{pathname.src_pbm_path}"
|
38
38
|
end
|
39
39
|
end
|
@@ -53,7 +53,7 @@ module Pbmenv
|
|
53
53
|
Helper.system_and_puts "mkdir -p #{pathname.version_path}"
|
54
54
|
Helper.system_and_puts "cp -r #{pathname.src_project_template_systemd_units} #{pathname.version_path}/"
|
55
55
|
|
56
|
-
if File.
|
56
|
+
if File.exist?(pathname.src_pbm_project_template_app_rb_erb_path)
|
57
57
|
pathname.project_template_file_paths(include_app_erb: true).each do |project_template_file_path|
|
58
58
|
Helper.system_and_puts "cp #{project_template_file_path} #{pathname.version_path}/"
|
59
59
|
end
|
@@ -80,7 +80,7 @@ module Pbmenv
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def create_if_miss_shared_dir
|
83
|
-
return if File.
|
83
|
+
return if File.exist?(VersionPathname.shared)
|
84
84
|
|
85
85
|
Helper.system_and_puts <<~SHELL
|
86
86
|
mkdir -p #{VersionPathname.shared}
|
@@ -89,7 +89,7 @@ module Pbmenv
|
|
89
89
|
|
90
90
|
def create_if_miss_device_id_file
|
91
91
|
device_id_path_in_shared = VersionPathname.device_id_path_in_shared
|
92
|
-
return if File.
|
92
|
+
return if File.exist?(device_id_path_in_shared)
|
93
93
|
|
94
94
|
File.write(device_id_path_in_shared, "d_#{SecureRandom.uuid}")
|
95
95
|
end
|
@@ -103,7 +103,7 @@ module Pbmenv
|
|
103
103
|
|
104
104
|
def create_if_miss_current_dir(version: )
|
105
105
|
# 初回だけinstall時にcurrentを作成する
|
106
|
-
if !File.
|
106
|
+
if !File.exist?(VersionPathname.current) || use_option
|
107
107
|
UseVersionService.new(version: version).execute!
|
108
108
|
end
|
109
109
|
end
|
@@ -13,7 +13,7 @@ module Pbmenv
|
|
13
13
|
def execute!
|
14
14
|
version_pathname = VersionPathname.new(version)
|
15
15
|
|
16
|
-
unless File.
|
16
|
+
unless File.exist?(version_pathname.version_path)
|
17
17
|
raise VersionNotFoundError
|
18
18
|
end
|
19
19
|
Helper.system_and_puts "rm -rf #{version_pathname.version_path}"
|
@@ -23,7 +23,7 @@ module Pbmenv
|
|
23
23
|
end
|
24
24
|
|
25
25
|
if Helper.system_and_puts(shell)
|
26
|
-
unless File.
|
26
|
+
unless File.exist?(pathname.src_pbm_project_template_path)
|
27
27
|
raise NotSupportVersionError, "This version is not support by pbmenv"
|
28
28
|
end
|
29
29
|
else
|
@@ -20,7 +20,7 @@ module Pbmenv
|
|
20
20
|
def throw_error_if_has_not_version
|
21
21
|
version_pathname = VersionPathname.new(version)
|
22
22
|
|
23
|
-
if !File.
|
23
|
+
if !File.exist?(version_pathname.version_path_without_v) && !File.exist?(version_pathname.version_path)
|
24
24
|
raise UseVersionService::VersionNotFoundError
|
25
25
|
end
|
26
26
|
end
|
data/lib/pbmenv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pbmenv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jiikko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A package manager of PBM
|
14
14
|
email:
|